Sunday, 29 November 2020

Joystick Controller acting as Mouse

 Worth a check if things are going wrong.


I installed some emulators including PCSX2 & ReDream. Both when capturing my xbox 360 controller would not release outside the emulation box and they would also cause the mouse and select buttons to activate causing weird things like selection menu's & random open folders to pull to the front and be activated.


Turns out when I installed something it must have also installed the capture mouse package. By uninstalling  xserver-xorg-input-joystick it freed up the mouse to act separately again. 

I just removed it through symantic package installer rather than the command line. Just to be sure I CTL ALT DEL to reach the login screen and logged out and in again.

Everything worked fine then.

 

 xserver-xorg-input-joystick

Sunday, 23 September 2018

FreeDos 1.2 on Oracle Virtual Box

Had problems installing.

Fix is

make up your drive NEW

when you get to install from CDROM press tab

Insert "raw" without quotes in the line after memdisk

vis

/boot/syslinux/memdisk

/boot/syslinux/memdisk raw

Press enter

Each time it rebooted to continue install I added it, not sure if made any difference after the 1st though and too lazy to reinstall again for no reason to check it out.

Saturday, 24 February 2018

Audio Recorder

sudo apt-add-repository ppa:audio-recorder/ppa
sudo apt-get update
sudo apt-get install audio-recorder

Sunday, 21 January 2018

Not all Thumbnails showing in Preview



sudo apt-get install dconf-editor

Open dconf-editor

Go to path

org / gnome / nautilus / preferences / thumbnail limit

Limit for showing thumbnails is 10mb size picture

add 0 on end for 100mb or double it 20mb whichever you want

Sunday, 24 September 2017

Swap space

Good tutorial on adding a swap space. I've been having memory freezes since adding my new Ultra widescreen monitor.


https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04

Sunday, 7 May 2017

Back up Pi (on Mint)

To backup the Raspberry Pi SD Card

dd if=/dev/sdx of=/path/to/image
To restore
dd if=/path/to/image of=/dev/sdx
From here:https://raspberrypi.stackexchange.com/questions/311/how-do-i-backup-my-raspberry-pi

Thursday, 13 April 2017

Check if Pi Zero Working (on MINT)

Remove SD card.

Micro USB to USB A male.

Plug in to USB on PC.

Plug Micro USB into USB port (not end of board Power micro USB) the other.

Open Terminal and type dmesg to check USB port connections.

Should see "Broadcom" come up as a connected device.

Wipe brow as not wasted a fiver by blowing Zero up. 

Sunday, 12 March 2017

Kill

Just another note to myself.

Using Kill

Noticed my CPU was using 3 out of the 4 cores at 100% and the fan was pretty noisy.

I initially thought it was Cinnamon but it wasn't.

I opened Terminal and used Top

Top

This listed the top three processes being used by FoxitReader. Earlier I had accidently tried to open a file with it that was not PDF.

Top showed me the process PID

So a quick ALT & F2 to open a console and kill followed by the PID shown next to each of the instances killed these processes and my CPU use dropped like a stone.

Sunday, 5 March 2017

Uploading Sailfish 3D Printer Software from 64 bit Linux Mint

My God, I've had my 3D printer for a year now and have not been able to upgrade the stock Makerbot firmware to the newer Sailfish firmware until NOW.

My Printer:




CTC 3D Printer (This is a Makerbot Dual Clone) equivalent to a Flashforge Creator)

The control board is a Mightyboard with an AT Mega 1280 Chip (I believe CTC have now updated the chip to the version with more memory)

Print area 220 x 140 x 150



Anyways, after watching video's, reading posts and getting nowhere I had nearly given up.

The problem I and it seems many others have had using Linux (not just Mint) was pressing the upload button to flash the new firmware onto the chip while simultaneously pressing the reset button on the printer.

Nothing was working, however many times I pressed, waited, pressed etc.

Finally I think I have cracked it after reading a post I will link to later for reference.

It seems that the problem on my 64 bit Linux install is avrdude.

So what I did...

1,Made sure I had the last version 7.5 of the Makerbot software.

2, Downloaded and installed all dependencies for ReplicatorG. You need the Sailfish version not the standard version. It can be found on Thingiverse Version 40 r33.

3, I then set up in ReplicatorG from File / Preferences / advanced / the new path to upload the updated firmware Hex files to RepG just as the Sailfish homepage instructions said (the new path is noted on Thingiverse as it has changed since the page was written).

4, I watched as in the command line view at the bottom of RepG uploaded the new software and a list flew by in green text.

