Saturday, 11 February 2012

Slow Web Browsing in Ubuntu

A couple of years ago I bought a Belkin wireless router. No big surprises there. My main PC connected to it via a network cable, my kid's PC using wireless.

In Windows it works great. In Linux it didn't. There was a noticable delay (around four seconds) from entering a web address to the page starting to load. Every time.

In the end I switched to a different router which nicely avoided the problem, and the old router took up it's new position as an "emergency backup."

Now the new router has finally failed, and so I've switched back to the "old" one, and yes, it is still slow to browse in Ubuntu. The funny thing is that once the page starts loading it loads quickly, but there is that long delay before it starts.

So now I'm stuck with it, and with the benefit of a couple of years more experience under my belt it is time to find out what's going wrong.

Let's turn to our good friend dig and see whats going on:

dig www.google.com

This gives the following response:

;; reply from unexpected source: 8.8.8.8#53, expected 192.168.1.1#53

; <<>> DiG 9.7.3 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59114
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 3 IN CNAME www.l.google.com.
www.l.google.com. 3 IN A 209.85.229.99
www.l.google.com. 3 IN A 209.85.229.103
www.l.google.com. 3 IN A 209.85.229.104
www.l.google.com. 3 IN A 209.85.229.147
www.l.google.com. 3 IN A 209.85.229.105

;; Query time: 36 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Feb 11 17:45:21 2012
;; MSG SIZE rcvd: 132

The first line gives a very good clue as to what the problem may be.

reply from unexpected source: 8.8.8.8#53, expected 192.168.1.1#53

The unexpected source is what I would have thought was my primary DNS server (and indeed the router's configuration confirms this, with 8.8.4.4. as the secondary). The "expected" IP address is the router itself. This explains the slow browsing - as there there will be a delay while the DNS request is made to the router (which doesn't respond) before moving on to the true DNS server (which does).

Running the connection information tool confirms this. The router is being set up as the primary DNS server, with 8.8.8.8 as the secondary and 8.8.4.4 as tertiary.

The fix? I've set up a manual IP address for the desktop, which is just out of the router's DHCP scope, and manually specifies the correct DNS entries (but remembering to set the router as the gateway). Browsing is now just as fast on Ubuntu as it is on Windows.

Sorted!

Friday, 25 November 2011

Dear Ubisoft...

Dear Ubisoft,

I'd love to say how much I've been enjoying using my own electric guitar to play your fine game "Rocksmith." Especially as, according to a recent article: "What I see when I read the reviews is a lack of enthusiasm for something that is new."

However, seeing as there is no UK release in sight for the game, I'm not able to. I, and I suspect many others, have been waiting patently the past few months, cash-in-hand to buy your game. Hello? Customers waiting!

So far, we've heard the following regarding the UK (and European) release of Rocksmith:

* It will be released late 2011
* It will be released early 2012
* There are licensing issues (with the music) that are holding up the UK release
* There are no plans to release the game outside of the US

Which is it?

Are we to assume that you don't want European customers to buy your games?

We want the game, you want our money. Surely we can come to some arrangement here?

Distribution / licensing / trademark issues can (and do) happen. This is a sad fact of business life at the moment. However sending conflicting messages to your customers when these problems happen is a really good way to loose them.

Permanently.

So, before we go our separate ways and I start looking for a Pro Guitar to go with Rock Band 3, I'd love to give you the chance to sell me the game that I actually want. Because believe me, if I have to shell out for a new guitar to play Rock Band 3, I certainly won't be spending my money on Rocksmith (or any other Ubisoft games) for a good long while.

Yours Hopefully

DanO

Thursday, 28 July 2011

Dan's Remakes vs OSX Lion

I've had a couple of emails regarding my games not working on the latest version of OSX Lion. This is thanks to those wonderful people at Apple removing support for PowerPC compiled applications in the latest and greatest version of their operating system.

Yes folks, Rosetta is no more, and when you update to Lion, neither are your legacy (PowerPC) apps.

So what does this mean for Dan's Remakes? Well, in the short term I'll only be able to support people running versions of OSX earlier than Lion as I don't have access to an Intel based Mac.

