Jump to content
IGNORED

Controller sensitivity, and the programming of the controller input


NoahsMyBro

Recommended Posts

For a few months I've participated in the 5200 HSC, so I've been playing a lot of 5200 lately. Personally, I prefer playing on the real hardware as opposed to using an emulator, so most of my playing has been done using the stock 5200 controller.

 

Last week we played Berzerk, and starting last night we switched to Beef Drop.

 

The transition made me notice something I hadn't previously. I *think* part of the reason Berzerk is so good is the unsurpassed smoothness of the controller responsiveness. It seems to me that in Berzerk, Pac Man, and maybe Star Raiders, the responsiveness to controller inputs is simply smoother and more graceful than most of the other games on the system.

 

Maybe this is my imagination. I'm not a programmer and don't know the detailed specifics of how the inputs are read, but there seems to be some sort of intangible something that makes the control feel better in those games.

 

Why couldn't/wouldn't programmers simply re-use the controller-read routines already written for those early games when writing new games, rather than doing something different?

 

(MODS - If you think this should be moved to the 5200/8-bit Programming topic feel free to move it. I wasn't sure about that.)

Link to comment
Share on other sites

...Why couldn't/wouldn't programmers simply re-use the controller-read routines already written for those early games when writing new games, rather than doing something different?
Different programmers make different choices. They may have borrowed code from one another in the halls, but I'll bet a lot of games were pretty much designed and coded from scratch, especially in the beginning. Also, when you try to be efficient by reusing canned algorithms/subroutines, you tend to overlook new, innovative ways of doing it that may end up working out better. Look at most of the Activision games for the 5200... they obviously reused as much of the stuff they created for the 2600 games as they could. It probably speeded up development time, but those games aren't much of an improvement, either. Another thing is that many programmers back in those days were pretty antisocial and preferred to roll their own, although I'm not sure specifically about Atari.
Link to comment
Share on other sites

My 2c worth, from what I can remember about programming my 5200 emulator:

 

IIRC, the 5200 analog positions are read like the old PC joystick - the potentiometer ("pot") in the joystick affects the time it takes for a capacitor to charge or discharge. The "position" of the joystick is proportional to the charge/discharge time measured.

 

This timing is all done in the POKEY.

The programmer writes to POTGO register in POKEY, to reset all the pot counters.

The program can then check if all counters are "finished" using the ALLPOT register.

The pot "positions" (X and Y) are then read from the relevant POKEY registers. The software usually expects the values to be in the range 5 to 223 (roughly), with the centre position somewhere in the middle.

 

Also, some games "calibrate" the joystick dynamically (probably by keeping track of the max an min positions, and then calculating the centre position as the average of those).

 

Some emulators (ie: mine) cheat by making the ALLPOT register read "always finished", thus speeding up emulation a little, but negatively affecting accurate timing in the emulator.

 

It's also possible that some programmers bypassed this "standard" way of reading the analog joystick, and implemented some other hack way to gain a few cycles.

 

My memory is a bit fuzzy, bit there may also be a "standard" joystick read routine in the 5200 bios.

Edited by jum
Link to comment
Share on other sites

This always worked well for me for digital movement. If you change the "#$1A" and "#$50" numbers higher/lower, then it will cause the stick to become more sensitive/less sensitive. Basically the PADDL0 will have a number from 0 to 255 (or $0 to $FF in hex) - this represents far left to far right on the analog stick. Same thing with PADDL1 for vertical movement.

 

Now, for Frogger, the game makes you press the button while the stick is pressed a direction. But I think it could have been programmed without the button press. Maybe make the player push the stick pretty far and make him manually return it to the neutral area, plus recognize a range that might be considered a diagonal (there are not diagonals in Frogger of course) - if a player is pressing in the up/left range, for example , don't move Frogger at all - that might take the mistaken-jump factor down quite a bit.

 

HorizontalMoveCheck
       LDA	PADDL0
       LSR	A		; DIVIDE BY 2 TO PREVENT OVERFLOW
       CMP	#$1A		; STICK PULLED LEFT
       BMI	MVLEFT
       CMP	#$50		; STICK PULLED RIGHT
       BPL	MVRIGHT
       RTS

Link to comment
Share on other sites

yea some are horrid like frogger and really defective like in vanguard where they make it so you cant go diagonal

 

The biggest problem I noticed with Vanguard is how the ship becomes very sluggish when firing. That issue probably has less to do with the controller.

 

yep i have access to the best 5200 controllers in the world and it is not really the oem controllers fault the arcade and the atari 2600 both allow diagonals but 5200 says no way jose and it is annying figuring out directional override and cuttoff

 

like exact diagonal up right makes it go up

 

but exact diagonal right down make is go right and the weird thing is when i think i have it all figured out the next time i play its different i swear my 5200 is possessed

 

one day i was making a resistance trigger value chart and vanguard and a few others seem to have internal calibrations that change its almost as annoying as heisenberg

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