5, I followed the instructions again on the main sailfish site until I got to the part where I would be pressing update and the reset button.

(After my previous tries I had opened RepG in Terminal and behind the program in the terminal window I saw the fail was saying something about libusb not working. This new field of enquiry led me to a discussion about Avrdude and the version supplied with sailfish V 40r33 not working correctly on 64 bit Linux Ubuntu systems. A contributor had suggested the OP try calling the newer version installed on their system via the command line to do the flashing and so I followed that advice)

6, I opened up a command line terminal and input:

avrdude -c stk500v1 -P/dev/ttyACM0 -b57600 --Uflash:w:/home/my_name/.replicatorg/firmware/ff_creator-Sailfish-v7.7.0-r1432.hex:i  -pm1280

replacing "my_name" with my login of course.

The cursor sat there flashing an underscore. I'm not really sure what I was expecting and I turned, not very fast I admit and pressed the reset button on the back of the printer.

Bang...  The terminal changed

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9703 (probably m1280)
avrdude: reading input file "/home/my_name/.replicatorg/firmware/ff_creator-Sailfish-v7.7.0-r1432.hex"
avrdude: writing flash (125440 bytes):

Writing | ################################################## | 100% 30.11s

avrdude: 125440 bytes of flash written
avrdude: verifying flash memory against /home/my_name/.replicatorg/firmware/ff_creator-Sailfish-v7.7.0-r1432.hex:
avrdude: load data flash data from input file /home/my_name/.replicatorg/firmware/ff_creator-Sailfish-v7.7.0-r1432.hex:
avrdude: input file /home/my_name/.replicatorg/firmware/ff_creator-Sailfish-v7.7.0-r1432.hex contains 125440 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 25.80s

avrdude: verifying ...
avrdude: 125440 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

So the instructions set the USB port output and Uflash was directed to the Hex file to flash.

As you can see it was set for the flashforge Hex file. I believe this is because this is the same as the Makerbot Sailfish software but allows the heater bed on the printer to heat at the same time as the heating element on the head. Some power supplies on the Makerbot were not powerful enough to do both these things at the same time but apparently the Flashforge and the CTC have bigger power supplies.

I'd like to thank the people on this thread for getting me further than anyone else

https://groups.google.com/forum/#!topic/ctc3dprinters/IdgMcZT7zVg


Connections for Repetier Host: (Printing software just for my notes !)

serial connection set serial port to /dev/tty/ACM0 and Baudrate to 115200

GPX plugin - Change setting to Replicator 1 Dual NOT replicator 2

Slic3r - set options to printer settings / general / sailfish (makerbot)

Print area  (x)220 x (y)140 x (z)150 Origin 112 x 72 Centre (important for Octoprint)

Also Octoprint /Slic3r info, Set custom Left Tool (T1) Right Tool(T0) and Dual profiles. When slicing with one loaded filement make sure correct one is selected.

tool1 offset x34 y0

Use scrip section to set start and end gcode, If you want to print in dual color/materials remember to remove the tool1 offset from the slicer or from the printer setting or the software will add both.

More Slic3r info here:
https://3duniverse.org/2014/01/05/using-slic3r-with-a-flashforge-creator/

JST -VH (The Jst connector to the heater bed, just a reminder to myself)

Monday, 9 January 2017

System Sounds missing / not working

Yesterday I lost all my system sounds after a new install (done as an upgrade ) of Mint Sarah.

Actually it had been lost in 17.3 and I had done the upgrade after screwing it up there while trying to change the sound inputs to accept a 5.1 surround sound system. I had hoped with the new Kernel it would fix it.

Lot's of complicated advice out there for this issue and ideas for fault finding.

Turns out all I had to do was open Synaptic Package manager and search for libcanberra-pulse, it was not installed so I ticked it and applied the change. Voila I now have desktop sounds again.


Incidentally the issued with the Creative 5.1 surround sound system was a fixed to an extent,  after screwing everything up by following several different fixes first.

My internal sound card on the motherboard  has three, three-pin phono input/outputs.

My Sub woofer was connected to PINK (mic) connection nearest the board.
Next to that was FRONT connecting to the middle LIME (line-out).
Finally REAR was connected to LIGHT BLUE (line-in).

With these connections set up correctly from the manual's of both the ASROCK 960GM motherboard and the CREATIVE Inspire T6300 surround sound system it was just the software to tackle.

It seems like you have to change the options in the /etc/modprobe.d folder. there can be found the text file alsa-base.conf

