Jump to content
IGNORED

5200 Programming Help


Tempest

Recommended Posts

Well I did get that title thing to work... sort of. It ended up taking lots and lots of time wasting codes and loops to get the result I was looking for. In the end it was way too messy and complicated to stay so I axed it. Maybe I'll try it agian once I get the game done (eye candy goes at the end).

 

I'm trying to figure out what grpahics mode I want to do the main game screen in. For the player 1/player 2 and score stuff at the top of the screen I think it's normally text mode 0. But for the game screen itself (which consists mainly of black and white blocks) I may use mode 7 (4 colors and nice resolution) or something larger (mode 5 or 6). I don't see the need to do mode 8 graphics since my game screen isn't that detailed.

 

This is going to be tough. The display list with 1 graphic mode was hard to understand, when you start mixing modes it's going to be trouble! But I have a nice example in the book I copied form the Atari Archives.

 

I also have to start looking into joystick input. I hope it's similar to the Atari 2600 where you just read a register and took the bits you needed. Of course the 5200 has alot more buttons than the 2600 did.

 

Tempest

 

[ 05-29-2001: Message edited by: Tempest ]

Link to comment
Share on other sites

Ok, I've tried my first display list for my game screen. What I need is:

 

3 lines of Text 0

4 lines of Graphics 3

2 lines of Text 2

12 lines of Graphics 3

1 line of Text 0

 

This all adds up to 192 so I'm safe there. Here is what I did:

 

$70 x 3 ;VBlank

$42 ;Text 0

$00 ;Low Byte

$18 ;High Byte

$02

$02

$48 ;Graphics 3

$78 ;Low Byte

$18 ;High Byte

$08

$08

$08

$47 ;Text 2

$A0 ;Low Byte

$18 ;High Byte

$07

$48 ;Graphics 3

$C8 ;Low Byte

$18 ;High Byte

$08 x 11

$42 ;Text 0

$40 ;Low Byte

$19 ;High Byte

$41

$00

$10

 

Does this look right? I think I'm begining to understand this stuff (I hope)

 

Tempest

Link to comment
Share on other sites

Well I got the top part of my screen working. I have the Player info and score going (score is hard coded in at the moment) but that was easy because it's all text. Now I need to figure out how to do the graphics.

 

How do you change graphic modes mid line? I know it's possible, I just don't know how.

 

Tempest

Link to comment
Share on other sites

What do mean by changing graphic modes mid line? I'm assuming you mean playfield/screen and not scanline.

 

If you place your object within the range of your display list it should be in that graphics mode. Using your display list as an example if you start drawing at $1878 then your graphics should be in mode 3. And if you start drawing at $18A0 then your graphics should be in graphics mode 2.

 

Is this what you were asking?

 

If you mean scanline I don't know how or if anyone has done this. If you have seen the graphic modes change mid scanline then tell me which game or 8-bit application so I can see it too. It would be a cool feature if it is possible.

Link to comment
Share on other sites

I meant mid scanline. I wanted to do something like this:

 

Player 1 XXXX  Computer

000000  XXXX  000000

            XXXX

 

So I have text 0 mode and the X's are really Graphics mode 3 and the Text 0 again. I swear I've seen it done before. Maybe they just made text with Graphics 8 and it seemed like they switched modes.

 

Anyway, now I have to figure out how you actually write graphics. I have the display list, now I need to send it some values. With the text I had a nice Ascii tabel to look the values up on, but with the graphics I'm kind of lost at the moment.

 

Tempest

 

[ 06-01-2001: Message edited by: Tempest ]

Link to comment
Share on other sites

Man, this thread is getting long It took me 10 minutes to pull it up on my ISP...yuck!

 

Anyway, Matt I was thinking about your question on the way home from work. I have plenty of time to do that in Atlanta traffic. It's got to be possible to change graphic modes in the middle of a scanline. I'm thinking you could trick the display list sort of like scrolling games. I've seen games where the scrolling playfield is restricted to a small box and the reset of he display stays stationary. I'm assuming it could be the same trick.

 

I'll see if I can dig up some old documentation or source code on this trick and see if it can help.

Link to comment
Share on other sites

Matt I'm sorry. I was so excited about finding information on changing the graphics mode mid scanline (which I haven't found yet) I actually over looked your graphics road block. You may have an answer by now but in the event you haven't or someone else may need this too here is my explanation of Dan's graphics code in his 52pm.s.

 

If you skip to the draw display graphics section of his code you will come to where he draws the playfield. First he sets a pointer to the screen memory. Next he sets the color of the graphics to be displayed. The trick here is the computer uses the first 2 bytes to determine which color register to use. The bit pairs (from Chapter 1 of "Atari Graphics and Arcade Game Design") are 00 = Background, 01 = Color 1, 10 = Color 2, 11 = Color 3. Since #$FF in binary is %11111111 this tells the computer to place 8 pixels of color 3 at the current screen position. Try changing the first value from #$FF to #$F0 and you will see the bar is now 4 pixels with color 3 and 4 pixels with the background color. Also try changing the #$FF value to #FA and you will see the first line with 4 pixels of color 3 and 4 pixels of color 1.

 

I hope this helps to bring some light to Dan's code.

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