Status of Subatomic Particle Simulator: PARKED

Well, there have been occasional minor updates on the status of the VIGoV Subatomic Particle simulator since it was exhibited in January 2014, but no real progress, despite optimistic sentiments voiced in the first half of that year. Since then, I have gone on to do first-year physics in university, including a little Quantum Mechanics. This opened my eyes to just how little of an idea I had of what I was doing when I wrote that code. Examining it again, I’m even less sure of what I was trying to do in certain parts.

In short, I don’t believe it to be salvageable. It was a huge project for someone who had never done university-level physics, and, while it was an educational experience, with some interesting (and sometimes impressive!) results, it can’t really be taken any further. The basic ways in which the simulation is carried out appear to be very flawed, but I don’t know how to fix them, despite what I may have told myself in the past. That is why I am suspending development for a couple of years.

Over the next few years, I will be learning about Quantum Mechanics in university. Then I may be able to continue the project, or at least rewrite some sections of it from scratch, on a sounder footing. Until then, I am frankly afraid to touch the code.

So, while I had fun programming it and learned quite a lot, I feel it best to park the Subatomic Particle Simulator indefinitely.

Rayman 2 i nGaeilge!

Well, I’ve finally got some good old-fashioned game modding to report here. I have finished my translation of Rayman 2 from French into Irish, done with the help of the tool sna_nochar, created by MixerX and distributed on the Rayman Pirate-Community. As a sample of what has been done, here is the first ten minutes or so of the very last β-test of the translation:

I did miss one Lum on purpose, just to test that cutscene (I had previously tested the cutscene where one gets all 5 Lums on the first try). Then, after making this video this morning, I ran through the rest of the game (skipping some optional bits with no dialogue!) to find any other bugs. I am pleased to announce that the translation is now ready, and available for download from this server:

The installation instructions are fairly simple, they are written in the Readme.txt file in the above ZIP, in both English and Irish.

By the way, I used VMWare to record the video. I realised it was easier to test my translation in a virtual machine, since I could switch back and forth to a text editor to make changes, without crashing the game. But running the game in a virtual machine caused the physics engine to run too fast at times, which made gameplay really awkward…

That said, the camera glitch seen in the video happens even without a VM, and seems to be caused by the camera reaching the island too early in the cutscene. I guess my rig’s just too powerful!

My chimera Debian system

Well, it’s been a long time! Since my last post, I’ve discovered that there should have been a fifth “D’oh!” in there – turns out that the way the PCIe slots are arranged on my motherboard means that it’s impossible to pass through one graphics card without the other. That probably explains the blank screen I got when booting into the hypervisor. It all boils down to the fact that I should have bought a higher-end motherboard.

But none of that matters one jot anymore, I’ve moved onto other matters! The hoops through which I tried, and failed, to jump in the last post, were mainly so I could play Rayman Legends. I did wind up being able to play this via Wine, although it was very slow. For a fast-paced game like this, the atmosphere was destroyed. Still, I made do, playing the daily and weekly challenges occasionally.

This all changed when I discovered that VMWare Player exists in a freeware version, and that it gives very good 3D acceleration, even under Linux hosts. Though I had to install various proprietary drivers* to make this work reliably, I was happy. I got Windows Vista up and running in a VMWare virtual machine, and Rayman Origins and Legends both work perfectly under it. Thank you VMWare!

Anyway, since then, I decided to sod the whole Linux Mint Debian Edition thing, especially since they decided to switch their base from testing to stable. I changed my sources list to point directly to Debian Jessie repositories. Since Jessie was frozen last November, this didn’t cause me any problems – until Jessie went stable last month! I proceeded to point my package manager to the “Stretch” repositories and installed a plethora of updates.

I had already started compiling my own kernels some time ago, in order to be ahead of the curve (I’m on Linux 4.0 at the moment). I had to modify the sources of some of the VMWare modules in order to make them compile against the newer kernel. So when VMWare asked me to update a few weeks ago, I expected that these patches would have gone in upstream. I was wrong. The update actually overwrote my patched source with older versions, causing me to have to search out the patches again (this one and this one, if you’re interested). This annoyed me, since Linux 4.0 is now actually the latest stable kernel, so one would expect professionally-developed software to work with it out of the box.

What annoyed me even more is that VMWare Player started crashing on startup after I pulled in the above-mentioned plethora of updates from the Stretch repositories. It became apparent that there was a certain package which I needed to downgrade to make it work with VMWare. In order to downgrade it, I had to add the oldstable (“Wheezy”) repositories to my sources list, in addition to the “Stretch” ones. It was then a simple matter of heading into the package manager and selecting the older version of libgtkmm. This made VMWare work… for a while.

