Archive

Archive for the ‘Operating Systems’ Category

Mac Text Editors

February 16th, 2009 Ant 11 comments

I need a text editor that will print syntax highlighted Java code with line numbers.

  • Smultron doesn’t print line numbers.
  • TextWrangler doesn’t syntax highlight Java code.
  • BBEdit doesn’t syntax highlight Java code.
  • XCode doesn’t print line numbers.
  • Editra doesn’t print (it just prints the filename and the right-hand margin, leaving the actual text out).
  • TextMate doesn’t print line numbers.
  • NetBeans prints both line numbers and highlighted text, in a terrible way; printing to HTML results in print output surrounded by an inexplicable black box.
  • Aquamacs Emacs - an astonishing 115MB for a text editor even though it hasn’t got a real UI; view line numbers option doesn’t appear to work.

Why isn’t there a Mac text editor that will print properly?

Categories: OSX Tags: , ,

Mac Utilities; Versions in Beta

June 6th, 2008 Ant No comments

I’ve got a list of programs to buy at the moment. One of the main programs I miss from Windows is Sound Forge - Logic and Garageband are no substitute for a dedicated sample editor. Yeah, they have built-in editors, but they’re too clunky, cramped, counter-intuitive and limited. Audacity’s OK, though still clunky, but I’m looking for something with a more Mac-like interface.

I’ve found two main contenders for the role of Sound Forge Replacement. First up is Wave Editor from Audiofile Engineering. Not bad, but at $250 (or £125 in real money) it’s well out of my budget. That’s the same price as Logic Express.

I’ve settled instead on Sound Studio from Felt Tip Software. Great interface, fast, has all of the features I want and more, and only costs $80 (£40 in real money).

Whilst I’m on the topic of audio software, I discovered Soundflower the other day. It’s a tiny GPL program that creates a virtual sound device in OSX. You can set it as the output for one program and the input for another and, for example, rip audio streams as easily as recording from the microphone.

Anyhoo, the second program I’m thinking of buying at the moment is Pixelmator. It’s yet another Photoshop copy with all of the features you’d expect, but with two big differences. It uses the GPU for its effects processing (and so does neat things like rotating images in realtime) and only costs $59 (roughly £30). Photoshop is another application I’ve been missing since migrating away from Windows, and this looks like it’ll fill the gap.

The reason for mentioning this is that my SynchroSVN trial has expired. I’ve taken to storing all of my important files - source code, images, documents, serial numbers, etc - in a set of Subversion repositories. That means I have a working copy on my MacBook, the repositories on my MacMini, backups in their Time Machine databases, and a copy of the repositories in a SuperDuper image on a NAS. Unless the house explodes I’m pretty sure I’ll never lose anything important. I don’t want to buy any more serial numbers if I can’t add them to SVN and get them backed up automatically, so I need to buy Synchro first.

Except!

Versions, an OSX SVN client that seems like it’s been in development for nearly as long as Duke Nukem Forever, has finally gone into public beta. I tried it out today and it really is a massive step beyond all of the other clients available on the Mac. Forget Synchro, I’m going to wait for this to have a proper release. No mention of price yet, but as long as it’s not ridiculous I’m definitely getting it.

If you’re interested in trying it out, note that it currently has a stupid bug when trying to access SourceForge repos. When you try to bookmark a SourceForge repo, Versions runs into problems with the SSL certificate and opens an error dialogue with a “PROPFIND” message. There’s no way to accept the unknown certificate via Versions, so you can’t add the bookmark. The workaround is to open a shell and perform the initial checkout with the commandline client - this will prompt you to accept the certificate. If you choose to accept the certificate permanently, you’ll be able to work with the repo via Versions from then on.

I’ve notified the programmers, so hopefully they’ll fix the problem before it gets a proper release.

Categories: OSX Tags: , , ,

OSX 10.5.3

June 1st, 2008 Ant No comments

Since upgrading:

Strangely, these were all problems purported to be fixed by the new update, not introduced by it. Bah.

Here’s a quote from the first link:

I’m using Macs for 12 years now and I never experienced anything like this…

