Jump to content
IGNORED

Dumb Newbie Questions


Ze_ro

Recommended Posts

Okay, so I downloaded the Stella programmers guide, and I've been reading through it gradually. I haven't actually tried to program anything yet, as I'm still trying to come to terms with all the capabilities and requirements. That being said, I have a few questions that are probably stupid:

 

1. After looking at how the Atari generates the picture, and how you pretty much have to work around the TIA if you want to do anything at all, I was a little confused by the VSYNC and VBLANK lines. Since you have to do these manually, it seems like all you have to do is switch on VSYNC/VBLANK at the proper times (Immediately after a WSYNC I'd assume)... but what happens if you don't issue these? Will the TV delay the frame until it receives VSYNC? Basically, can I keep doing stuff in overscan even after overscan is done, then give a VSYNC even if it lowers the frame rate... or will this cause the picture to roll or damage the TV or something? Also, I assume you can easily do calculations in VBLANK, as long as you make sure you keep track of how much you're doing so that you know when to shut off VBLANK.

 

2. From my understanding of sprites, you simply jam the proper 8 bits into the register during an HBLANK, and it gets displayed on that line... does this mean sprites can be effectively as tall as you want them to be (entire screen even)? I realize of course that you're still limited in number of sprites, but this is very different than how the C-64 handled sprites (which I have some background in)

 

3. The playfield seems fairly intuitive actually (moreso than I expected). However, I'm a little bothered that I can only affect the left side of the screen... until I realized that dozens of games manage to break this limitation and get non-mirrored and non-repeated screens. This makes perfect sense as I assume you can just fiddle with the playfield register half-way through the scanline (Of course, timing is crucial otherwise you'd get nasty results). Is this how it's done, or is there a simpler way?

 

4. Many of the registers in the 2600 seem to be unusual sizes (2 bits, 20 bits, etc). Are these actually all 8 bit registers that are only partially used, or is the rest of it actually not there? (If I try to plug a value into bit 21 of the playfield register, what happens?)

 

5. The method for reading joystick trigger inputs seems very strange to me as it is written... are they just bit 7 of INPT4 and INPT5? (If so, then the description seems overly complicated to me)

 

6. It surprised me that the joystick ports can be set for input or output! Does anything other than the keyboard controller use the output setting? It seems like some interesting stuff could be done here, though it would require custom hardware.

 

7. The manual explains how to read joysticks, paddles, and keyboard controllers... but what about driving controllers? Is there a seperate document for this, or is it unknown at present? (Since only one game in history has used these things, I'd believe it if no one really knew)

 

Sorry if these questions are stupid, but please remember I'm still new at this. In many ways I'm surprised at how the Atari handles everything, some things are easier than I expected, some things are harder, and some are just... different (paddle reading is bizarre!). Overall, it actually looks fun to program for once I figure everything out (Man, you know you're a nerd when you claim assembly programming is "fun"... especially on >20 year old hardware)

 

--Zero

Link to comment
Share on other sites

OK, I guess you should have a look at Nick Bensema's site and download his "How to draw a Playfield" example. It is very well commented and demonstrates nicely how to get the TIA to display anything and still do some game game calculations. That would already answer a lot of your questions in part one.

 

Also you should join the Stella mailing list, as this is where most of the VCS homebrew programmers hang out. You would probably get much better responses there than here.

 

But now to answering your other questions:

 

On 2: Yes you can make the moving objects as large as the screen. But you can also reposition them during the screen and get one sprite for top part of the screen and another sprite for the bottom part of the screen, that are essentially the same object. Kaboom uses that for the bombs for example.

 

On 3: Yes, that is exactly how it is done. You can change any of the registers at anytime. That way you can change the shape or the colour of an object during the scanline.

 

On 4: All registers are 8 bit wide. But some of them don't evaluate all of the bits. Writing to the unused bits has no affect.

 

On 5: You can read the state of the joystick buttons directly from bit 7 of INPT4 and INPT5. However you can also enable the latching feature for these registers. If this is turned on and someone pushes the button and releases it, then INTP4/5 will report a pushed button as long as you don't disable the latching feature through the VBLANK register. Ususally it is not nessessary to use the latch feature, so you can just ignore this part of the manual.

 

On 6: The only other devices that use the output on the joystick port are the Compumate Keyboard and the KidVid tape drive, AFAIK. But you probably won't be able to use either of them in your homebrew games, so no need to worry about that.

 

On 7: There is no special manual on the driving controller. But this device just uses a quadrature encoder on the pins for left and right. On these pins you will see a signal like 00/01/11/10/00 etc. Depending on which way you turn the dial, it will cycle forward or backward through this list. A full turn of the dial has 16 state changes.

 

 

Ciao, Eckhard Stolberg

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