Jump to content
IGNORED

GoSub for INTV


atari2600land

Recommended Posts

How about if I change the octopus death sound and put back the ping? Something like this, perhaps?

 

The original Ping sound is definitely a keeper. I'm not in love of the new octopus death sound effect, though. I think I can live with the octopus sound effect cutting off the Ping. I say, put it all the way it was! :)

 

By the way, the Ping is back with a short repeat period... :\

Link to comment
Share on other sites

I added an octopus death counter which keeps track of the number of octopi you've shot. Which makes me wonder if a variable can go above 255. If the player shoots 9 octopi per level multiplied by 39 levels is 351.

 

You have 2 options here:

 

1. Use a 16 bit variable (#score). And make sure you refer to it as #score every time. "score" is a completely different variable.

 

2. If you use an 8 bit variable, it will overflow once it goes past 255. And by overflow, I mean it will change to 0. And then increment again from there. If you want to still use an 8 bit variable, you can, but then you need another variable (or similar) to track how many times you've overflowed. So that you can add 255 to whatever your final score is. In the best case, it would be 96, so you'd add 255 to that to get the final perfect score of 351. Of course if it hasn't overflowed (the player didn't score that high) then the final score is whatever the score variable contains. Hopefully this isn't too confusing :)

 

My suggestion would just be to use a 16 bit variable, unless you've already exhausted the available ones. IntyBASIC allows something like 16 of them.

Link to comment
Share on other sites

I used a 16-bit variable.

I experimented with firing using the keypad in the direction you want to fire (4=left, 6=right, etc.) but pressing 6 moved the SUB right in addition to firing right for no apparent reason. Why?

 

Cool :) Easiest to just use the bigger variables if you have them available.

 

Warning - some thinking in binary follows:

 

One thing about the INTV controller that is "fun" - it's possible to have "ghost" moves interpreted if you try to use both the direction disc and the keypad at the same time, unless you get smart about it. Why? Well, the controller memory address just returns an 8-bit value to say what was pressed on the controller. When you use things such as CONT1.UP to compare against, IntyBASIC is merely taking the returned value from the controller address and checking against a static constant for "up". And for my (potentially poor) explanation, let's treat every input on the controller as a button. This means up, down, etc are all individual "buttons" as far as my description goes.

 

Now, what they've actually done is used an 8-bit bitmap to indicate which "buttons" are pressed at any given time. For example:

 

Nothing = 0

Down = 1

Right = 2

Up = 4

Left = 8

 

