AVR Megatris 2 / Megatris JAMMA
- DaveyPocket
- Posts: 378
- Joined: Sun Sep 14, 2008 8:33 pm
- Contact:
Re: AVR Megatris 2 / Megatris JAMMA
Let me clear some things up, there seems to be some confusion:
All inputs on the JAMMA harness are connected to the 4021 pins. Here is a simple map of the pinout (I'm working on a more illustrated diagram, so here's something simple):
SNES P1 --------- JAMMA Harness
Up---------------- Up P1
Down------------- Down P1
Left--------------- Left P1
Right------------- Right P1
A------------------ 1 P1
B------------------ 2 P1
X------------------ 3 P1
Y------------------ 4 P1
L bumper-------- Service
R bumper-------- Test
Start-------------- P1 Start
Select------------ P2 Start
SNES P2 --------- JAMMA Harness
Up---------------- Up P2
Down------------- Down P2
Left--------------- Left P2
Right------------- Right P2
A------------------ 1 P2
B------------------ 2 P2
X------------------ 3 P2
Y------------------ 4 P2
L bumper-------- Coin 1 \
R bumper-------- Coin 2 |- These might be switched around, I have to check.
Start-------------- Tilt
Select------------ Nothing
Mapes, if you're using your version of softswtich, there is a problem. I checked in your code that your program DOES NOT check for SNES controller player 2 inputs (In your for loop, you said "for i = 0; i < 1....". This only checks controller 0). My softswitch program should have it fixed. Re-download it here: http://uzebox.org/forums/viewtopic.php? ... =140#p7711 just to make sure. I also did not program the coin counter to increment in Megatris just yet.
For everyone: To test the coin counter in softswitch, press player 1 button 3 in the input test screen and it should pulse the coin counter line.
Mapes, as for your SD card, make sure it is inserted all the way, make sure it's not fragmented, try different cards.
Now that I think about it Mapes, with your screen flickering and SD card problems. Grab a voltmeter and measure the voltage on the +12v lead on the JAMMA board and measure the power going into the ATmega644. I've had flickering screen problems caused by over-voltage...
And codecrank, I'm not quite sure I understand what you're saying, but all inputs are connected to 4021 in some way.
All inputs on the JAMMA harness are connected to the 4021 pins. Here is a simple map of the pinout (I'm working on a more illustrated diagram, so here's something simple):
SNES P1 --------- JAMMA Harness
Up---------------- Up P1
Down------------- Down P1
Left--------------- Left P1
Right------------- Right P1
A------------------ 1 P1
B------------------ 2 P1
X------------------ 3 P1
Y------------------ 4 P1
L bumper-------- Service
R bumper-------- Test
Start-------------- P1 Start
Select------------ P2 Start
SNES P2 --------- JAMMA Harness
Up---------------- Up P2
Down------------- Down P2
Left--------------- Left P2
Right------------- Right P2
A------------------ 1 P2
B------------------ 2 P2
X------------------ 3 P2
Y------------------ 4 P2
L bumper-------- Coin 1 \
R bumper-------- Coin 2 |- These might be switched around, I have to check.
Start-------------- Tilt
Select------------ Nothing
Mapes, if you're using your version of softswtich, there is a problem. I checked in your code that your program DOES NOT check for SNES controller player 2 inputs (In your for loop, you said "for i = 0; i < 1....". This only checks controller 0). My softswitch program should have it fixed. Re-download it here: http://uzebox.org/forums/viewtopic.php? ... =140#p7711 just to make sure. I also did not program the coin counter to increment in Megatris just yet.
For everyone: To test the coin counter in softswitch, press player 1 button 3 in the input test screen and it should pulse the coin counter line.
Mapes, as for your SD card, make sure it is inserted all the way, make sure it's not fragmented, try different cards.
Now that I think about it Mapes, with your screen flickering and SD card problems. Grab a voltmeter and measure the voltage on the +12v lead on the JAMMA board and measure the power going into the ATmega644. I've had flickering screen problems caused by over-voltage...
And codecrank, I'm not quite sure I understand what you're saying, but all inputs are connected to 4021 in some way.
Re: AVR Megatris 2 / Megatris JAMMA
I was pretty sure I goofed something up in my code since the games worked fine, but my program did not.DaveyPocket wrote:I checked in your code that your program DOES NOT check for SNES controller player 2 inputs (In your for loop, you said "for i = 0; i < 1....". This only checks controller 0).
The interesting thing about the SD card is that it works most of the time. Ocasionally the SD card though freaks out. I've loaded some games perfectly fine, and at other times I get a jumbled mess a few seconds into the game (This happened when playing BC Dash).Mapes, as for your SD card, make sure it is inserted all the way, make sure it's not fragmented, try different cards.
Now that I think about it Mapes, with your screen flickering and SD card problems. Grab a voltmeter and measure the voltage on the +12v lead on the JAMMA board and measure the power going into the ATmega644. I've had flickering screen problems caused by over-voltage...
I'll take a look at the voltage and see if it is a solid +12volts, but I'm still a little puzzled why the voltage regulator would not hold it at 5 volts regardless of the input voltage. The regulator is designed to operate between a 7 to 25 volt input.
-Mapes
Re: AVR Megatris 2 / Megatris JAMMA
I think that what he meant is how to use equivalent of the SNES shoulder buttons in a game. Obviously, since they map to Test and Service (which I assume are inside the cabinet right?), they can't be used for game play. So Megatris JAMMA should be tweaked to remap the "hold block" function from the R-Shoulder to X or Y button.And codecrank, I'm not quite sure I understand what you're saying, but all inputs are connected to 4021 in some way.
-Uze
- DaveyPocket
- Posts: 378
- Joined: Sun Sep 14, 2008 8:33 pm
- Contact:
Re: AVR Megatris 2 / Megatris JAMMA
Ahh, now I understand. Yes, I'm going to be totally re-mapping controls for Megatris. I'll work on that tonight and post the files.uze6666 wrote:I think that what he meant is how to use equivalent of the SNES shoulder buttons in a game. Obviously, since they map to Test and Service (which I assume are inside the cabinet right?), they can't be used for game play. So Megatris JAMMA should be tweaked to remap the "hold block" function from the R-Shoulder to X or Y button.And codecrank, I'm not quite sure I understand what you're saying, but all inputs are connected to 4021 in some way.
-Uze
- DaveyPocket
- Posts: 378
- Joined: Sun Sep 14, 2008 8:33 pm
- Contact:
Re: AVR Megatris 2 / Megatris JAMMA
Milestone 2 posted at the thread's first post: http://uzebox.org/forums/viewtopic.php?f=3&t=1044#p7766
Try that.
Try that.
Re: AVR Megatris 2 / Megatris JAMMA
should have checked the wiki.mapes wrote:on the Wiki http://uzebox.org/wiki/index.php?title= ... allocation
Megatris Jamma Milestone 2 works perfect !! Thanks for the remapping !Milestone 2 posted at the thread's first post: viewtopic.php?f=3&t=1044#p7766
Other cool features I can think of , in case you feel like adding more.
- credit counter
- service button brings up the megatris options menu that used to be available from the main menu.
- maybe add a dot cloth to the options menu
- ability to interrupt a 1 player game when player 2 hits start ( given available credits ) . Although this is not an issue until AI is implemented.
Thanks for your work
- DaveyPocket
- Posts: 378
- Joined: Sun Sep 14, 2008 8:33 pm
- Contact:
Re: AVR Megatris 2 / Megatris JAMMA
I was planning on adding those thingscodecrank wrote: Other cool features I can think of , in case you feel like adding more.
- credit counter
- service button brings up the megatris options menu that used to be available from the main menu.
- maybe add a dot cloth to the options menu
- ability to interrupt a 1 player game when player 2 hits start ( given available credits ) . Although this is not an issue until AI is implemented.
Thanks for your work
Dot cloth??
The service menu sounds interesting, I was planning to add those options in the game DIP switches and have it configured through softswitch.
Re: AVR Megatris 2 / Megatris JAMMA
you know, the test pattern used to do convergence adjustments and such.
that actually may make more sense to put in softswitch... dunno.
that actually may make more sense to put in softswitch... dunno.
- DaveyPocket
- Posts: 378
- Joined: Sun Sep 14, 2008 8:33 pm
- Contact:
Re: AVR Megatris 2 / Megatris JAMMA
I'm experimenting with the scoring system right now. I found several scoring tables such as the ones mentioned at http://tetris.wikia.com/wiki/Scoring. I think I may use one of those.
Re: AVR Megatris 2 / Megatris JAMMA
Is the source code for Megatris Jamma available?
I FINALLY got a different empty cabinet and hooked up everything and it worked without a hitch. No flicker, no noise. I thought I'd check out the code and update a few bugs that I find. I noticed that my 2nd coin chute doesn't register my coin, so I wanted to look into it.
Also, I was thinking about how hard it would be to implement some tetris AI for 1 player game.
I was looking at this: http://luckytoilet.wordpress.com/2011/0 ... algorithm/ and it spells out how to make a decent using weighted value.
Looks like I'll have to finish a few of my projects...
-Mapes
I FINALLY got a different empty cabinet and hooked up everything and it worked without a hitch. No flicker, no noise. I thought I'd check out the code and update a few bugs that I find. I noticed that my 2nd coin chute doesn't register my coin, so I wanted to look into it.
Also, I was thinking about how hard it would be to implement some tetris AI for 1 player game.
I was looking at this: http://luckytoilet.wordpress.com/2011/0 ... algorithm/ and it spells out how to make a decent using weighted value.
Looks like I'll have to finish a few of my projects...
-Mapes