Sorry and all that, but buying a new (or second hand) Apple laptop is a bit beyond my means at the present time (and with four kids and a wife to support this isn't likely to change in the near future).

However. . . .

For a number of years there has been a link to a Paypal tips jar on Dan's Remakes. This has garnered a grand total of nothing. Should anyone feel like saying "thanks" and dropping a couple of pounds / dollars / francs / yen / whatever in, then I'll put it towards getting that new (or second hand) Mac so I can start supporting OSX Lion.

I'll update the main site this weekend and will post the progress towards the fund total (should there be any).

Fund total? Well, looking at EBay it will cost me £350-400 to get a second hand Intel based Macbook. If the total gets close enough then I'll stump up the rest of the cash myself.

Click here to donate.

On the other hand - should someone have a spare Intel based Mac Laptop that they are willing to donate then get in touch at the usual address.

If a miracle happens and too much money is raised - then I'll donate the overflow to charity.

Tuesday, 14 June 2011

Linux on Fujitsu Amilo Li 1705

Earlier this year I bought a Fujitsu Amilo Li 1705 and I've been wanting to get Linux working properly on it, as it would make a handy portable development system.

As I've just upgraded the CPU from a single core Celeron M to a proper Dual Core processor, I was keen to see how well Linux ran on it, especially as it had made a HUGE difference when running Vista.

It goes without saying that these days installing Linux is a lot less painful than it used to be. In fact, in most instances you can go through the entire install and configuration process without ever touching a command line.

Ubuntu can even take away the agony of partitioning. Using the Wubi application downloads the install files, creates a loopback file system, and configures your Windows boot menu to allow you to install Linux without having to do anything scary with your existing system. You can even uninstall it from add/remove programs.

Once you boot into your new "Ubuntu" option then the install proper takes place, and one reboot later you are the proud parent of a bouncing baby Linux.

End to end the install took less than half an hour. Uninstalling takes a few seconds.

Logging into Ubuntu for the first time it is time to go through the checklists:

Has the correct graphics driver and screen mode been selected? Yes.

Is 3D acceleration working? Yes.

Do we have sound? Yes.

How about wireless networking? Yes again.

Is CD Burning working? Sure is.

How about playing DVDs? Oh dear.

There is an art to getting DVD playback working on Linux. Thankfully the process for doing so in Ubuntu is extremely well documented and it only takes a few minutes to install the necessary packages.

sudo apt-get install ubuntu-restricted-extras
sudo /usr/share/doc/libdvdread4/install-css.sh

Sadly although the DVD started to play the media player crashed. Not only did it crash, but it took out the window manager too, leaving me back at the login screen.

Installing VLC and trying to play DVDs through that had much the same result. After a bit of fiddling I was able to find a video driver within VLC that didn't crash within a few seconds. However playback was extremely stuttery and stalled within ten minutes.

Trying to install a basic 3D game also showed problems - Saurbrauten was running at a less than impressive 2fps.

The strange thing is that in Windows the 3D isn't that bad, and DVD playback works fine. So what is going wrong?

Web browsing was also a bit hit-and-miss, with various crashes and lockups (usually when playing video, but sometimes when playing music).

After a bit of a search I found the problem is down to the graphics drivers - a Via Chrome9 HLC - a reasonably common choice for laptops and netbooks. Not exactly a 3D powerhouse but no-where near as bad as Ubuntu was making it appear.

The driver that is installed is the OpenChrome open source driver. This provides 2D and 3D acceleration for the Chrome9 driver. Badly.

This isn't meant as a dig at the team that are doing the drivers. The fact that the drivers work at all is no mean feat. However they certainly not stable enough for every-day use. As development appears to have stalled in 2009 I'm not exactly holding my breath for bug fixes.

That said, VIA do provide (limited) support for Linux, and do have a set of drivers available to download at their linux portal.

The problem is that the drivers don't work with the latest Ubuntu release - so for now it is back to Unbuntu 10.10 (the latest supported one) to test their drivers. As the drivers are dated April 2011 it looks like they are still supporting them.

One uninstall and re-install of Ubuntu later. . .

OK, so once we've installed Ubuntu 10.10 and downloaded the drivers let's install them:

The current version is 5.75.32.87a-u1010-55689.tar.bz2. Enter the following:

tar -jxf 5.75.32.87a-u1010-55689.tar.bz2
cd 5.75.32.87a-u1010-55689
cd 5.75.32.87a-u1010-55689
sudo ./vinstall

Once the install has completed a reboot should be all it takes to get things working.

Well, this is a bit of a mixed bag. On the one hand the drivers have fixed the crashing during DVD playback, and 3D is now running an awful lot faster. On the downside the screen resolution is entirely wrong and the Monitors option refuses to allow you to change it.

As a side note, recent Ubuntu releases don't need an xorg.conf (the X11 configuration file), and do a damn good job of detecting what graphics card / monitor resolutions are available to you. As part of the VIA driver install an xorg.conf is created in /etc/X11. We can use this to add our "missing" resolutions.

So, how do we find our missing modes?

Open a command prompt and enter the following:

cvt 1024 768 60

This returns the following:

# 1024x768 59.92 Hz (CVT 0.79M3) hsync: 47.82 kHz; pclk: 63.50 MHz
Modeline "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync

Now, we need to edit our xorg.conf file.

sudo vi /etc/X11/xorg.conf

We are looking for the currently enabled display.

Section "Monitor"
Identifier "CRT"
Option "Enable" "true"
EndSection

We'll need to edit this section to add in our missing mode. I've also added in some of the other standard resolutions.

Section "Monitor"
Identifier "CRT"
Option "Enable" "true"
Modeline "1280x800_60.00" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync
Modeline "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
Modeline "800x600_60.00" 38.25 800 832 912 1024 600 603 607 624 -hsync +vsync
Modeline "640x480_60.00" 23.75 640 664 720 800 480 483 487 500 -hsync +vsync
Option "PreferredMode" "1280x800_60.00"
EndSection

The final line of the section selects which of our modes we are going to use. In our case we want the 1280x800 one.

One restart of X11 later and YES! We are running in full-screen! 3D now works at a reasonable speed (not stunning, but it does work). DVD playback also works - and by selecting the X11 driver in the VLC preferences it doesn't max out the CPU either. Result!

Using VIA's own drivers has changed my Ubuntu install from being basically unusable, to a pretty stable one.

After four hours of testing (I played a couple of DVDs, browsed the web, listened to some music and basically did all the regular things that I want a laptop to do) there were no crashes or lockups.

I was even able to enable the extra desktop effects such as "wobbly windows". All in all it is very nice indeed.

Once VIA release drivers for 11.04 I should be able to upgrade to that. But there isn't any rush for now.

Update

As the legendary comic Jimmy Cricket often said: There's more...

Updating the kernel reverts the drivers back to the OpenChrome ones. You can, of course, re-install the VIA ones, but there is a little extra to do this time.

We'll need to re-compile the kernel modules for the current kernel version, and then re-run the install routine. So in the directory where we expanded the drivers:

cd 5.75.32.87a-u1010-55689/5.75.32.87a-u1010-55689/VIA_Chrome9/
sudo make
cd ..
sudo ./vinstall

Now, we'll need to copy our configuration file back:

cd /etc/X11
sudo cp xorg.conf.viabak xorg.conf

Now, reboot and everything should (hopefully) be working again!


Notes:

One thing that I have found is that changing resolution (ie a game trying to set full-screen 800x600) stuffs the display. As soon as I find a fix then I'll update the article.

Thursday, 20 January 2011

Big Business vs Hackers

Some times I just feel so damn old. I remember the days when I bought a computer and was able to develop software for it - no questions asked. In fact, back in the 8-bit era the computer came with a version of BASIC built in to allow you to get started.

This was how many future programming stars got their start (not to mention wannabe indie devs like myself). Even hacking things together for consoles wasn't a problem (not that the consoles of the day were really worth playing with too much). In fact, it wasn't unknown for programming kits to be released for consoles - even the NES got a version of basic!

That was then. Now, however, it seems that some manufacturers are willing to do anything to stop you playing with the hardware that you have bought from them. Sony is a case in point.

Sony don't want you to make games yourself for the PS3 (PlayStation 3) or PSP (PlayStation Portable). Their logic goes something like this: if you allow any code to run, then that code could be pirated software. Pirated software is bad, so we won't allow it.

Sony used to allow users to run Linux on the PS3 (albeit without full access to all the hardware). This allowed you to run Linux versions of homebrew games and emulators, as well as converting the PS3 into a low cost Linux workstation. Sadly this functionality was taken away at the point where people managed to get access to the "restricted" parts of the console. Never ran pirated software in your life, but want to run Linux on a PS3? Tough luck.

The "Other OS" option was not only removed from new consoles, but from existing ones too. This has led to a situation where "hackers" have been trying to find ways of restoring the missing functionality, and whilst doing so have discovered something important, namely the "key" used to sign executable programs. This is basically a code that the console looks for when a program tries to run: if the "key" is correct then the game or program will launch, if not then it doesn't.

This is bad news for Sony - as it now means that homebrew software can be made to look like Sony's own software and the console cann't tell the difference. According to Sony this can also be used to enable pirated software to run.

To make matters worse (for Sony) the PS3 also contains the key for signing PSP software, so now homebrew can run on the portable too. Although in theory Sony could change the key, in practice this would invalidate all software for the PS3 (and PSP) - in other words all existing software would be inoporable beit on CD, downloaded from the Sony store, or installed by those naughty homebrew people.

Sony's response to this has been to take legal action against the hackers. In the meantime software to allow users to self-sign PSP code has already been released and ready-signed emulators and homebrew games that run on unmodified PSPs are already available (with more appearing each day).

What can Sony hope to gain from their legal action? I wish I had the answer to that one. Sadly the cat is now well and truly out of the bag - and no amount of legal posturing is going to put it back in.

It is now only a matter of time before Linux is available again on an unmodified PS3, and this time there are unlikely to be any restrictions on what parts of the hardware it can access.

In my opinion it appears that Sony's heavy-handed response to the hacking / homebrew community has backfired in spectacular fashion - and the damage that Sony are now doing to the PlayStation brand is immense.

Could things have worked out better by using a different approach?

Indeed they could. Microsoft (you know, the Big Evil Corporation) have been doing a lot of things right lately. Let's take Kinect for example.

Not long after the Kindle was released hackers found ways of making the device work on PCs (both Windows and Linux based). Although Microsoft initially grumbled about this, they had a change of heart and are now in the process of releasing a development kit for it.

Even more recently hackers found a way to enable the equivalent of unsigned applications to run on the new Windows Phone 7. In essense, Microsoft were in the same situation as Sony with the PS3 / PSP.

So did they sue? No.

Did they create a media firestorm decrying the hackers as evil monsters intend on ruining the platform? No.

Did they invite the hackers to a meeting to discuss methods of enabling homebrew software to run on Windows Phone 7? Yes, they did.

Not only that, they also provided the hackers with custom made t-shirts that read "I was the first to jailbreak Windows Phone 7 and all I got was this lousy t-shirt." The upshot of the meeting is that the Windows Phone 7 jailbreak apps have been removed whilst the official homebrew tools are developed by Microsoft. The community is happy as they will (eventually) be able to write their own stuff on Windows 7 Phone. Microsoft is also happy because they are still in control of the phone, and have had some damn good publicity into the bargain.

This is the best advert that Windows Phone 7 could ever have - namely "we want you to be part of our community," as opposed to Sony with "do as we tell you or we'll sue you into oblivion."

Who would you rather deal with?

Does Blogger censor items

Strange but true.

Over the past week or so I've been preparing a (short) item on the PSP homebrew scene. It's been re-written a couple of times due to the speed that the scene is changing (hopefully more later on this).

Rather than swamping the blog with PSP related entries, I've been working on a draft version of the piece, and was planning on publishing it today.

Only one small problem - the article has vanished from my account. AAAAARGH!

So between my last edit yesterday lunchtime (which was just waiting for a list of homebrew games that run on unmodified PSPs) and me logging in this morning something has happened.

So, assuming that this blog entry doesn't vanish in a cloud of electrons - coincidence or censorship? If this entry vanishes then we'll know the answer.

Sunday, 17 October 2010

Serious Sam The First Encounter on Ubuntu 10.10

Whilst having a hunt through some things that I had placed in storage a couple of years ago (and then forgot about) I happened across my original CD of Serious Sam - The First Encounter.

As this is one of the games where Loki games provided a proper Linux installer for it I thought I'd give it a bit of a blast.

Problem 1 - Tracking down the installer.

This should have been easy - ie. go to the Croteam website and download the installer, right?

Nope. They had some archived patches for a Linux installation, but not the damn installer - or if the do have it they've hidden it well.

I eventually tracked down the installer here:

Loki Installers for Linux Games

Problem 2 - Installation

So far, so good. Apart from the fact that the installer doesn't work (at least, not without some effort).

So here is a quick rundown on how to get the installer working.

First, move the installer into its own directory:

mkdir ssam
mv serious.sam.tfe_1.05beta3-english-2.run ssam
cd ssam
chmod +x serious.sam.tfe_1.05beta3-english-2.run


Make sure the original Windows CD is in your drive. And if you want you can try and run the installer.

./serious.sam.tfe_1.05beta3-english-2.run


If you are lucky it might work. If so then go, play, enjoy. See you later.

However, you may well find that you see the following:

Verifying archive integrity... All good.
Uncompressing Serious Sam: The First Encounter 1.05beta3-english-2 Installer.............................

after which you are back at the terminal prompt.

If this is the case, then you can try the following, which worked for me.

./serious.sam.tfe_1.05beta3-english-2.run --tar xvf
sudo ./setup.data/bin/Linux/x86/setup


And that should be it. The installer should run and you can choose where to install it and finally play the game!

Thursday, 8 July 2010

They're Baaaaack......

The last time I wrote about SCO was when they lost the Novell case - and had their initial request for a retrial denied. As I said at the time "SCO have approximately one month to decide on their next course of action - assuming, of course, that they don't slide into Chapter 7 bancruptcy in the meantime."

Well, here we are, just under one month later and yes, they're going to try and appeal. The timing of this (leaving it as late as humanly possible - and also just before the next bankruptcy hearing) has been well noted.

To be honest I'm not surprised that they have appealed. In fact, I don't see that they've got an awful lot of choice at this point. SCO's future - such as it is - depends on them winning the court cases, and at the present time the ongoing court cases are the only thing realistically keeping them from sliding from Chapter 10 into Chapter 7 bankruptcy.

In a perfect world I can't see the appeal succeeding. I don't believe that the evidence, facts or the witness testimonies were in their favour. Personally I think that the courts were pretty darn lenient with them all the way through (in fact I thought that it was verging on the unfair towards Novell) so I can't see them having any grounds for a retrail other than the fact that they lost when they believe they should have won.

However this isn't a perfect world, so anything could happen. I'm not sure how long the appeals process takes - although judging by SCO's recent financial reports the bigger question is whether the Bankruptcy court is going to allow them the opportunity for one more throw of the dice before deciding to wind things up.

Stay tuned folks, it ain't over (quite) yet.

Wednesday, 16 June 2010

Return to Retrovaders - Part 3

Now that I've finished the translation framework for RetroVaders, it is time to move on to the next bit - graphics. The main sprite set (which I like, I must admit) is still a bit too close to the original Space Invaders graphics. I've adapted them slightly so that although they are still recognisable they are (hopefully) different enough to differentiate the game from the arcade original.

I've also replaced the "RetroVaders" backdrop with a new version, and made that the default. So, by default, the game now looks like this:

You can, of course, make it look like the original via the options menu.

Speaking of the options menu, another "usability" adaption is that when the game is launched for the first time, it now starts in the options menu (in windowed mode). Subsequent launches will open at the main screen with whatever options you have chosen.


The next release is (likely) to be RetroVaders 2.00 - and probably will be the final major release - unless someone supplies some alternative translations.

So what is left to do? Apart from testing the game, I've also got the Linux and Mac OS X ports to do, the translations to complete (German and Finnish still to add, maybe French too), and some tweaking of game elements; although nothing too major.

Update: The Finnish translation has been added, so that only leaves the German one to do. It actually only took around quarter of an hour to add the translation in. The language framework (although it was a bit of a bugger to sort out initially) has indeed made life much easier for me.

Saturday, 12 June 2010

Return to Retrovaders - Part 2

Keeping with the theme of accessibility - language support is something that has been on my list of features that I'd like to add.

Sadly, however, my grasp of languages other than English is very limited indeed, but not to be deterred I made a start - and stripped out the menu text from the game - which came to a stonking 24 words - and posted a request for translations on the RetroRemakes forum.

So thanks to the kind assistance of Ordvana, I'm now well on the way to adding Finnish and Russian (!) translations to the game. As it turns out it is just as well that I'm only translating the menus, as BlitzMax doesn't support non-English languages that well. This leaves me with creating bitmapped versions of the Russian text (and probably for the Finnish text too).

As the Russian one is going to take the most work I'm starting with that - and hopefully by the end of today should have the main menu working in both English and Russian, and be able to make a start on the Options menu.

This means that instead of "Start Game" - the Russian version will display "Начать игру", instead of "Options" we'll show "Опции" and so on.

So if you are reading this, and would like RetroVaders in your native language then get in touch!

Update: The main menu now works in both Russian and English. I can use regular text, graphics or a mix of both for the menus - which should make adding other languages much easier.