By changing (as root) and adding the yellow highlighted line to the file I seem to have made the sound chip on the motherboard's connection be recognised as an analogue 3 pin phono connector thus enabling it to send the correct signals out and not expecting a microphone signal in and line in to be received.

# Prevent abnormal drivers from grabbing index 0
options snd_hda_intel model=3stack
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2


I still have some work to do on this as I'm not sure if everything is working OK but I am getting there.

Finally I checked that the option of 5.1 was now there in the sound options of the control panel and moved the option from 2 channel stereo to 5.1 stereo.

I also checked alsamixer from the Terminal which seemed to only show the first 5 channel volume options by moving across with the right arrow the other options appeared from the edge of the screen to check also. I made sure the correct options for volume were set here also.

Thats where I'm up to.

Thursday, 28 July 2016

XBOX 360 gamepad Install

Finally found a good driver install for Ubuntu/Mint that works correctly for this gamepad.

From:
http://www.noobslab.com/2014/08/configure-xbox-controller-on-your.html






sudo add-apt-repository ppa:rael-gc/ubuntu-xboxdrv

sudo apt-get update

sudo apt-get install ubuntu-xboxdrv

sudo service xboxdrv restart

Saturday, 6 February 2016

Makerbot Desktop Unable to install from instructions on their site

Just trying to install Makerbot Desktop on Mint 17.3 from their website instructions.

Lesson learnt, don't trust cut and paste

This guys answer is a bit over the top but I like that, explained it perfectly

http://askubuntu.com/questions/528051/makerbot-won-t-install

Answer 2

Sunday, 13 December 2015

D-Link IP Camera setup on Linux Mint

Well last night I gave in to shopping temptation and got a D-Link DCS-932LB1

Dlink pictire

It was cheap and on offer and although it only said Windows / Mac use I thought I would take a chance to get it working under Mint. That BUY NOW button eh !

So first I found Zone Minder, which looks a great program but I had real trouble setting it up so I gave up trying after following a few guides. Something to do with systemd and systemctl I could not figure out.
So I looked for something simpler and I found it.

Motion

I've just started to play with it but I need to get this down before I move on to saving video and using it via my android phone & other places, so the basics of setting it up.

First I found a guide on how to just set up the camera with my router at sensor.org

This was basically connect by ethernet cable to my router
plug the camera in
navigate to my router setup homepage where I found the WPS connection button,
then press the button on the back of the camera and the WPS button on the setup page
The router found the IP camera and I was away.

I found the new connection on the list of active connections on the router info page
copied the internal IP address 192.168.x.x
and pasted it into my browser
This brought up the IP cameras setup page where I entered the supplied username and password
from the manual. The first thing I did was change this and follow the setup from there
keeping the simplest options for now.

I was now ready to install Motion

sudo apt-get install motion
sudo apt-get update

apparently this should automatically create a

motion group (I learnt a bit from trial and error about there from installing Plex !)
it should also add a motion user

This info is on Linux.com at how to operate linux spycams with motion

after making sure this was right I started motion

$: motion

mistake it wouldn't give permission to use
silly me

$: sudo motion

and it started up. I then found it had failed to find the video device

I followed the instructions on Linux.com down to the point where the author talked about
permissions again.

Her name was carla so I noticed she gave the instructions

~$ sudo chown carla:carla .motion/motion.conf
Her group name was obviously carla and so was her user name.

I replaced the carla with my group name and user name so it all worked.

I followed the info to make more directories then saved localhost:8081 and localhost:8080 to my browser favourites
The first port 8081 is the feed to see the camera output and the second port 8080 is the configuration
file where you can enter and change different set up options.

I went to config then list and all the changable options were there

To see my camera I then went back to the IP Camera's setup page and found the link to the feed by
right clicking on the video feed and using inspect on my chromium browser to pick up the link as shown on Linux.com.

pasting that link into netcam_url =
and then pasting admin:mypassword
into netcam_userpass =

Bang. the feed came up on the hocalhost:8081 webpage

Now I can mess about with other options another day to add functionality

Sunday, 25 October 2015

Mupen64plus

Just a little about setting up Mupen64plus, the Nintendo 64 emulator.

It seems this puts files everywhere and none of the Ubuntu places that are suggested in most tutorials.

So easiest after installing the deb file, do a search in the Nautilus file manager for Mupen64 and watch all the places its stuck itself show up.

Install the frontend "M64py" to make it a little easier to point to where the Rom's are stored along with where the executable is and Data files / Plugins. Leave the search results handy so you can see where everything is.