What is going on with 10.5? It’s a massive bugfest.

Categories: OSX Tags:

ListBox Take 2 and SVN Again

April 28th, 2008 Ant 6 comments

The rewritten version of the ListBox class is now in the SVN repository. Instead of farming out the drawing routines to an array of ListBoxItem child gadgets, the ListBox now draws its own list items. It’s made a massive difference to the scroll speed. Just need to make a wrapper gadget for it that includes a scrollbar and I can knock another item off the SourceForge to-do list.

As part of that rewrite, I had to fix a bug in the double click code. Nothing major, just a magic number that had slipped past somehow.

Given up for today because SourceForge’s SVN server is abysmally slow at the moment. I’ve come to rely on SVN heavily, and not being able to rely on it makes me uncomfortable…

Related to that, I’ve been tinkering with alternative OSX SVN clients again. I’ve gone back to ZigVersion, which I’ve discovered is free for non-commercial use; you just have to register for a free licence key. It’s got a much, much better interface than SmartSVN. It has several big problems, though. First of all, its ignore list functionality is lacklustre. There’s no way to change it unless you right-click on a file that can be ignored, as far as I can see.

Secondly, it seems to work directly off the server all of the time instead of from a cache. TortoiseSVN uses a cache, and is generally better for it, or it is until it starts sucking up 95% of the processor time and most of the computer’s RAM. Firefox 2’s memory leaks have nothing on TortoiseSVN.

Lastly, it keeps crashing on me. For all of its weird interface problems, SmartSVN is at least stable.

I gave svnX another go, but the interface for that really makes no sense.

Honestly, are there no good SVN clients for OSX? I’m seriously considering installing Eclipse just so that I can give Subclipse a try. Either that or I turn my back on 30 years of progress and join the guys who still think that the command line is an amazingly good idea.

Categories: OSX, Woopsi Tags: ,

RIP Linux Laptop

April 17th, 2008 Ant No comments

Fedora won’t install either. It keeps crashing. Looks to me like there’s something broken inside the laptop; like a little piece of it has died.

EDIT:

Thought that it might be the hard disk that was dodgy, so I tried installing both Fedora and Ubuntu from one USB stick to another. No luck. Thought it might just be a Linux problem, so got hold of an IDE to USB adaptor and an old CD drive and tried installing SyllableOS (installer locks up), AROS (can’t install from a USB CD drive) and PC-BSD (complains about segmentation faults before shutting down). I did get FeatherLinux running from a USB stick by installing it via another PC. Success!

After opening the laptop up, I’ve discovered that the problem is either the laptop or the memory. The laptop has a 512MB stick of Kingston RAM, but the BIOS thinks it’s got 640MB to play with.

EDIT EDIT:

It’s both. Putting the RAM from the dead laptop into a working machine results in a non-working machine. The dead laptop reports RAM from the working machine as being double the real size and continues to crash when booted. Looks like I need to take it to the tip.

Categories: Operating Systems Tags:

Laptop Linux

April 15th, 2008 Ant No comments

I was given a new laptop the other day. A new old laptop, anyway. It’s a grimy, rather tatty Dell Latitude X200. There’s something wrong with the backlight that causes strange ring effects on the LCD, the hinge is a bit loose, and the CD-ROM drive it came with is for a different model of laptop and so doesn’t work. I intended to get it running and then give it away, but I remembered I was after a cheap, small laptop for my forthcoming university course, so I’ve decided to keep it.

It’s currently OS-free. As it doesn’t have any way of getting Windows installed (and I seem to have lost the CD wallet with all of my install disks in it) my only real option is Linux. As per usual, I’m going for Ubuntu.

I’ve complained before about how ridiculously complicated it is to get Linux working properly, and trying to get it installed on this laptop is just as complicated. First of all, no CD drive means I’ve got to get a USB memory stick install working. There are lots of guides for doing this, but as you’d expect with anything Linux-related, the documentation is either for old versions or is woefully incomplete (yes, I can see the hypocrisy there; I’m going to sort out the Woopsi docs at some point).

