123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|706|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> 2 x 4 - 3 = 2?

Mon, 12 Sep 2016, 22:47
spinal
Surely I'm correct in thinking that -- if(num & x == x) would check if num contains the same bit pattern as x, regardless of other bits present?

-=-=-
Check out my excellent homepage!
Mon, 12 Sep 2016, 22:47
Jayenkai
I'd bracketise it. I've fallen out with stuff like that, too many times, not to!

It's probably doing
num & (x == x)
instead of
(num & x) == x

-=-=-
''Load, Next List!''
Tue, 13 Sep 2016, 03:58
spinal
I think I found the issue, looks like part of my data is actually reused in a different part. That's what I get for building an adapter for a 37 year old game controller! They sure had some kookie ideas in the 70's!

-=-=-
Check out my excellent homepage!
Tue, 13 Sep 2016, 05:43
Jayenkai
... This needs pictures!!!
Tue, 13 Sep 2016, 06:51
rockford
What console would that be then, coming in 1979? Atari VCS (a la 2600 after 1982)?
Tue, 13 Sep 2016, 09:35
spinal
en.m.wikipedia.org/wiki/Intellivision

I can do photos later when I remember. As for the nuttiness of it, the controller has a keypad and a 16 direction pad, all operating through a 9 wire switch matrix. If I take a good look at it, I might be able to arrange my bunch of if statements in such a way to not conflict...

-=-=-
Check out my excellent homepage!
Tue, 13 Sep 2016, 10:04
rockford
My wife had an Intellivision (and thusly I did) until recently; we gave the console and games away - there were about 30.

I really hated the intellivision disc controls. Worst controller ever.
Tue, 13 Sep 2016, 11:59
steve_ancell
We had a Hanimex HMG 2605, more commonly known as the Emerson Arcadia 2001. Very similar to the Intellivision but you could screw sicks into the control disks.



Tue, 13 Sep 2016, 12:22
spinal
Right, I have the controller converting to the following keyboard keys....



I now can't really tell if its because the controller is older than me and juts crap, or if it was never any good to start with. Tried it in an emulator that allows all 16 directions to be mapped, it seems to work, but can I hell play those old games, the characters are unresponsive, sometimes jumping about in the wrong direction etc.

Maybe I'll try it with only 8 directions, might be a little more stable, apparently very few, if any games used all 16 directions anyway.

Arduino code for current version with 8 of the directions commented out...



-=-=-
Check out my excellent homepage!
Tue, 13 Sep 2016, 12:27
rockford
I can assure you; the controller was never any good to start with!

TBF The Intellivision was an OK system for the time, with some good pretty games, eg Burger Time, DragonFire and LockOut to name just a few.

Anyway, what are you trying to do with the controller?
Tue, 13 Sep 2016, 22:36
spinal
Just use it for an emulator, Helen has an inty, but todays TV's being what they are, we can use the damn thing. So I figured an emulator would be just as good.

Hmmm, after a quick test, it seems that the controller doesn't actually have 16 directions, only 12, the 45 degree directions are combinations, I'll have to change what keys are being pressed but it might help with gameplay.


right, the following seems to work much much better, although it's still a little crappy.



-=-=-
Check out my excellent homepage!