Jump to content
IGNORED

Atari Lynx II - Raspberry Pi Install


cowdog360

Recommended Posts

How did you connect the buttons? I am currently building something similar and cannot make up my mind if I should use retrogame to map the GPIO pins to key presses or go with some ready made library for GPIO control in RetroPie.

 

I would like to use the second A, B buttons for X, Y to be able to play PSX games like Bust a Groove (in case it runs at all on a PiZero).

Link to comment
Share on other sites

Second set of buttons are wired in parallel inside, and the creator used the original Lynx membrane for the buttons. You would need to carefully cut the traces to separate upper and lower buttons and wire in the 2 separated buttons so they would work as A, B, X, and Y.

 

But TBH the buttons on top and bottom are far apart and not really comfortable for quick switching so many games won't be easy or fun to play.

Link to comment
Share on other sites

Have you thought about the possibility of transforming it to a 4 or 6 buttons ?

 

How did you connect the buttons? I am currently building something similar and cannot make up my mind if I should use retrogame to map the GPIO pins to key presses or go with some ready made library for GPIO control in RetroPie.

 

I would like to use the second A, B buttons for X, Y to be able to play PSX games like Bust a Groove (in case it runs at all on a PiZero).

 

Yes, I've thought about more buttons. Separating the membrane to use the lower AB as additional would work, but is tricky because you can't solder to the membrane without melting it. Another option would be to bondo up the case, drill all new holes for A B X Y and use bits from another controller and paint the case, but that ruins the stock look.

 

Finally, you do have the 3 buttons on the right hand side of the screen. I've actually mapped X and Y to the top 2 buttons. The bottom button is START. The bottom button on the left of the screen (backlight) is SELECT. Off is mapped to a shutdown script so that if you hold it down for 2 seconds, it shuts down the pi safely.

 

Here's what I used for wiring the flat panel connector to the GPIO pins. I did use adafruit's retrogame to handle the buttons as keyboard presses.

Ribbon Lynx Button SNES Button GPIO Retrogame 1 Ground GND 2 B Y 23 KEY_A 3 A B 7 KEY_Z 4 Opt 2 Start 27 KEY_RETURN 5 Flip A 4 KEY_X 6 Opt 1 X 3 KEY_S 7 Backlight Select 2 KEY_SPACE 8 Off 18 ** 9 10 Right Right 9 KEY_RIGHT 11 Down Down 17 KEY_DOWN 12 Up Up 10 KEY_UP 13 Left Left 25 KEY_LEFT 14

In retrogame, my mods look this:

// Use this table for the basic retro gaming project:

{ 25, KEY_LEFT },

{ 9, KEY_RIGHT },

{ 10, KEY_UP },

{ 17, KEY_DOWN },

{ 23, KEY_A },

{ 7, KEY_Z },

{ 2, KEY_SPACE },

{ 3, KEY_S },

{ 4, KEY_X },

{ 27, KEY_ENTER }

// For credit/start/etc., use USB keyboard or add more buttons.

#endif

};

#define IOLEN (sizeof(io) / sizeof(io[0])) // io[] table size

// A "Vulcan nerve pinch" (holding down a specific button combination

// for a few seconds) issues an 'esc' keypress to MAME (which brings up

// an exit menu or quits the current game). The button combo is

// configured with a bitmask corresponding to elements in the above io[]

// array. The default value here uses elements 6 and 7 (credit and start

// in the Cupcade pinout). If you change this, make certain it's a combo

// that's not likely to occur during actual gameplay (i.e. avoid using

// joystick directions or hold-for-rapid-fire buttons).

// Also key auto-repeat times are set here. This is for navigating the

// game menu using the 'gamera' utility; MAME disregards key repeat

// events (as it should).

const unsigned long vulcanMask = (1L << 6) | (1L << 9);

const int vulcanKey = KEY_ESC, // Keycode to send

vulcanTime = 1500, // Pinch time in milliseconds

repTime1 = 500, // Key hold time to begin repeat

repTime2 = 100; // Time between key repetitions

 

This guy's blog has all these details: http://rickybee.com/index.php?option=com_content&view=article&id=157:lynxpi-project&catid=77&Itemid=435

 

He also details the shutdown script.

 

I'll go through and document everything I did shortly in a step by step as well.

 

I will say that X and Y as the small buttons on the side of the LCD sucks.. they aren't very responsive. So as silly as it sounds, if I want to play SNES games, I just plug in a SNES controller to the USB port :P

  • Like 1
Link to comment
Share on other sites

Also, I'm thinking about taking a Lynx I shell and modding the heck out of it with more buttons and such. I have a pretty banged up Lynx I that has a cracked screen bezel, the paint is coming off, the battery and cart door is missing. So I'm thinking it's going to get bondo'd up and have a lot more buttons installed as well as a 4.3" screen screen instead of the 3.5". Then I can give it a custom paintjob.

  • Like 1
Link to comment
Share on other sites

Atari should have gone with A,B,X,Y instead of having Option buttons. Oh well I'm sure you're doing a great job cowdog360. I'm sure you've seen the Lynx/GameCube mod.

 