In fact, the easiest way to get Ubuntu installed via a memory stick isn’t documented anywhere on the internet. There’s a surprise. This is how you do it. Note that you need a computer already running a Linux distro to make this work.

  • Download the latest Ubuntu ISO from the main site.
  • Download the “boot.img.gz” file from this location, replacing “gutsy” with the name of the latest distro: http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/boot.img.gz
  • Insert your memory stick and make sure it is dismounted
  • Open a terminal and type “sudo zcat boot.img.gz > /dev/sda”, replacing the “/dev/sda” portion with the device name of the USB stick (this will wipe the stick, so make sure it’s blank)
  • Create a new folder on your desktop called “img”
  • Mount the USB stick and copy its contents to “img”
  • Dismount the USB stick
  • Open your partitioning tool (I use GParted) and delete the partition on the USB stick
  • Create a new FAT16 partition on the USB stick
  • In the terminal, type “sudo syslinux /dev/sda1”, replacing “/dev/sda1” with the device name of the *partition* on the USB stick
  • In the terminal, type “sudo install-mbr /dev/sda”, replacing “/dev/sda” with the device name of the USB stick
  • Mount the stick (you may need to physically unplug and re-insert it first)
  • Copy the contents of “img” back to the USB stick, replacing all files
  • Copy the Ubuntu ISO to the USB stick
  • Reboot and select the USB stick as the boot device in your BIOS
  • When prompted with “MBR AF:”, type “A”
  • When prompted with “MBR 1234F:”, type “1”

The Ubuntu installer starts up, and you’re off.

What we’ve done here is dump a boot disk image to the USB stick, then copy those files to the computer, wipe the stick, copy the files back, add in the Ubuntu ISO and make the stick bootable again. This is a hell of a lot more reliable than trying to get a network install going.

The problem I’ve got is that Ubuntu refuses to work on the laptop. Feisty was slightly better, in that the installer chose the correct framebuffer mode before complaining about imaginary corruption in various random packages. Gutsy chooses the wrong mode completely before it complains about errors. There’s just no way that Ubuntu will ever get installed on this laptop.

This leaves me with a dilemma. If I can’t use the least-worst desktop Linux distro, what next? My favourite used to be Fedora back when it was called “Core 1”, so I’ll give that a go. Unfortunately, again, it doesn’t work - it freezes just after announcing “initrd.img…….”.

A quick Googling session reveals that it’s probably a BIOS problem. How do you update the BIOS on a laptop that doesn’t have a floppy drive, a CD drive or an operating system? I’ve got a USB floppy drive. Except the BIOS update is shipped as a Windows executable, which is of little use when you run nothing but Linux and OSX. Good job they invented virtualisation, really. Much fiddling later and, amazingly, the Fedora installer seems to work. Now downloading the 3.2GB DVD ISO, which I’m planning on installing via an NFS share.

Categories: Operating Systems Tags:

Not Giving Fedora a Try

January 22nd, 2008 Ant 1 comment

I got fed up of waiting for the Fedora DVD to download and gave Ubuntu another try instead. I’m amazed to say that it works, and the fileserver is now running Ubuntu as its main OS, with Windows in a VMWare Server VM. I only had to resort to the command line on two occasions - once to run “ntfsfix” to fix problems with my Windows drives (fair enough) and once to edit the Samba config files (just about acceptable).

Ubuntu now has a VMWare Server package in the third-party repository, so installing it was just a matter of locating the package in Synaptic and hitting the “install” button. Ubuntu also has read/write NTFS support with NTFS-3G, so that’s another one of my requirements off the list. Installing NTFS support is similarly easy, and it even comes with a simple GUI consisting of two checkboxes and two buttons.

Setting up VNC is just a matter of ticking another box and entering a password (hurrah). It uses RealVNC, so the password can’t be very long, but as the Linux side of the box isn’t exposed to the net anyway that’s not a big problem. SMB gets installed automatically when you try to share a drive, and the only config change is switching from “user” security to “share” (again, the server is only accessible locally).

