ABOUT THIS FILE:
================
This is a README for the file lmscd0.3.tar.gz.  This tar file
contains the files:

	lmscd0.3.diff
	lmscd.README

The later file is identical to this README.


ABOUT THE DRIVER:
=================
lmscd0.3.diff is an experimental driver for the LMS/Philips CD-ROM
CM 205 connected to the CM 250 adapter.  It has lots of enhancements
and speed ups versus the 0.2 version of the driver.

I have not yet come around to implement support to play audio.  I
hope, it will be in the next release.  For now, you have to stick
with what you get by pressing the volume control knob.  The double
speed version of the drive, CM 206, is not supported, too.

This driver should also work with the CM 225 external drive and
the (old) CM 202.  It does not work with the CM 206, the new
double speed version.

The file is a patch relative to the 99pl14 kernel.


MAJOR CONFLICT:
===============
One week ago, Ken Pizzini <ken@halcyon.com> e-mailed me, that he is
using the same major number 24 for his Sony CDU-535 driver.  This is
not a problem, unless you put both drivers into the same kernel.  In
that case, you should change either Major device number in
/usr/src/linux/include/linux/major.h.

I have suggested to Ken, that we should work out a concept for all
CDROM interfaces to work on the same major device number.  I hope,
he will agree soon, so there will be no reason for me to first change
the major device number, just to change it back in my next release.


INCLUDING THIS DRIVER INTO YOUR KERNEL:
=======================================
Unpack the .tar.gz file, then include the changes into your kernel
using the patch command:

	cd /usr/src/linux
	zcat lmscd0.2.tar.gz | gtar xfv -
	patch -p1 <lmscd0.3.diff

A few hunks may fail, most likely that hunk, that goes into the
file /usr/src/linux/config.in.  In this case, ensure by hand,
that the line:

	bool 'LMS/Philips CDROM driver support' CONFIG_LMSCD y

is added along the other (= Sony and Mitsumi) CD-ROM device
drivers.


CONFIGURING THE DRIVER FOR YOUR HARDWARE SETTINGS:
==================================================
Next, you may have to edit the file:

	/usr/src/linux/kernel/blk_drv/lmscd.c

at lines 62 and 63:

	#define LMSCD_INTR_NR 5
	#define LMSCD_PORT 0x340

The first is the interrupt or irq you use, and the second is the port
address.  For the CM 250 adapter, valid irq's are 3, 4, 5 or 6, and the
port may be 0x300, 0x310, 0x330 or 0x340.

You may have to change the values to match those on the adapter.

If in doubt about which jumpers you set when you inserted the drive
into your computer, list or print your DOS config file CONFIG.SYS.
You should find a line, which has the file name

	DD250.SYS

in it.  Ignore the DEVICE= or DEVICEHIGH= and the path, which you find
at the beginning of that line.  Important is the information after the
/I switch, which tells you the interrupt, and after the /P switch,
which is the port number.  Please don't forget to add 0x in front of
the port number.  An example is:

	DEVICEHIGH=C:\CDROM\DD250.SYS /D:MSCD001 /C:99 /M:06 /I:5 /P:340
							      ^^^  ^^^^^
						   LMSCD_INTR_NR    LMSCD_PORT
						       (= 5)	    (= 0x340)

CONFIGURING DEBUGGING:
======================
There is lots of debugging information, which can be compiled into
the driver.  By default, most of it is off.  To turn on some of it
(which I would ask you to do if you have problems, so you can report
me more details!), change the values of DLEVEL, CLEVEL and DFUNC.

DLEVEL defines the debugging level:
#define DLEVEL 0 	prints very few messages
#define DLEVEL 1	prints some messages whenever an error occurs
#define DLEVEL 2	protocolls most action, that is going on
#define DLEVEL 3	outputs a real lot

CLEVEL is how much double checks should be performed.
#define CLEVEL 0	turns all integrity checks off
#define CLEVEL 1	does a lot of tests, that really should not fail.
#define CLEVEL 2	Reports some more errors about conditions, which
			are strange, but did not cause errors for me so far.

If you set DFUNC to 1, additional information is printed along most
debugging data, which tells about what action the driver is performing
right now, or what the driver is expecting from the hardware.


RECOMPILING YOUR KERNEL:
========================
You have to configure your kernel again to ensure, that the CD-ROM
driver is really included.  Thus don't forget to type "make config".
Type (in directory /usr/src/linux):

	make config
	make depend
	make [zImage | zlilo | ...]

When asked about the configuration, ensure, that you answer yes to the
questions about the "LMS/Philips CD-ROM driver support" and the "ISO9660
cdrom filesystem support".  After "make depend" use your favourite
options to compile a kernel.  For further information, like installing
your newly compiled kernel, please refer to the FAQ.

If you have 8 MB RAM or less, please exit X windows before starting the
compile.  It will notably to drastically reduce your compile time.


CREATING THE DEVICE SPECIAL FILE:
=================================
After recompiling and installing your new kernel, you have to reboot.
To access the drive, you have to create an entry for it in the /dev
file.  Type:

	mknod /dev/lmscd b 24 0
	chown root:disk /dev/lmscd
	chmod 440 /dev/lmscd

If you want to give read permissions to anyone, use:

	chmod 444 /dev/lmscd

instead.


MOUNTING A DISK:
================
Type:

	mkdir /cdrom
	mount -t iso9660 /dev/lmscd /cdrom


UNMOUNTING/CHANGING A DISK:
===========================
Type:

	umount -t /dev/lmsicd

then change the disk, then do the mount command again.  You can
safely leave unused disks mounted.


REPORTING BUGS:
===============
Please report any problems you encounter.  You can reach me by
e-mail as wpp@marie.physik.tu-berlin.de.  Please include all
information available.  This includes:

- Which kernel were you using?
- Which other patches had you included?
- How did you access the CD-ROM, when the driver failed (eg. were
  you just mounting/unmounting it, starting an executable, copying
  a file, etc., etc.)?
- Did you just start or finish another program (for example, for a
  while, this driver kept crashing, when I left X-Windows).
- Were you accessing other devices heavily at the same time (like
  sending bitmaps to the printer, ftp'ing to another host, etc.)
- Can you reproduce the error, or does is appear unpredictable?
- Please include all the debugging output, which was printed in the
  last few seconds before a crash or other failure.  If you can
  reproduce the error, please recompile the kernel with higher
  debugging levels, and retry.


AUTHOR:
=======
Kai Petzke, wpp@marie.physik.tu-berlin.de


COPYRIGHT:
==========
This file is copyrighted by me.  You may use and distribute it under
the terms of the GNU Copyleft.


NO GUARANTEE:
=============
This is still ALPHA test software.  You may experience system hangups
or crashes, when using this driver, whether accessing the CD-ROM or
not.  I believe, that software cannot destroy your CD-ROM drive, but
I do not guarentee it either.

In other words: you may loose data, and you may even damage your
hardware.

You have been warned.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