One problem I had was setting up my controller. I used a Xbox360 Pad and tried to follow the joystick setup walkthru that is an easy find online.

https://code.google.com/p/mupen64plus/wiki/ControllerSetup

Two things to point out about this, the config.ini file it talks about is in the $HOME/.config hidden file in your home directory.

(Dot). files need to be seen in a folder by going to the menu bar and selecting View then scrolling down to hidden files and selecting so they are shown. There also may be other config.ini files for other emulators there also.

This file is nice to view and only needs a little amending (as root).

The parameter needs to be changed in the Core section of mupen64plus.cfg. It should look something like this:

Joy Mapping Stop = "j0b10"

That's for joystick 0, button 10

This gives you an ESCAPE from the emulator mapped to button 10.

The InputAutoCfg.ini file which is the file used to set various joypads up was harder to find thus the Nautilus search. The controller Setup info was wrong for me. I found it at /usr/share/games/mupen64plus 

Before I go any further I have to say I had lots of trouble getting the controller to work until I realised my controller itself was not connecting correctly. I was forced to try a few different USB ports for it to connect. I checked that the system was seeing it by doing a lsusb command at the terminal until it showed up.

I grabbed the Xbox 360 controller configuration file and pasted it into the InputAutoCfg.ini and tried and tried to get it to work with the controller setup GUI in M64py frontend. No luck

Finally I found a post on the Ubuntu forums that had the answer. Call the programme from a Terminal window. I did this and all the setup configuration options were there to be changed and saved. easy when you know how.

One final thing I've been finding with emulators in general. Quite a few I've used have been opening in full screen and I've had trouble escaping from the full screen view.

There have been some quite bad tempered replies to posts from people who had this problem from some unsympathetic dicks. They should just be nice and tell them on some emulators to escape full screen it is ALT and ENTER. Even with random pushes that was hard to find and when its buried somewhere in the midst of a manual its even harder to work out.

Saturday, 22 August 2015

Setting up my Time lapse Raspberry Pi Camera with a shut down switch

Lets do it !


Well this post is a little bit about Linux Mint as I'm using it to set up and transfer files to my Time Lapse Camera I have made from a "Raspberry Pi" Micro computer but also because it links in to my last post which was about joining the shots I'd made into a short time lapse Video.

Let's get this down while I have the tabs open on my browser I've used and it's fresh, in case I need to do it again.

About the Camera


I set up a simple camera time lapse using the camera module for the Pi and set it off connected to a mobile phone battery back up pack.

These are ridiculously cheap on e-bay from China without the batteries inside, currently about £2 including shipping. They're searchable as Rechargeable USB LED Mobile Power Bank Charger 4pcs 18650 Li-ion Battery Case

People give me old out of date or none working Laptops and so I ripped the Lithium batteries out of the battery pack of one of these. The nice Panasonic batteries were checked on my multimeter and they all seemed OK so I put 6 of them inside the battery pack casing and set it on charge through the USB port of my PC.

By the way most laptops seem to hold battery packs of the type 18650. You can buy them on e-bay but there are types with a nipple on the plus end and types that are flat on both ends. My batteries from the laptop fitted in the case but some new ones I also bought 4x 4200mAh UltraFire 18650 3.7V Rechargeable Li-ion Battery  were shorter and were loose when put in so I did not use them.

I now had a portable time lapse camera I can take anywhere and it will take a picture every one minute for as long as the batteries last.

The set up for the Camera time lapse is available as a worksheet on the Raspberry Pi  learning website
https://www.raspberrypi.org/resources/

This is just a prototype and I want to add other features to it as I go along so nice start.

What now

After setting up the Camera to capture the scene outside my window onto the street I left it running overnight to see how long the batteries would last before they cut power to the Pi. The shots were saved as in the worksheet instructions to save date and time so I would know how many hours by just checking the time stamp on the pictures.

Well that all worked and I took the mini SD card (or TF card if you're from China) from out of the Pi and connected it to my PC, copying over the "Camera" folder to my Linux desktop and then using imagemagic in TERMINAL as described in my last post.

Now to the crux

The battery lasted enough time to get a nice sunrise over my car and onto the street but then I had the issue of shutting down the Pi. (Switches to present tense)

I don't want to damage the file system on the SD card by too many hard close downs from loss of power. I can do this by adding something to my script to fix the time and amount of shots taken before the script tells the Pi to shutdown the operating system (don't know how to do that yet but it is something I will research and learn). 