The only real problem I’ve had with it is that it crashed when X started running if I wasn’t there to hit Ctrl-Alt-F1 and then Ctrl-Alt-F7 at the right time to switch to a console and back. Removing the NVidia drivers fixed that.

Even better, the new network card worked without any problems. All of the hard disks were detected automatically with no mucking around with floppy disks containing SATA drivers. I even got to upgrade the RAM to 1GB and replace the PSU, which was red hot and ticking ominously (yikes).

The real benefit of doing all of this is that I can take a snapshot of Windows whilst it’s working and just restore the snapshot in July when the OS decides to mangle itself again.

Categories: Operating Systems Tags:

Giving Fedora a Try

January 22nd, 2008 Ant No comments

Bang on cue, almost 7 months to the day, my fileserver’s installation of Windows has gone wrong again.

In time-honoured tradition, I’m giving another version of Linux a go before I reinstall Windows (note the lack of expectations). Last time I tried Ubuntu, which was unusual for a Linux distro in that it wasn’t really a desktop OS yet wasn’t great as a server OS either. This time I’m trying Fedora, which was my favourite Linux distro a few years a go - I had it set up as a dual-boot on my laptop with Windows for a while.

EDIT:

Scratch that. Pulling the new network card I put in makes it work again. I think that the cheap motherboard I used when building it has a really bad PCI controller, because I’ve had similar problems before. Swapping the PCI graphics card for an AGP card seems to fix the problem. Now I’ve just got to deal with the fact that NetGear has shipped a broken driver with their card.

EDIT EDIT:

Nope, it’s not a broken driver; Windows is actually screwed. Fedora it is, then.

Categories: Operating Systems Tags:

A Great Idea, Ruined by Apple and Microsoft

December 23rd, 2007 Ant 14 comments

I was reading the GBADev forum yesterday and found an interesting thread about how people were getting around the problem of debugging when coding for the DS. It was such an interesting thread that I didn’t notice I’d missed both of the stops I could have got off at, and had to ride the train into the city centre and get a train back. Curses.

The idea goes something like this: If you can abstract away enough of the DS’ hardware, there’s nothing to stop you from writing a simple layer that will allow your DS project to run on the PC as a native application. Woopsi is itself basically a hardware abstraction layer, and all of its DS-hitting code is contained within Steven’s woopsifuncs files.

I decided that it would be easy to create a new “nds.h” file (containing all of the data type shortcuts from libnds) and create a new set of Woopsi functions targeted at another hardware platform. Obvious choice: SDL. If I can get Woopsi’s standard HAL pointing at SDL, Woopsi and any apps that use it will immediately run in Windows, on the Mac, on the Amiga, the GP2X, Linux…

Except, of course, both Microsoft and Apple have conspired against me to stop this happening. Getting SDL set up in Visual Studio looks to be needlessly complicated, so I went for Xcode instead. Easy to set up - just involves dragging the runtime library into the Frameworks folder, and copying over the templates.

However, Apple have played another hilarious trick with Leopard - if you upgrade Xcode from 2 to 3, you’ll find that trying to compile anything results in “duplicate symbol” errors. Nothing works.

That pretty much settles it. Leopard is a bloody nightmare if you perform an upgrade from Tiger - I’ve had endless problems with it - and I’ve got no choice but to wipe my laptop and reinstall the OS from scratch.

Categories: DS Coding, Development, GP2X, OSX, Woopsi Tags:

XCode PALib Template

October 19th, 2007 Ant No comments

Following on from the previous post about getting PALib and devkitARM set up in OSX, here’s some instructions for creating a PALib template project:

  • Download the PALib XCode Template
  • Unzip the archive
  • Drag the resultant folder to “/Library/Application Support/Apple/Developer Tools/Project Templates”

All done!

To create a project using the template:

  • Fire up XCode
  • Choose “File/New Project” from the top menu
  • Select “PAlib” from the template list
  • Click “Next”
  • Choose a project name and a location for the project
  • Click “Finish”

You’ve now created a basic PALib project that will compile (ROMs are put in the “release” folder) and run in an emulator.

Categories: DS Coding, OSX, PALib Tags: