public SongEntry [] getSongs ()
	throws IOException
	{
	    int		temp = getFirstFreeEntryOffset ();

	    // a lot of these calculations feel quite odd
	    // they're from the c code

	    int		blocks = temp / BLOCKSIZE;
	    int		count = 8 * blocks;

	    temp %= BLOCKSIZE;
	    if (temp > 0)
		blocks++;
	    count += temp / SONG_ENTRY_SIZE;

	    byte 	data [] = new byte [blocks * BLOCKSIZE];
	    SongEntry	retval [] = new SongEntry [count];

	    int		address = getFolderNumber ();

	    address <<= 8;
	    address |= 0x0ff;
	    address &= 0xfff;
	    rio.read (external, address, data, 0, data.length);

	    address = 0;
	    for (int i = 0; i < retval.length; i++) {
		retval [i] = new SongEntry (this, data, address);
		address += SONG_ENTRY_SIZE;
	    }

	    return retval;
	}