I got one session of Rayman Legends played, then it started crashing again. More Googling revealed that there were issues with libcurl. At first I couldn’t believe this to be the cause, since that post was from 2013! But after a week of being unable to find any other possible causes, I decided to try also downgrading libcurl to oldstable. In order to do this, I also needed to downgrade a number of GNU R packages that depend on it, which I installed some time ago. For some reason, the package manager couldn’t seem to figure out that it was possible to downgrade them all at once, so I had to mark them for downgrading separately, which was tedious. Still, I did it, and downgraded libcurl. And, surprise surprise, VMWare worked! Seemingly even the Jessie version of Curl is quite old…

So, I now have something of a chimera Debian system:

  • It’s basically a Stretch (i.e. testing) system.
  • But there are 21 packages in it from oldstable; these are libgtkmm, libcurl, and several R packages.
  • I also compile my own kernel, so that is a package that comes from neither the testing nor oldstable repositories.
  • And there are several relics of Mint Debian Edition still lurking in the system files – GRUB identifies the system as “LinuxMint GNU/Linux” for example.

So this is fine, but I am annoyed that I have to use any oldstable packages. VMWare in fact comes with its own versions of these packages, but is unfortunately programmed to prefer system ones, even if they make it crash. Again, the current version was released very recently, and I think it’s reasonable to expect that it would at least make provisions for systems that use packages that are too new for it (e.g. version check, fallback on the libraries with which it ships).

~It’s been ages since I last updated this blog. Several things have happened. Notably I finally removed GSL from the Subatomic Particle Simulator, disentangling the legal issues. Unfortunately the inbuilt C++ version of the Gamma Function, that I now use instead, had not yet been implemented by Microsoft in the version of the Visual Studio compiler preferred by Valve. In other words, the Simulator won’t compile on Windows for the moment. I suddenly find myself with more free time, maybe I should tackle that now…

*I’ve been through a few GPUs since by the way – I wish I’d updated this blog! Suffice it to say I have a GeForce GTX 980 now!

My experiences with XEN VGA passthrough

The following post gets quite technical, and employs a bit of jargon. You can read the whole anecdote if you want, or just scroll down to the bottom if you want some advice related to Linux Mint Debian Edition, XEN and VGA Passthrough.

I recently built myself a new computer, and after jumping through many hoops (involving Intel’s Haswell Refresh I believe – seems trying a “Devil’s Canyon” processor with an 8-series chipset isn’t a good idea – D’oh #1!), I got a machine up and running with Linux Mint Debian Edition 64-bit. There is an nVidia card in one PCIe slot, an AMD card in another PCIe slot, and an integrated GPU on my Core i7 that is disabled in the BIOS. Once I had this all set up, I thought it would be child’s play (well, not really, but quite simple) to follow this tutorial and get Windows Vista up and running, and using my AMD card, while leaving the nVidia card for Mint.

Boy, was I wrong! At first everything seemed to be going smoothly, but I had a niggling feeling that it was going too well – this was, after all, a tutorial for normal Mint, not the Debian Edition. My first stumbling block came at step 17, which didn’t give the output hoped for. However, I assumed that this was because I skipped steps 9 and 10, opting for Synergy instead. I forged on, and ended up unable to pass through any devices to the VM – D’oh #2!

At this point, I had Vista up and running, able to control it via VNC, but with no VGA passthrough. Therefore, I backtracked, and I’m not sure what I did, but I ended up with a “no such file or directory” error upon attempting to start the VM, with the unhelpful question “Is xend running?”. Seemingly I could no longer use the XM toolstack for whatever reason. Therefore, I switched to XL with the command:

sudo sed -i 's/TOOLSTACK=.*\+/TOOLSTACK="xl"/' /etc/default/xen

Of course, now problems with QEMU versions started to rear their ugly heads. XEN couldn’t find the right QEMU binaries anymore, and following the instructions wasn’t enough, because I was on Debian rather than Ubuntu. My suspicions were correct after all! I was eventually able to start the VM with the following config file:

firmware_override = '/usr/lib/xen-default/boot/hvmloader'
memory = 8192
name = 'vista'
vif = [ 'mac=00:16:3e:68:e1:01,bridge=xenbr0' ]
disk = [ 'phy:/dev/mapper/guest-vista,hda,w' , 'file:/home/mgkeyes/Vista.iso,hdc:cdrom,r' ]
#device_model = '/usr/lib/xen-default/bin/qemu-dm'
device_model_version = 'qemu-xen'
device_model_override = '/usr/bin/qemu-system-x86_64'
#pci=[ '02:00.0', '02:00.1' ]
pci=[ '02:00.1' ]

Now, you may notice that I’ve commented out the line passing through both the GPU and its sound chip, in favour of one passing through only the sound chip. This is because the sound chip is passed through successfully, and detected by Windows. The GPU, on the other hand, causes the VM to not boot, with the only way to shut it down being:

sudo xl destroy vista

Unfortunate, especially after I had spent so much time trying to get the Radeon driver blacklisted so the card was even available for passthrough.

I was puzzled. Surely my card should pass through fine. After all, all Radeon HD 7000 are supported, and I had bought a card from that series, albeit a low-end one. Or so I thought. What I had bought was a “Radeon R7 250″, which I misinterpreted as “Radeon 7250″. Turns out it’s part of a new series of cards altogether – D’oh #3! It is with considerable shame that I divulge this.

=====The rest of this isn’t really related to VGA passthrough, but it is interesting, and somewhat related to XEN. You can still scroll down to the bottom to see my lessons.=====

So, having cursed my inability to properly research components for my new build, I decided to wait until, some time down the line, support for these cards is properly programmed. (But in the meantime, I wonder how I will play Rayman Legends…) Having given up on the VM’s graphics, I had a look at the host’s. The “nouveau” open-source drivers were being used, which caused the Cinnamon desktop environment to run in software mode, and when I tried to install and run Steam, it didn’t even start for me. Therefore, I decided to give the proprietary nVidia drivers a try. After all, they had worked well on my old system, with the same card (a GeForce GTX 550Ti by the way).

Bad idea. Cinnamon, instead of running in software mode, crashed upon login, leaving me in “Fallback Mode”, which was very unpleasant. To make matters worse, Firefox also crashed any time it was even slightly over-taxed, making even regular browsing quite a frustrating experience. Also the screen went irrecoverably blank any time I tried to exit to command-line to install an updated version of the driver (obtained from nVidia’s site). Defeated, I returned to the nouveau driver, an action which itself involved jumping through a few hoops.

On the up-side, it turned out that I could get proper OpenGL rendering by installing the libgl1-mesa-dri-experimental package. This got Cinnamon out of software mode, allowed me to run Steam, and even play through Portal! Afterwards, I tried a few other things, like playing recordings in MythTV, but ended up coming across this little kernel bug, which affects the version still being shipped with this distro (3.11). Still, I was happy, and was looking forward to seeing what would happen with Portal 2.

What I saw was really ugly, and unfortunately the system became too unresponsive to take a screenshot. nouveau decided to spam all ttys (accessible by Ctrl+Alt+F(1-6)) with error messages, making it basically impossible to even try to kill the game from the command line. After a hard reboot, I thought it might be the same kernel bug again, so I disabled the option “Wait for Vertical Sync” in the advanced video settings. It seems I was on to something, because this time the game didn’t go ugly, but it did freeze with three dots left in the loading progress bar for the first map.

Having already found that exiting to command line no longer turned the screen blank, I decided to have another shot at installing the updated driver from nVidia’s website. It installed successfully, but a reboot produced – you guessed it – a blank screen! D’oh #4!

At this point I realised that I was still booting into the XEN hypervisor, which wasn’t much good to me when VGA passthrough wasn’t working. Therefore, I decided to try the normal kernel, and what did I get? Cinnamon running perfectly and Portal 2 playable! I do have a few visual glitches in normal apps, but I can overlook them (for now).

Now, I publish this in the hope that others can benefit from my experience, so I’ll try to boil it down to a few little lessons that I have learned, and that I hope others may be able to take away from this:

  • DO YOUR RESEARCH! If you see something like “Devil’s Canyon” on a processor, be sure you know exactly what it means. Don’t assume that “R7 250″ means the same thing as “Radeon 7250″. This is probably obvious to most, but I failed to do it, and, as mentioned, I am ashamed of that.
  • Try not to assume that tutorials for normal Mint work with the Debian Edition.
  • device_model_version = 'qemu-xen'
    device_model_override = '/usr/bin/qemu-system-x86_64

    seems to work on Linux Mint Debian Edition with the correct QEMU packages installed. These packages include qemu and qemu-system.

  • AMD R7 250 cards DO NOT WORK with VGA passthrough at this time, and it’s probable that other members of the Rx 200 series don’t either.
  • Proprietary nVidia drivers don’t work well with the version of the Linux kernel used in the XEN hypervisor (at least in Debian, or it might just be a Linux Mint Debian Edition thing).

I hope this has been in some way helpful, or at least amusing! Suggestions for improvement or clarification are more than welcome.

Happy 85th Anniversary to the Warners!

Well, I posted back in September to celebrate the twentieth anniversary of the initial airing of Animaniacs season 1 episode 1, so I might as well also celebrate the anniversary of the 65th and last episode of that season!

Because of a “newly discovered” cartoon of the Warners revealed late in the first season, the date that their red noses were first somehow printed onto black and white film was found to be 1929, rather than 1930, so the season was terminated in 1994 with an in-universe 65th Anniversary celebration. That makes today their 85th anniversary!

So, Happy (in-universe) 85th Anniversary to Yakko, Wakko and Dot!!!

Happy Anniversary!

I can hardly believe it! This blog has now been in existence for an entire year! This is also the third anniversary of the release of Portal 2 (at least in this time zone), another fact which some of you may find scarcely credible.

What a year it’s been. Proof finally emerged that the US government was spying on everyone and, well… Rather little has been done about it! Oh well… We also observed the anniversaries of two great television programmes, Animaniacs and Frasier.

In terms of activity on this blog and the building in which it is hosted, the Subatomic Particle Simulator was conceptualised, developed and published in the course of the last year. Also, YouTube saw the upload of three animated histories of Sony Pictures Television (with a fourth coming in the next few days).

All in all, I’m quite satisfied with what has graced this blog in the preceding twelve months, and I hope that the next twelve will be just as fruitful!

P.S. Once again, I was considering naming this post “Happy Explosion Day!”, but even one year on, I couldn’t be sure whether or not that would be PC, so I’m erring on the side of caution.

On the subject of Portal 2, to clarify the issue from yesterday’s post, it seems that the GNU/Linux beta has been around for two months. Once again, I apologise profusely for not observing this earlier on. However, work on Sony Pictures Television History Mark IV has taken precedence anyway, so Aperture Ireland’s state probably wouldn’t be any different even if I had been aware.

Status of Aperture Ireland 2.0 and other things

I was just browsing through the archives of this blog and saw a post mentioning Aperture Ireland. I realised I’d never actually checked whether or not Valve had gone about porting Portal 2 to GNU/Linux. I fired up Steam and it seems that this port recently entered beta.

Had I known this earlier, Aperture Ireland 2.0 would probably be underway right now. However, at this late date, it seems unlikely that I will be able to release on this side of June, since I will be otherwise engaged for much of next week. I apologise for what may seem to have been an avoidable delay.

On the plus side, Sony Pictures Television History Mark IV is almost done. I am half-way through documenting 2011 and the animation work should be all done by Easter Sunday. After that, putting it all together should be simple enough, so expect it to appear on Tuesday!

Some observations about the proposed Comcast-TWC merger

First of all, allow me to apologise for the recent week-and-a-half of downtime. Storm Darwin took out my phone line. Seemingly, while my connectivity with the outside world was a lot more tenuous than what I’m used to, Comcast announced that it wanted to merge with Time Warner Cable. It’s not my prerogative to complain. I don’t live in America and am not particularly affected by its telecoms market, though I was startled to learn that I have faster broadband than 66% of America (I do now, that is :-P ). Besides, the last week has seen more than enough complaints about this thing on various sites. All I wish to do is share a few humorous/ironic observations of my own, which I have been formulating during this extensive downtime.

The torch of “The Octopus” has finally been passed

It’s no secret that Comcast owns Universal Studios. Even when their shareholding was only a controlling 51% stake, the 2012 Universal logo announced to the world for the first time that it was “A COMCAST COMPANY”.

The 2012 Universal logo

In the olden days, Universal was owned by the MCA conglomerate, which I discussed last June in my “Sausage Factories” post. Before MCA owned Universal, it was the largest talent agency in the United States of America. With its shady dealings and relentless buying-up of other agencies, it earned the title of “The Octopus”. The agency was dissolved when the company took control of Universal, because of antitrust concerns, among other things.

However, MCA and Universal became more and more closely associated over the years, with the Universal name eventually replacing “MCA” altogether at the hands of Edgar Bronfman Junior. Now, it can be said that Comcast owns what is left of the original MCA, and it is now seemingly vying for the title of “The Octopus” of cable operators, rather than “The Octopus” of talent agencies.

A combination of the current Comcast logo and an old MCA-TV "bug"


One less confusing brand-name on the market

Well, whatever about the implications for competition of this particular deal, I’m glad someone is getting rid of the Time Warner Cable name. From the information available, one would be forgiven for thinking that two of the “Big Three” music companies were about to merge. We have Universal Music, which looks like it is owned by the same company as Universal Studios. We also have Warner Music, which looks like it is owned by the same company as Warner Bros., which is Time Warner. Time Warner Cable also looks like it is owned by the same company.

None of this is true, however. Both Warner Music and Universal Music separated from their respective film studios a decade ago. Time Warner Cable separated from Time Warner half a decade ago. Unfortunately, trademarks are licensed. They all get to keep using each other’s names, under the terms of some obscure agreements. One needs look no further than the comments on this Techdirt post about the lawsuit against Warner/Chappell Music over “Happy Birthday” to see the confusion caused by this.

Therefore, I sincerely hope that Comcast will not renew their trademark licence once the deal comes through, so that this nonsense can finally start coming to an end.

The NBC Peacock finally gets an eye?

Peacocks have fake eyes in their plumage. The well-known NBC Peacock, however, seems to be an exception.

Peacock Closeup vs. NBC 2014 Indent Style

What about Time Warner Cable though? That weird Celtic-esque graphic that it uses as a logo surely qualifies as an eye:

The logo of Time Warner Cable

An eye or what?

What if Comcast got rid of the Time Warner brand, but kept the logo in some way? Would the NBC Peacock finally get something resembling an eye?

Time Warner Cable and Comcast logo fusion

Perhaps needs a bit more polish...

So anyway, that’s my two cent on this Comcast-TWC thing!

Why we shouldn’t use “Splenda”

Lately, I’ve been seeing this ad for Splenda, showing various “want versus should” situations, before claiming that the sucralose-based sweetener satisfies both. The ad is about health. For years, sucralose has been marketed as a healthy alternative to sugar, which is made from sugar and is just as sweet (in fact it’s much sweeter), but has negligible calorific value. Therefore, it doesn’t lead to weight gain or diabetes or anything like that. However, to me, it seems that sucralose may indeed be a “want”, as a supposedly healthy alternative to sugar, but by no means a “should”.

Unlike in the case of aspartame, this is not an issue of health. This is a moral/ecological issue. Let me start by explaining the way in which sucralose works. As widely advertised, it is “made from sugar”. The initial substance is sucrose, or normal sugar. This is called a disaccharide, because it is two sugar units stuck together. In the small intestine, it is split up into glucose and fructose, which can then be absorbed into the blood and used to make energy. Creating sucralose involves subtly changing the chemical structure so that this can’t happen.

Sucrose molecule Sucralose molecule
Spot the difference!

As you can see, three of the hydroxyl groups (OH groups) in the structure are replaced by chlorine atoms. The result is a molecule that seems similar (hence we taste it as sweet) but is actually quite different (hence our bodies can’t break it down to release energy). Since only tiny amounts of this substance can be actually used by our bodies, the rest is excreted and ends up, dare I say it, in the sewage system. Of course, from there, it ends up in rivers and seas, where it is no good as a food source for micro-organisms or anything. But that’s grand, right?

WRONG! The original sucrose that was used to make the sucralose was obtained from plant material. The plant had photosynthesised, taking in sunlight and using its energy to combine carbon dioxide and water into carbohydrate. The natural order of things would have this used, either by the plant or an animal, to produce energy, releasing the carbon dioxide and water back into their respective cycles. Instead, we end up with carbon, hydrogen and oxygen dumped uselessly in some body of water, where they may never be returned to their proper places. Carbon is a fundamental element of life, required to build most plant matter and also very important in animal biochemistry. Is it really right for us to squander it like this?

Granted, lots of plant matter from millions of years ago was turned into useless coal and oil, but that was perfectly natural. In a world where resources are increasingly strained, can we really afford to waste them this way? I think this is a real moral issue, and something that is often overlooked by people who talk about sucralose and artificial sweeteners in general.

Subatomic Particle Simulator now on GitHub!

Well, I have just spent an entire weekend using Windows, amounting to probably more hours than I had spent with this operating system in the previous six months! Of course, this meant that I had to endure loads of automatic updates, their drain on bandwidth and automatic restarts! It was worth it though to get the Subatomic Particle Simulator up, working just as well as it does on GNU/Linux! It’s nice to know that I’ve made this thing cross-platform.

More good news: In the process of porting the code, I realised that the best thing to do was to fork the Source SDK repository on GitHub, and that way avoid all the problems of contaminating a working copy to compile the simulator. It is here, so you can now clone it in a ready-to-compile state, or even download a ZIP file if you would prefer.

Again, same legal restrictions apply – due to incompatible licences, it is not currently possible to (legally) distribute binaries. Once again, I apologise for this, and hope I can sort it out in the future.

PS. If you would like to express your opinions on how legal restrictions like this should apply in the future, please go to this new campaign website.