I also would like to be able to just press a button and ask the Pi to stop taking shots and shutdown the operating system itself before the battery does it for it by dying.

The little portable setup won't be connected to a monitor and keyboard and also I don't want to always have it connected to a ethernet cable or have a WiFi receiver plugged in. 

The only choice is a soft shutdown button.

Now there are a load of pages on the Internet on how to do this but my problem with them is if they are written by experts, they forget the simple stuff or miss vital bits out expecting you to know it.

If they are written by novices they seem to do everything the longwinded way with un-neccsary steps that just add to the confusion.

It's difficult to find something at my "tinkering" level. Oh well, that's life.

So this is How I have done it after lots of wasted hours.

The actual Process

This is for the Raspberry Pi model B+.  I have one of the earlier models, the B but I don't like doing anything that could screw it up with it.

First all the pages I looked at had everybody doing the complicated stuff on the Pi first connected to a monitor. For desktop stuff I think the Pi is just way to slow to do these things. After my initial setup of the card and Pi using a monitor I noted the IP address of the Pi and enabled SSH in (sudo) raspi-config so I could access it from my main computer.

All my editing of files were done by cutting the code from my browser then pasting into gedit the linux mint notepad, saving this file to my desktop and using Filezilla the FTP program to transfer that file to the correct folder on the Pi.

I used PUTTY to  do any other things such as making the files I had sent over read or writable using chmod to change the permissions, and for shutdowns.

The best resource I found was an article on the Rasbperry Pi forum but to me I felt it was over complicated. There were lots of comments made to improve the result but all left out important bits leaving a guide which seemed to be do it wrong then change this bit by bit until it works this way.

I had to go through everything to pull out a relevant and simple process.

First rip a small monetary switch from some old press button electronics board or buy new. They are tiny and just connect when pressed down for a moment. 

Then check they open and close forming a circuit. I used a light and battery to create a simple series circuit to check the legs of the switch as I could only find square 4 leg switches in my scrap box and didn't know which leg connected to which.

I then cut of the wires from an old PC fan connector that fits into the headers on a motherboard. They are small and thin black power connectors. You'll see them and know they are perfect to connect to the headers on the Pi.

Solder the micro switch to the two wires from the flat black connector (it may have two or 3 holes in it depending where you got it from) and you have your plug in switch. This should just slide gently over the pins 5 and 6 on the Model B+

Count in from the top left by the mounting hole, use a guide first to see where they are. 2 , 4 , 5 and 6.

Now cut and paste the code from the forum post below into gedit. I used the code by "ame" at the end of page one as the later code didn't work for me. 

Save it as shutdown.py.

FTP the file to the Home/Pi/    folder

Use PUTTY to access the Pi and in TERMINAL go to the Home/Pi/ folder where everything is and chmod +x shutdown.py to change file permissions.

Then enter the Cron system that sets up timed events by crontab -e

Go to the bottom of the file and add at the end

@reboot /home/pi/shutdown.py


Save this. Shutdown the Pi and disconnect, fit the switch wherever you want it and connect it all up again.

After the reboot you should just be able to press the microswitch quickly and the Pi will shutdown from within with a shutdown call. the lights will flicker then go to a solid red. One more tap and the Pi will come out of hibernate.





Links to resources I've used and were useful.

https://www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/

Shows GPIO points on the Raspberry Pi B+ I used, they're different from the B model

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=106410

Called "Solderless clean shutdown/boot switch" if it moves.

http://www.trevorappleton.blogspot.co.uk/2013/11/creating-time-lapse-camera-with.html

https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=67109

Friday, 21 August 2015

Rotating timelapse Images in bulk & converting to AVI using ImageMagic

CD to your folder  eg.

TERMINAL

cd Desktop/camera/



Make a bash script. My images are upside down so I need the rotation 180% using ImageMagic's convert.


TERMINAL


for file in *.jpg; do convert $file -rotate 180 rotated-$file; done


This script takes files all files (* wildcard) within the folder that are jpg format and rotates them 180 degrees. It then renames the file by adding a "rotated-" to the start of the file name.

I just remove the unrotated jpg's cos I'm lazy then

TERMINAL

ls *.jpg > stills.txt


List all jpg files and send that down a pipe to a text file called stills.txt

I can then use memcoder (if installed) to convert the timelapse pictures to a short avi video

mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@stills.txt

Saturday, 14 February 2015

Retro Pie

Not really about Linux mint but I thought I would add my notes here from setting up Retropie on my Raspberry Pi 256m. Just for my benefit incase I lose my tomboy note pad somehow.

