Chapter 5. Applications

Table of Contents
X
Compiling Applications

This chapter contains a few random notes on applications for Linux/APUS.

You can get precompiled software for a complete system in both RedHat and Debian packages (see Chapter 12). The thing to remember when looking for applications is that Linux/APUS is binary compatible with Linux/PPC so you should have no problems finding software.

Some commercial applications are also available for Linux, but only in binary form. You would have to persuade the company to start shipping PowerPC compiled binaries in that case. I can imagine some of the other Linux/PPC sites would be coordinating such efforts, or at least it seems like a good idea to do.

X

In order to run X you need to get a version of the X server compiled for PowerPC with support for the Amiga hardware. Luckily, such a server is provided by Geert Uytterhoeven at www.cs.kuleuven.ac.be/~geert/bin/XF68_FBDev-ppc-19981017.gz (You might find a newer version than this).

You should also get fbset from Geert's site: www.cs.kuleuven.ac.be/~geert/bin/fbset-19990118.tar.gz (again, there may be a newer version). This file may also be useful: www.cs.kuleuven.ac.be/~geert/bin/fb.modes.gz

Unzip the X server and copy it to /usr/X11R6.3/bin/X.

Now get the example XF86Config file from the 'misc' directory at SunSITE Denmark and copy it to /etc/XF86Config.

Next, you have to create some Amiga specific devices which are not included in the RedHat/PPC packages:


	cd /dev
	mknod fb0current c 29 0
	mknod amigamouse c 10 4
	ln -s fb0current fb0
	ln -s amigamouse mouse	

Now you should be ready to start up X by issuing the command "startx".

X and graphics cards

There are a few more details to sort out if you want to run X on a graphics card. This text is specific to CyberVision and CyberVision/3D -- but it might help you get X running on other cards. Please let me know of your success if you try that.

Note: You have to use the same pixel clock under Linux/APUS as you use under Amiga DOS

Text by Jeffrey W. Davis

I just wanted to inform everyone that Linux/APUS and the CV64 is working. I do not have the CV64/3D, but apparently it is also working. From what I have seen for the CV64/3D you need to substitute "virge" for any instance where I mention "cyber".

(The frame buffer label "cyber" selects the CyberVision64 driver and "virge" the Cybervision64/3D driver.)

I use a simple boot script as follows:


	  copy bootstrap ram:boothack
	  boothack --apus -v -k ram:vmlinux root=/dev/hda3 video=cyber:1024x768-8	

Apparently, only resolutions understood by Linux work at present. Therefore, you should choose 640x480, 800x600, or 1024x768 in the above statement. I believe all of them have been reported to work. I'm sure that there are others, but I haven't done much experimentation at this point.

Make sure that before you boot Linux/APUS, that your CyberGfx video mode matches what you have selected to boot Linux/APUS. I believe the two key factors in the command line are the -v and video= options. You should be able to modify the rest to suit your configuration.

Once you have successfully booted Linux you will see the penguin drawing and probably a much higher resolution that what you have seen before.

To run X you will need to specify the resolution in the /etc/XF86Config file. There is an example in the same directory as where you found Geert Uytterhoeven's X server. To figure out what parameters you need, use "fbset -x" [1] which will show you what you are currently using. If you are running in an interlaced mode, the fbset program will show you values that your monitor will not actually support. BUT... these values will work properly. Simply LIE about the scanrate in your monitor definition in the XF86Config file. It will work. Use the values returned from fbset and you should be able to start X with no problem. [2]

If I use the same resolution for everything, with only one resolution specified for X everything works great. Good luck! Really... it works!

Custom XF86Config for CyberGfx users

Text by Jeff Crystal

The format for a modeline statement in XF86Config is as follows:


	  modeline NAME     Clock HR SH1 SH2 HL VR SV1 SV2 VL 

where Clock is the pixel clock in Mhz, HR is visible Horizontal resolution, SH1 is the start of the horizontal sync pulse and SH2 is the end, HL is the total Horizontal line length, VR is visible vertical resolution, SV1 and SV2 are the start and end of the sync pulse and VL is the total vertical length.

To convert a CGX screen mode to X11, folow these steps.

  1. Run CGXMode in prefs

  2. Select the video mode that you would like to use and click Edit

  3. Compute the values for the modeline statement as follows:

    
	      Modeline "Name"   PC  HR HR+HPO HR+HPO+HPL HR+HSL VR VR+VPO VR+VPO+VPL VR+VSL 

    where:

    
	      PC = Pixel Clock in Mhz  (i.e. 40000000Hz is entered as 40)
    	      HR = Horizontal Resolution
    	      HPO = Horizontal Pulse Offset
    	      HPL = Horizontal Pulse Length
    	      HSL = Horizontal Sync Length
    	      VR = Vertical Resolution
    	      VPO = Vertical Pulse Offset
    	      VPL = Vertical Pulse Length
    	      VSL = Vertical Sync Length    

X on PAL-lace or NTSC-lace screens

Text by Marco De Vitis

You have to start Linux in the screenmode you want to use, through the "video=amifb:pal-lace" or "video=amifb:ntsc-lace" options on the bootstrap command line; you can then start X making it use the current screenmode. If you already followed the instruction about running X above, the only thing you need to do is edit your /etc/XF86Config file so that the last section "Screen" only contains one "Display" subsection about the "default" mode:


	  SubSection "Display"
	  Modes      "default"
	  EndSubsection    

You can alternatively use Geert Uytterhoeven's XF86Config.pmac file found at www.cs.kuleuven.ac.be/~geert/bin/XF86Config.pmac.gz decompressing it and copying it in your system as /etc/XF86Config, as it is already set up like that. But you'll probably need to edit it anyway to make it work, changing the line:


	  Device "/dev/adbmouse" 

to:


	  Device "/dev/mouse" 

Please note that X won't be much usable in 640x400 or even 640x512, and the current (at the time of writing) version of XFree86 doesn't support the "Virtual" option for the "default" mode, but it will do it in the upcoming version 3.3.3, allowing you to have a virtual screen bigger than your actual screensize.

Exotic X problems :)

VGA mode sync problem

Text by Matthias Goerdeler

After installing X for use with AGA vga-mode (just use the XF86Config found in the 'misc' directory at SunSITE Denmark) as described earlier I could start X, but the monitor just didn't sync. So if your problem is that X does not start, this will probably not help you.

I got my monitor to sync after changing the line A to line B in the monitor section of XF86Config:

	    [A]  HTimings	640 760 804 916

	    [B]  HTimings	640 750 804 916  

It should be pointed out that I do not know how to calculate the correct timing values, it was just 'try and error'. And it is not even sure that this will help you if you run into the same problem as I did. But you could give it a try and report your findings to the linux-apus mailing list.

Notes

[1]

You will also find fbset in the, by now, famous directory with Geert Uytterhoeven's X server.

[2]

I'd like to see this paragraph rewritten - I wouldn't want someone accidently blowing up their monitor. Users, do be careful! -Jesper