Pete's CDR ASPI driver for freeware PSX emus
----------------------------------------------------------------------------

I never thought about coding my own cdr plugin,
because my cdrom/dvd drives were always nicely
supported by the already existing cdr plugins.

Well, 'til last week I've used my Pioneer 305 scsi dvd drive
for playing psx games, but I've noticed that it has 
sometimes troubles with some psx game cds, causing 
big pauses while streaming special data (for example in 
the Alundra2 opening scene).

So when I had the chance to get a new and cheap
Teac 532S (scsi cdrom drive), I couldn't resist.
My girlfriend's pc has the same drive, and I've
never heard my gf telling anything bad about it...

Well, I put the drive into my pc, and it was acting
nicely... until I tried to start epsxe with the internal
epsxe cdr plugin... it didn't work at all (it does work
fine with the Pioneer drive!).

I did know my gf was using the internal epsxe plugin 
as well, so I looked at the config at her pc... surprise,
surprise... she never had any troubles with the teac 
drive because she converted the few games she
wanted to play into iso files... pfff ;)

Oki, calb was nice enuff to give me some ASPI test
funcs, so I could check out what's wrong... first it 
seemed that the drive can only read 2048 bytes per
sector, and that some custom teac scsi command
has to be used to read the full psx sector data.

So I started my a painful search in the net... Teac is
only giving informations if you are signing a NDA,
(no, thank you) but finally I'd found the sources of
some linux audio rippers, which showed me different
scsi commands for reading raw data (bah, what a
mess).

Well, this plugin is the result of my researches.
It offers seven different read modes in the plugin
config window. So hopefully most existing drives
are covered :) At least my Teac one finally is working 
fine :P

----------------------------------------------------------------------------

Requirements:

A cdrom/dvd drive. The ASPI layer. Some psx
game cds. 

I've tested the plugin with W98 only, but NT and
W2K could also work (I've added some special
code for that... mmm... we will see).

Just copy the file cdrPeteAspi.dll into your \plugin 
directory, that's all.

----------------------------------------------------------------------------

Configuration:

You HAVE TO configure the plugin before you use
it the first time. There are only three options
available:

1) Drive
--------------

Well, that's self-explaining. Just select the drive
you want to use. "NONE" is NO drive... you have to
select a real one.

2.) Reading mode
-----------------------------

That's the tricky part of my cdr plugin. I've listed
all seven modes my plugin is supporting. You have
to select the mode your drive can use.
To help you with your decision, there is an "autodetect"
button. Insert a psx game cd, and push it... the
plugin will now fire the different commands up to your 
drive, and if one mode seems to work, it will select that 
mode for you.
When the autodetection fails (or the pc hangs up... yup,
that can happen), you have to try all seven modes 
manually. There are also drives which are supporting more
than one mode, so you can also try to select a (faster? 
slower?) mode even if the detection did work fine. It's up 
to you... but better be prepared for some reboots ;)

3.) Read-ahead caching
-------------------------------------

To get more speed, you can activate that option.
Please note: it could happen that your drive doesn't
support the read ahead I am doing. So, if you are
using the plugin the first time, I advise to disable
the caching. If everything is working fine without
caching, you can come back to the config window
and activate it... if everything still is working... 
congrats :)

4.) Speed limitation
-------------------------------

Some drives will work better (less noisy and smoother)
if you limit the drive speed. Not all drives are supporting
the "set speed" command I am using, though.
If your drive doesn't support it, a message will be displayed
on startup. There are some tools in the net which will
offer the same function, prolly for a wider range of drives,
so you can also try one of them, if the plugin speed limit fails.

----------------------------------------------------------------------------

Conclusion:

Vendor specific scsi commands suck :)

Ah, btw, my Teac drive needs the 28_1 mode...
my Pioneer works best with the BE_2 mode,
but it can use the 28_1 as well...

For version infos read the "version.txt" file.

Have fun!

Pete Bernert

EMail: BlackDove@addcom.de
Web: http://home.t-online.de/home/PeteBernert

----------------------------------------------------------------------------

Disclaimer/Licence:

This program is freeware and cannot be sold. Also this program cannot be 
distributed without written permission. This program cannot be used for 
any commercial purposes. You may not reverse engineer, decompile, or 
disassemble the enclosed software. Authors are not responsible for any 
damages that this program may cause, and are also not responsible for 
anything this plugin will be used for.