Yeah, that one is amazing. I'd consider bondo and sanding on a Lynx II to get more butttons, but then I have to paint it all up. I'd love to keep the plastic stock and add more buttons, but I don't see a whole lot of ways to do that and add things. the Lynx I is a good candidate because a lot of them have flaking peeling paint, so it wouldn't be as much of a sin to modify that body.

Link to comment
Share on other sites

So tonight I got some PAM8043 amplifier boards in, so I took apart my project and put the new amp in. Basically I just desoldered all the LM386's and components off the stock PCB I recycled. I then did a lot of schematic and continuity testing to figure out how to run line out from the Pi into the volume pot, and volume pot to headphone jack. Then I just took a combined output off the headphone jack and ran it into the right channel on the PAM board. The speaker is much much louder now. There's still some background noise, and I'm pretty convinced it's the crappy line out on the Pi. As soon as my USB sound cards get here, I can doublecheck and hopefully I'll have cleaner audio. It isn't bad, I'm just a little picky about sound.

 

What I've also noticed is that the combined audio sounds pretty bad on stereo games. I think the original circuits must've done some mixing, so I'll need to build a quick audio sum circuit out of 3 resistors. I also ordered some calipers so I can take measurements of things. I'm definitely going to build a PCB that will have headphone jack, volume pot, comlynx jack with ins/outs for whatever amp/soundcard people want to use.

Link to comment
Share on other sites

Here's some progress on a 2nd build with a new twist. This one won't have a lithium pack, but instead will use AA batts and retain all of the original jacks and even the cartridge slot.

 

The goal here is to wire the cartridge slot up to the Pi's USB ports and make a custom "cartridge" that has USB jacks on it, so when you need to work on the Pi, you can have external USB jacks for keyboard/mouse/wifi. In this example, I've gutted the original board and cut out parts of it. The pi will be stripped of all of the USB ports and ethernet and slimmed down as much as possible vertically. Then it's off to make a 5V regulator circuit to handle the 9V conversion and rewire all the jacks. Not as elegant as just making a new PCB, but a lot less work.

 

Parts for this one will be:

 

Lynx II shell

PAM8403 Audio amp for Speaker ($1)

USB sound card for Pi ($1)

Pi 2 ($35)

32gb MicroSD Card ($15)

Slim power switch ($2)

5V DC-DC Converter (RECOM or OKI) - $6

Screen, either 3.5" Composite ($17) or maybe a VGA 3.5" if I can figure out how to fit everything in there ($100+).

 

So this project has a base cost of about $77 if you have a Lynx shell. Should be fun!

 

20160124_133439_zpshbnyr8dg.jpg

Edited by cowdog360
Link to comment
Share on other sites

Has anyone tried RecalboxOS instead of RetroPi? There seems to be lots of action going around RecalboxOS. They have also integrated free homebrew games in the base image. And Kodi as a video/music player.

 

I do have some issues with the GPIO pin 7. It works perfectly for one game but when you exit the game the pin has lost its function. My guess is that the pin is used for something else also. Perhaps the 1-wire interface.

Link to comment
Share on other sites

I'm have 2 SD card for emulation, one with Retropie, one with RecalBox.

RecalBox is easier to install, manage 360 sticks from scratch, and have an option to auto-update.

For emulation, it's pretty the same (but I don't have a raspberry 2 right now for testing powerfull systems)

 

I think I will keep RecalBox as main system, I still have to decide which kind od cabinet I want (big one or portable like yours).

But I'm not sure that Recalbox works from scratch with A/V output.

Edited by Fadest
Link to comment
Share on other sites

It took a while to find out a way to map the buttons in RetroPie.

 

Buttons UP/DOWN/LEFT/WRITE are trivial. Mapped to up/down/left/right cursor keys on the keyboard.

A=z B=x

 

The RetroPie needs KEY_SPACE and KEY_ENTER for navigating the main menus.

 

select = PAUSE = KEY_SPACE

back left = Opt2 = KEY_ENTER

 

The combination is also the FLIP of the screen which is kind of useless on the Raspberry Pi. The "space" is also used as a speed up key by default. I re-mapped the speed-up function key to "plus" in order to free the key. Then I also declared the "space" to be the hot-key selector.

 

The hot-key selector needs to be active for the "exit the game" function to work.

 

I mapped the exit the emulator to be mapped to "escape". The retromenu software has something called vulcan key. It is a key combination that pressed for more than 1.5s it will send out the ESC character. In this case I mapped the PAUSE + Opt2 to become "exit" when pressed for a long time.

 

The last key to map is the

back right = Opt1 = b.

 

This was a very brief log of a working setup on RetroPi. The nice thing is that FLIP and RESTART works just as in a real Lynx. So you only need 5 buttons + joypad to make a working Lynx emulator. For Amiga games you also need the usb socket for mouse/kbd.

HeroQuest1.jpg

Link to comment
Share on other sites

Just a small note about emulation.

 

The Lynx emulation works great on a PiZero.

 

Amiga emulation is not so good. The beautiful background tunes of Hero Quest lost all the depth. The music is also a bit stuttering.

 

I have not yet tested my favourite PlayStation games. It would be cool to be able to emulate dancing games like Bust-A-Groove or Channel-5 properly.

Link to comment
Share on other sites

  • 3 months later...

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