Useful Linux scripts for standalone systems, emulators, HTPCs etc.

Booting the system to console with grub2 Edit the file /etc/default/grub: Change the line GRUB_CMDLINE_LINUX_DEFAULT to include “text”: Save the file and update grub: Note that on systemd systems this might not be enough. Switch to text mode using this: You can switch back to graphical mode using “graphical.target”.Now reboot. Auto-login user on console tty1Continue reading “Useful Linux scripts for standalone systems, emulators, HTPCs etc.”

Decompose the OpenGL projection matrix

Sometimes you need to decompose the OpenGL projection matrix into its original components to adjust some values. Here’s how to do that. I found a thread on stackoverflow on the subject. The formulas there are in row-major format though, but OpenGL is column-major, so they need to be swapped around: For a perspective matrix: ForContinue reading “Decompose the OpenGL projection matrix”

Useful Linux scripts etc.

A better find I keep using the find command in Unix as such: “find / -name SOMETHING” (Yes, I know there’s locate, too). You always get an error message when you hit a directory you don’t have permissions for, but I usually don’t care about those directories anyway, so it makes sense to pipe thoseContinue reading “Useful Linux scripts etc.”

Useful CMake functions

CMake is a great tool, but I always keep searching on how to do this and that. Time to make a list again… Checking the G++ compiler version: Appending entries to a list: Creating filters in Visual Studio projects: Custom install commands To print a message during the install process add: To run a shellContinue reading “Useful CMake functions”

Useful C++ tricks and helper functions

My brain sucks. It can remember the lyrics to songs or the power draw of a electronic component, but I keep forgetting those simple, useful helper functions you sometimes need. This sends me off Google again, searching through excellent sites like StackOverflow etc. Time to make a list… Remove characters from a string: Replace charactersContinue reading “Useful C++ tricks and helper functions”

tl;dr – Reviving an Acer Aspire 3820 TG with a broken BIOS chip

Man, was I screwed. I had this awesome laptop with a diy keyboard backlight and then it died on me just after the (already voided) warranty had expired and new mainboards were ~200€…It all started when I noticed that my ATI Radeon 5650M GPU had vanished in Windows, so I tried to reboot, enter theContinue reading “tl;dr – Reviving an Acer Aspire 3820 TG with a broken BIOS chip”

Installing and switching gcc/g++ versions in Debian

Installing newer gcc/g++ versions is easy: If your system does not provide the new versions, you might still be able to get them via a different repository. Add the toolchain repository to your system and update your sources: Now you should be able to install gcc/g++. The real problem comes after that. How to makeContinue reading “Installing and switching gcc/g++ versions in Debian”

Raspberry Pi setup / configuration stuff

I keep forgetting the stuff and always start over when I have to reformat or the SD card breaks, so here’s a collection of useful tidbits when setting up and configuring a Pi. I’ll expand this page whenever new stuff pops up… Adding a root password When you try to su, you can’t when noContinue reading “Raspberry Pi setup / configuration stuff”

Arduino Leonardo as a MAME interface

UPDATE: I made the thing a project on GitHub. You can find information and can download the source code for the Arduino and PC programs from the project page. Ok. So I found this old arcade cabinet for 1,50€ 😀 on Ebay and managed to carry it up the stairs. Looks dandy and even hasContinue reading “Arduino Leonardo as a MAME interface”

Reading the OpenGL backbuffer to system memory

Sometimes you are in the need to read back the OpenGL backbuffer, or other framebuffers. In my case the question was how to read back a downsampled framebuffer resp. its texture to system memory. There are different methods for this and I wrote a small benchmark to test them on various systems. UPDATE #1: AContinue reading “Reading the OpenGL backbuffer to system memory”

Design a site like this with WordPress.com
Get started