Friday, 28 February 2025

My Batocera Linux Setup

 So I've been working on setting up a system with Batocera linux, for my retrogaming enjoyment. 

Originally I had thought of just setting up a Linux environment and run MAME, and was working on a version of Debian, but was still doing research on what would be the best way to set up what I wanted. After a while I found out about Batocera and decided to give it a go. As soon as I managed to try it, I was instantly convinced it was what I wanted.

I had only small problems to start with: Finding a suitable USB stick, and convincing my old PC machinery to boot from it. First I was trying with a setup that had an old motherboard that needed some settings to be adjusted to allow the boot. But once it worked, it worked. And then I decided I wanted to install it to my SDD, which gave some problems. The installation to a drive should be possible directly from batocera menus, but it kept failing. I am not sure why, but I think it was trying to download stuff to put on the drive. I don't know if it was trying to download to the stick, but if it was then I'm pretty sure the problem was lack of sufficient space. If the problem was something else then it was something else. I didn't really look into it, and rather just went for a workaround. I ended up creating an image of my USB stick, and just copying it over to the SDD. To my astonishment, it worked.

Next problem was that the image was not using the whole of the SDD, so I needed to expand the partition. After some research I found out that this is a matter of setting some boot parameter to automatically extend the size of the partition to use all of the available space. I tried it, but as far as I could tell, it didn't work. I probably did something wrong, but I couldn't figure it out. So I ended up doing that manually, which worked just brilliantly. I cannot remember how I did it though, but it was probably reasonably easy. Otherwise I wouldn't have managed.

Next I switched to using a different PC setup. I think I just wanted to use the smaller case, and it was easier to just move the drive than to move any components. The two systems were very similar, and actually the one I switched to had slightly newer components. The only problem was it was my old Windows PC so I had to clean up lots of documents to make sure I wasn't going to lose anything important. The clean-up took a while, but the actual switch went without a hitch.

What was giving me trouble next was the audio through HDMI. It would just randomly stop working, and then just as randomly start working again. I never really managed to figure out the real root cause, but some of my dabbling around seemed to at some point have fixed it. I hope to still figure out what the issue was. I guess that means I hope that the problem resurfaces. Until then I will just enjoy the working audio.

Next on the list was trying to get the wireless PS3 controllers to work. The motherboard I am using does not have a built-in bluetooth. Luckily, I had an old USB-bluetooth dongle. I think it's at least 15 years old, so I had doubts about whether it would work but I decided to try it anyway. So I plugged it in, expecting that it's too old to do anything useful. Studying the setup and troubleshooting instructions, I learned that I need to plug my controller in with USB first for something like 10 seconds, then unplug and then press the PS button and it should miraculously connect.

I don't now remember if I had to do anything else for that first little bit of success but I'm pretty sure I didn't. The result was that the controller was connected. The problem was, however, that nothing happened if I pressed any of the buttons. As soon as I plugged it in with USB, the controller worked. Unplugged, despite showing that it is connected, it would not work.

What followed then was a bit of back and forth, trying various things like editing the config file to change the driver, plugging/unplugging, trying manual pairing, automatic pairing, moving the dongle from a usb-port in the back to one in the front of the computer, etc, combined with several reboots. At times it felt like progress was made, and at other times not. I'm pretty sure anything that looked like progress was 50% imagined and 50% misunderstood. I tried so many things I didn't even know what I was trying to do anymore.

Finally, I decided that the problem was my old dongle. I decided to buy a new one. What followed next was extensive research into which dongles have been tested with Batocera, which are recommended, and which one does my gut like. My gut liked one that was both tested and recommended, and I ordered it. It was delivered the next day. A few days later, I opened the package and plugged it into the computer. About two weeks later, I powered the computer on. I pulled out the controller and plugged in. After 10 seconds, I unplugged it, and pressed the PS button. The lights kept blinking. I checked the config and I think I had to change the driver to default again as in my earlier troubleshooting I had changed it something else. After rebooting, I plugged the controller in again, and unplugged, and pressed the PS button. And then it was connected. And it worked. I played a bit of NES Super Mario Bros and patted my back for job well done.

Next thing I want to do is to setup a library of a few games for a few different systems. Games I like and games I have tested. Dragon's Lair I and II and Space Ace are already setup for Daphne. I have a few too many games for NES and SNES. I have all the classics and more for SCUMM. I have a bunch of MS-DOS games I wish I had the time to play. So what I actually want to do is to organise the games I already have to have a few favourites I can go back to and I know will work and I will enjoy them, and then to have the rest as things to try when I feel like it.

So if all goes well, maybe I'll have more to tell on this topic later.

No comments:

Post a Comment