So far so good. For Right, IntyBASIC essentially checks CONT1 for "2", and if it sees 2, then it returns true for CONT1.RIGHT But it's not comparing to the value of 2 - it's checking for bit 1 being set. Notice that for each direction, it's a discrete binary digit that is set (00000001, 00000010, 00000100, and 00001000 respectively). However - you're stuck using an 8 bit memory value. And there are nearly 20 inputs on a controller. So it multiplexes the bitmap which only contains 8 distinct values (you can't have each bit represent a discrete input). What you end up with is that some inputs use more than one of the bits. Here's what the keypad returns:

 

1 = 129

2 = 65

...

6 = 34

 

etc

 

Now remember, CONT1 is simply checking which bits are set. So when you press 6, which returns 34 in decimal, the actual binary value is 00100010. Notice something? The second-to-last digit is set as well. So if you check CONT1.RIGHT at this exact moment in time, it will return true. Because all it looks for is 00000010. This means that if you check for numpad 6 AND right in at the same time, which I suspect you are (keep in mind "at the same time" here refers to how frequently the INTV polls the controller input, which is pretty fast compared to your code), then BOTH are returned true and both actions will take place in your code.

 

The IntyBASIC manual hints at this when it says "Because movements can be taken as keys, it's suggested to wait for CONT1.KEY to contain 12 before waiting for a key." What he's really saying is that directions, action buttons, and the keypad can overlap and present ghost inputs if you aren't very careful. Oh, and I'm also glossing over the fact that CONT1 is really returning a complemented address to do the bitmap checking for you.

 

There are a lot of ways to get around this. You'll notice that many if not games don't use the keypad during gameplay, and there's a reason. It's a pain in the ass to separate your controller inputs, depending on how you're checking their values. I find with IntyBASIC that I use either/or - keypad for menu screens, direction and buttons for the game itself. If you want to use both, or for example if you want to use diagonals (as IntyBASIC only has the 4 cardinal directions), you need to check the value of CONT1 yourself, and then perform your game logic based on that. You could, for example, just do this:

 

test=CONT1

IF test = 2 THEN move_right

IF test = 34 THEN fire_torpedo

 

I pull the controller value into a separate variable for occasional debugging, plus I've seen weird behaviour if I don't. I don't think it's necessary but I do find that it helps me, at least in terms of how I think. And notice that what you're doing here is checking explicitly for the ENTIRE bitmap, not just which bits are set. There's a catch here, because with this method you cannot have 2 things happen at once (move and fire at the same time). That requires even more complex logic. I'm sure everyone is aware of Night Stalker's challenges with the input - I *think* it's something that could be fixed with some clever code but maybe I'm wrong.

 

In case you're wondering, the action buttons return 11000000, 01100000, and 10100000. Notice how they are all distinct and do not overlap with the direction disc (at least not for basic directions). This is why you can use UDLR and all 3 buttons with no problems. It's really once you introduce the keypad that you see non-intuitive effects.

 

I hope this makes sense. Most of this comes from reverse-engineering as I ran into exactly the situation you're in, so I may not have the finer details correct.

Edited by freeweed
Link to comment
Share on other sites

I wish games would use enter for jump/fire. In gosub if you hit enter you turn and shoot left. In donkey kong you jump straight up only. You cannot jump forward or backwards. Space patrol does something wonky too. Because of control setup on wiijzintv it would be easier to be able to use enter and clear for controls than the side buttons.

Link to comment
Share on other sites

I used a 16-bit variable.

I experimented with firing using the keypad in the direction you want to fire (4=left, 6=right, etc.) but pressing 6 moved the SUB right in addition to firing right for no apparent reason. Why?

 

May I suggest not to complicate the mechanics too much? Personally, I think it was perfectly fine for the sub to shoot in the direction it is facing. This adds to the challenge that you need to manœuvre your sub at the same time that you are aiming.

 

-dZ.

Link to comment
Share on other sites

I used a 16-bit variable.

I experimented with firing using the keypad in the direction you want to fire (4=left, 6=right, etc.) but pressing 6 moved the SUB right in addition to firing right for no apparent reason. Why?

 

Along this same line, I know the title screen says "Press Fire To Start" but pressing a number on an actual controller usually causes the game to start, a torpedo to fire, and my submarine to crash into the seaweed. Can you ignore the keypad at the title screen or set a delay before movement, like there is when I get killed in a maze? Better yet, how about "Press Disc To Start"? That's the conventional way of starting an Intv game, unless there are difficulty levels to select from.

 

I like this game the more I play it. It feels like it has good "balance," if you know what I mean.

Link to comment
Share on other sites

  • 2 weeks later...

I think I have solved the keypad=shooting crisis I had earlier. I also added a new level. If you want to fire, you use the lower right fire button to fire. While it works OK on a real Intellivision, I can't figure out how to make firing happen on jzintv. Is there any game that uses all four fire buttons individually as different actions? Also, the sub only shoots at the direction it's going. I decided not to do the keypad firing in different directions the sub is going thing I was going to do. So now there are 33 levels. I am aiming for 39. I have 13k, so I think I can do it as well as the two different endings I had planned.

Edited by atari2600land
Link to comment
Share on other sites

The lower-left button on my controller does the firing when I'm running jzintv on my Mac using the Ultimate PC Interface, and I'd prefer that to firing with the lower-right button. Much less awkward for me, and I'd hate having to use the keypad to fire. Why not use all of the side buttons to fire? Would it matter? Firing in the direction I'm headed is reasonable (and seems sub-like).

 

Pressing Enter to start also works well, and no more crashing into the seaweed with a keypad press!

Link to comment
Share on other sites

I think I have solved the keypad=shooting crisis I had earlier. I also added a new level. If you want to fire, you use the lower right fire button to fire. While it works OK on a real Intellivision, I can't figure out how to make firing happen on jzintv. Is there any game that uses all four fire buttons individually as different actions? Also, the sub only shoots at the direction it's going. I decided not to do the keypad firing in different directions the sub is going thing I was going to do. So now there are 33 levels. I am aiming for 39. I have 13k, so I think I can do it as well as the two different endings I had planned.

are you left handed? Reason i ask is button 3 is the most awkward button to use. If you kept it on button 1 as in previous versions which is both top buttons then both right handed and left handed people could use the side button comfortably. The fire button works on jzintvwii but using the classic controller i have to shoot with my left middle finger (also have to use my left middle finger when played on an inty controller) with it set on button 3. Also previous versions allowed you to start with the fire button which i preferred. Edited by pimpmaul69
Link to comment
Share on other sites

Oops, I meant to say "lower left fire button."

it works on lower right not left in jzintvwii which is really awkward for me

 

Edit: maybe jzintvwii has the buttons 2 & 3 backwards from how they should be but at any case it is really odd playing it with that button

Edited by pimpmaul69
Link to comment
Share on other sites

Well, the intention all along was to just use the lower left side button to fire. By the way, I'm right handed, but I hold the controller in my left hand and I press the left fire buttons with my left hand and press the buttons and keypad and stuff with my right hand.

Edited by atari2600land
Link to comment
Share on other sites

Well, the intention all along was to just use the lower left side button to fire. By the way, I'm right handed, but I hold the controller in my left hand and I press the left fire buttons with my left hand and press the buttons and keypad and stuff with my right hand.

i asked about being left handed because you originally stated it was the lower right button. The problem i still see with using only the bottom left is it makes it harder for a left handed person or anyone who does not use an actual intellivision controller.

Edit: i prefer using the top buttons because that is how i am used to playing other intellivision games.

Edited by pimpmaul69
Link to comment
Share on other sites

Are the two upper fire buttons the same? If so, why did they do that?

 

They are hard-wired together in the controller. You'll notice that IntyBASIC only has B0, B1, and B2 even though controllers have 4 side buttons. As to why?

 

You have to keep in mind that this was a time when most consoles had one - that's right, one - button. A lot of controllers started coming out with multiple buttons, but they were basically wired to the same action (as there was really only one button). But you had the choice of using the left or right button, depending on preference/handedness.

 

With the Intellivision, I suspect they wanted the same experience. One main fire button for twitch (or just simple) games, and let the more complicated games worry about the other buttons. But have a left/right scenario to allow people to choose.

 

When you look at controllers today, it's almost unthinkable that this sort of option would be necessary. People just got used to Nintendo's choice (direction on the left, buttons on the right) and that's what we've had for 29 years now with very few exceptions. But for a while, no one really knew how gamers would want to hold things. I remember quite a lot of heated arguments in arcades over whether it was more natural to hold the joystick in your left or right hand. And games often varied. Heck, I remember a lot of arcade cabinets that had the fire button on both sides, so players could choose how to control things. So, designing a controller to allow this kind of flexibility was actually pretty groundbreaking.

Edited by freeweed
  • Like 2
Link to comment
Share on other sites

 

They are hard-wired together in the controller. You'll notice that IntyBASIC only has B0, B1, and B2 even though controllers have 4 side buttons. As to why?

 

You have to keep in mind that this was a time when most consoles had one - that's right, one - button. A lot of controllers started coming out with multiple buttons, but they were basically wired to the same action (as there was really only one button). But you had the choice of using the left or right button, depending on preference/handedness.

 

With the Intellivision, I suspect they wanted the same experience. One main fire button for twitch (or just simple) games, and let the more complicated games worry about the other buttons. But have a left/right scenario to allow people to choose.

 

When you look at controllers today, it's almost unthinkable that this sort of option would be necessary. People just got used to Nintendo's choice (direction on the left, buttons on the right) and that's what we've had for 29 years now with very few exceptions. But for a while, no one really knew how gamers would want to hold things. I remember quite a lot of heated arguments in arcades over whether it was more natural to hold the joystick in your left or right hand. And games often varied. Heck, I remember a lot of arcade cabinets that had the fire button on both sides, so players could choose how to control things. So, designing a controller to allow this kind of flexibility was actually pretty groundbreaking.

 

 

BTW, you might find the patent for the hand controller interesting reading, or at least the "background of the invention" and "summary of the invention" sections: http://papaintellivision.com/pdfs/4246452_Switch_apparatus.pdf

 

In particular, they call out "the switch portion being along the side edges of the controller housing with the conductive patterns suitably interconnected for providing right hand or left hand operation." You called it. :)

 

The rest of it is somewhat impenetrable patent-ese...

 

The Papa Intellivision site has all sorts of interesting documents, including a study proposal at the University of Oklahoma Long Term Care Gerontology Center about using Intellivision video games for therapeutic purposes among aging populations in long term geriatric care. Hmmm... none of us is getting any younger. We might be able to provide data points for such a study sooner than we hope. ;)

Edited by intvnut
  • Like 1
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...