Retropie table writeup

May 27, 2016 by · 2 Comments
Filed under: Development, Hardware, Linux, Personal 

A co-worker of mine asked me to do a writeup of my retropie table build and yes, I guess I should. I rarely write anything about what I do anymore 🙂 .

So, I got kids, and I thought it would be fun for them to play some of the old stuff I used to play and found the quite interesting and so set out to do something similar. I winded up going to Ikea with the kids and told them to choose colors, we winded up with a pink IKEA Lack table … ;).

I also got a bunch of old screens at home, I picked a very heavy 17″ monitor and removed all the casings etc greatly reducing the weight. My choice was slightly bad though for two reasons, the connectors are standing at a 90 degree angle to the screen so it winded up not fitting inside the table and it’s pointing out on the underside as it is now… secondly, the viewing angles are so so, I winded up rotating the screen 180 degrees as the viewing angles where much better from that direction and the /boot/config.txt in raspbian systems have options to hardware rotate the output. I also bought a set of 2 joysticks + 20 buttons with built in backlight and a xin mo based usb controller from ebay, a small speaker from a local shop and the power adapters I had at home, and a connector to fit for power input to the table. I decided to pick up a powered USB hub as well to fit so it was reachable from the outside. I also had a sheet of plexiglass lying around for many years which winded up useful. I also had a USB wifi dongle lying around so I reused that for connectivity.

We started out with measuring out and sawing up the holes needed and then removing the innards that are in the way. I used some paint masking tape to protect the table, more on this later. This work was very easy to do with a dremel with a circular saw addon. The underside wasn’t so important how it looked but I tried to make the cuts decent looking at least.

Once this was done, I test fitted and probed a bit on how to get the raspberry pi, monitor and power system fitted inside the the table before moving on to sawing the plexiglass sheet into the same size as the table, and then drilling and countersinking the screw holes, temporarily fit the plexiglass while drilling the holes for the joystick + buttons. Some sanding and fixing of edges followed. I removed the plexiglass sheet and drilled and countersunk holes for screwing the joysticks to  the topside of the table underneath the plexiglass.

Moving on, I screwed in the joysticks and fitted the power adapters for the monitor, USB hub and raspberry pi in the screen. I made 6 foam inserts to rest the monitor on and glued in place inside the table, wired up the monitor and put the monitor in. Removing the paint masking tape I realized that I used some shitty tape with much too hard tacking adhesive, meaning that I managed to pull away a bunch of the foil/tape (the “paint” on the table, it’s not painted, but rather foiled with a layer of colored plastic). When I realized this I started rethinking a paint scheme I had already planned and decided to do some modifications to hide the errors and to possibly heighten the feeling of the table.

I did the paintjob, made some simple paint masks etc and airbrushed the table with black borders, softish blue and red and green colors further softened with a few drops of white.

After this had dried for a few days I put the plexiglass on, screwed in all the buttons, joystick heads etc and installed the raspberry pi + other final electronics and tested the system. This is when I realized the problems with the screen viewing angle so I had to back everything up, remove the buttons, joysticks, plexiglass screen, and monitor. I winded up lifting some of the paint I had used to paint the table (the paint was really sticking badly to the surface). This lead me to question the surface of the plexiglass and figured I’d polish the plexiglass. I originally made the bad choice of trying to apply an old plastic modelling technique on the plexiglass, washing it with a layer of future floor polish. This looked absolutely horrible on this big surface so I winded up spending 1,5-2 hours removing the stuff again and then using some proper polishing compounds on both sides of the table making the plexiglass sheet incredibly nice looking (in my humble opinion). I Repainted the parts where the paint was removed, took out the screen, rotated it 180 degrees, re-fitted all the power adapters etc so it wouldn’t be in the way of the monitor and had to saw up a second hole for the DVI connector… I then reinstalled plexiglass, buttons, joysticks, etc… and now, a much nicer viewing angle of the monitor and a nicer looking plexiglass sheet, but paint job not as nice anymore. Shit happens. Oh, I also pulled a cable through from the screen to the front panel button so I can turn on/off the monitor from one of the buttons. The USB hub was glued into a hole made in the skirting so it sticks out underneath the table with two accessible USB ports.

