Posts

Showing posts from 2013

Sound Through Headphones and Speakers at the Same Time

Windows lets me have sound through my speakers and headphones simultaneously, which is great for not having to plug in/unplug my headphones when I want to switch.  I just have to don the headphones and turn down the volume on my speakers.  No fiddling about with jacks. However!  Ubuntu seemed to have no way of sorting this out. This post, however, describes how to change your line-in into an output jack! http://askubuntu.com/questions/225017/how-do-i-change-which-audio-jacks-are-used-for-input-and-output It uses the HDA Analyser tool from the Alsa Project.  Not a well documented tool, but the post above has all the information you need.

Using GLC to capture game video on Ubuntu

DAMN, this has been a total pain in the backside. I wanted to record a video of my latest game writing developments with commentary.   (Ubuntu 12.0.3 LTS, with KDE desktop) The normal desktop recording applications failed to cope with OpenGL, which is understandable, really.  So then I found glc . glc looked like it would do everything I wanted, and after a couple of frustrating hours, it turns out it actually will.  This is good. The bad is that the documentation is non-existent, and figuring it out has got me VERY CROSS, with quite a tension-headache to boot. Command line which finally worked: glc-capture -o blah.glc -j -a 'sysdefault:CARD=camera,48000,1' java -jar MyGame.jar Gotcha 1: It doesn't tell you how to specify the application part (java -jar MyGame.jar).  It took me ages to realise that it cannot deal with quotes .  Just put the application in as you would type it normally in the command line. Gotcha 2: Finding the ALSA device nam...

Auto-update for TinyCore Linux

I got myself in a bit of a pickle sorting this one out, but I got there in the end. The issue: To update TinyCore extensions (packages), you need to boot into a special mode (base norestore) .  Then, you need to run tce-update. This is a piece of cake to do manually, but a pain to automate. How I did it (overview): backup extlinux.conf create extlinux.conf and script to switch to boot into 'update mode' create script to switch back to normal boot add check to /opt/bootlocal.sh to see if the system is booting normally, or into 'update mode' create crontab job to regularly reboot into 'update mode' How I did it (details):

Troubleshooting NFS servers

OMFG, NFS servers are SUCH a pain in the backside.  But anyway, here are some useful tricks: On server:     netstat -l lists which services are listening on which port.    rpcinfo -p also lists rpc processes, with program numbers and ports     /etc/services The file portmapper uses to see which port the services should run on.  Names of the relevant services are: mountd lockd and status HOWEVER:     sysctl -w fs.nfs.nlm_tcpport=blah    sysctl -w fs.nfs.nlm_udpport=blah might be needed to set the port of nlockmgr.  Why it doesn't listen to portmapper, I've no idea. Debug logs:    - kill the server process (nfsd, mountd, or whichever)    - run the server process with a -F or without the -D to force it to run in the foreground (you also might have to include a debug or verbose mode option.    - try to mount the nfs share from the client.  Now you should get a load of mean...

Computation Server for under £1000

I was daydreaming and wondering what it would cost to get a top-of-the-range processing server with normal desktop components.  Then I set myself the challenge of putting together a shopping list for a powerful computation machine (to do video transcoding, for example) for under £1000. Obviously, Core i7 processors are out - they're fast, but very expensive. For fast computation, you want plenty of RAM (no slooow HDD I/O), but enough hard drive storage for decent backups of large amounts of raw data. So here's the shopping list: Qty        @ subtotal Mobo 1 £89.99 £89.99 from Novatech CPU 1 £159.98 £159.98 from Novatech RAM 1 £229.19 £229.19 from Crucial Graphics 1 £19.99 £19.99 from Novatech HDD 5 £54.98 £274.90 from Novatech CPU Cooler 1 £32.99 £32.99 from Novatech PSU (1000W) 1 £169.99 £169.99 from Novatech Total £977.03 I probably went a bit overboard with 7.5TB of storage (6TB with RAID 5), but feh. I haven't included shi...

FirstQuest Development Methodology Crisis

I am shedding another development skin. My first solo game (working title: FirstQuest) is bogged down in 'engine development'. Until now, I have been using 'enjoying coding' as a motivation tool to keep up momentum on the project. This, coupled with the fact I enjoy systems engineering, has led me into the clichéd problem of over-engineering the game engine. Looking forward to working part-time from September (having one day a week to work on games) has made me re-assess how I develop code. I now intend to split 'play coding' and 'work coding'. Work coding: Stick to agile principles: Develop only what is required to move the game forward.   Keep code as modular as possible, but DO NOT engineer systems.   Stick RIGOROUSLY to test-driven development - EVERY bug needs a unit test before fixing it. During the one day part-time, ONLY do work coding.  Keep play coding for evenings/weekends.  (This should allow use of work velocities) Play c...

XBox 360 Red Ring of Death

My brother bought a job lot of busted XBox 360s and recently gave up trying to fix them.  I have stepped into the breach and decided to show these machines who is boss. At the moment, it looks like I might even be able to fix one as well. :) I tried replacing the thermal compound , but to no avail. Then, I found this article , which seemed a little extreme.  However, to test it out, I tried firing up the XBox while leaning heavily on the CPU heatsink.  Lo and behold, the RROD had disappeared! So tomorrow, I am off to a hardware store to pick up some nuts, bolts and washers to properly squeeze this processor back down.  I'll update with how it goes... UPDATE: Well, I busted it.  Now it shows a different error code.  I suspect I tightened the bolts too much and the stress on the motherboard broke more connections. I feel like a ham-fisted dumb-ass.

OpenVPN with Ubuntu and Via's Padlock Technology

Why? I've been using OpenVPN for gaming.  I have heard of Hamachi , but open source tastes better. I wanted to have an OpenVPN client running 24/7, so I tried running it on a low-power laptop.  This led to unacceptable latency and disconnects.  The encryption load was just too much. Having a powerful desktop running would solve that, but running costs build up all too fast. What? Via produce processors with low power consumption and hardware acceleration for encryption with their Padlock system. After quite a lot of searching for a cheap Via machine, I found this on eBay .  It's got a Via C7 processor (all of which have Padlock), and it turns out to use less than 30W even on peak load. How? I replaced the 1GB Compact Flash card with an 8GB one, then installed Ubuntu Server 12.4.1 via a USB stick.  (Choosing to install the OpenSSH server). I had found plenty of sources telling me to check which engines were available.  However, when I t...

Testing a blank hard drive for errors

http://thelinuxexperiment.com/guinea-pigs/tyler-b/how-to-test-hard-drive-for-errors-in-linux/ "badblocks -b 4096 -p 4 -c 16384 -w -s /dev/sda" WARNING: This test wipes all data on the hard drive
Success!  I have completed step 1 of my robotic world domination plan! I now have a laptop with Eclipse and leJOS installed, which can control my newly-flashed Lego Mindstorms NXT brick! The tutorial is actually really easy to follow.  I used Linux, which required me to manually set the control brick into 'firmware updating mode', but that was a piece of cake. Setting up Eclipse was also fairly straightforward, following the instructions here . The only gotchas I encountered were: - Setting up udev rules to allow me to access the control brick via USB.  Solution: After creating the rules file, remember to add yourself to the 'lego' group and restart the PC! - Connection to control brick kept failing in 'PC' mode.  I could upload a program and run it from a 'leJOS NXT project', but not have the PC run an application that remote controls the brick.  Solution: Needed to install it onto a 32bit OS (thankfully I had a laptop which fit the bill...