Notes are grabbed from various sources. If I need to remove them or credit please tell me.







RetroPie Notes

Note from 2015-02-02 20:22:15.304

First Set-up change memory split from root file system : $ sudo raspi-config
also expand file system to fit card size

----------------------------------------------------------------------------------------------------------------------------------------------------
SETUP SCREEN

$ cd RetroPie-Setup
$ sudo ./retropie_setup.sh

----------------------------------------------------------------------------------------------------------------------------------------------------

If screen goes black ALT F2 then ALT F1 may work

Exit Emulation Station F4

When upgrading anything exit Emulation Station

Easy file copy Filezilla - use sFTP

Game Boy Advance - gba_bios.bin is stored in /opt/retropie/emulators/gpsp/

-------------------------------------------------------------------------------------------------------------------------------------------------------

Emulation Station config files for Joysticks info

top level config is for main emulation station controller and to control the main front end screen only. Start Em Stn 1st time it detects and asks.
To reset it up use console option or from terminal to delete file and make a new one
rm /home/pi/.emulationstation/es_input.cfg

To have controllers also work on the emulators edit the main emulator configuration file with the controller’s button information.

Basic way to start from scratch Use ‘retroarch-joyconfig’
find it (in case its been moved).

sudo find / -name retroarch-joyconfig

Maybe its here : /opt/retropie/emulators/RetroArch/tools
To store keymaps create a folder in the pi’s home directory with: mkdir /home/pi/keymaps
go to that directory: cd /home/pi/keymaps (one controller plugged in at a time when doing this)
/opt/retropie/emulators/retroarch/retroarch-joyconfig > /home/pi/keymaps/SNES_1.txt

View this file with Cat
pi@raspberrypi ~/keymaps $ cat SNES_1.txt
input_player1_joypad_index = “0”
input_player1_b_btn = “2”
input_player1_y_btn = “3”
input_player1_select_btn = “8”
input_player1_start_btn = “9”
input_player1_up_axis = “-1″
input_player1_down_axis = “+1″
input_player1_left_axis = “-0″
input_player1_right_axis = “+0″
input_player1_a_btn = “1”
input_player1_x_btn = “0”
input_player1_l_btn = “4”
input_player1_r_btn = “5”
input_player1_l2_btn = “9”
input_player1_r2_btn = “9”
input_player1_l3_btn = “9”
input_player1_r3_btn = “9”
input_player1_l_x_plus_btn = “9”
input_player1_l_x_minus_btn = “9”
input_player1_l_y_plus_btn = “9”
input_player1_l_y_minus_btn = “9”
input_player1_r_x_plus_btn = “9”
input_player1_r_x_minus_btn = “9”
input_player1_r_y_plus_btn = “9”
input_player1_r_y_minus_btn = “9”

Start button for all the other unused buttons is used here i.e.(9)

Now use RetroArch (the main configuration for all emulators). To find these (example)

pi@raspberrypi ~ $ sudo find / -name retroarch.cfg

RESULT
/etc/retroarch.cfg/opt/retropie/emulators/RetroArch/pandora/retroarch/retroarch.cfg/opt/retropie/emulators/RetroArch/retroarch.cfg/opt/retropie/configs/nes/retroarch.cfg/opt/retropie/configs/atari2600/retroarch.cfg/opt/retropie/configs/segacd/retroarch.cfg/opt/retropie/configs/megadrive/retroarch.cfg/opt/retropie/configs/mame/retroarch.cfg/opt/retropie/configs/mastersystem/retroarch.cfg/opt/retropie/configs/gamegear/retroarch.cfg/opt/retropie/configs/psx/retroarch.cfg/opt/retropie/configs/snes/retroarch.cfg/opt/retropie/configs/gb/retroarch.cfg/opt/retropie/configs/all/retroarch.cfg/opt/retropie/configs/gbc/retroarch.cfg/opt/retropie/configs/doom/retroarch.cfg/opt/retropie/configs/fbs/retroarch.cfg/opt/retropie/configs/pcengine/retroarch.cfg/opt/retropie/configs/cavestory/retroarch.cfg/opt/retropie/configs/sega32x/retroarch.cfg

The one that controls all of them is :
The others over-ride this file for individualisation, so you can amend the controller set-up for individual systems so
the right buttons cause the correct effect such as fire always being the same button on each emulator. REMEMBER this file will only effect all the emulators that work with RetroArch, the main frontend control.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

To change the main config file in the "all" folder use nano from Terminal: /opt/retropie/configs/all $ nano retroarch.cfg