After everything was fitted and tested to work I started to look at the backside what could be done about it… I had to make a raised area to increase the depth of the table as the buttons I got wont fit properly otherwise. I used a 1 cm floor skirting around the hole and then took the sheet from the monitor hole and sawed into two pieces which fits over the hole, drilled a lot of holes in it to at least create some air ventilation into the table.

At this point I’ve installed some games, used it for a bit, let the kids play around and I’m absolutely happy with it. The software side I didn’t need to do anything about, it worked more or less out of the box. I had to make a usb quirks hack to split the controller into two halves, I had to rotate the screen in the config.txt and that’s it, then just follow the installation howtos. Retropie was a really happy surprise, I wasn’t expecting things to be that smooth to install. I do wish the Amiga emulator was better integrate, it would be nice to be able to do the same thing as with the NES images, just drop them in and they work… but I understand that each game needs its own “fixes” to get up and running… I will have a look and see if it’s possible to improve the situation somehow, at least so I can start games with just the joysticks and buttons.

Replacing network switches can be a pain sometimes

March 25, 2016 by · Leave a Comment
Filed under: Communications, Personal 

One of those days when replacing 2 routers being used as switches should be so simple bit turn out so complicated. I completely forgot I’m using one of them as a “firewall” between a dmz and the rest of the network. Figured I’d just switch the IP on the comhem router and it would work for now at least, but no, it refused to because guest network is hardwired in the router to the same range as my internal network, and hence impossible to use… Winded up reconfiguring everything on my network to a different IP range, spending a couple of hours doing so, and once I’m done, switch IP on the comhem router and reboot it… And get a 10/8 IP address on the Internet side interface… Wtf? I call the tech support and apparently this has been so for at least 3 years. Sometimes you get a private network IP on the Internet, sometimes not, and there is nothing you or they can do about it. I went home and rebooted the router, and got an 83/8 IP instead this time. So… Something I planned to take 10 minutes winded up taking 5-6 hours… Hurray… I just wish we could start being sane and also that certain network providers would start implementing IPv6.

FOSDEM 2016 is over

I went to FOSDEM 2016 this year with 8 other colleagues of mine and had a really really good time. A lot of good speeches and stuff to talk about and I feel very motivated for some new projects. Some of the stuff going on right now is incredibly exciting, especially with regards to containerization etc which is something I have a lot of personal and work related interest in. I will be looking into more details in that for the future…

What I did miss was a more “general networking” track with low level stuff like iptables, netfilter, iproute, wireshark, snort, etc. I’m just not sure if this is the right conference for that though. Gathering my thoughts and working out some of the project details in the upcoming week if I get time.

3D printing

February 11, 2015 by · Leave a Comment
Filed under: 3D printing, Development, Hardware, Personal 

wpid-img_20150209_132426.jpgI started working at a new company a while back if I failed to mention it called Pelagicore, doing automotive in vehicle infotainment systems the right way with open source, working in the community etc. They have a 3D printer (Makerbot thing-o-matic) that’s been standing around for a while really grabbing my attention and I’ve wanted to find the time to use it since I started there. I finally took the time and am happy as a clam.

