its been awhile since ive posted, but ive got a top seret hardware masterpiece in the making! So here are a few photos and a video showing functionality will be coming soon!
Actually it's eight buttons! And yes, I plan on a sonic game, but right now no promises on when that will get done, because I just finished the controller driver and the controller it's self, plus I still have a few kinks to work out, plus all the other drivers. But I'm currently reading about game development for the hydra, and will get some good techniques from it! I've got a video showing it's functionality turning LEDs on and off, but I plan on uploading that tomorrow.
Oh and not just emulate, but recreate! Same sprites, new game levels and the possibility of new music. But right now that's a dream until I get my "console" working in a prototype state.
Cool! See the list in my last post - I think those are the specs. Z80 and 76489 are already done. Not sure about the 68000 but the ram and speeds would be well within the propellers capability.
The display is tricky - 320x224 with a 512 color palette. Up until recently I would have said no, as that is too many colors in the palette for the TV and VGA drivers. But with the ILI9325 touchscreen 320x240 and a palette of 64k colors, this is quite possible.
Ah I didn't see the specs above, but thanks! In terms of genesis specs you are spot on! But before trying that, I might reconstruct a master system, since the Z80 and the PSG emulators for the hardware required already exist, but a genesis propeller does not seem far fetched. I will have to look into that!
It's very interesting and marvelous in fact! But I'm a little confused about RAM and ROM management. I know several cogs are involved, but the global ram is 32k which isn't enough for 64k or 1Mb(clearly) so is some expansion necessary? And also where cld I find some EEPROM or RAM chips, and how would I wire them with the one I already have?
looks cool but one thing fun a parallel to serial shift register will let you use the NES wire up style and lots of buttons with few pins
my prop chip is in a box with a controller made of push buttons with a 74hc166 is 8 bit parallel in serial out so it works just like the NES controller
but you can lay out your buttons as you please
Yes, but if I wanted to use n nescontroller, I would get one that works and solder the connectors on my el' jugador. Thanks though, all help is appreciated!
Pull-ups.......Pull-ups....oops, that's the one thing I forgot....
I was thinking about resistor values to use, but ended up leaving them out because I'm using +3v, so I figured that would be fine, and its working okay, except I've got wires everywhere, so some buttons get randomly sensitive.
That was my main concern from the start....will it fit, and will it interfere. The only interference I usually get is when I nudge the wires, not so much the pressing of the buttons. But I'm still working out kinks and adding some more functionality features.
I was thinking about resistor values to use, but ended up leaving them out because I'm using +3v, so I figured that would be fine, and its working okay, except I've got wires everywhere, so some buttons get randomly sensitive.
They would be randomly sensitive because you have no pullups! Duane's circuit solves the problem.
@Duane
Me too.....
Basically there is a push button switch in between a prop pin and a supply of +3v.
Add a 10K resistor from the Prop pin to ground (always connected no matter the button state) for each button. You wont have to change your code and the button will be much more reliable.
Add a 10K resistor from the Prop pin to ground (always connected no matter the button state) for each button. You wont have to change your code and the button will be much more reliable.
Pull up vs Pull down. You can choose either. Back in the olden days the way 74xx TTL logic worked, a pullup used less current than a pull down resistor. So pull ups became a convention. With modern chips this does not matter.
With a pull up, the resting state of the pin is "High" and the pushed state is "Low" so that might need a software inversion. So that might be an argument in favor of a pull down, where resting is "Low".
It does not really matter in the end. What you don't want is a floating pin, picking up stray RF from your local radio station and randomly flipping high and low.
Pull up vs Pull down. You can choose either. Back in the olden days the way 74xx TTL logic worked, a pullup used less current than a pull down resistor. So pull ups became a convention. With modern chips this does not matter.
With a pull up, the resting state of the pin is "High" and the pushed state is "Low" so that might need a software inversion. So that might be an argument in favor of a pull down, where resting is "Low".
It does not really matter in the end. What you don't want is a floating pin, picking up stray RF from your local radio station and randomly flipping high and low.
I initial suggested pull-up resistors since they seem to be the norm. Now I know why, thanks. I suggested the pull-downs after Sonic told us how his circuit was wired. I figured with the pull-down resistors Sonic wouldn't have to modify his code.
To the both of you:
Added the resistors like you two suggested, I played TRON light cycles with some code I modified by OBC! Thanks OBC, and Dr. Acula, and Duane!
if you intend to make a sonic game on the PROP you my run low on pins real fast
8 pins per player with direct buttons 16 pins for 2 players 3 for TV DAC one for audio 2 for eeprom and most of the ram boards might take 4 to what 10 pins?
so we are already up to 24 to 32 pins and well thats all your pins
i just want to clarify the GENY had a D pad and a mode and A B C buttons.
the NES had D pad select start and A and B buttons
point its the same a 4 position D pad and 4 buttons just different names on the buttons
the case has an fold up lcd on it, and on my SD card i have lots of the games like load runner defender and dodgey kong modded to my layout.
i recommend you save pins and use some discrete logic chips to shift in data from your buttons you would reduce your foot print down from 8 pins per player to 4 pins for 2 players my home made controller looks noting like a nes controller with just a d pan on one side and 4 buttons on the other side.
I'm just trying to be helpful, and trust me this is easier then it sound. i can post a circuit schematic if you like.
One of my original thoughts was also that, but I lack any logic chips that can shift data, or at least I think, so a schematic would be helpful, along with a logic chip you recommend. Thanks for the help, I'll think about it, but I alread have enough pins for another controller if I decided to use it.
Comments
Clearly you are trying to emulate the game Sonic on a propeller!
And don't laugh. Some of this has already been done.
The display is tricky - 320x224 with a 512 color palette. Up until recently I would have said no, as that is too many colors in the palette for the TV and VGA drivers. But with the ILI9325 touchscreen 320x240 and a palette of 64k colors, this is quite possible.
Searching 68000 and propeller on google throws up some intriguing links.
my prop chip is in a box with a controller made of push buttons with a 74hc166 is 8 bit parallel in serial out so it works just like the NES controller
but you can lay out your buttons as you please
I couldn't tell from your pictures if you've got pull-up or pull-down resistors on your buttons.
Here's a little circuit that is commonally used.
There are lots of different ways of reading push button inputs but the schematic above is about as simple as it gets.
I was thinking about resistor values to use, but ended up leaving them out because I'm using +3v, so I figured that would be fine, and its working okay, except I've got wires everywhere, so some buttons get randomly sensitive.
(don't ask me how I know this!)
They would be randomly sensitive because you have no pullups! Duane's circuit solves the problem.
I'm curious how you have these buttons wired if you're not using pull-up or pull-down resistors.
You really need them.
Me too.....
Basically there is a push button switch in between a prop pin and a supply of +3v.
Add a 10K resistor from the Prop pin to ground (always connected no matter the button state) for each button. You wont have to change your code and the button will be much more reliable.
Pull up vs Pull down. You can choose either. Back in the olden days the way 74xx TTL logic worked, a pullup used less current than a pull down resistor. So pull ups became a convention. With modern chips this does not matter.
With a pull up, the resting state of the pin is "High" and the pushed state is "Low" so that might need a software inversion. So that might be an argument in favor of a pull down, where resting is "Low".
It does not really matter in the end. What you don't want is a floating pin, picking up stray RF from your local radio station and randomly flipping high and low.
I initial suggested pull-up resistors since they seem to be the norm. Now I know why, thanks. I suggested the pull-downs after Sonic told us how his circuit was wired. I figured with the pull-down resistors Sonic wouldn't have to modify his code.
In other words, I agree with you.
Added the resistors like you two suggested, I played TRON light cycles with some code I modified by OBC! Thanks OBC, and Dr. Acula, and Duane!
8 pins per player with direct buttons 16 pins for 2 players 3 for TV DAC one for audio 2 for eeprom and most of the ram boards might take 4 to what 10 pins?
so we are already up to 24 to 32 pins and well thats all your pins
i just want to clarify the GENY had a D pad and a mode and A B C buttons.
the NES had D pad select start and A and B buttons
point its the same a 4 position D pad and 4 buttons just different names on the buttons
the case has an fold up lcd on it, and on my SD card i have lots of the games like load runner defender and dodgey kong modded to my layout.
i recommend you save pins and use some discrete logic chips to shift in data from your buttons you would reduce your foot print down from 8 pins per player to 4 pins for 2 players my home made controller looks noting like a nes controller with just a d pan on one side and 4 buttons on the other side.
I'm just trying to be helpful, and trust me this is easier then it sound. i can post a circuit schematic if you like.
And the object I have used can be found in the obex... here!
http://obex.parallax.com/objects/616/
Once you can use button presses to control the logic in your program you can look for ways of decreasing the pin count of your button pads.