# Joypad buttons.
# Figure these out by using RetroArch-Phoenix or retroarch-joyconfig.
# You can use joypad hats with hnxx, where n is the hat, and xx is a string representing direction.
# E.g. “h0up”
# input_player1_a_btn =
# input_player1_b_btn =
# input_player1_y_btn =
# input_player1_x_btn =
# input_player1_start_btn =
# input_player1_select_btn =
# input_player1_l_btn =
# input_player1_r_btn =
# input_player1_left_btn =
# input_player1_right_btn =
# input_player1_up_btn =
# input_player1_down_btn =
# input_player1_l2_btn =
# input_player1_r2_btn =
# input_player1_l3_btn =
# input_player1_r3_btn =
/p
# Axis for RetroArch D-Pad.
# Needs to be either ‘+’ or ‘-‘ in the first character signaling either positive or negative direction of the axis, then the axis number.
# Do note that every other input option has the corresponding _btn and _axis binds as well; they are omitted here for clarity.
# input_player1_left_axis =
# input_player1_right_axis =
# input_player1_up_axis =
# input_player1_down_axis =

Uncomment input lines (remove #) and refer to your previous results found in the SNES_1.txt you made earlier and stored in /home/pi/keymaps
Add the button numbers including quotes "" to match.
input_player1_a_btn = "1" for example.
Change the axis's to match also. these are for the D-Pad.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

Now enable Hot Keys (multi-button presses for other functions such as exiting). The example below uses double key presses to Select, Start,menu,save games and audio up/down.

input_enable_hotkey_btn = 8 #Select
input_exit_emulator_btn = 9 #Start
input_save_state_btn = 1 #A button
input_load_state_btn = 2 #B button
input_state_slot_increase_btn = 5 #R button
input_state_slot_decrease_btn = 4 #L button
input_reset_btn = 0 #X button
input_menu_toggle_btn = 3 #Y button
input_state_slot_increase_axis = +0 #Right on D pad
input_state_slot_decrease_axis = -0 #Left on D pad
input_reset_axis = -1 #Up on D pad
input_audio_mute_axis = +1 #Down on D pad

Save this in nano CTRL + X
Y
Enter

---------------------------------------------------------------------------------------------------------------------------------------------------------------

Saving Game States (i.e. part way through). To do this you can give permission to your "Pi" user account to save in the folder normally only available to the "root" user where all saves are made. Failure to save is caused by you not having permission to write to the root folder.
sudo chown -R pi /home/pi/RetroPie

--------------------------------------------------------------------------------------------------------------------------------------------------

Wireless XBOX 360 controller set-up

-----------------------------------------------------------------------------------------------------------------------------------------------------

Duke 3D Install Issues

original DUKE3D.GRP must be in /home/pi/RetroPie/roms/duke3d
Joystick needs setting up and checking in the options

-------------------------------------------------------------------------------------------------------------------------------------------------------

Set up wireless network from terminal

sudo nano /etc/network/interfaces

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0


iface wlan0 inet dhcp
wpa-ssid "ssid"
wpa-psk "password"

change ssid and password to yours

-------------------------------------------------------------------------------------------------------------------------------------------------------

BACKUP Pi SD CARD

Place card in Linux PC
Go to ROOT : $ sudo sh

find out what device the card is : $ fdisk -l
check by seeing what size card is e.g. 15.8 G

My card usually under /dev/SDC
dd is the copy image program, if (input file), of (output file), bs (baud speed, K,KB or M is multiplier speed of writing)

Use dd (execute it in folder you are saving to) : $ dd if=/dev/sdc of=THIS_IS_WHAT_IM_CALLING_IT.img bs=4M
Check it is there : $ ls -l -h
Compress file (minus 1 least compressed to minus 9 highest compression) : $ gzip -9 MY_CARD.img

------------------------------------------------------------------------------------------------------------------------------------------------------------

SOUND ISSUES

Set for HDMI or Audio Jack ?
Not using HDMI to DVI converter ? (DVI no sound throughput)

test from Terminal if sound using aplay : $ aplay /usr/share/sounds/alsa/Front_Center.wav

----------------------------------------------------------------------------------------------------------------------------------------------------------

Thursday, 12 February 2015

Wow, been some time and rzip

Wow, forgot how long it's been on here. My little place I keep my hints for myself and any others who get the same issues as me.
Obviously there are less issues with Linux Mint and I've not broken anything enough yet.

Anyway needed to do some compression on files today. Did a search, read a bit and it looks like rzip, from the repository was the one for me. Apparently lrzip is slightly better but I'd started encoding by the time I looked at that and it's just an upgrade to rzip.

So first I install it.

do a : rzip --help   for the info.

 -0            fastest (worst) compression
 -6            default compression
 -9            slowest (best) compression
 -d            decompress
 -o filename   specify the output file name
 -S suffix     specify compressed suffix (default '.rz')
 -f            force overwrite of any existing files
 -k            keep existing files
 -P            show compression progress
 -V            show version

Important notes being without the "-k" it deletes the original file after compression. I may not want that sometimes.

Friday, 25 April 2014

Major Fail ...bios corruption...keyboard not working

Well last night I installed some software, well a few pieces of software actually and I didn't check them out just expected them to work and trusted the recommendations from a website. The articles name was something about "Things to install after a new install of Mint Petra" or something like that.
I was really tired and didn't switch the PC off that night just fell asleep on the sofa till this morning. i headed back to the PC and was just sorting e-mail and messaging friends when....Shutdown. The PC just crashed.

I have been messing about with help from the Mint forum's, changing my bios memory settings as Mint seems not to recognise both my memory chips on my ASROCK 960GM motherboard. I thought maybe this was it.

Or the problems I've had with USB 3.0 connections also. Maybe this was all connected to my current troubles in hindsight.

Anyway on boot up again, my keyboard was not recognised and I was unable to get into bios to check things there. I got the GRUB menu but with no keyboard I couldn't access my Desktop either.
I disconnected all my USB connections and tried the keyboard and mouse in other USB ports first (I've heard some motherboards will only recognise the first USB port), no luck, then up to the loft for an old style keyboard and mouse. plugged them in to the Din sockets. nothing again. The PC was still not working just hitting GRUB and staying there waiting for  input from the non existent keyboard.

I needed help from the internet.

No computer ....

Up to the loft again and I pulled out one of my old PC's (I never seem to get around to getting rid of them) and 3 hours later after searching through several Hard disks to find a working one I know have a running Intel 2Core E8400 with 1mb ram and 160gig hard disk. I loaded the Mint Live CD I always keep around up. It had Nadia on it so just used that to download Petra and burnt over that copy (it's on a re-writeable). I know I could have updated in other ways but it just seemed the simplest.

Anyway I now have second PC to play with and this one has a floppy disk on it so i can check out those dozens of really old floppy disks I have lying about that I've meant to check for anything interesting I may have put on them years ago.

Back to my immediate problem. After some forum searches I decided to replace the Bios battery in the faulty PC. This didn't work to get the keyboard running again but now I had access to my cloud storage (where I keep PDF manuals of all the stuff I have) I could check out the Motherboard manual and reset the Bios jumpers.

Well this has worked, I have my Keyboard working again.
My first thing to do now is what is happening this second. Back-up... I've loaded the Mint Petra disk on the faulty PC and I am copying all the files in the home folder to a second Hard drive. There's a lot and really this has not been done for a while so it also gives me a chance to sort the trash in there out as well.

***USEFUL BIT***
It seems when you use the LIVE CD it will not let you copy files from one drive to another. It says permission denied. To bypass this a quick search told me I needed to be administrator to do this, which makes sense. To be able to do this on the Desktop all you need to do is right click on the folder you want to copy from and open as root then right click on the folder you will be sending to and open that as root also. you can then pull files and folders over. Use go up one folder on the folder menu to access that folder to open it's child.

I'm thinking I may just do a re-install as I can't find any answers yet on how to remove a program from a broken installation from the terminal in a Live CD. I assume it may be possible but being root and checking the dependencies in where-ever the list of programs are kept by the package manager.
I'm thinking this just because Windows kept things in the Registry. I may be wrong but this is all a learning process eh.
At least I've got a spare PC out of this mess to use to sort things out with.

Saturday, 5 April 2014

Opening a graphical program from Terminal

One thing I have had to work out myself as it may seem obvious to many or it may be stated somewhere I've never looked is sudo and gksudo

I've come across errors many times in Terminal such as

IBUS-WARNING

Gtk-WARNING

This I now know is because I was trying to open a programme with a graphical front end from within the Terminal.

I now know if I try to open it as root using the sudo command I need to do it as gksudo. This is to warn the system it is opening a graphical programme which may have other environmental variables it needs to set up which would not be otherwise.


So for example in Terminal and wanting to use gedit (the editing programme) I use from the command line:

$ gksudo gedit

and not

$ sudo gedit