August, 2008

Haiku Grows Swap Support

Submitted by Ingo Weinhold on Fri, 2008-08-29 15:34.   Tags:  :: ::

Thanks to Google Summer of Code student Zhao Shuai successfully finishing his project Haiku does now feature support for swapping. As of revision 27233 it is enabled by default, using a swap file twice the size of the accessible RAM. The swap file size can be changed (or swap support disabled) via the VirtualMemory preferences.

Swap support finally allows building Haiku in Haiku on a box with less than about 800 MB RAM, as long as as the swap file is large enough. I tested this on a Core 2 Duo 2.2 GHz with 256 MB RAM (artificially limited) and a 1.5 GB swap file. Building a standard Haiku image with two jam jobs (jam -j2) took about 34 minutes. This isn't particularly fast, but Haiku is not well optimized yet.

Haiku's swap implementation was heavily inspired by that of FreeBSD. At the moment it is not as sophisticated, but Zhao intends to borrow more of FreeBSD's optimizations.

BeOS Joystick Framework

Submitted by Fredrik Modéen on Mon, 2008-08-11 13:53.   Tags:  ::

This article are more of a compliment to ITO Takayuki’s “BeOS Joystick Driver ” so reading ITO’s article before this one are advisable.

I’m not a article writing person (not even in Swedish) but as I’m the 3:d that tries to implement the Joysticks framework in Haiku I think that it would be good to have something for the 4:th person to read if I drop this :)

When I started to look over the Joystick framework I thought that this would not be that hard, boy was I fooled :) , lol I don’t even know how to talk to hardware. Anyway after some testing (trial and error style) I think I have found some additional information about the Joystick framework, but first I would like to describe how I think the frame work works.

The BJoystick class in libdevice.so talks to a joystick published at dev/joystick/”portname”/”joystick name” this way both the generic gameport and ITO’s usb_joy works as they publish as separate devices.
usb_joy = dev/joysticks/usb/0 (for the first)
usb_joy = dev/joysticks/usb/1 (Second and so on)
gameport = dev/joysticks/gameport/201
etc
emuxkigameport = dev/joysticks/ emuxkigameport /et18

emuxkigameport are a driver that was donated to Haiku that make’s gamport on a SB Live and Audigy soundcard work. I tried to add it to emuxki but then the sound was interfered when I moved the joystick. This driver uses the generic gameport.

So how does this work? You could say we have two ways of talking to Joystick’s, through usb_joy and emuxkigameport. First you must have a copy of a joystick description file in config/settings/joystick/”portname”/”joystick name”. I think that this need to be a copy of a description file as the Joystick Preference app does changes to the file so a link are not to recommend.

First usb_joy, when BJoystick sends a ioct (I haven’t tested but I think I have figured that one out right?) to the driver the usb_joy does everything by itself, collecting usb information and reading joystick description file from /settings/joystick/”portname”/”joystick name”.

How does the emuxkigameport work then? BJoystick sends the same information as with usb_joy but in this case the emuxkigameport forwared the ioct to a driver called generic gameport located under drivers/generic this one loads the file in config/settings/joystick/”portname”/”joystick name” with this file it knows what module to load and loads this module but it must be a joystick description file in this location or you will only be allowed to used the joystick in standard mode (same if the module don’t exist to your joystick).

Using BeOS Joystick Framework in Haiku. Yes this works but not usb_joy as it crashes the system.
You need to copy libdevice.so, Joystick preference app, etc/joysticks, media/joy, generic/gamport and Haiku’s emuxkigameport. I have only tested stickit and BeOS R5 joystick preference and not any games.

So what now? I will continue but perhaps focus on the usb_joy driver and figure out what’s wrong with this driver. I would like to have some help to determent if it would be a good idée to use modules in a USB drive to handle the difference in different joystick’s or does those difference not exist in a USB world?

If you like to read more about Joysticks in BeOS here are some links.
http://www.beatjapan.org/mirror/www.be.com/documentation/rel_notes/R4Rel...
http://euc.jp/beos/beosjoystick.en.html
http://www.haiku-os.org/legacy-docs/bebook/BJoystick_Overview.html
http://www.haiku-os.org/legacy-docs/benewsletter/Issue3-43.html#DevWorks...

How To Get Haiku Booted

Submitted by Michael Lotz on Thu, 2008-08-07 16:47.   Tags:  :: :: ::

This article is intended to explain in a nutshell how booting works in general, what the Haiku counterparts of standard boot process elements are and how to get everything together for a working boot in case this is not done automatically. These are things you will encounter installing/booting most operating systems, so it's not entirely Haiku specific.