http://www.mediafire.com/?nzmttnwi0ut

for now it doesn't support images, only drives, real or virtual
but i'll try to add those later, within a month or two

16-bit key under LibCrypt section in configuration menu
is where you can enter actual LC key aka Digital ID aka MagicWord
to override one calculated from Q subchannel
for instance, if CD got scrached and won't pass check anymore
or if you want to experiment and see how it works

calculation is as follows:
psxt001z by Dremora, v0.21 beta 1

Subchannels offset correction: -1

Reading sector 13955... original sector \ bitF = 0
Reading sector 13960... original sector /
Reading sector 14081... original sector \ bitE = 0
Reading sector 14086... original sector /
Reading sector 14335... LibCrypt, LC1 sector \ bitD = 1
Reading sector 14340... LibCrypt, LC1 sector /
Reading sector 14429... LibCrypt, LC1 sector \ bitC = 1
Reading sector 14434... LibCrypt, LC1 sector /
Reading sector 14499... LibCrypt, LC1 sector \ bitB = 1
Reading sector 14504... LibCrypt, LC1 sector /
Reading sector 14749... original sector \ bitA = 0
Reading sector 14754... original sector /
Reading sector 14906... LibCrypt, LC1 sector \ 1
Reading sector 14911... LibCrypt, LC1 sector /
Reading sector 14980... original sector \ 0
Reading sector 14985... original sector /
Reading sector 15092... original sector \ 0
Reading sector 15097... original sector /
Reading sector 15162... LibCrypt, LC1 sector \ 1
Reading sector 15167... LibCrypt, LC1 sector /
Reading sector 15228... LibCrypt, LC1 sector \ 1
Reading sector 15233... LibCrypt, LC1 sector /
Reading sector 15478... original sector \ 0
Reading sector 15483... unknown        /
Reading sector 15769... LibCrypt, LC1 sector \ 1
Reading sector 15774... LibCrypt, LC1 sector /
Reading sector 15881... LibCrypt, LC1 sector \ 1
Reading sector 15886... LibCrypt, LC1 sector /
Reading sector 15951... original sector \ 0
Reading sector 15956... original sector /
Reading sector 16017... original sector \ bit0 = 0
Reading sector 16022... original sector /

backup copy, that's, to my knowledge, for some strange reason, is never used:
Reading sector 41895... original sector
Reading sector 41900... original sector
Reading sector 42016... original sector
Reading sector 42021... original sector
Reading sector 42282... LibCrypt, LC1 sector
Reading sector 42287... LibCrypt, LC1 sector
Reading sector 42430... LibCrypt, LC1 sector
Reading sector 42435... LibCrypt, LC1 sector
Reading sector 42521... LibCrypt, LC1 sector
Reading sector 42526... LibCrypt, LC1 sector
Reading sector 42663... original sector
Reading sector 42668... original sector
Reading sector 42862... LibCrypt, LC1 sector
Reading sector 42867... LibCrypt, LC1 sector
Reading sector 43027... original sector
Reading sector 43032... original sector
Reading sector 43139... original sector
Reading sector 43144... original sector
Reading sector 43204... LibCrypt, LC1 sector
Reading sector 43209... LibCrypt, LC1 sector
Reading sector 43258... LibCrypt, LC1 sector
Reading sector 43263... LibCrypt, LC1 sector
Reading sector 43484... original sector
Reading sector 43489... original sector
Reading sector 43813... LibCrypt, LC1 sector
Reading sector 43818... LibCrypt, LC1 sector
Reading sector 43904... LibCrypt, LC1 sector
Reading sector 43909... LibCrypt, LC1 sector
Reading sector 44009... original sector
Reading sector 44014... original sector
Reading sector 44162... original sector
Reading sector 44167... original sector

Original sectors: 31
LC1 sectors:      32
LC2 sectors:      0
Other sectors:    1

i.e. bit is set, when both sectors from pair are modded
actual content of Q channel doesn't matter,
since PSX drive won't even use content in such case
instead it would return data from previous sector then
and that's what LibCrypt algorithm exploits

so for given example key would be:
0011 1010 0110 1100 = 0x3a6c (it's PAL 'Dino Crisis' btw)

also it's pretty easy to derive those values from DB data:
those kept would be ones and missing sectors would be 0

e.g. it's cec1 for 'Ape Escape', 89ea for 'Mulan', 096f for 'Speed Freaks',
e728 - 'Crash Bash', 90af - 'Italian Job', and so on

if necessary, it's also possible to turn on logging to file
and see how calculations are done on real CDs
log will be saved to 'cdrX.log' in the same dir where plugin is

Not bad. I might try it out just to see it in action although I've lost interest in using ePSXe unless I have no other choice. I've had to reconfigure that emulator so many times after a reformat or in between games it seems I'm tweaking it more then actually playing the games I load up in it. As nice as it is I really wish emulators would follow pSX's lead and get rid of that plugin system since it seems to cause more problems then solve them.

thanks Haldrie.
i completely agree with you. to be honest, reason why i started this, was because i thought i could at least for a bit improve some low level functionality, that i saw was lacking. turned out CD plugins are very limited and whole PSEmu plugin concept completely outdated. unfortunately ePSXe 1.7.0 itself is quite bug ridden also, so, even things that should work, do not. so, ePSXe -  it was amazing, undeniably, it had it's time and without it maybe there wouldn't be those newer emulators, but, if i'd be in situation, where i'd have to choose, which project to support, pSX and XEBRA would be the ones. but, nevertheless, i hope this would be useful to some, particularly when messing with LibCrypt.

edit: oh, and it's only one that would work with my IDE->USB adapter, so if somebody had problems with other plugins not accessing drive this might as well work.

themabus wrote:

thanks Haldrie.
oh, and it's only one that would work with my IDE->USB adapter, so if somebody had problems with other plugins not accessing drive this might as well work.

Ah very impressive. I've gotten so use to using my internal drive's that I didn't even realize there was a problem with accessing USB drives.

update to v1.1:
- fixed waiting for threads to close, when none is running
- fixed successive calls to CDRgetBufferSub
- added option to mute CD audio, when range hits on data track
- added option to specify how many secors to skip on read errors
- improved caching for some specific cases
bundled with PSX ROMid & sbi2sub into one single archive
http://www.mediafire.com/?nzmttnwi0ut