Forum Replies Created
-
AuthorPosts
-
supersirlinkParticipant
Made of 1/4″ pine, vents are 1/16″ balsa spaced on 1/16″… ports and openings were routed out… I have over 60 hours in it, so I don’t think it would be cost effective to sell… Though there are few things I might improve on and so might build another some day…
supersirlinkParticipantShadowgate was the NES game I noticed it immediately with… The music is all distorted and choppy…Mario is fine, till you get going quickly and there are several enemies… SNES games are worse… It almost undos the mid level over-clock…
Bumping the sleep up higher helps, Shadowgate is not as choppy, but it is noticeable enough still that you can hear in the music when it recycles… What I have not tried yet is seeing if I increase the sleep and if bumping the over-clock a little more will help…
I posted on the raspberry pi forums as well and it was suggested there that I look into finding a script that does the same but uses polling or interrupts and it not BASH based… So I am going to explore that as well…
supersirlinkParticipantI was wondering that myself, not sure exactly how to do that…
Or if there was a better way to watch for the pins… The original is a bash script:
#!/bin/bash #this is the GPIO pin connected to the lead on switch labeled OUT GPIOpin1=22 #this is the GPIO pin connected to the lead on switch labeled IN GPIOpin2=14 echo "$GPIOpin1" > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio$GPIOpin1/direction echo "$GPIOpin2" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio$GPIOpin2/direction echo "1" > /sys/class/gpio/gpio$GPIOpin2/value while [ 1 = 1 ]; do power=$(cat /sys/class/gpio/gpio$GPIOpin1/value) if [ $power = 0 ]; then sleep 1 else sudo poweroff fi done
supersirlinkParticipantDo you have
input_enable_hotkey =
set in any of the cfg files?supersirlinkParticipantDon’t use root, just SSH on and do sudo nano /boot/config.txt
supersirlinkParticipant[quote=3209]Sorry, Meant to say:
That looks great, a couple extra settings altered here that I CAN’T find in the Raspi-Config.
Thanks.
[/quote]
These settings go in the config.txt located in /bootsupersirlinkParticipantDid you try just holding done the button you assigned first to “enter”? If you hold the button down, it should skip the input being prompted…
supersirlinkParticipantOk, think I know what the cause is now… Been playing more with the retroarch configs.
In the configs/all/retroarch.cfg I have the common inputs, hotkey, exit. In the configs/nes/retroarch.cfg I had this:
input_player1_joypad_index = 0 input_player1_b_btn = 3 input_player1_a_btn = 1 input_player1_start_btn = 7 input_player1_select_btn = 6 input_player1_up_axis = -1 input_player1_down_axis = +1 input_player1_left_axis = -0 input_player1_right_axis = +0 input_player2_joypad_index = 1 input_player2_b_btn = 3 input_player2_a_btn = 1 input_player2_start_btn = 7 input_player2_select_btn = 6 input_player2_up_axis = -1 input_player2_down_axis = +1 input_player2_left_axis = -0 input_player2_right_axis = +0
In the configs/snes/retroarch.cfg I had this:
input_player1_joypad_index = 0 input_player1_b_btn = 1 input_player1_a_btn = 0 input_player1_y_btn = 3 input_player1_x_btn = 2 input_player1_l_btn = 4 input_player1_r_btn = 5 input_player1_start_btn = 7 input_player1_select_btn = 6 input_player1_up_axis = -1 input_player1_down_axis = +1 input_player1_left_axis = -0 input_player1_right_axis = +0 input_player2_joypad_index = 1 input_player2_b_btn = 1 input_player2_a_btn = 0 input_player2_y_btn = 3 input_player2_x_btn = 2 input_player2_l_btn = 4 input_player2_r_btn = 5 input_player2_start_btn = 7 input_player2_select_btn = 6 input_player2_up_axis = -1 input_player2_down_axis = +1 input_player2_left_axis = -0 input_player2_right_axis = +0
First I remarked out all the entries in the nes/retroarch.cfg and put the inputs back in all/retroarch.cfg, and Super Mario Bros worked again! So I did the same for the snes/retroarch.cfg and Super Mario World worked! Then I put it back the way I had it, but remarked out the player2 entires and both still work… So I am thinking that it is the player2 inputs. It is odd that it only effected these two ROMs…
I think getting control back with SNESDev disabled was an indirect effect… Since they use different entires for keyboard input…
So the question now, did I format something wrong for player2?
supersirlinkParticipantI had similar results… If you browse and apply one through the RGUI, I just get a black screen as well…
supersirlinkParticipantDoes it register if you do jstest /dev/input/js0 ?
supersirlinkParticipantSorry, I should have explained better. I do have controllers connected to the GPIO board, NES in this case that work with Emulation Station and RetroArch. If I launch a ROM (Zelda), it works great! Now if I try to launch another (Mario Bros), I have no controls once the ROM loads.
I thought it was odd that I also lost the keyboard too. If I stop the service I still don’t have controller input (of course), but I get keyboard control again.
It seems as if ROMs like Mario Bros are not working with SNESDev. This is the only one I have found so far, going go through all the others and see if there are others.
Edit: I should also add, with SNESDev running I can use the controller to trigger the hotkey exit RetroArch combo to take me back to Emulation Station…
Is it possible that a ROM is not using the retroarch.cfg in the folder for that system? The hotkey and exit are in configs/all, the controls for the NES and SNES are in their respective folders…
Been going through testing and so far Super Mario Bros is the only NES ROM not working…
Odder still, on the SNES side Super Mario World buttons don’t work on the menu, game select, or map screen. You have to hold another button down (one of the shoulder buttons or start) then you can move/press start. BUT all the controls work fine within the level… The odd part is if I connect the NES controller, I don’t have that issue… I can push start and begin playing…
supersirlinkParticipantYou actually want to look for the input settings for RetroArch, not EmulationStation… You can find all of the default inputs in the skeleton config here:
https://github.com/libretro/RetroArch/blob/master/retroarch.cfgsupersirlinkParticipant[quote=3528]I tried Petrockblog’s most recent idea of entering two commands for key pressed to be able to use hotkeys and confirmed it does not work. I can get the GPIO button to function while holding down my function key on the gamepad but mapping two button commands to one command did not provide any results. Let me know if anyone else has any ideas so we can get this all figured out![/quote]
There was an extra space after the comma after leftalt, be sure you only have one space… Also you will need to put the correct key in for the hot key assignment you made… Thats where I put two hot keys in my retroarch.cfg
I have one hot key defined for my controller and one for the keyboard. That way I can input commands from the controller OR keyboard without having to grab both…
input_enable_hotkey = alt input_enable_hotkey_btn = 6
case BTN_STATE_PRESSED: if (button.pressedCtr == 1 && button.duration >= 1) { uinput_kbd_write(&uinp_kbd, KEY_LEFTALT, 1, EV_KEY); uinput_kbd_write(&uinp_kbd, KEY_R, 1, EV_KEY); } break; case BTN_STATE_RELEASED: if (button.pressedCtr == 1 && button.duration >= 1) { uinput_kbd_write(&uinp_kbd, KEY_LEFTALT, 0, EV_KEY); uinput_kbd_write(&uinp_kbd, KEY_R, 0, EV_KEY);
And just to confirm this worked for me… I push the momentary switch and with the assignments above, the rom resets (without having to touch the controller or keyboard)…
Thanks Florian!
supersirlinkParticipantI haven’t managed to find if you can send a key sequence with the script… Anyone know if that is possible?
supersirlinkParticipantIt’s the red ones… You don’t want to check for resistance, but continuity… Should make a sound and show a value when the probes are touched…
supersirlinkParticipantChances are 2 pins are for the circuit and the other(s) are support. Test for continuity across all the points, with the switch depressed and open.
If you do this on the switch provided with the GPIO board, you will see the outer 2 are isolated from the inner 2. And the corresponding holes on the board are also isolated. (Sometimes can be ground, but I didn’t see that. )
So for mine, I used a NES reset switch, I picked up the middle two points.
I actually soldered a connector there for easy removal.
supersirlinkParticipantYeah, the SNES controller worked fine with the adapter I made to connect to NES ports.
It is a great little board you designed!
Ohh and it seems the script assigned to the momentary switch is also affected by the enable hotkey setting in the retroarch.cfg. But I posted about that in another thread.
supersirlinkParticipantFlorian, can we put a key combination in the code, like say KEY_ALT+ESC, or KEY_ALT+H?
supersirlinkParticipantIf all you want is ESC, try this:
if (confres.button_enabled) { btn_read(&button); switch (button.state) { case BTN_STATE_IDLE: break; case BTN_STATE_PRESSED: if (button.pressedCtr == 1 && button.duration >= 1) { uinput_kbd_write(&uinp_kbd, KEY_ESC, 1, EV_KEY); } break; case BTN_STATE_RELEASED: if (button.pressedCtr == 1 && button.duration >= 1) { uinput_kbd_write(&uinp_kbd, KEY_ESC, 0, EV_KEY); } break; } } /* wait for some time to keep the CPU load low */
supersirlinkParticipantDo you have this line defined in one of your retroarch.cfg files:
input_enable_hotkey_btn = 6
I found when I set that, I have to use the hotkey to send ANY commands, even from the keyboard. My momentary switch works when I hold down the hotkey button then press the switch…
supersirlinkParticipantI left the SNESDev.cfg file set to SNES controller types, but set the button mappings for each system in retroarch.cfg for that system…
Works great!
supersirlinkParticipantSo I am testing the GPIO with an NES controller, but jstest on js0 is not showing the Retropie GPIO, but my USB NES controller:
pi@raspberrypi /dev/input $ jstest js0
Driver version is 2.1.0.
Joystick (InfiniteNesLives.com (S)NES_USB) has 2 axes (X, Y)
and 8 buttons (BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect).
Testing … (interrupt to exit)
Axes: 0:-32767 1:-32767 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off ^Z
[3]+ Stopped jstest js0
`Do I have to remove js0, or should it redetect the controller on the GPIO? I forced a fresh install of SNESdev via the setup script…
Tested the momentary switch function and that appears to be working via the testbutton script…
Edit: nope I forgot to unplug the usb controller… Did so and rebooted, but now I don’t even have a js0 or js1…
Service also appears to be running…
Edit2: okay, if I restart the service I get js0 and js1…
Edit2: Nevermind, :) I performed the enable on restart from the retropie setup script and now they show up on start up… Guessing when I force a new install it removed that…
supersirlinkParticipantGlad I could be of help! :)
supersirlinkParticipantsupersirlinkParticipantI would start by checking the settings in the /Boot/config.txt for you video mode.
Take a look here:
http://elinux.org/RPi_config.txtOnce you get a controller setup, there is a key to be able to jump by first letter or last played, ect…
supersirlinkParticipantDo you mean F1 to go into the RGUI menu? I see the option to set the shaders path there, but when going into the directory is empty so, I am guessing if they are installed they are elsewhere or that they really aren’t installed…
supersirlinkParticipantHi FreezX, I was wanting to test them with NES and SNES games and play with the look and feel…
I saw the references in the retroarch.cfg, but didn’t know if they were already installed, or do I have to pull them down from Git (I am assuming)…
supersirlinkParticipantThat’s not bad at all! I changed the single press from R to H to reset the ROM and kept 3 and 5 press as is for now… I got the GPIO board the other day and plan to wire it up this weekend! I also got a shutdown switch from Mausberry Circuits that I will be wiring up to power/shutdown… Thanks!
supersirlinkParticipantWould like to know how to do this as well… :)
supersirlinkParticipantI was able to set my runcommand to 2 and force 720p. That way I get widescreen emulation station, but a 4:3 pillar boxed for NES.
Might be happening based on the way my reciever sees the signal though.
Performance seemed great on the NES, haven’t tried SNES yet.
supersirlinkParticipantsupersirlinkParticipantIt just occurred to me that NES and SNES controls both have 7 pins… I can then wire up NES connectors (since I play more NES games and only own a few SNES games) and make an adapter to plug an SNES controller in…
Speaking of which, now if there was a way to read the actual cartridges… That would be beyond cool…
supersirlinkParticipantThanks, will post back my results once I get the parts…
supersirlinkParticipantOhh, I forgot to ask, is that version of the driver already in version 1.9.1 of the RetroPi image?
supersirlinkParticipantCool, thanks much for the reply! I don’t intend of doing a lot of multiplayer, so one of each is really what I am after… I just ordered one from you, thanks for making that available!
I have original controllers that have been modified to USB, I wonder then if I can make the USB player 2…
Thanks again!
-
AuthorPosts