I made my first 3D print at work two days ago, first of three pieces for a BabyNES Raspberry Pi 2 case (, a small hatch. When I went on and tried building the two larger pieces I ran into troubles. Running out of time that day, I got around to try and fix it today. Disassembled the extruder stepper motor and realized a screw had dislocated from the vibrations. Re-screw it and assemble everything again, and this time, it worked! Got top and bottom parts done before leaving for home today and am fairly happy. They will do.wpid-img_20150211_163900.jpg

The print quality is pretty shoddy, a lot of settings needs to be tuned I guess, and the print speed was probably too high for the unit. Judging by the software installed, I should probably install newer software and redo the calibrations using those instead. Still, awesome to work with this 🙂


Finding the Zone.

February 10, 2011 by · 1 Comment
Filed under: Development, General, Personal 

Several years ago at one of my first jobs, right smack at the end of the dot-com boom over here, we had a dartboard. What good is a dartboard you ask? I don’t know, we also had a pinball machine, but I never quite liked it as much as the dartboard. I’d take short breaks from answering phone calls and e-mail or problematic pieces of text to throw a few darts. Personally, it gave me one thing however, I learnt to shut out everything else and find my Zone, you know the one where you’re at your most efficient, solving problems, kicking off e-mail and answering calls in a furious flurry.

For me, I focus on the bulls-eye of the dartboard, relax all muscles in my head, letting my scalp feel like a smashed egg running down from the skull. It feels like my head gets lighter and all pressure on my brain dissipates. Nothing else exists but bulls-eye. Ears are shut off, and all focus is on bulls-eye, nothing else distracts my eyes. At this point I’m there, and ready to hit bulls-eye. It’s simple, it’s fast, and it works. Under extreme pressure and stress, it sometimes takes closing my eyes to get the process started, but almost always I reach the “Zone” within a minute or so.

After the few darts, I’d get my headphones on and listen to music, work my hardest to shut everything else out and maintain the Zone for as long as possible. Reaching it takes concentration and loosing the concentration is always easily lost. Getting back on your train of thought on a complex problem after loosing it is hard work, often taking 15-30 minutes. I absolutely hate having that elusive thread of clarity vanish into thin air due to someone breaking Zone or loosing the almost ready to implement solution to a particularly bothersome problem.

My wife knitted me a pair of special fingerless gloves, ending just before the first knuckle on my ringfinger. I use them while coding or otherwise writing at the computer, to keep my hands warm, just to be able to maintain the Zone for that bit longer, not having to bother about getting cold hands. Cozy, to say the least, but people look funny at me for using them so it’s not often I use them at work. Also, I like to wall myself in as I’m easily distracted by movements and foreign objects. Open office space is complete devastation on these trips into the Zone, where people talk, walk around, gesticulate, strange things happening on other peoples screens, and so forth. I barely ever manage to stay in the Zone for more than 45 minutes or so. On that note, open office planning must have been among the most stupid things ever invented, short term savings at huge cost in productivity.

So, that is how I reach my Zone. Do you have a Zone, and how do you reach it? How do you maintain it from collapsing?

Comments requiring login

March 11, 2010 by · Leave a Comment
Filed under:, General, Personal 

Due to the amount of spam I receive in the comments fields of this site, I decided to turn on the requirement for all users to be logged in to post any comments. So far, there has been 770 spams posted and only 38 real comments. It’s easy to clean the spams out for sure (akismet, normal users don’t even have to see them), but just seeing the names of some of the links spammed are making me sick.

As a sidenote, with todays climate, maybe I shouldn’t say this, but if I ever ran into a person with the “quirkiness” required to watch (or for that matter produce) what is spammed these days, I’d probably go completely ballistic and on a killing spree. I definitely don’t condone the type of filtering done and/or tested on national levels, such as in Australia and Germany, but I can definitely understand why less hardened people turn to those extremes. My main reason for disliking that filtering isn’t really the content it is supposed to target, but rather where it is heading. The step from no filtering to filtering extreme sex is much larger than  the step from extreme sex to “rough” sex, and who will draw the line in the end?

What is the difference between extreme and normal? Most humans like to see things in black and white, and we forget about the greyscales. This is trait easily manipulated by people with an agenda (christian and muslim extremists, politicians, law enforcements and so forth) by pretty much saying “Look here, look at that absolute abomination of a thing going on, we can not allow this to happen to XXX. Let’s do something, let’s ban everything remotely connected to it.” In all honesty, that shit scares the hell out of me. Not so much the rethoric used, but the fact that so many falls for it. This whole 0-tolerance, black and white and fight or flight mentallity.

Anyways, just some random thoughts on the matter.

Final thoughts on the embedded Linux seminar

December 12, 2009 by · Leave a Comment
Filed under: Development, Linux, Personal 

The embedded Linux seminar was held last week, and in general I feel that it went pretty well in line with my expectations. It’s been a long time since I held any real presentations, so the first two presentations in Gothenburg I was very much nervous and lost myself a few times along the line. The two presentations in Stockholm and Oslo went surprisingly well however, and I don’t think I made any huge errors from a pure presentation point of view.


Now, that said, we did run into a few snags and after pondering what we can learn from the whole presentation/seminar — and there are a few points I’d like to raise both for the attendees and anyone else who might be interested. Being an “engineer”, I like to consider what went wrong, etc. Most points are of minor interest, but one of the absolute major points that we really didn’t get across properly, licensing issues with open source, or rather, licensing issues are manageable, however this was not the main area that we (or at least me) where there to talk about. Our main error was simply that we forgot communicating properly with each other, and correlate what we where saying. Also, this seminar wasn’t really about licensing issues, Nohau has an entire seminar/course on that topic alone, and you could easily fill out an entire university course on open source licensing.

The main point I tried to get across was that, yes, you need to be wary about licenses and you need to look at what is required of you, but that’s nothing different from any closed source licenses either, and you should be putting policies as well as processes in place to handle it, and push knowledge on how to handle licenses must be disseminated throughout the project.

So, to address some of the main licensing questions we received:

  • No you will not have to give away your code if you link the code properly.
  • You will have to set up proper procedures to handle any third party sources.
  • You will have to create processes for everyone to follow to get any third party sources “accepted”.
  • You will have to adhere to third party licenses, if you don’t, be prepared to be forced to and receive some bad publicity for it. (A lot of companies/people do get away with it, but is it worth risking it?)


The second large question we got was, when would you use Linux, and when wouldn’t you use it, in a life or death situation? Simply put, I wouldn’t put it in a system where a person or persons would die if the process/hardware/appliance crashes, but that’s me. I would generally speaking make the life supporting/critical system run on a separate hardware, and then make all the critical stuff run in that context/hardware, and then a second piece which communicates with the critical hardware and do the higher end “stuff” that might be interesting (communicate to centrals, user interfaces, settings, etc). This way, the critical stuff can be kept simplistic and reliable (in my experience, reliability is a function of complexity, the more complex, the higher the failure rate).

In most projects, this has to be decided on a case by case basis, and due diligence must most of the time be taken with the laws and standards of each area. What is possible and advisable to do in house and home automation is not the same as in airplanes or medical systems for pretty obvious reasons.

Presentation depth/breadth/focus

Finally, a minor point, I got some criticism for being too shallow, not going enough in depth. Well, I could have stayed on discussing tool-chains and how to make one for hours, or I could have talked entirely about Linux internal boot order and why it works the way it does, but that wasn’t the goal of the entire seminar. That stuff could be studied to death, in the end your better off “getting” the top-down structure of an embedded Linux project and then just experiment on your own rather than get everything served in forum that can not make justice to everyones requirements. Next time however, I will try to maintain a deeper focus on a bit fewer topics, or get more time to speak in.

Anyways, I think it was fun and a huge experience. I hope most people visiting found the seminar interesting and had something out of it.

Website downtime

November 30, 2009 by · Leave a Comment
Filed under:, General, Personal 

As some people may have noticed, the servers was down for almost a week. This was due to several hardware problems at my host, which where very unfortunate. When I put up the new webpage a few weeks ago, we also moved the daemons/hosting to a new one running on a new machine. This machine has been misbehaving for several weeks, and we switched over to another identical machine to rule out hardware error. In the end, we managed to get it solved. Last week both servers where killed due to power fluctuations (I believe if I interpreted it correctly). As a replacement, two new machines where ordered in, and they where both DOA (Dead on arrival). On top of this, I was told they received a faulty 20x500gb harddrive batch a few months back, which has had a 50% failure rate so far.

All this being said, I want to also extend my gratitude to these people for hosting this site, and for the wonderful work they do in running it. In 7 years of hosting this domain/host, I have rarely had a single breakdown, and this is the first time any major problem has existed with the hosting. In short, the wonderful fellows in the Netherlands that keeps hosting this site has had a really rough week, and I really wish them the best of luck getting everything back in order. Until then, please be patient with the site if it’s down or something is not working correctly, or even better, throw a mail in my general direction.

Using Ubuntu as Media Server for Xbox360

November 21, 2009 by · Leave a Comment
Filed under: Personal, Ubuntu, Windows 

I got a Xbox360 since about a year and I just noticed it had some way of connecting to a PC, using the PC as a Media Server. Unfortunately it required a Windows Media Center installation to work, or so it claimed at least. This is probably not news to anyone, but it was very easy to get Ubuntu (or any other Linux distro as a matter of fact) to serve media for the Xbox 360. Xbox 360 uses UPnP to get media from the Windows Media Center PC. To make any recent Ubuntu able to serve UPnP suitable for the Xbox, do the following:

  1. sudo apt-get install ushare
  2. sudo dpkg-reconfigure ushare
  3. sudo vim /etc/ushare.conf
    1. Make sure all the settings are correct.
  4. sudo vim /etc/default/ushare
    1. Make sure it contains USHARE_OPTIONS=”–xbox”.
  5. sudo /etc/init.d/ushare restart

You should now be able to find the PC by searching for it from the Xbox interface (the name you set in ushare.conf should show up in the list of found PC’s). Now that that’s said, I should hint that the Xbox360 has a really shitty availability of audio and video codecs, and I don’t know if it’s possible to resolve this problem. There are hints that there is something called a UPnP Media Adaptor on the ushare website which should be able to convert to proper file formats as necessary, but ushare does not have that ability. Of course, that would give a shitload of cpu load on the fileserver as well, something which sounds less good in my opinion.

My personal opinion so far, Xbox 360 media center is really simple to use, but the available codecs, flexibility and scalability is catastrophically bad in comparison to my MythBuntu installation (still running 9.04 though). The Mythbuntu installation is a bit heavy on the configuration, but much more flexible, handles almost all codecs I’ve run into without even a hitch, and very scalable.

Thoughts on Intellectual Property

November 11, 2009 by · 1 Comment
Filed under: General, Personal 

A few days ago I watched a show on swedish television where two doctors in IP and creativity went visiting badly running companies and helping them get creativity back in to the company, and hence making the badly running companies back in game. The methods they used seemed fairly straight forward and I can’t really say much about them, except it seemed to be how it should be done. Bring in the people who matters, talk things over, get ideas for new business areas, get ideas on how to improve efficiency in the employees work, how to run the company, new retailable products and services, and so forth. All this is just perfect, however, there was one comment on a subject that struck me hard.

They where complaining that Sweden is one of the countries putting the most money into research and development, yet we get the least IP out of it, and for some reason they could not understand why. I work with development, and to some extent research and I’m not the least bit shocked about this. Lack of cooperation, simple as that. Humans are in a sense made to cooperate, to work as a team and to throw ideas back and forth, especially in this day when the mass of information is simply impossible to keep tabs on. There are probably more research and development papers published every day than I could read in an entire lifetime and I will never be able to read more than a small bit of everything out there in my specific area of expertise, and not even there will I be able to read everything. The problem stems, in my humble opinion, from all the IP lawyers and lobbyists getting their messages across all too well.

Let me give an example of what I mean, for the last 3-4 years, I’ve worked on 4 different projects at 4 companies. At every single one of them, we have all been brought to a big meeting with the entire project/department/company where some “IP department” representative or lawyer has stood up and told us, whenever you get an idea:

  1. Shut up about it, don’t talk to anyone.
  2. Send an e-mail (or preferably sealed envelope or actually come talk to them in person) about the idea to the IP people.
  3. They’ll discuss the idea with you, then wait for half a year or so.
  4. If the idea is patentable, wait another 2-3 years for the patent to go through.
  5. Now you can implement and start talking about the patent, and hopefully cash in on all the suckers who re-created your patent while you where biding your time.

I hope you can see the problem here. The whole idea is so completely remote from how creativity for most of us normal people work that it’s not even funny. For my own part, the best and most inventive days I’ve had, has been with friends. During my education, for example, we went out by the sea and talked mostly crap, but this is where and when we cross-breeded our ideas about cool things and how you could do them. How does a submarine work, what/how do you make it (sub)merge, how could you make it autonomous, how do you navigate, how does INS systems work, and so forth. Or whats the cheapest and simplest way to crossbreed a bicycle with a floating device so that you can bike around on water.

Not being able to talk to fellow colleagues about ideas and solutions to problems is probably among the biggest speedbumps in the entire system imho. One of the reasons I believe Google (for example) has been so successful is that the level of trust bestowed on their employees, and the level of openness within the company. People dare talk to eachother without the imminent threat of being fired or scalded for talking about the wrong thing, with the wrong person (this is actually not unheard of, where I am right now). Correct me if I’m wrong, but it’s one of the impressions I have gotten, without ever being a google  employee myself.

Finally, don’t get me wrong on this subject. To live in a world, you have to adapt to the world. I’m not about to go divulge ideas and patentable IP on a whim that I hear about while at work. It is a fine line to cross between understanding and sympathizing with an ideology/theory and actually trying to live like an idealist, and it’s not one I would cross at this point of my life.

If/when I do get ideas on my own however, I would most likely not even consider the possibility of patenting it. I’d rather publish it openly so that it could benefit the world rather than try to suck the living bone marrow out of my victims. As a final thought, has anyone considered making an open source/open media “prior arts database” to, which would gather data and ideas on prior arts to patents, hence rendering current/future patents unusable?

Next Page »