git-svn-id: http://pcsx2.googlecode.com/svn/trunk@424 96395faa-99c1-11dd-bbfe-3dabce05a288

This commit is contained in:
refraction 2009-02-06 19:45:43 +00:00
parent 3f10380ba6
commit 5331a6caeb
1095 changed files with 0 additions and 369186 deletions

View File

@ -1,52 +0,0 @@
CDiso FPSE plugin
=================
This software is distributed "AS IS" and the authors decline all responsability for all damages (hardware, software and economic) derived by the use of this software.
What's this?
------------
This plugin allows you to load in FPSE ISO images of games directly from your hard-disk.
There is no need of any configiration, just select it: when you run FPSE it will pop up a dialog where you can choose the image to load.
Install
-------
Put CDiso.dll in the plugin directory of FPSE.
Select the plugin with the FPSE config tool.
What's new
----------
1.0: first release... it compiles & works (at least on my sistem) :-)
Known issues
------------
If you move around the "Select iso" dialog it will close and you will have to restart FPSE.
Notes
-----
I'm not an experienced programmer and I don't want to take credit of work that I've not done...
The plugin is _heavily_ based on the sources of CDctrl plugin (I think by LDChen) found on Bero's page (www.geocities.co.jp/Playtown/2004) and on the open source cdriso PSEmu plugin for linux by Linuzappz.
They've done most of the work, I've introduced most of the bugs ;-)
Sources
-------
I've decided to release the sources of the plugin and you should have found them togheter with the dll and this readme.
The sources are not covered by any license so you can do with them whatever you want, but if you find a bug or implement a new feature it would be very nice if you let me know and if you help me to improve this plugin instead of starting another one... This is the best I can do at the moment and having some feedback would help me to learn programming better!
To compile you'll need the FPSE SDK that can be found at the FPSE site:
http://fpse.emuunlim.com
Thanks to the FPSE team and to all the PSX emulation scene.
_xobro_@tin.it

View File

@ -1,94 +0,0 @@
CDVDbin v0.67
---------------
This is an extension to use with play station2 emulators
as PCSX2 (only one right now).
The plugin is free open source code.
Using:
-----
Place the file "CDVDbin.dll" in the Plugins directory
of the Emulator to use it.
If you have a cdaudio image, go to config dialog of the plugin and check
"Force CD Audio on detection failure". CDDA support is limmited in this
version.
Note:
-----
-I'm using a method for detection of images that can lead to misdetections.
So, if the plugin shows a dialog box that says that the image is an ISO
and you KNOW it is a BIN (2352 bytes/sector) or BIN that is in fact an ISO,
please notice me.
-The detection might work on some other image formats. You can check the
"Debug messages" box in config dialog and then open the image using
"All files" filter. If the image works and it is not a *known* type,
please notice me.
-Officialy known types: (bytes/sec)
bin(+cue), //2352 + toc info file
iso, //2048 (it is not recommended to use such)
img(+ccd+sub), //2352 + toc info file + subchannel file
bwi, //2353 (i don't know much about this type)
mdf(+mds), //2352/2448 + toc info file (2448-2352=96 => full subchannel)
nrg //2048/2352/2448 as mdf type, the subq info is in the file,
at the end of the image there are toc infos
-A splitted image is a sequence of files that have a common name and a trailing
number. The number starts from 0 or 1. To choose such an image in Open dialog,
select "All Files" filter and pick one of the splits.
Thanks:
------
Xobro, this is a port of his FPSE cd plugin
Linuzappz
Changes:
-------
v0.67:
* Up to date to the latest CDVD specs v3 (0.4.3)
* Bugfix for small files
v0.66:
* Added "All Files" filter
* Added some CDDA support :P
* Support for splitted image files
* Support for *.mds
v0.65:
* Up to date to the latest CDVD specs v2 (0.4.0)
* Added support for RAW+SUBQ images (2352+96=2448 bytes/sector)
* Easier detection, ready for subq;)
v0.64:
* Up to date to the latest CDVD specs
* Better detection of images (ISO2048/RAW2352)
This allows one to use an incomplete/bad image
* Added *.nrg support (Nero images)
v0.63:
* Added *.bwi to open dialog (Blind Write images)
v0.62:
* Small fix to file pointer in order to handle
big files (64bit pointer). (hi bositman;)
v0.61:
* Added *.img to open dialog (CloneCD images)
v0.6:
* Changed for PS2E Definitions v0.2.9 (beta) specs; CDVDopen()
* Fixed OFN_NOCHANGEDIR issue; thx linuzappz;)
v0.5:
* Added a config dialog
v0.4:
v0.3:
* Automatic iso/bin detection
v0.2:
v0.1:
* First Release/Port
* Tested with Pcsx2
Email: <florinsasu@yahoo.com>

View File

@ -1,90 +0,0 @@
#ifndef __CDVD_H__
#define __CDVD_H__
#include <windows.h>
#define CDVDdefs
#include "PS2Edefs.h"
/* some structs from libcdvd by Hiryu & Sjeep (C) 2002 */
#if defined(__WIN32__)
#pragma pack(1)
#endif
struct rootDirTocHeader
{
u16 length; //+00
u32 tocLBA; //+02
u32 tocLBA_bigend; //+06
u32 tocSize; //+0A
u32 tocSize_bigend; //+0E
u8 dateStamp[8]; //+12
u8 reserved[6]; //+1A
u8 reserved2; //+20
u8 reserved3; //+21
#if defined(__WIN32__)
}; //+22
#else
} __attribute__((packed));
#endif
struct asciiDate
{
char year[4];
char month[2];
char day[2];
char hours[2];
char minutes[2];
char seconds[2];
char hundreths[2];
char terminator[1];
#if defined(__WIN32__)
};
#else
} __attribute__((packed));
#endif
struct cdVolDesc
{
u8 filesystemType; // 0x01 = ISO9660, 0x02 = Joliet, 0xFF = NULL
u8 volID[5]; // "CD001"
u8 reserved2;
u8 reserved3;
u8 sysIdName[32];
u8 volName[32]; // The ISO9660 Volume Name
u8 reserved5[8];
u32 volSize; // Volume Size
u32 volSizeBig; // Volume Size Big-Endian
u8 reserved6[32];
u32 unknown1;
u32 unknown1_bigend;
u16 volDescSize; //+80
u16 volDescSize_bigend; //+82
u32 unknown3; //+84
u32 unknown3_bigend; //+88
u32 priDirTableLBA; // LBA of Primary Dir Table //+8C
u32 reserved7; //+90
u32 secDirTableLBA; // LBA of Secondary Dir Table //+94
u32 reserved8; //+98
struct rootDirTocHeader rootToc;
u8 volSetName[128];
u8 publisherName[128];
u8 preparerName[128];
u8 applicationName[128];
u8 copyrightFileName[37];
u8 abstractFileName[37];
u8 bibliographyFileName[37];
struct asciiDate creationDate;
struct asciiDate modificationDate;
struct asciiDate effectiveDate;
struct asciiDate expirationDate;
u8 reserved10;
u8 reserved11[1166];
#if defined(__WIN32__)
};
#else
} __attribute__((packed));
#endif
#endif /* __CDVD_H__ */

View File

@ -1,679 +0,0 @@
/****************************************************************************\
* CDVDbin PLUGIN for PS2 emus (PCSX2) based on
* CDiso PLUGIN for FPSE
*
*
* AUTHOR: Xobro, mail: _xobro_@tin.it
*
* WHAT'S NEW: It compiles and it seems to work! ;-)
*
* TO DO: cue/ccd reading; tracks stuff;
* subchannel reading
* registry or ini save of iso/bin name
* detection of other types of CD/DVD
* proper audio support
*
* PORTED BY FLORIN
*
\****************************************************************************/
#include <stdio.h>
#include <windows.h>
#include <commdlg.h>
#include "CDVD.h"
#include "resource.h"
/////////////////////////////////////////////////////////////////
// Internal variables & defines
/////////////////////////////////////////////////////////////////
#define OpenFile(a) CreateFile(a, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE,\
NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL)
static HANDLE hinstance = (HANDLE)-1;
#define RAW_SECTOR_SIZE 2352
#define DATA_SECTOR_SIZE 2048 // not used at the moment
#define RAWQ_SECTOR_SIZE (RAW_SECTOR_SIZE+96)
//#define ?_SECTOR_SIZE (RAW_SECTOR_SIZE+16)
//#define MSF2SECT(m,s,f) (((m)*60+(s)-2)*75+(f))
#define INT2BCD(a) ((a)/10*16+(a)%10)
static HANDLE hISOFile;
#define MAXFILENAMELENGHT 512
char ISOFileName[MAXFILENAMELENGHT] = {0}, format[MAXFILENAMELENGHT] = {0};
static int sectorsize, //0==2048; 1==2352; 2==2448
offset, cdtype, cdtraystatus, debug=0, forcecdda=0;
static u8 readBuffer[RAWQ_SECTOR_SIZE], *pbuffer, *subqbuffer;
static u32 first, last, crt;
static __int64 unitsize;
static cdvdTN diskInfo={0, 0};
static cdvdTD tracks[100];
s32 msf_to_lba(u8 m, u8 s, u8 f) {
u32 lsn;
lsn = f;
lsn+=(s - 2) * 75;
lsn+= m * 75 * 60;
return lsn;
}
void lba_to_msf(s32 lba, u8* m, u8* s, u8* f) {
lba += 150;
*m = lba / (60*75);
*s = (lba / 75) % 60;
*f = lba % 75;
}
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
/////////////////////////////////////////////////////////////////
// generic plugin stuff
/////////////////////////////////////////////////////////////////
const unsigned char version = PS2E_CDVD_VERSION; // CDVD library v2
const unsigned char revision = VERSION;
const unsigned char build = BUILD; // increase that with each version
static char *libraryName = "CDVDbin Driver";
u32 CALLBACK PS2EgetLibType() {
return PS2E_LT_CDVD;
}
char* CALLBACK PS2EgetLibName() {
return libraryName;
}
u32 CALLBACK PS2EgetLibVersion2(u32 type) {
return version<<16|revision<<8|build;
}
void SysMessage(char *fmt, ...) {
va_list list;
char tmp[512];
va_start(list,fmt);
vsprintf(tmp,fmt,list);
va_end(list);
MessageBox(0, tmp, "CDVDbin Msg", 0);
}
/////////////////////////////////////////////////////////////////
// CDVDinit: plugin init
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDinit() {
//some defaults
hISOFile = NULL;
cdtype=CDVD_TYPE_NODISC; // no image loaded
cdtraystatus=CDVD_TRAY_OPEN; // no image loaded
sectorsize=0; // *bad* value
offset=0; // no offset in the file
// till the beginning of the data
return 0;
}
HANDLE detectMultipleSplits(__int64 *filesize){
__int64 size;
HANDLE h;
int len, filenamelen=strlen(ISOFileName);
first=last=0;
for (len=filenamelen; len && ISOFileName[len-1]>='0' && ISOFileName[len-1]<='9'; len--);
ISOFileName[len]=0;
len=filenamelen-len;
if (len){
sprintf(format, "%s%%0%dd", ISOFileName, len);
for (first=0; first<2; first++){//check for first if it is 0 or 1
sprintf(ISOFileName, format, first);
if ((h = OpenFile(ISOFileName)) != INVALID_HANDLE_VALUE){
for (last=first; h != INVALID_HANDLE_VALUE; h = OpenFile(ISOFileName)){
(*(u32*)(&size))=GetFileSize(h, ((u32*)(&size))+1);
*filesize+=size;
CloseHandle(h);
sprintf(ISOFileName, format, ++last);
}
last--;
if (last>first && debug)
SysMessage("Found multiple files (%d->%d) with format:\n\"%s\"\n"
"Total size=%I64d / Unit size=%I64d",
first, last, format, *filesize, (*filesize-size)/(last-first));
break;
}
}
if (first == 2) return INVALID_HANDLE_VALUE;
}else
strcpy(format, ISOFileName);
sprintf(ISOFileName, format, crt=first);
return OpenFile(ISOFileName);
}
int detect(__int64 filesize){
register struct cdVolDesc *volDesc;
register u32 sectors;
if (CDVDreadTrack(16, CDVD_MODE_2048) == -1) {
SysMessage("file too small");
return CDVD_TYPE_ILLEGAL;
}
volDesc = (struct cdVolDesc *)CDVDgetBuffer();
if (memcmp(volDesc->volID, "CD001", 5))
return CDVD_TYPE_DETCT;
if (memcmp(volDesc->sysIdName, "PLAYSTATION", 11))
SysMessage("Warrning: Not a Playstation disc?");
sectors=(u32)(filesize / sectorsize);
diskInfo.strack =1;
diskInfo.etrack =1;
memset(tracks, 0, sizeof(cdvdTD) * 100);
tracks[0].lsn=sectors-offset;
tracks[0].type =(volDesc->rootToc.tocSize == DATA_SECTOR_SIZE) ?
CDVD_TYPE_PS2CD : CDVD_TYPE_PS2DVD; //simple & lame detection:p
tracks[1].lsn=0;
tracks[1].type =CDVD_MODE2_TRACK;
if (debug || (filesize % sectorsize))
SysMessage("%s (%d bytes/sector - offset=%d) %s %simage detected\n"
"Datasize: %I64d\n"
"Sectors: %d LSN:%d\n%s",
offset ? "NRG" :
sectorsize==DATA_SECTOR_SIZE ? "ISO" :
sectorsize==RAW_SECTOR_SIZE ? "RAW" : "RAW+SUBQ",
sectorsize, offset,
volDesc->rootToc.tocSize == DATA_SECTOR_SIZE ? "CD" : "DVD",
last>first ? "splitted " : "",
filesize, sectors,
tracks[0].lsn,
filesize % sectorsize ? "Warrning: Truncated!" : "");
return tracks[0].type;
}
/////////////////////////////////////////////////////////////////
// CDVDopen: CD hw init
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDopen() {
__int64 filesize=0;
OPENFILENAME ofn = {sizeof(OPENFILENAME), // size
NULL, // owner
NULL, // hInstance
"CD/DVD images (*.bin;*.iso;*.img;*.bwi;*.mdf;*.nrg)\0*.bin;*.iso;*.img;*.bwi;*.mdf;*.nrg\0"
"RAW(2352) CD/DVD images (*.bin;*.img;*.bwi;*.mdf)\0*.bin;*.img;*.bwi;*.mdf\0"
"ISO(2048) CD/DVD images (*.iso)\0*.iso\0"
"NERO CD/DVD images (*.nrg)\0*.nrg\0"
"All Files (*.*)\0*.*\0"
,// filter
0, // custom filter
0, // max custom filter
0, // filter index
(char *)&ISOFileName, // file name
MAXFILENAMELENGHT, // max filename lenght
0, // file title
0, // max file title
NULL, // initial dir
"Select a CD/DVD image...", // title
OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR,// flags
0, // file offset
0, // file extension
0, // def ext
0, // cust data
0, // hook
0}; // template
//clean any old stuff
if (hISOFile){
CloseHandle(hISOFile);
hISOFile = NULL;
}
cdtype=CDVD_TYPE_NODISC; // no image loaded
cdtraystatus=CDVD_TRAY_OPEN; // no image loaded
if (!ISOFileName[0])
if(!GetOpenFileName(&ofn)) //Common open file dialog
return 0;
//no image/dusc loaded => null plugin
//detect & open the selected file (or first if more than 1)
hISOFile = detectMultipleSplits(&filesize);
cdtraystatus=CDVD_TRAY_CLOSE;
cdtype=CDVD_TYPE_UNKNOWN;
if (hISOFile == INVALID_HANDLE_VALUE){
SysMessage("error opening the file\n");
cdtype=CDVD_TYPE_ILLEGAL;
return 0;
}
(*(u32*)(&unitsize))=GetFileSize(hISOFile, ((u32*)(&unitsize))+1);
if (!filesize) filesize=unitsize;//in case of non-splitted images
sectorsize=DATA_SECTOR_SIZE; offset=0; //ISO 2048 detection
cdtype=detect(filesize);
if (cdtype!=CDVD_TYPE_DETCT) return 0;
sectorsize=RAW_SECTOR_SIZE; offset=0; //RAW 2352 detection
cdtype=detect(filesize);
if (cdtype!=CDVD_TYPE_DETCT) return 0;
sectorsize=RAWQ_SECTOR_SIZE; offset=0; //RAWQ 2448 detection
cdtype=detect(filesize);
if (cdtype!=CDVD_TYPE_DETCT) return 0;
filesize-=156;//ending junk
sectorsize=DATA_SECTOR_SIZE; offset=150; //NERO ISO 2048 detection
cdtype=detect(filesize);
if (cdtype!=CDVD_TYPE_DETCT) return 0;
sectorsize=RAW_SECTOR_SIZE; offset=150; //NERO RAW 2352 detection
cdtype=detect(filesize);
if (cdtype!=CDVD_TYPE_DETCT) return 0;
sectorsize=RAWQ_SECTOR_SIZE; offset=150; //NERO RAWQ 2448 detection
cdtype=detect(filesize);
if (cdtype!=CDVD_TYPE_DETCT) return 0;
if (forcecdda && (filesize>RAW_SECTOR_SIZE)){
u32 sectors=(u32)(filesize/(sectorsize=RAW_SECTOR_SIZE));
offset=0; //FIXME: offset for nero images
memset(tracks, 0, sizeof(cdvdTD) * 100);
diskInfo.strack =1;
diskInfo.etrack =1;
tracks[0].lsn=sectors-offset;
tracks[0].type =cdtype=CDVD_TYPE_CDDA;//DVDV;
tracks[1].lsn=0;
tracks[1].type =CDVD_AUDIO_TRACK;
if (debug)
SysMessage("CDDA (%d bytes/sector - offset=%d) image\n"
"Datasize: %I64d\n"
"Sectors: %d LSN:%d\n",
sectorsize, offset,
filesize, sectors,
tracks[0].lsn);
return 0;
}
//nothing detected
SysMessage("The file you picked is not a usable cd/dvd image\n");
CloseHandle(hISOFile);
hISOFile=NULL;
cdtraystatus=CDVD_TRAY_OPEN;
cdtype=CDVD_TYPE_NODISC;
return 0;
}
/////////////////////////////////////////////////////////////////
// CDVDclose: CD shutdown
/////////////////////////////////////////////////////////////////
void CALLBACK CDVDclose() {
CloseHandle(hISOFile);
CDVDinit();
}
/////////////////////////////////////////////////////////////////
// CDVDshutdown: plugin shutdown
/////////////////////////////////////////////////////////////////
void CALLBACK CDVDshutdown() {
}
/////////////////////////////////////////////////////////////////
// CDVDreadTrack: read 1(one) sector/frame (2352 bytes)
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDreadTrack(u32 lsn, int mode) {
u32 nbytesRead, chunk;
s32 Ret;
__int64 filepos;
pbuffer = readBuffer;
subqbuffer = readBuffer+RAW_SECTOR_SIZE;
memset(readBuffer, 0, RAWQ_SECTOR_SIZE);
//if no iso selected act as a null CD plugin
if (hISOFile == NULL)
return 0;
// Set the file pointer at the right sector
filepos=(__int64)(lsn+offset)*sectorsize;
chunk=(u32)(filepos / unitsize);
filepos-=chunk * unitsize;
chunk+=first;
if (chunk!=crt){
crt=chunk;
CloseHandle(hISOFile);
sprintf(ISOFileName, format, crt);
hISOFile=OpenFile(ISOFileName);
}
SetFilePointer (hISOFile,
*(u32*)(&filepos),
((u32*)(&filepos))+1,
FILE_BEGIN);
Ret = ReadFile(hISOFile,
readBuffer+(sectorsize==DATA_SECTOR_SIZE?12+12:0),
sectorsize, &nbytesRead, NULL);
if (Ret && nbytesRead < (u32)sectorsize && crt<last){
crt++;
CloseHandle(hISOFile);
sprintf(ISOFileName, format, crt);
hISOFile=OpenFile(ISOFileName);
Ret = ReadFile(hISOFile,
readBuffer+(sectorsize==DATA_SECTOR_SIZE?12+12:0)+nbytesRead,
sectorsize-nbytesRead, &nbytesRead, NULL);
//subchannel buffer is at readBuffer+2352 ;)
}
if (!Ret) SysMessage("Error = %08x\nbytesRead=%d",GetLastError(), nbytesRead);
// put buffer pointer at the correct data start point
switch (mode) {
case CDVD_MODE_2368://not realy supported atm
case CDVD_MODE_2352: break;
case CDVD_MODE_2340: pbuffer+= 12; break;
case CDVD_MODE_2328: pbuffer+= 24; break;
case CDVD_MODE_2048: pbuffer+= 24; break;
}
return 0;
}
/////////////////////////////////////////////////////////////////
// CDVDgetBuffer: address of sector/frame buffer
/////////////////////////////////////////////////////////////////
// return can be NULL (for async modes); no async mode for now...
u8* CALLBACK CDVDgetBuffer() {
return pbuffer;
}
/////////////////////////////////////////////////////////////////
// CDVDreadSubQ: read subq data
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ* subq) {
// fake it
u8 min, sec, frm;
subq->ctrl = 4;
subq->mode = 1;
subq->trackNum = itob(1);
subq->trackIndex= itob(1);
lba_to_msf(lsn, &min, &sec, &frm);
subq->trackM = itob(min);
subq->trackS = itob(sec);
subq->trackF = itob(frm);
subq->pad = 0;
lba_to_msf(lsn + (2*75), &min, &sec, &frm);
subq->discM = itob(min);
subq->discS = itob(sec);
subq->discF = itob(frm);
return 0;
}
/////////////////////////////////////////////////////////////////
// CDVDgetTN: tracks number
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDgetTN(cdvdTN *Buffer) {
//if no iso selected act as a null CD plugin
if (hISOFile == NULL){
Buffer->strack = 1;
Buffer->etrack = 1;
return 0;
}
//should be read from .cue
memcpy(Buffer, &diskInfo, sizeof(cdvdTN));
return 0;
}
/////////////////////////////////////////////////////////////////
// CDVDgetTD: track start end addresses
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDgetTD(u8 Track, cdvdTD *Buffer) {
//if no iso selected act as a null CD plugin
if (hISOFile == NULL)
return -1;
if (Track>diskInfo.etrack)
return -1;
memcpy(Buffer, &tracks[Track], sizeof(cdvdTD));
return 0;
}
/////////////////////////////////////////////////////////////////
// CDVDgetTOC: get comlpete toc
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDgetTOC(void* toc) {
u8 type = CDVDgetDiskType();
u8* tocBuff = (u8*)toc;
if( type == CDVD_TYPE_DVDV ||
type == CDVD_TYPE_PS2DVD)
{
// get dvd structure format
// scsi command 0x43
memset(tocBuff, 0, 2048);
// fake it
tocBuff[ 0] = 0x04;
tocBuff[ 1] = 0x02;
tocBuff[ 2] = 0xF2;
tocBuff[ 3] = 0x00;
tocBuff[ 4] = 0x86;
tocBuff[ 5] = 0x72;
tocBuff[16] = 0x00;
tocBuff[17] = 0x03;
tocBuff[18] = 0x00;
tocBuff[19] = 0x00;
}
else if(type == CDVD_TYPE_CDDA ||
type == CDVD_TYPE_PS2CDDA ||
type == CDVD_TYPE_PS2CD ||
type == CDVD_TYPE_PSCDDA ||
type == CDVD_TYPE_PSCD)
{
// cd toc
// (could be replaced by 1 command that reads the full toc)
u8 min, sec, frm;
s32 i, err;
cdvdTN diskInfo;
cdvdTD trackInfo;
memset(tocBuff, 0, 1024);
if (CDVDgetTN(&diskInfo) == -1) { diskInfo.etrack = 0;diskInfo.strack = 1; }
if (CDVDgetTD(0, &trackInfo) == -1) trackInfo.lsn = 0;
tocBuff[0] = 0x41;
tocBuff[1] = 0x00;
//Number of FirstTrack
tocBuff[2] = 0xA0;
tocBuff[7] = itob(diskInfo.strack);
//Number of LastTrack
tocBuff[12] = 0xA1;
tocBuff[17] = itob(diskInfo.etrack);
//DiskLength
lba_to_msf(trackInfo.lsn, &min, &sec, &frm);
tocBuff[22] = 0xA2;
tocBuff[27] = itob(min);
tocBuff[28] = itob(sec);
for (i=diskInfo.strack; i<=diskInfo.etrack; i++)
{
err = CDVDgetTD(i, &trackInfo);
lba_to_msf(trackInfo.lsn, &min, &sec, &frm);
tocBuff[i*10+30] = trackInfo.type;
tocBuff[i*10+32] = err == -1 ? 0 : itob(i); //number
tocBuff[i*10+37] = itob(min);
tocBuff[i*10+38] = itob(sec);
tocBuff[i*10+39] = itob(frm);
}
}
else
return -1;
return 0;
}
/////////////////////////////////////////////////////////////////
// CDVDgetDiskType: type of the disc: CD/DVD
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDgetDiskType() {
if (debug) SysMessage("CDVDgetType() == %02X", cdtype);
return cdtype;
}
/////////////////////////////////////////////////////////////////
// CDVDgetTrayStatus: the status of the tray
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDgetTrayStatus() {
if (debug) SysMessage("CDVDgetTrayStatus() == %02X", cdtraystatus);
return cdtraystatus;
}
/////////////////////////////////////////////////////////////////
// CDVDctrlTrayOpen: open the disc tray
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDctrlTrayOpen() {
return 0;
}
/////////////////////////////////////////////////////////////////
// CDVDctrlTrayClose: close the disc tray
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDctrlTrayClose() {
return 0;
}
BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
OPENFILENAME ofn = {sizeof(OPENFILENAME), // size
NULL, // owner
NULL, // hInstance
"CD/DVD images (*.bin;*.iso;*.img;*.bwi;*.mdf;*.nrg)\0*.bin;*.iso;*.img;*.bwi;*.mdf;*.nrg\0"
"RAW(2352) CD/DVD images (*.bin;*.img;*.bwi;*.mdf)\0*.bin;*.img;*.bwi;*.mdf\0"
"ISO(2048) CD/DVD images (*.iso)\0*.iso\0"
"NERO CD/DVD images (*.nrg)\0*.nrg\0"
"All Files (*.*)\0*.*\0"
,// filter
0, // custom filter
0, // max custom filter
0, // filter index
(char *)&ISOFileName, // file name
MAXFILENAMELENGHT, // max filename lenght
0, // file title
0, // max file title
NULL, // initial dir
"Select a CD/DVD image...",// title
OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR,// flags
0, // file offset
0, // file extension
0, // def ext
0, // cust data
0, // hook
0}; // template
switch(uMsg) {
case WM_INITDIALOG:
CheckDlgButton(hW, IDC_DEBUG, debug ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hW, IDC_CDDA, forcecdda ? BST_CHECKED : BST_UNCHECKED);
if (ISOFileName && *ISOFileName){
SetDlgItemText(hW, IDC_FILE, ISOFileName);
CheckDlgButton(hW, IDC_FILE, BST_CHECKED);
}else
CheckDlgButton(hW, IDC_FILE, BST_UNCHECKED);
return TRUE;
case WM_COMMAND:
switch(HIWORD(wParam)){
case BN_CLICKED:
switch(LOWORD(wParam)) {
case IDC_FILE:
if (!IsDlgButtonChecked(hW, IDC_FILE)){
CheckDlgButton(hW, IDC_FILE, BST_UNCHECKED);
ISOFileName[0]='\0';
SetDlgItemText(hW, IDC_FILE, "Choose a CD/DVD bin or iso image...");
}else{
if (GetOpenFileName(&ofn)){
CheckDlgButton(hW, IDC_FILE, BST_CHECKED);
SetDlgItemText(hW, IDC_FILE, ISOFileName);
}else
CheckDlgButton(hW, IDC_FILE, BST_UNCHECKED);
}
return TRUE;
case IDOK:
debug=IsDlgButtonChecked(hW, IDC_DEBUG);
forcecdda=IsDlgButtonChecked(hW, IDC_CDDA);
EndDialog(hW, FALSE);
return TRUE;
}
}
}
return FALSE;
}
/////////////////////////////////////////////////////////////////
// CDVDconfigure: config dialog, if any...
/////////////////////////////////////////////////////////////////
void CALLBACK CDVDconfigure(){
DialogBox(hinstance,
MAKEINTRESOURCE(IDD_CONFIG),
GetActiveWindow(),
(DLGPROC)ConfigureDlgProc);
}
/////////////////////////////////////////////////////////////////
// CDVDabout: about dialog, if any...
/////////////////////////////////////////////////////////////////
void CALLBACK CDVDabout() {
SysMessage("%s %d.%d\n"
"PS1 version by: Xobro, mail: _xobro_@tin.it\n"
"PS2 version by: Florin, mail: florin@ngemu.com", libraryName, revision, build);
}
/////////////////////////////////////////////////////////////////
// CDVDtest: test hw and report if it works
/////////////////////////////////////////////////////////////////
s32 CALLBACK CDVDtest() {
FILE *f;
if (cdtype==CDVD_TYPE_ILLEGAL)
return -1;
if (*ISOFileName == 0)
return 0;
f = fopen(ISOFileName, "rb");
if (f == NULL)
return -1;
fclose(f);
return 0; //if (sectorsize==2048) return 40;//PSE_CDR_WARN_LAMECD;
}
BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved){
hinstance = (HINSTANCE)hModule;
return TRUE;
}

View File

@ -1,29 +0,0 @@
; CDVDbin.def : Declares the module parameters for the DLL.
LIBRARY "CDVDbin"
DESCRIPTION 'CDVD BIN/ISO Driver'
EXPORTS
; Explicit exports can go here
PS2EgetLibType @2
PS2EgetLibName @3
PS2EgetLibVersion2 @4
CDVDinit @5
CDVDshutdown @6
CDVDopen @7
CDVDclose @8
CDVDreadTrack @9
CDVDgetBuffer @10
CDVDreadSubQ @11
CDVDgetTN @12
CDVDgetTD @13
CDVDgetTOC @14
CDVDgetDiskType @15
CDVDgetTrayStatus @16
CDVDctrlTrayOpen @17
CDVDctrlTrayClose @18
CDVDconfigure @19
CDVDtest @20
CDVDabout @21

View File

@ -1,139 +0,0 @@
# Microsoft Developer Studio Project File - Name="CDVDbin" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=CDVDBIN - WIN32 RELEASE
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "CDVDbin.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "CDVDbin.mak" CFG="CDVDBIN - WIN32 RELEASE"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "CDVDbin - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "CDVDbin - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "CDVDbin - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CDVDBIN_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CDVDBIN_EXPORTS" /D "__WIN32__" /D VERSION=0 /D BUILD=67 /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x2c0a /d "NDEBUG"
# ADD RSC /l 0x2c0a /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\CDVDbin.dll"
!ELSEIF "$(CFG)" == "CDVDbin - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "CDVDbin___Win32_Debug"
# PROP BASE Intermediate_Dir "CDVDbin___Win32_Debug"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "CDVDbin___Win32_Debug"
# PROP Intermediate_Dir "CDVDbin___Win32_Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CDVDBIN_EXPORTS" /D "__WIN32__" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MT /W3 /GX /Od /D "WIN32" /D "DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CDVDBIN_EXPORTS" /D "__WIN32__" /D VERSION=0 /D BUILD=67 /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x2c0a /d "NDEBUG"
# ADD RSC /l 0x2c0a /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"D:\TEMP2\emus\pcsx2.042\Plugins\CDVDbin.dll"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\CDVDbin.dll"
!ENDIF
# Begin Target
# Name "CDVDbin - Win32 Release"
# Name "CDVDbin - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\CDVDbin.c
# End Source File
# Begin Source File
SOURCE=.\CDVDbin.def
# End Source File
# Begin Source File
SOURCE=.\CDVDbin.rc
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE="C:\Program Files\Microsoft Visual Studio\Vc98\Include\Basetsd.h"
# End Source File
# Begin Source File
SOURCE=.\CDVD.h
# End Source File
# Begin Source File
SOURCE=.\PS2Edefs.h
# End Source File
# Begin Source File
SOURCE=.\PS2Etypes.h
# End Source File
# End Group
# Begin Source File
SOURCE=..\readme.ps1.txt
# End Source File
# Begin Source File
SOURCE=..\readme.txt
# End Source File
# End Target
# End Project

View File

@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "CDVDbin"=".\CDVDbin.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

Binary file not shown.

View File

@ -1,151 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Romanian resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ROM)
#ifdef _WIN32
LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT
#pragma code_page(1250)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_CONFIG DIALOG DISCARDABLE 0, 0, 266, 68
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configure CDVDbin"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Close",IDOK,209,47,50,14
CONTROL "Choose a CD/DVD bin or iso image...",IDC_FILE,"Button",
BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_MULTILINE |
WS_TABSTOP,7,20,252,21
LTEXT "Click this to choose an image to use or else you will be asked for one at runtime:",
IDC_STATIC,7,7,252,11
CONTROL "Debug Messages",IDC_DEBUG,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,7,51,69,10
CONTROL "Force CD Audio on detection failure",IDC_CDDA,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,79,51,125,10
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO MOVEABLE PURE
BEGIN
IDD_CONFIG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 259
TOPMARGIN, 7
BOTTOMMARGIN, 61
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE MOVEABLE PURE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE MOVEABLE PURE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE MOVEABLE PURE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,6,6
PRODUCTVERSION 1,0,6,6
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "simple and easy bin/iso plugin; thanks Xobro; it is not optimised in either way; it is for testing & to serve as a template\0"
VALUE "CompanyName", "-\0"
VALUE "FileDescription", "CDVDbin\0"
VALUE "FileVersion", "1, 0, 6, 7\0"
VALUE "InternalName", "CDVDbin\0"
VALUE "LegalCopyright", "Copyright © 2002-2003\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "CDVDbin.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "CDVDbin/iso plugin for P©SX2\0"
VALUE "ProductVersion", "1, 0, 6, 7\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#endif // Romanian resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDbin", "CDVDbin.vcproj", "{50921BF5-D9DE-4264-92CF-7001E117CFC3}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug.ActiveCfg = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug.Build.0 = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release.ActiveCfg = Release|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDbin", "CDVDbin.vcproj", "{50921BF5-D9DE-4264-92CF-7001E117CFC3}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug.ActiveCfg = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug.Build.0 = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release.ActiveCfg = Release|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@ -1,178 +0,0 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="CDVDbin"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\CDVDbin___Win32_Debug"
IntermediateDirectory=".\CDVDbin___Win32_Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=67"
RuntimeLibrary="0"
PrecompiledHeaderFile=".\CDVDbin___Win32_Debug/CDVDbin.pch"
AssemblerListingLocation=".\CDVDbin___Win32_Debug/"
ObjectFile=".\CDVDbin___Win32_Debug/"
ProgramDataBaseFileName=".\CDVDbin___Win32_Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\CDVDbin___Win32_Debug/CDVDbin.pdb"
ImportLibrary=".\CDVDbin___Win32_Debug/CDVDbin.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\CDVDbin___Win32_Debug/CDVDbin.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=65"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDbin.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\Release/CDVDbin.pdb"
ImportLibrary=".\Release/CDVDbin.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDbin.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\CDVDbin.c">
</File>
<File
RelativePath=".\CDVDbin.def">
</File>
<File
RelativePath="CDVDbin.rc">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="C:\Program Files\Microsoft Visual Studio\Vc98\Include\Basetsd.h">
</File>
<File
RelativePath=".\CDVD.h">
</File>
<File
RelativePath=".\PS2Edefs.h">
</File>
<File
RelativePath=".\PS2Etypes.h">
</File>
<File
RelativePath="resource.h">
</File>
</Filter>
<File
RelativePath="..\readme.ps1.txt">
</File>
<File
RelativePath="..\readme.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,164 +0,0 @@
<?xml version="1.0" encoding = "windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="CDVDbin"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\CDVDbin___Win32_Debug"
IntermediateDirectory=".\CDVDbin___Win32_Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=67"
RuntimeLibrary="0"
PrecompiledHeaderFile=".\CDVDbin___Win32_Debug/CDVDbin.pch"
AssemblerListingLocation=".\CDVDbin___Win32_Debug/"
ObjectFile=".\CDVDbin___Win32_Debug/"
ProgramDataBaseFileName=".\CDVDbin___Win32_Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\CDVDbin___Win32_Debug/CDVDbin.pdb"
ImportLibrary=".\CDVDbin___Win32_Debug/CDVDbin.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\CDVDbin___Win32_Debug/CDVDbin.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=65"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDbin.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\Release/CDVDbin.pdb"
ImportLibrary=".\Release/CDVDbin.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDbin.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\CDVDbin.c">
</File>
<File
RelativePath=".\CDVDbin.def">
</File>
<File
RelativePath="CDVDbin.rc">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="C:\Program Files\Microsoft Visual Studio\Vc98\Include\Basetsd.h">
</File>
<File
RelativePath=".\CDVD.h">
</File>
<File
RelativePath=".\PS2Edefs.h">
</File>
<File
RelativePath=".\PS2Etypes.h">
</File>
<File
RelativePath="resource.h">
</File>
</Filter>
<File
RelativePath="..\readme.ps1.txt">
</File>
<File
RelativePath="..\readme.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDbin", "CDVDbin_2003.vcproj", "{50921BF5-D9DE-4264-92CF-7001E117CFC3}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug.ActiveCfg = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug.Build.0 = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release.ActiveCfg = Release|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@ -1,178 +0,0 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="CDVDbin"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\CDVDbin___Win32_Debug"
IntermediateDirectory=".\CDVDbin___Win32_Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=67"
RuntimeLibrary="0"
PrecompiledHeaderFile=".\CDVDbin___Win32_Debug/CDVDbin.pch"
AssemblerListingLocation=".\CDVDbin___Win32_Debug/"
ObjectFile=".\CDVDbin___Win32_Debug/"
ProgramDataBaseFileName=".\CDVDbin___Win32_Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\CDVDbin___Win32_Debug/CDVDbin.pdb"
ImportLibrary=".\CDVDbin___Win32_Debug/CDVDbin.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\CDVDbin___Win32_Debug/CDVDbin.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=65"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDbin.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\Release/CDVDbin.pdb"
ImportLibrary=".\Release/CDVDbin.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDbin.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\CDVDbin.c">
</File>
<File
RelativePath=".\CDVDbin.def">
</File>
<File
RelativePath="CDVDbin.rc">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="C:\Program Files\Microsoft Visual Studio\Vc98\Include\Basetsd.h">
</File>
<File
RelativePath=".\CDVD.h">
</File>
<File
RelativePath=".\PS2Edefs.h">
</File>
<File
RelativePath=".\PS2Etypes.h">
</File>
<File
RelativePath="resource.h">
</File>
</Filter>
<File
RelativePath="..\readme.ps1.txt">
</File>
<File
RelativePath="..\readme.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,26 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDbin", "CDVDbin_vsnet2005beta1.vcproj", "{50921BF5-D9DE-4264-92CF-7001E117CFC3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|Win64 (AMD64) = Debug|Win64 (AMD64)
Release|Win32 = Release|Win32
Release|Win64 (AMD64) = Release|Win64 (AMD64)
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug|Win32.ActiveCfg = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug|Win32.Build.0 = Debug|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug|Win64 (AMD64).ActiveCfg = Debug|Win64 (AMD64)
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Debug|Win64 (AMD64).Build.0 = Debug|Win64 (AMD64)
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release|Win32.ActiveCfg = Release|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release|Win32.Build.0 = Release|Win32
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release|Win64 (AMD64).ActiveCfg = Release|Win64 (AMD64)
{50921BF5-D9DE-4264-92CF-7001E117CFC3}.Release|Win64 (AMD64).Build.0 = Release|Win64 (AMD64)
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,428 +0,0 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="CDVDbin"
ProjectGUID="{50921BF5-D9DE-4264-92CF-7001E117CFC3}"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="Win64 (AMD64)"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\CDVDbin___Win32_Debug"
IntermediateDirectory=".\CDVDbin___Win32_Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\CDVDbin___Win32_Debug/CDVDbin.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=67"
RuntimeLibrary="0"
PrecompiledHeaderFile=".\CDVDbin___Win32_Debug/CDVDbin.pch"
AssemblerListingLocation=".\CDVDbin___Win32_Debug/"
ObjectFile=".\CDVDbin___Win32_Debug/"
ProgramDataBaseFileName=".\CDVDbin___Win32_Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\CDVDbin___Win32_Debug/CDVDbin.pdb"
ImportLibrary=".\CDVDbin___Win32_Debug/CDVDbin.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDbin.tlb"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=65"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDbin.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\Release/CDVDbin.pdb"
ImportLibrary=".\Release/CDVDbin.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win64 (AMD64)"
OutputDirectory="amd64\$(ConfigurationName)"
IntermediateDirectory="amd64\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="3"
TypeLibraryName=".\CDVDbin___Win32_Debug/CDVDbin.tlb"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;DEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=67"
RuntimeLibrary="0"
PrecompiledHeaderFile=".\CDVDbin___Win32_Debug/CDVDbin.pch"
AssemblerListingLocation=".\CDVDbin___Win32_Debug/"
ObjectFile=".\CDVDbin___Win32_Debug/"
ProgramDataBaseFileName=".\CDVDbin___Win32_Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\CDVDbin___Win32_Debug/CDVDbin.pdb"
ImportLibrary=".\CDVDbin___Win32_Debug/CDVDbin.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win64 (AMD64)"
OutputDirectory="amd64\$(ConfigurationName)"
IntermediateDirectory="amd64\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="3"
TypeLibraryName=".\Release/CDVDbin.tlb"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CDVDBIN_EXPORTS;__WIN32__;VERSION=0;BUILD=65"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDbin.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="11274"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\CDVDbin.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateManifest="FALSE"
ModuleDefinitionFile=".\CDVDbin.def"
ProgramDatabaseFile=".\Release/CDVDbin.pdb"
ImportLibrary=".\Release/CDVDbin.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath=".\CDVDbin.c"
>
</File>
<File
RelativePath=".\CDVDbin.def"
>
</File>
<File
RelativePath="CDVDbin.rc"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="C:\Program Files\Microsoft Visual Studio\Vc98\Include\Basetsd.h"
>
</File>
<File
RelativePath=".\CDVD.h"
>
</File>
<File
RelativePath=".\PS2Edefs.h"
>
</File>
<File
RelativePath=".\PS2Etypes.h"
>
</File>
<File
RelativePath="resource.h"
>
</File>
</Filter>
<File
RelativePath="..\readme.ps1.txt"
>
</File>
<File
RelativePath="..\readme.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,141 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Romanian resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ROM)
#ifdef _WIN32
LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT
#pragma code_page(1250)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_CONFIG DIALOGEX 0, 0, 267, 69
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configurare CDVDbin"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "Închide",IDOK,210,48,50,14
CONTROL "Alegeþi o imagine bin sau iso de CD/DVD...",IDC_FILE,
"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_MULTILINE |
WS_TABSTOP,7,20,253,21
LTEXT "Apasã pentru a alege o imagine de folosit sau altfel veþi fi întrebat în timpul rulãrii:",
IDC_STATIC,7,7,253,11
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_CONFIG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
TOPMARGIN, 7
BOTTOMMARGIN, 62
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,6,1
PRODUCTVERSION 1,0,6,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "041804b0"
BEGIN
VALUE "Comments", "plugin simplu de bin/iso; mulþumiri lui Xobro; nu e optimizat de nici un fel; a fost fãcut pentru teste si sã serveascã de exemplu"
VALUE "CompanyName", "-"
VALUE "FileDescription", "CDVDbin"
VALUE "FileVersion", "1, 0, 6, 1"
VALUE "InternalName", "CDVDbin"
VALUE "LegalCopyright", "Copyright © 2002"
VALUE "OriginalFilename", "CDVDbin.dll"
VALUE "ProductName", "plugin CDVDbin/iso pentru P©SX2"
VALUE "ProductVersion", "1, 0, 6, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x418, 1200
END
END
#endif // Romanian resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,723 +0,0 @@
#ifndef __PS2EDEFS_H__
#define __PS2EDEFS_H__
/*
* PS2E Definitions v0.5.9 (beta)
*
* Author: linuzappz@hotmail.com
* shadowpcsx2@yahoo.gr
* florinsasu@hotmail.com
*/
/*
Notes:
* Since this is still beta things may change.
* OSflags:
__LINUX__ (linux OS)
__WIN32__ (win32 OS)
* common return values (for ie. GSinit):
0 - success
-1 - error
* reserved keys:
F1 to F10 are reserved for the emulator
* plugins should NOT change the current
working directory.
(on win32, add flag OFN_NOCHANGEDIR for
GetOpenFileName)
*/
#include "PS2Etypes.h"
#ifdef __LINUX__
#define CALLBACK
#else
#include <windows.h>
#endif
/* common defines */
#if defined(GSdefs) || defined(PADdefs) || \
defined(SPU2defs)|| defined(CDVDdefs)
#define COMMONdefs
#endif
// PS2EgetLibType returns (may be OR'd)
#define PS2E_LT_GS 0x01
#define PS2E_LT_PAD 0x02
#define PS2E_LT_SPU2 0x04
#define PS2E_LT_CDVD 0x08
#define PS2E_LT_DEV9 0x10
#define PS2E_LT_USB 0x20
#define PS2E_LT_FIREWIRE 0x40
// PS2EgetLibVersion2 (high 16 bits)
#define PS2E_GS_VERSION 0x0006
#define PS2E_PAD_VERSION 0x0002
#define PS2E_SPU2_VERSION 0x0004
#define PS2E_CDVD_VERSION 0x0005
#define PS2E_DEV9_VERSION 0x0003
#define PS2E_USB_VERSION 0x0003
#define PS2E_FIREWIRE_VERSION 0x0002
#ifdef COMMONdefs
u32 CALLBACK PS2EgetLibType(void);
u32 CALLBACK PS2EgetLibVersion2(u32 type);
char* CALLBACK PS2EgetLibName(void);
#endif
// key values:
/* key values must be OS dependant:
win32: the VK_XXX will be used (WinUser)
linux: the XK_XXX will be used (XFree86)
*/
// event values:
#define KEYPRESS 1
#define KEYRELEASE 2
typedef struct {
u32 key;
u32 event;
} keyEvent;
typedef struct {
u8 ctrl:4; // control and mode bits
u8 mode:4; // control and mode bits
u8 trackNum; // current track number (1 to 99)
u8 trackIndex; // current index within track (0 to 99)
u8 trackM; // current minute location on the disc (BCD encoded)
u8 trackS; // current sector location on the disc (BCD encoded)
u8 trackF; // current frame location on the disc (BCD encoded)
u8 pad; // unused
u8 discM; // current minute offset from first track (BCD encoded)
u8 discS; // current sector offset from first track (BCD encoded)
u8 discF; // current frame offset from first track (BCD encoded)
} cdvdSubQ;
typedef struct { // NOT bcd coded
u32 lsn;
u8 type;
} cdvdTD;
typedef struct {
u8 strack; //number of the first track (usually 1)
u8 etrack; //number of the last track
} cdvdTN;
// CDVDreadTrack mode values:
#define CDVD_MODE_2352 0 // full 2352 bytes
#define CDVD_MODE_2340 1 // skip sync (12) bytes
#define CDVD_MODE_2328 2 // skip sync+head+sub (24) bytes
#define CDVD_MODE_2048 3 // skip sync+head+sub (24) bytes
#define CDVD_MODE_2368 4 // full 2352 bytes + 16 subq
// CDVDgetDiskType returns:
#define CDVD_TYPE_ILLEGAL 0xff // Illegal Disc
#define CDVD_TYPE_DVDV 0xfe // DVD Video
#define CDVD_TYPE_CDDA 0xfd // Audio CD
#define CDVD_TYPE_PS2DVD 0x14 // PS2 DVD
#define CDVD_TYPE_PS2CDDA 0x13 // PS2 CD (with audio)
#define CDVD_TYPE_PS2CD 0x12 // PS2 CD
#define CDVD_TYPE_PSCDDA 0x11 // PS CD (with audio)
#define CDVD_TYPE_PSCD 0x10 // PS CD
#define CDVD_TYPE_UNKNOWN 0x05 // Unknown
#define CDVD_TYPE_DETCTDVDD 0x04 // Detecting Dvd Dual Sided
#define CDVD_TYPE_DETCTDVDS 0x03 // Detecting Dvd Single Sided
#define CDVD_TYPE_DETCTCD 0x02 // Detecting Cd
#define CDVD_TYPE_DETCT 0x01 // Detecting
#define CDVD_TYPE_NODISC 0x00 // No Disc
// CDVDgetTrayStatus returns:
#define CDVD_TRAY_CLOSE 0x00
#define CDVD_TRAY_OPEN 0x01
// cdvdTD.type (track types for cds)
#define CDVD_AUDIO_TRACK 0x01
#define CDVD_MODE1_TRACK 0x41
#define CDVD_MODE2_TRACK 0x61
#define CDVD_AUDIO_MASK 0x00
#define CDVD_DATA_MASK 0x40
// CDROM_DATA_TRACK 0x04 //do not enable this! (from linux kernel)
typedef void (*DEV9callback)(int cycles);
typedef int (*DEV9handler)(void);
typedef void (*USBcallback)(int cycles);
typedef int (*USBhandler)(void);
// freeze modes:
#define FREEZE_LOAD 0
#define FREEZE_SAVE 1
#define FREEZE_SIZE 2
typedef struct {
int size;
s8 *data;
} freezeData;
typedef struct {
char name[8];
void *common;
} GSdriverInfo;
#ifdef __WIN32__
typedef struct { // unsupported values must be set to zero
HWND hWnd;
HMENU hMenu;
HWND hStatusWnd;
} winInfo;
#endif
/* GS plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef GSdefs
// basic funcs
s32 CALLBACK GSinit();
s32 CALLBACK GSopen(void *pDsp, char *Title);
void CALLBACK GSclose();
void CALLBACK GSshutdown();
void CALLBACK GSvsync();
void CALLBACK GSgifTransfer1(u32 *pMem, u32 addr);
void CALLBACK GSgifTransfer2(u32 *pMem, u32 size);
void CALLBACK GSgifTransfer3(u32 *pMem, u32 size);
void CALLBACK GSwrite8(u32 mem, u8 value);
void CALLBACK GSwrite16(u32 mem, u16 value);
void CALLBACK GSwrite32(u32 mem, u32 value);
void CALLBACK GSwrite64(u32 mem, u64 value);
u8 CALLBACK GSread8(u32 mem);
u16 CALLBACK GSread16(u32 mem);
u32 CALLBACK GSread32(u32 mem);
u64 CALLBACK GSread64(u32 mem);
void CALLBACK GSreadFIFO(u64 *mem);
// extended funcs
// GSkeyEvent gets called when there is a keyEvent from the PAD plugin
void CALLBACK GSkeyEvent(keyEvent *ev);
void CALLBACK GSmakeSnapshot(char *path);
void CALLBACK GSirqCallback(void (*callback)());
void CALLBACK GSprintf(int timeout, char *fmt, ...);
void CALLBACK GSsetCSR(u64 *csr);
void CALLBACK GSgetDriverInfo(GSdriverInfo *info);
#ifdef __WIN32__
s32 CALLBACK GSsetWindowInfo(winInfo *info);
#endif
s32 CALLBACK GSfreeze(int mode, freezeData *data);
void CALLBACK GSconfigure();
void CALLBACK GSabout();
s32 CALLBACK GStest();
#endif
/* PAD plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef PADdefs
// basic funcs
s32 CALLBACK PADinit(u32 flags);
s32 CALLBACK PADopen(void *pDsp);
void CALLBACK PADclose();
void CALLBACK PADshutdown();
// PADkeyEvent is called every vsync (return NULL if no event)
keyEvent* CALLBACK PADkeyEvent();
u8 CALLBACK PADstartPoll(int pad);
u8 CALLBACK PADpoll(u8 value);
// returns: 1 if supported pad1
// 2 if supported pad2
// 3 if both are supported
u32 CALLBACK PADquery();
// extended funcs
void CALLBACK PADgsDriverInfo(GSdriverInfo *info);
void CALLBACK PADconfigure();
void CALLBACK PADabout();
s32 CALLBACK PADtest();
#endif
/* SPU2 plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef SPU2defs
// basic funcs
s32 CALLBACK SPU2init();
s32 CALLBACK SPU2open(void *pDsp);
void CALLBACK SPU2close();
void CALLBACK SPU2shutdown();
void CALLBACK SPU2write(u32 mem, u16 value);
u16 CALLBACK SPU2read(u32 mem);
void CALLBACK SPU2readDMA4Mem(u16 *pMem, int size);
void CALLBACK SPU2writeDMA4Mem(u16 *pMem, int size);
void CALLBACK SPU2interruptDMA4();
void CALLBACK SPU2readDMA7Mem(u16* pMem, int size);
void CALLBACK SPU2writeDMA7Mem(u16 *pMem, int size);
void CALLBACK SPU2interruptDMA7();
void CALLBACK SPU2irqCallback(void (*callback)());
// extended funcs
void CALLBACK SPU2async(u32 cycles);
s32 CALLBACK SPU2freeze(int mode, freezeData *data);
void CALLBACK SPU2configure();
void CALLBACK SPU2about();
s32 CALLBACK SPU2test();
#endif
/* CDVD plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef CDVDdefs
// basic funcs
s32 CALLBACK CDVDinit();
s32 CALLBACK CDVDopen();
void CALLBACK CDVDclose();
void CALLBACK CDVDshutdown();
s32 CALLBACK CDVDreadTrack(u32 lsn, int mode);
// return can be NULL (for async modes)
u8* CALLBACK CDVDgetBuffer();
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ* subq);//read subq from disc (only cds have subq data)
s32 CALLBACK CDVDgetTN(cdvdTN *Buffer); //disk information
s32 CALLBACK CDVDgetTD(u8 Track, cdvdTD *Buffer); //track info: min,sec,frame,type
s32 CALLBACK CDVDgetTOC(void* toc); //gets ps2 style toc from disc
s32 CALLBACK CDVDgetDiskType(); //CDVD_TYPE_xxxx
s32 CALLBACK CDVDgetTrayStatus(); //CDVD_TRAY_xxxx
s32 CALLBACK CDVDctrlTrayOpen(); //open disc tray
s32 CALLBACK CDVDctrlTrayClose(); //close disc tray
// extended funcs
void CALLBACK CDVDconfigure();
void CALLBACK CDVDabout();
s32 CALLBACK CDVDtest();
#endif
/* DEV9 plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef DEV9defs
// basic funcs
s32 CALLBACK DEV9init();
s32 CALLBACK DEV9open(void *pDsp);
void CALLBACK DEV9close();
void CALLBACK DEV9shutdown();
u8 CALLBACK DEV9read8(u32 addr);
u16 CALLBACK DEV9read16(u32 addr);
u32 CALLBACK DEV9read32(u32 addr);
void CALLBACK DEV9write8(u32 addr, u8 value);
void CALLBACK DEV9write16(u32 addr, u16 value);
void CALLBACK DEV9write32(u32 addr, u32 value);
void CALLBACK DEV9readDMA8Mem(u32 *pMem, int size);
void CALLBACK DEV9writeDMA8Mem(u32 *pMem, int size);
// cycles = IOP cycles before calling callback,
// if callback returns 1 the irq is triggered, else not
void CALLBACK DEV9irqCallback(DEV9callback callback);
DEV9handler CALLBACK DEV9irqHandler(void);
// extended funcs
s32 CALLBACK DEV9freeze(int mode, freezeData *data);
void CALLBACK DEV9configure();
void CALLBACK DEV9about();
s32 CALLBACK DEV9test();
#endif
/* USB plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef USBdefs
// basic funcs
s32 CALLBACK USBinit();
s32 CALLBACK USBopen(void *pDsp);
void CALLBACK USBclose();
void CALLBACK USBshutdown();
u8 CALLBACK USBread8(u32 addr);
u16 CALLBACK USBread16(u32 addr);
u32 CALLBACK USBread32(u32 addr);
void CALLBACK USBwrite8(u32 addr, u8 value);
void CALLBACK USBwrite16(u32 addr, u16 value);
void CALLBACK USBwrite32(u32 addr, u32 value);
// cycles = IOP cycles before calling callback,
// if callback returns 1 the irq is triggered, else not
void CALLBACK USBirqCallback(USBcallback callback);
USBhandler CALLBACK USBirqHandler(void);
void CALLBACK USBsetRAM(void *mem);
// extended funcs
s32 CALLBACK USBfreeze(int mode, freezeData *data);
void CALLBACK USBconfigure();
void CALLBACK USBabout();
s32 CALLBACK USBtest();
#endif
/* Firewire plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef FIREWIREdefs
// basic funcs
s32 CALLBACK FireWireinit();
s32 CALLBACK FireWireopen(void *pDsp);
void CALLBACK FireWireclose();
void CALLBACK FireWireshutdown();
u32 CALLBACK FireWireread32(u32 addr);
void CALLBACK FireWirewrite32(u32 addr, u32 value);
void CALLBACK FireWireirqCallback(void (*callback)());
// extended funcs
s32 CALLBACK FireWirefreeze(int mode, freezeData *data);
void CALLBACK FireWireconfigure();
void CALLBACK FireWireabout();
s32 CALLBACK FireWiretest();
#endif
// might be useful for emulators
#ifdef PLUGINtypedefs
typedef u32 (CALLBACK* _PS2EgetLibType)(void);
typedef u32 (CALLBACK* _PS2EgetLibVersion2)(u32 type);
typedef char*(CALLBACK* _PS2EgetLibName)(void);
// GS
typedef s32 (CALLBACK* _GSinit)();
typedef s32 (CALLBACK* _GSopen)(void *pDsp, char *Title);
typedef void (CALLBACK* _GSclose)();
typedef void (CALLBACK* _GSshutdown)();
typedef void (CALLBACK* _GSvsync)();
typedef void (CALLBACK* _GSwrite8)(u32 mem, u8 value);
typedef void (CALLBACK* _GSwrite16)(u32 mem, u16 value);
typedef void (CALLBACK* _GSwrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _GSwrite64)(u32 mem, u64 value);
typedef u8 (CALLBACK* _GSread8)(u32 mem);
typedef u16 (CALLBACK* _GSread16)(u32 mem);
typedef u32 (CALLBACK* _GSread32)(u32 mem);
typedef u64 (CALLBACK* _GSread64)(u32 mem);
typedef void (CALLBACK* _GSgifTransfer1)(u32 *pMem, u32 addr);
typedef void (CALLBACK* _GSgifTransfer2)(u32 *pMem, u32 size);
typedef void (CALLBACK* _GSgifTransfer3)(u32 *pMem, u32 size);
typedef void (CALLBACK* _GSreadFIFO)(u64 *pMem);
typedef void (CALLBACK* _GSkeyEvent)(keyEvent* ev);
typedef void (CALLBACK* _GSirqCallback)(void (*callback)());
typedef void (CALLBACK* _GSprintf)(int timeout, char *fmt, ...);
typedef void (CALLBACK* _GSsetCSR)(u64 * csr);
typedef void (CALLBACK* _GSgetDriverInfo)(GSdriverInfo *info);
#ifdef __WIN32__
typedef s32 (CALLBACK* _GSsetWindowInfo)(winInfo *info);
#endif
typedef void (CALLBACK* _GSmakeSnapshot)(char *path);
typedef s32 (CALLBACK* _GSfreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _GSconfigure)();
typedef s32 (CALLBACK* _GStest)();
typedef void (CALLBACK* _GSabout)();
// PAD
typedef s32 (CALLBACK* _PADinit)(u32 flags);
typedef s32 (CALLBACK* _PADopen)(void *pDsp);
typedef void (CALLBACK* _PADclose)();
typedef void (CALLBACK* _PADshutdown)();
typedef keyEvent* (CALLBACK* _PADkeyEvent)();
typedef u8 (CALLBACK* _PADstartPoll)(int pad);
typedef u8 (CALLBACK* _PADpoll)(u8 value);
typedef u32 (CALLBACK* _PADquery)();
typedef void (CALLBACK* _PADgsDriverInfo)(GSdriverInfo *info);
typedef void (CALLBACK* _PADconfigure)();
typedef s32 (CALLBACK* _PADtest)();
typedef void (CALLBACK* _PADabout)();
// SPU2
typedef s32 (CALLBACK* _SPU2init)();
typedef s32 (CALLBACK* _SPU2open)(void *pDsp);
typedef void (CALLBACK* _SPU2close)();
typedef void (CALLBACK* _SPU2shutdown)();
typedef void (CALLBACK* _SPU2write)(u32 mem, u16 value);
typedef u16 (CALLBACK* _SPU2read)(u32 mem);
typedef void (CALLBACK* _SPU2readDMA4Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2writeDMA4Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2interruptDMA4)();
typedef void (CALLBACK* _SPU2readDMA7Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2writeDMA7Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2interruptDMA7)();
typedef void (CALLBACK* _SPU2irqCallback)(void (*callback)());
typedef void (CALLBACK* _SPU2async)(u32 cycles);
typedef s32 (CALLBACK* _SPU2freeze)(int mode, freezeData *data);
typedef void (CALLBACK* _SPU2configure)();
typedef s32 (CALLBACK* _SPU2test)();
typedef void (CALLBACK* _SPU2about)();
// CDVD
typedef s32 (CALLBACK* _CDVDinit)();
typedef s32 (CALLBACK* _CDVDopen)();
typedef void (CALLBACK* _CDVDclose)();
typedef void (CALLBACK* _CDVDshutdown)();
typedef s32 (CALLBACK* _CDVDreadTrack)(u32 lsn, int mode);
typedef u8* (CALLBACK* _CDVDgetBuffer)();
typedef s32 (CALLBACK* _CDVDreadSubQ)(u32 lsn, cdvdSubQ* subq);
typedef s32 (CALLBACK* _CDVDgetTN)(cdvdTN *Buffer);
typedef s32 (CALLBACK* _CDVDgetTD)(u8 Track, cdvdTD *Buffer);
typedef s32 (CALLBACK* _CDVDgetTOC)(void* toc);
typedef s32 (CALLBACK* _CDVDgetDiskType)();
typedef s32 (CALLBACK* _CDVDgetTrayStatus)();
typedef s32 (CALLBACK* _CDVDctrlTrayOpen)();
typedef s32 (CALLBACK* _CDVDctrlTrayClose)();
typedef void (CALLBACK* _CDVDconfigure)();
typedef s32 (CALLBACK* _CDVDtest)();
typedef void (CALLBACK* _CDVDabout)();
// DEV9
typedef s32 (CALLBACK* _DEV9init)();
typedef s32 (CALLBACK* _DEV9open)(void *pDsp);
typedef void (CALLBACK* _DEV9close)();
typedef void (CALLBACK* _DEV9shutdown)();
typedef u8 (CALLBACK* _DEV9read8)(u32 mem);
typedef u16 (CALLBACK* _DEV9read16)(u32 mem);
typedef u32 (CALLBACK* _DEV9read32)(u32 mem);
typedef void (CALLBACK* _DEV9write8)(u32 mem, u8 value);
typedef void (CALLBACK* _DEV9write16)(u32 mem, u16 value);
typedef void (CALLBACK* _DEV9write32)(u32 mem, u32 value);
typedef void (CALLBACK* _DEV9readDMA8Mem)(u32 *pMem, int size);
typedef void (CALLBACK* _DEV9writeDMA8Mem)(u32 *pMem, int size);
typedef void (CALLBACK* _DEV9irqCallback)(DEV9callback callback);
typedef DEV9handler (CALLBACK* _DEV9irqHandler)(void);
typedef s32 (CALLBACK* _DEV9freeze)(int mode, freezeData *data);
typedef void (CALLBACK* _DEV9configure)();
typedef s32 (CALLBACK* _DEV9test)();
typedef void (CALLBACK* _DEV9about)();
// USB
typedef s32 (CALLBACK* _USBinit)();
typedef s32 (CALLBACK* _USBopen)(void *pDsp);
typedef void (CALLBACK* _USBclose)();
typedef void (CALLBACK* _USBshutdown)();
typedef u8 (CALLBACK* _USBread8)(u32 mem);
typedef u16 (CALLBACK* _USBread16)(u32 mem);
typedef u32 (CALLBACK* _USBread32)(u32 mem);
typedef void (CALLBACK* _USBwrite8)(u32 mem, u8 value);
typedef void (CALLBACK* _USBwrite16)(u32 mem, u16 value);
typedef void (CALLBACK* _USBwrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _USBirqCallback)(USBcallback callback);
typedef USBhandler (CALLBACK* _USBirqHandler)(void);
typedef void (CALLBACK* _USBsetRAM)(void *mem);
typedef s32 (CALLBACK* _USBfreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _USBconfigure)();
typedef s32 (CALLBACK* _USBtest)();
typedef void (CALLBACK* _USBabout)();
//FireWire
typedef s32 (CALLBACK* _FireWireinit)();
typedef s32 (CALLBACK* _FireWireopen)(void *pDsp);
typedef void (CALLBACK* _FireWireclose)();
typedef void (CALLBACK* _FireWireshutdown)();
typedef u32 (CALLBACK* _FireWireread32)(u32 mem);
typedef void (CALLBACK* _FireWirewrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _FireWireirqCallback)(void (*callback)());
typedef s32 (CALLBACK* _FireWirefreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _FireWireconfigure)();
typedef s32 (CALLBACK* _FireWiretest)();
typedef void (CALLBACK* _FireWireabout)();
#endif
#ifdef PLUGINfuncs
// GS
_GSinit GSinit;
_GSopen GSopen;
_GSclose GSclose;
_GSshutdown GSshutdown;
_GSvsync GSvsync;
_GSwrite8 GSwrite8;
_GSwrite16 GSwrite16;
_GSwrite32 GSwrite32;
_GSwrite64 GSwrite64;
_GSread8 GSread8;
_GSread16 GSread16;
_GSread32 GSread32;
_GSread64 GSread64;
_GSgifTransfer1 GSgifTransfer1;
_GSgifTransfer2 GSgifTransfer2;
_GSgifTransfer3 GSgifTransfer3;
_GSreadFIFO GSreadFIFO;
_GSkeyEvent GSkeyEvent;
_GSmakeSnapshot GSmakeSnapshot;
_GSirqCallback GSirqCallback;
_GSprintf GSprintf;
_GSsetCSR GSsetCSR;
_GSgetDriverInfo GSgetDriverInfo;
#ifdef __WIN32__
_GSsetWindowInfo GSsetWindowInfo;
#endif
_GSfreeze GSfreeze;
_GSconfigure GSconfigure;
_GStest GStest;
_GSabout GSabout;
// PAD1
_PADinit PAD1init;
_PADopen PAD1open;
_PADclose PAD1close;
_PADshutdown PAD1shutdown;
_PADkeyEvent PAD1keyEvent;
_PADstartPoll PAD1startPoll;
_PADpoll PAD1poll;
_PADquery PAD1query;
_PADgsDriverInfo PAD1gsDriverInfo;
_PADconfigure PAD1configure;
_PADtest PAD1test;
_PADabout PAD1about;
// PAD2
_PADinit PAD2init;
_PADopen PAD2open;
_PADclose PAD2close;
_PADshutdown PAD2shutdown;
_PADkeyEvent PAD2keyEvent;
_PADstartPoll PAD2startPoll;
_PADpoll PAD2poll;
_PADquery PAD2query;
_PADgsDriverInfo PAD2gsDriverInfo;
_PADconfigure PAD2configure;
_PADtest PAD2test;
_PADabout PAD2about;
// SPU2
_SPU2init SPU2init;
_SPU2open SPU2open;
_SPU2close SPU2close;
_SPU2shutdown SPU2shutdown;
_SPU2write SPU2write;
_SPU2read SPU2read;
_SPU2readDMA4Mem SPU2readDMA4Mem;
_SPU2writeDMA4Mem SPU2writeDMA4Mem;
_SPU2interruptDMA4 SPU2interruptDMA4;
_SPU2readDMA7Mem SPU2readDMA7Mem;
_SPU2writeDMA7Mem SPU2writeDMA7Mem;
_SPU2interruptDMA7 SPU2interruptDMA7;
_SPU2irqCallback SPU2irqCallback;
_SPU2async SPU2async;
_SPU2freeze SPU2freeze;
_SPU2configure SPU2configure;
_SPU2test SPU2test;
_SPU2about SPU2about;
// CDVD
_CDVDinit CDVDinit;
_CDVDopen CDVDopen;
_CDVDclose CDVDclose;
_CDVDshutdown CDVDshutdown;
_CDVDreadTrack CDVDreadTrack;
_CDVDgetBuffer CDVDgetBuffer;
_CDVDreadSubQ CDVDreadSubQ;
_CDVDgetTN CDVDgetTN;
_CDVDgetTD CDVDgetTD;
_CDVDgetTOC CDVDgetTOC;
_CDVDgetDiskType CDVDgetDiskType;
_CDVDgetTrayStatus CDVDgetTrayStatus;
_CDVDctrlTrayOpen CDVDctrlTrayOpen;
_CDVDctrlTrayClose CDVDctrlTrayClose;
_CDVDconfigure CDVDconfigure;
_CDVDtest CDVDtest;
_CDVDabout CDVDabout;
// DEV9
_DEV9init DEV9init;
_DEV9open DEV9open;
_DEV9close DEV9close;
_DEV9shutdown DEV9shutdown;
_DEV9read8 DEV9read8;
_DEV9read16 DEV9read16;
_DEV9read32 DEV9read32;
_DEV9write8 DEV9write8;
_DEV9write16 DEV9write16;
_DEV9write32 DEV9write32;
_DEV9readDMA8Mem DEV9readDMA8Mem;
_DEV9writeDMA8Mem DEV9writeDMA8Mem;
_DEV9irqCallback DEV9irqCallback;
_DEV9irqHandler DEV9irqHandler;
_DEV9configure DEV9configure;
_DEV9freeze DEV9freeze;
_DEV9test DEV9test;
_DEV9about DEV9about;
// USB
_USBinit USBinit;
_USBopen USBopen;
_USBclose USBclose;
_USBshutdown USBshutdown;
_USBread8 USBread8;
_USBread16 USBread16;
_USBread32 USBread32;
_USBwrite8 USBwrite8;
_USBwrite16 USBwrite16;
_USBwrite32 USBwrite32;
_USBirqCallback USBirqCallback;
_USBirqHandler USBirqHandler;
_USBsetRAM USBsetRAM;
_USBconfigure USBconfigure;
_USBfreeze USBfreeze;
_USBtest USBtest;
_USBabout USBabout;
// FireWire
_FireWireinit FireWireinit;
_FireWireopen FireWireopen;
_FireWireclose FireWireclose;
_FireWireshutdown FireWireshutdown;
_FireWireread32 FireWireread32;
_FireWirewrite32 FireWirewrite32;
_FireWireirqCallback FireWireirqCallback;
_FireWireconfigure FireWireconfigure;
_FireWirefreeze FireWirefreeze;
_FireWiretest FireWiretest;
_FireWireabout FireWireabout;
#endif
#endif /* __PS2EDEFS_H__ */

View File

@ -1,43 +0,0 @@
#ifndef __PS2ETYPES_H__
#define __PS2ETYPES_H__
// Basic types
#if defined(__MSCW32__) || defined(__WIN32__)
typedef __int8 s8;
typedef __int16 s16;
typedef __int32 s32;
typedef __int64 s64;
typedef unsigned __int8 u8;
typedef unsigned __int16 u16;
typedef unsigned __int32 u32;
typedef unsigned __int64 u64;
#if defined(__x86_64__)
typedef u64 uptr;
#else
typedef u32 uptr;
#endif
#elif defined(__LINUX__) || defined(__MINGW32__)
typedef char s8;
typedef short s16;
typedef int s32;
typedef long long s64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
#if defined(__x86_64__)
typedef u64 uptr;
#else
typedef u32 uptr;
#endif
#endif
#endif /* __PS2ETYPES_H__ */

View File

@ -1,19 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by CDVDbin.rc
//
#define IDD_CONFIG 101
#define IDC_FILE 1000
#define IDC_DEBUG 1001
#define IDC_CDDA 1002
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1002
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -1,43 +0,0 @@
// AboutBox.cpp : implementation file
//
#include "stdafx.h"
#include "cdvddraft.h"
#include "AboutBox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutBox dialog
CAboutBox::CAboutBox(CWnd* pParent /*=NULL*/)
: CDialog(CAboutBox::IDD, pParent)
{
//{{AFX_DATA_INIT(CAboutBox)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CAboutBox::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutBox)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutBox, CDialog)
//{{AFX_MSG_MAP(CAboutBox)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAboutBox message handlers

View File

@ -1,46 +0,0 @@
#if !defined(AFX_ABOUTBOX_H__D58937A1_2304_11D7_8E29_0050DA15DE89__INCLUDED_)
#define AFX_ABOUTBOX_H__D58937A1_2304_11D7_8E29_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AboutBox.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CAboutBox dialog
class CAboutBox : public CDialog
{
// Construction
public:
CAboutBox(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CAboutBox)
enum { IDD = IDD_ABOUT };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutBox)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CAboutBox)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ABOUTBOX_H__D58937A1_2304_11D7_8E29_0050DA15DE89__INCLUDED_)

View File

@ -1,172 +0,0 @@
// Config.cpp : implementation file
//
#include "stdafx.h"
#include "cdvddraft.h"
#include "Config.h"
#include <atlbase.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConfig dialog
CConfig::CConfig(CWnd* pParent /*=NULL*/)
: CDialog(CConfig::IDD, pParent)
{
//{{AFX_DATA_INIT(CConfig)
m_nInterface = 0;
m_nBuffMode = 0;
m_nDrive = 0;
m_nReadMode = 0;
//}}AFX_DATA_INIT
}
void CConfig::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConfig)
DDX_Control(pDX, IDC_DRIVE, m_ctrlDrive);
DDX_CBIndex(pDX, IDC_INTERFACE, m_nInterface);
DDX_CBIndex(pDX, IDC_PREFETCH, m_nBuffMode);
DDX_CBIndex(pDX, IDC_DRIVE, m_nDrive);
DDX_CBIndex(pDX, IDC_READMODE, m_nReadMode);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConfig, CDialog)
//{{AFX_MSG_MAP(CConfig)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConfig message handlers
BOOL CConfig::OnInitDialog()
{
int nResult = CDialog::OnInitDialog();
TRACE("on init dialog.\n");
int curr_intf = (CDVD_INTERFACE_TYPE)
cdvd_init(CDVD_INTF_UNKNOWN);
int init_okay = CDVD_ERROR_FAIL;
if(curr_intf == CDVD_INTF_UNKNOWN)
{
if(CCdvd::Aspi_CheckValidInstallation()
== CDVD_ERROR_SUCCESS)
{
init_okay = cdvd_init(CDVD_INTF_ASPI);
TRACE("config: init_aspi: %ld\n", init_okay);
}
else if(CCdvd::GetWin32OSType() == WINNTNEW)
{
TRACE("config: init_ioctl: %ld\n", init_okay);
init_okay = cdvd_init(CDVD_INTF_IOCTL);
}
else
{
curr_intf = CDVD_INTF_UNKNOWN;
TRACE("config: init_unknown: %ld\n", init_okay);
}
}
// else already either init to ioctl or aspi
else
{
TRACE("config: already previously init.\n");
init_okay = CDVD_ERROR_SUCCESS;
}
if(init_okay == CDVD_ERROR_SUCCESS)
{
ADAPTERINFO info;
int ndrives = cdvd_getnumdrives();
if(ndrives > 0)
{
for(int i = 0; i < ndrives; i++)
{
CString str;
info = cdvd_getadapterdetail(i);
str.Format(_T(" %d:%d:%d %s"),
info.ha, info.id, info.lun, info.name
);
TRACE("str: %s\n", str);
m_ctrlDrive.InsertString(i, str);
}
}
else
{
MessageBox(_T("Unable to locate c/dvd drives on this computer\n"),
_T("Drive Error"),
MB_OK|MB_ICONERROR);
}
if(curr_intf == CDVD_INTF_UNKNOWN &&
init_okay == CDVD_ERROR_SUCCESS)
cdvd_shutdown();
}
LoadConfig();
return TRUE;
}
void CConfig::OnOK()
{
SaveConfig();
CDialog::OnOK();
}
/////////////////////////////////////////////////////////////////////////////
// save/load stuff
BOOL CConfig::SaveConfig()
{
CRegKey rKey;
if(rKey.Create(HKEY_CURRENT_USER, PLUGIN_REG_PATH) == ERROR_SUCCESS)
{
UpdateData(TRUE);
if(m_nDrive != -1)
{
rKey.SetValue(m_nDrive, _T("DriveNum"));
rKey.SetValue(m_nBuffMode, _T("BuffMode"));
rKey.SetValue(m_nInterface, _T("Interface"));
rKey.SetValue(m_nReadMode, _T("ReadMode"));
}
rKey.Close();
}
return TRUE;
}
BOOL CConfig::LoadConfig()
{
CRegKey rKey;
if(rKey.Create(HKEY_CURRENT_USER, PLUGIN_REG_PATH) == ERROR_SUCCESS)
{
DWORD val;
if(rKey.QueryValue(val, _T("DriveNum")) == ERROR_SUCCESS)
m_nDrive = val;
if(rKey.QueryValue(val, _T("BuffMode")) == ERROR_SUCCESS)
m_nBuffMode = val;
if(rKey.QueryValue(val, _T("Interface")) == ERROR_SUCCESS)
m_nInterface = val;
if(rKey.QueryValue(val, _T("ReadMode")) == ERROR_SUCCESS)
m_nReadMode = val;
UpdateData(FALSE);
rKey.Close();
}
return TRUE;
}

View File

@ -1,54 +0,0 @@
#if !defined(AFX_CONFIG_H__A5E8FC61_C0A7_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_CONFIG_H__A5E8FC61_C0A7_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Config.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CConfig dialog
class CConfig : public CDialog
{
// Construction
public:
CConfig(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CConfig)
enum { IDD = IDD_CONFIG };
CComboBox m_ctrlDrive;
int m_nInterface;
int m_nBuffMode;
int m_nDrive;
int m_nReadMode;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConfig)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog();
virtual BOOL SaveConfig();
virtual BOOL LoadConfig();
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CConfig)
// NOTE: the ClassWizard will add member functions here
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CONFIG_H__A5E8FC61_C0A7_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,723 +0,0 @@
#ifndef __PS2EDEFS_H__
#define __PS2EDEFS_H__
/*
* PS2E Definitions v0.5.9 (beta)
*
* Author: linuzappz@hotmail.com
* shadowpcsx2@yahoo.gr
* florinsasu@hotmail.com
*/
/*
Notes:
* Since this is still beta things may change.
* OSflags:
__LINUX__ (linux OS)
__WIN32__ (win32 OS)
* common return values (for ie. GSinit):
0 - success
-1 - error
* reserved keys:
F1 to F10 are reserved for the emulator
* plugins should NOT change the current
working directory.
(on win32, add flag OFN_NOCHANGEDIR for
GetOpenFileName)
*/
#include "PS2Etypes.h"
#ifdef __LINUX__
#define CALLBACK
#else
#include <windows.h>
#endif
/* common defines */
#if defined(GSdefs) || defined(PADdefs) || \
defined(SPU2defs)|| defined(CDVDdefs)
#define COMMONdefs
#endif
// PS2EgetLibType returns (may be OR'd)
#define PS2E_LT_GS 0x01
#define PS2E_LT_PAD 0x02
#define PS2E_LT_SPU2 0x04
#define PS2E_LT_CDVD 0x08
#define PS2E_LT_DEV9 0x10
#define PS2E_LT_USB 0x20
#define PS2E_LT_FIREWIRE 0x40
// PS2EgetLibVersion2 (high 16 bits)
#define PS2E_GS_VERSION 0x0006
#define PS2E_PAD_VERSION 0x0002
#define PS2E_SPU2_VERSION 0x0004
#define PS2E_CDVD_VERSION 0x0005
#define PS2E_DEV9_VERSION 0x0003
#define PS2E_USB_VERSION 0x0003
#define PS2E_FIREWIRE_VERSION 0x0002
#ifdef COMMONdefs
u32 CALLBACK PS2EgetLibType(void);
u32 CALLBACK PS2EgetLibVersion2(u32 type);
char* CALLBACK PS2EgetLibName(void);
#endif
// key values:
/* key values must be OS dependant:
win32: the VK_XXX will be used (WinUser)
linux: the XK_XXX will be used (XFree86)
*/
// event values:
#define KEYPRESS 1
#define KEYRELEASE 2
typedef struct {
u32 key;
u32 event;
} keyEvent;
typedef struct {
u8 ctrl:4; // control and mode bits
u8 mode:4; // control and mode bits
u8 trackNum; // current track number (1 to 99)
u8 trackIndex; // current index within track (0 to 99)
u8 trackM; // current minute location on the disc (BCD encoded)
u8 trackS; // current sector location on the disc (BCD encoded)
u8 trackF; // current frame location on the disc (BCD encoded)
u8 pad; // unused
u8 discM; // current minute offset from first track (BCD encoded)
u8 discS; // current sector offset from first track (BCD encoded)
u8 discF; // current frame offset from first track (BCD encoded)
} cdvdSubQ;
typedef struct { // NOT bcd coded
u32 lsn;
u8 type;
} cdvdTD;
typedef struct {
u8 strack; //number of the first track (usually 1)
u8 etrack; //number of the last track
} cdvdTN;
// CDVDreadTrack mode values:
#define CDVD_MODE_2352 0 // full 2352 bytes
#define CDVD_MODE_2340 1 // skip sync (12) bytes
#define CDVD_MODE_2328 2 // skip sync+head+sub (24) bytes
#define CDVD_MODE_2048 3 // skip sync+head+sub (24) bytes
#define CDVD_MODE_2368 4 // full 2352 bytes + 16 subq
// CDVDgetDiskType returns:
#define CDVD_TYPE_ILLEGAL 0xff // Illegal Disc
#define CDVD_TYPE_DVDV 0xfe // DVD Video
#define CDVD_TYPE_CDDA 0xfd // Audio CD
#define CDVD_TYPE_PS2DVD 0x14 // PS2 DVD
#define CDVD_TYPE_PS2CDDA 0x13 // PS2 CD (with audio)
#define CDVD_TYPE_PS2CD 0x12 // PS2 CD
#define CDVD_TYPE_PSCDDA 0x11 // PS CD (with audio)
#define CDVD_TYPE_PSCD 0x10 // PS CD
#define CDVD_TYPE_UNKNOWN 0x05 // Unknown
#define CDVD_TYPE_DETCTDVDD 0x04 // Detecting Dvd Dual Sided
#define CDVD_TYPE_DETCTDVDS 0x03 // Detecting Dvd Single Sided
#define CDVD_TYPE_DETCTCD 0x02 // Detecting Cd
#define CDVD_TYPE_DETCT 0x01 // Detecting
#define CDVD_TYPE_NODISC 0x00 // No Disc
// CDVDgetTrayStatus returns:
#define CDVD_TRAY_CLOSE 0x00
#define CDVD_TRAY_OPEN 0x01
// cdvdTD.type (track types for cds)
#define CDVD_AUDIO_TRACK 0x01
#define CDVD_MODE1_TRACK 0x41
#define CDVD_MODE2_TRACK 0x61
#define CDVD_AUDIO_MASK 0x00
#define CDVD_DATA_MASK 0x40
// CDROM_DATA_TRACK 0x04 //do not enable this! (from linux kernel)
typedef void (*DEV9callback)(int cycles);
typedef int (*DEV9handler)(void);
typedef void (*USBcallback)(int cycles);
typedef int (*USBhandler)(void);
// freeze modes:
#define FREEZE_LOAD 0
#define FREEZE_SAVE 1
#define FREEZE_SIZE 2
typedef struct {
int size;
s8 *data;
} freezeData;
typedef struct {
char name[8];
void *common;
} GSdriverInfo;
#ifdef __WIN32__
typedef struct { // unsupported values must be set to zero
HWND hWnd;
HMENU hMenu;
HWND hStatusWnd;
} winInfo;
#endif
/* GS plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef GSdefs
// basic funcs
s32 CALLBACK GSinit();
s32 CALLBACK GSopen(void *pDsp, char *Title);
void CALLBACK GSclose();
void CALLBACK GSshutdown();
void CALLBACK GSvsync();
void CALLBACK GSgifTransfer1(u32 *pMem, u32 addr);
void CALLBACK GSgifTransfer2(u32 *pMem, u32 size);
void CALLBACK GSgifTransfer3(u32 *pMem, u32 size);
void CALLBACK GSwrite8(u32 mem, u8 value);
void CALLBACK GSwrite16(u32 mem, u16 value);
void CALLBACK GSwrite32(u32 mem, u32 value);
void CALLBACK GSwrite64(u32 mem, u64 value);
u8 CALLBACK GSread8(u32 mem);
u16 CALLBACK GSread16(u32 mem);
u32 CALLBACK GSread32(u32 mem);
u64 CALLBACK GSread64(u32 mem);
void CALLBACK GSreadFIFO(u64 *mem);
// extended funcs
// GSkeyEvent gets called when there is a keyEvent from the PAD plugin
void CALLBACK GSkeyEvent(keyEvent *ev);
void CALLBACK GSmakeSnapshot(char *path);
void CALLBACK GSirqCallback(void (*callback)());
void CALLBACK GSprintf(int timeout, char *fmt, ...);
void CALLBACK GSsetCSR(u64 *csr);
void CALLBACK GSgetDriverInfo(GSdriverInfo *info);
#ifdef __WIN32__
s32 CALLBACK GSsetWindowInfo(winInfo *info);
#endif
s32 CALLBACK GSfreeze(int mode, freezeData *data);
void CALLBACK GSconfigure();
void CALLBACK GSabout();
s32 CALLBACK GStest();
#endif
/* PAD plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef PADdefs
// basic funcs
s32 CALLBACK PADinit(u32 flags);
s32 CALLBACK PADopen(void *pDsp);
void CALLBACK PADclose();
void CALLBACK PADshutdown();
// PADkeyEvent is called every vsync (return NULL if no event)
keyEvent* CALLBACK PADkeyEvent();
u8 CALLBACK PADstartPoll(int pad);
u8 CALLBACK PADpoll(u8 value);
// returns: 1 if supported pad1
// 2 if supported pad2
// 3 if both are supported
u32 CALLBACK PADquery();
// extended funcs
void CALLBACK PADgsDriverInfo(GSdriverInfo *info);
void CALLBACK PADconfigure();
void CALLBACK PADabout();
s32 CALLBACK PADtest();
#endif
/* SPU2 plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef SPU2defs
// basic funcs
s32 CALLBACK SPU2init();
s32 CALLBACK SPU2open(void *pDsp);
void CALLBACK SPU2close();
void CALLBACK SPU2shutdown();
void CALLBACK SPU2write(u32 mem, u16 value);
u16 CALLBACK SPU2read(u32 mem);
void CALLBACK SPU2readDMA4Mem(u16 *pMem, int size);
void CALLBACK SPU2writeDMA4Mem(u16 *pMem, int size);
void CALLBACK SPU2interruptDMA4();
void CALLBACK SPU2readDMA7Mem(u16* pMem, int size);
void CALLBACK SPU2writeDMA7Mem(u16 *pMem, int size);
void CALLBACK SPU2interruptDMA7();
void CALLBACK SPU2irqCallback(void (*callback)());
// extended funcs
void CALLBACK SPU2async(u32 cycles);
s32 CALLBACK SPU2freeze(int mode, freezeData *data);
void CALLBACK SPU2configure();
void CALLBACK SPU2about();
s32 CALLBACK SPU2test();
#endif
/* CDVD plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef CDVDdefs
// basic funcs
s32 CALLBACK CDVDinit();
s32 CALLBACK CDVDopen();
void CALLBACK CDVDclose();
void CALLBACK CDVDshutdown();
s32 CALLBACK CDVDreadTrack(u32 lsn, int mode);
// return can be NULL (for async modes)
u8* CALLBACK CDVDgetBuffer();
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ* subq);//read subq from disc (only cds have subq data)
s32 CALLBACK CDVDgetTN(cdvdTN *Buffer); //disk information
s32 CALLBACK CDVDgetTD(u8 Track, cdvdTD *Buffer); //track info: min,sec,frame,type
s32 CALLBACK CDVDgetTOC(void* toc); //gets ps2 style toc from disc
s32 CALLBACK CDVDgetDiskType(); //CDVD_TYPE_xxxx
s32 CALLBACK CDVDgetTrayStatus(); //CDVD_TRAY_xxxx
s32 CALLBACK CDVDctrlTrayOpen(); //open disc tray
s32 CALLBACK CDVDctrlTrayClose(); //close disc tray
// extended funcs
void CALLBACK CDVDconfigure();
void CALLBACK CDVDabout();
s32 CALLBACK CDVDtest();
#endif
/* DEV9 plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef DEV9defs
// basic funcs
s32 CALLBACK DEV9init();
s32 CALLBACK DEV9open(void *pDsp);
void CALLBACK DEV9close();
void CALLBACK DEV9shutdown();
u8 CALLBACK DEV9read8(u32 addr);
u16 CALLBACK DEV9read16(u32 addr);
u32 CALLBACK DEV9read32(u32 addr);
void CALLBACK DEV9write8(u32 addr, u8 value);
void CALLBACK DEV9write16(u32 addr, u16 value);
void CALLBACK DEV9write32(u32 addr, u32 value);
void CALLBACK DEV9readDMA8Mem(u32 *pMem, int size);
void CALLBACK DEV9writeDMA8Mem(u32 *pMem, int size);
// cycles = IOP cycles before calling callback,
// if callback returns 1 the irq is triggered, else not
void CALLBACK DEV9irqCallback(DEV9callback callback);
DEV9handler CALLBACK DEV9irqHandler(void);
// extended funcs
s32 CALLBACK DEV9freeze(int mode, freezeData *data);
void CALLBACK DEV9configure();
void CALLBACK DEV9about();
s32 CALLBACK DEV9test();
#endif
/* USB plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef USBdefs
// basic funcs
s32 CALLBACK USBinit();
s32 CALLBACK USBopen(void *pDsp);
void CALLBACK USBclose();
void CALLBACK USBshutdown();
u8 CALLBACK USBread8(u32 addr);
u16 CALLBACK USBread16(u32 addr);
u32 CALLBACK USBread32(u32 addr);
void CALLBACK USBwrite8(u32 addr, u8 value);
void CALLBACK USBwrite16(u32 addr, u16 value);
void CALLBACK USBwrite32(u32 addr, u32 value);
// cycles = IOP cycles before calling callback,
// if callback returns 1 the irq is triggered, else not
void CALLBACK USBirqCallback(USBcallback callback);
USBhandler CALLBACK USBirqHandler(void);
void CALLBACK USBsetRAM(void *mem);
// extended funcs
s32 CALLBACK USBfreeze(int mode, freezeData *data);
void CALLBACK USBconfigure();
void CALLBACK USBabout();
s32 CALLBACK USBtest();
#endif
/* Firewire plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef FIREWIREdefs
// basic funcs
s32 CALLBACK FireWireinit();
s32 CALLBACK FireWireopen(void *pDsp);
void CALLBACK FireWireclose();
void CALLBACK FireWireshutdown();
u32 CALLBACK FireWireread32(u32 addr);
void CALLBACK FireWirewrite32(u32 addr, u32 value);
void CALLBACK FireWireirqCallback(void (*callback)());
// extended funcs
s32 CALLBACK FireWirefreeze(int mode, freezeData *data);
void CALLBACK FireWireconfigure();
void CALLBACK FireWireabout();
s32 CALLBACK FireWiretest();
#endif
// might be useful for emulators
#ifdef PLUGINtypedefs
typedef u32 (CALLBACK* _PS2EgetLibType)(void);
typedef u32 (CALLBACK* _PS2EgetLibVersion2)(u32 type);
typedef char*(CALLBACK* _PS2EgetLibName)(void);
// GS
typedef s32 (CALLBACK* _GSinit)();
typedef s32 (CALLBACK* _GSopen)(void *pDsp, char *Title);
typedef void (CALLBACK* _GSclose)();
typedef void (CALLBACK* _GSshutdown)();
typedef void (CALLBACK* _GSvsync)();
typedef void (CALLBACK* _GSwrite8)(u32 mem, u8 value);
typedef void (CALLBACK* _GSwrite16)(u32 mem, u16 value);
typedef void (CALLBACK* _GSwrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _GSwrite64)(u32 mem, u64 value);
typedef u8 (CALLBACK* _GSread8)(u32 mem);
typedef u16 (CALLBACK* _GSread16)(u32 mem);
typedef u32 (CALLBACK* _GSread32)(u32 mem);
typedef u64 (CALLBACK* _GSread64)(u32 mem);
typedef void (CALLBACK* _GSgifTransfer1)(u32 *pMem, u32 addr);
typedef void (CALLBACK* _GSgifTransfer2)(u32 *pMem, u32 size);
typedef void (CALLBACK* _GSgifTransfer3)(u32 *pMem, u32 size);
typedef void (CALLBACK* _GSreadFIFO)(u64 *pMem);
typedef void (CALLBACK* _GSkeyEvent)(keyEvent* ev);
typedef void (CALLBACK* _GSirqCallback)(void (*callback)());
typedef void (CALLBACK* _GSprintf)(int timeout, char *fmt, ...);
typedef void (CALLBACK* _GSsetCSR)(u64 * csr);
typedef void (CALLBACK* _GSgetDriverInfo)(GSdriverInfo *info);
#ifdef __WIN32__
typedef s32 (CALLBACK* _GSsetWindowInfo)(winInfo *info);
#endif
typedef void (CALLBACK* _GSmakeSnapshot)(char *path);
typedef s32 (CALLBACK* _GSfreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _GSconfigure)();
typedef s32 (CALLBACK* _GStest)();
typedef void (CALLBACK* _GSabout)();
// PAD
typedef s32 (CALLBACK* _PADinit)(u32 flags);
typedef s32 (CALLBACK* _PADopen)(void *pDsp);
typedef void (CALLBACK* _PADclose)();
typedef void (CALLBACK* _PADshutdown)();
typedef keyEvent* (CALLBACK* _PADkeyEvent)();
typedef u8 (CALLBACK* _PADstartPoll)(int pad);
typedef u8 (CALLBACK* _PADpoll)(u8 value);
typedef u32 (CALLBACK* _PADquery)();
typedef void (CALLBACK* _PADgsDriverInfo)(GSdriverInfo *info);
typedef void (CALLBACK* _PADconfigure)();
typedef s32 (CALLBACK* _PADtest)();
typedef void (CALLBACK* _PADabout)();
// SPU2
typedef s32 (CALLBACK* _SPU2init)();
typedef s32 (CALLBACK* _SPU2open)(void *pDsp);
typedef void (CALLBACK* _SPU2close)();
typedef void (CALLBACK* _SPU2shutdown)();
typedef void (CALLBACK* _SPU2write)(u32 mem, u16 value);
typedef u16 (CALLBACK* _SPU2read)(u32 mem);
typedef void (CALLBACK* _SPU2readDMA4Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2writeDMA4Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2interruptDMA4)();
typedef void (CALLBACK* _SPU2readDMA7Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2writeDMA7Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2interruptDMA7)();
typedef void (CALLBACK* _SPU2irqCallback)(void (*callback)());
typedef void (CALLBACK* _SPU2async)(u32 cycles);
typedef s32 (CALLBACK* _SPU2freeze)(int mode, freezeData *data);
typedef void (CALLBACK* _SPU2configure)();
typedef s32 (CALLBACK* _SPU2test)();
typedef void (CALLBACK* _SPU2about)();
// CDVD
typedef s32 (CALLBACK* _CDVDinit)();
typedef s32 (CALLBACK* _CDVDopen)();
typedef void (CALLBACK* _CDVDclose)();
typedef void (CALLBACK* _CDVDshutdown)();
typedef s32 (CALLBACK* _CDVDreadTrack)(u32 lsn, int mode);
typedef u8* (CALLBACK* _CDVDgetBuffer)();
typedef s32 (CALLBACK* _CDVDreadSubQ)(u32 lsn, cdvdSubQ* subq);
typedef s32 (CALLBACK* _CDVDgetTN)(cdvdTN *Buffer);
typedef s32 (CALLBACK* _CDVDgetTD)(u8 Track, cdvdTD *Buffer);
typedef s32 (CALLBACK* _CDVDgetTOC)(void* toc);
typedef s32 (CALLBACK* _CDVDgetDiskType)();
typedef s32 (CALLBACK* _CDVDgetTrayStatus)();
typedef s32 (CALLBACK* _CDVDctrlTrayOpen)();
typedef s32 (CALLBACK* _CDVDctrlTrayClose)();
typedef void (CALLBACK* _CDVDconfigure)();
typedef s32 (CALLBACK* _CDVDtest)();
typedef void (CALLBACK* _CDVDabout)();
// DEV9
typedef s32 (CALLBACK* _DEV9init)();
typedef s32 (CALLBACK* _DEV9open)(void *pDsp);
typedef void (CALLBACK* _DEV9close)();
typedef void (CALLBACK* _DEV9shutdown)();
typedef u8 (CALLBACK* _DEV9read8)(u32 mem);
typedef u16 (CALLBACK* _DEV9read16)(u32 mem);
typedef u32 (CALLBACK* _DEV9read32)(u32 mem);
typedef void (CALLBACK* _DEV9write8)(u32 mem, u8 value);
typedef void (CALLBACK* _DEV9write16)(u32 mem, u16 value);
typedef void (CALLBACK* _DEV9write32)(u32 mem, u32 value);
typedef void (CALLBACK* _DEV9readDMA8Mem)(u32 *pMem, int size);
typedef void (CALLBACK* _DEV9writeDMA8Mem)(u32 *pMem, int size);
typedef void (CALLBACK* _DEV9irqCallback)(DEV9callback callback);
typedef DEV9handler (CALLBACK* _DEV9irqHandler)(void);
typedef s32 (CALLBACK* _DEV9freeze)(int mode, freezeData *data);
typedef void (CALLBACK* _DEV9configure)();
typedef s32 (CALLBACK* _DEV9test)();
typedef void (CALLBACK* _DEV9about)();
// USB
typedef s32 (CALLBACK* _USBinit)();
typedef s32 (CALLBACK* _USBopen)(void *pDsp);
typedef void (CALLBACK* _USBclose)();
typedef void (CALLBACK* _USBshutdown)();
typedef u8 (CALLBACK* _USBread8)(u32 mem);
typedef u16 (CALLBACK* _USBread16)(u32 mem);
typedef u32 (CALLBACK* _USBread32)(u32 mem);
typedef void (CALLBACK* _USBwrite8)(u32 mem, u8 value);
typedef void (CALLBACK* _USBwrite16)(u32 mem, u16 value);
typedef void (CALLBACK* _USBwrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _USBirqCallback)(USBcallback callback);
typedef USBhandler (CALLBACK* _USBirqHandler)(void);
typedef void (CALLBACK* _USBsetRAM)(void *mem);
typedef s32 (CALLBACK* _USBfreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _USBconfigure)();
typedef s32 (CALLBACK* _USBtest)();
typedef void (CALLBACK* _USBabout)();
//FireWire
typedef s32 (CALLBACK* _FireWireinit)();
typedef s32 (CALLBACK* _FireWireopen)(void *pDsp);
typedef void (CALLBACK* _FireWireclose)();
typedef void (CALLBACK* _FireWireshutdown)();
typedef u32 (CALLBACK* _FireWireread32)(u32 mem);
typedef void (CALLBACK* _FireWirewrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _FireWireirqCallback)(void (*callback)());
typedef s32 (CALLBACK* _FireWirefreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _FireWireconfigure)();
typedef s32 (CALLBACK* _FireWiretest)();
typedef void (CALLBACK* _FireWireabout)();
#endif
#ifdef PLUGINfuncs
// GS
_GSinit GSinit;
_GSopen GSopen;
_GSclose GSclose;
_GSshutdown GSshutdown;
_GSvsync GSvsync;
_GSwrite8 GSwrite8;
_GSwrite16 GSwrite16;
_GSwrite32 GSwrite32;
_GSwrite64 GSwrite64;
_GSread8 GSread8;
_GSread16 GSread16;
_GSread32 GSread32;
_GSread64 GSread64;
_GSgifTransfer1 GSgifTransfer1;
_GSgifTransfer2 GSgifTransfer2;
_GSgifTransfer3 GSgifTransfer3;
_GSreadFIFO GSreadFIFO;
_GSkeyEvent GSkeyEvent;
_GSmakeSnapshot GSmakeSnapshot;
_GSirqCallback GSirqCallback;
_GSprintf GSprintf;
_GSsetCSR GSsetCSR;
_GSgetDriverInfo GSgetDriverInfo;
#ifdef __WIN32__
_GSsetWindowInfo GSsetWindowInfo;
#endif
_GSfreeze GSfreeze;
_GSconfigure GSconfigure;
_GStest GStest;
_GSabout GSabout;
// PAD1
_PADinit PAD1init;
_PADopen PAD1open;
_PADclose PAD1close;
_PADshutdown PAD1shutdown;
_PADkeyEvent PAD1keyEvent;
_PADstartPoll PAD1startPoll;
_PADpoll PAD1poll;
_PADquery PAD1query;
_PADgsDriverInfo PAD1gsDriverInfo;
_PADconfigure PAD1configure;
_PADtest PAD1test;
_PADabout PAD1about;
// PAD2
_PADinit PAD2init;
_PADopen PAD2open;
_PADclose PAD2close;
_PADshutdown PAD2shutdown;
_PADkeyEvent PAD2keyEvent;
_PADstartPoll PAD2startPoll;
_PADpoll PAD2poll;
_PADquery PAD2query;
_PADgsDriverInfo PAD2gsDriverInfo;
_PADconfigure PAD2configure;
_PADtest PAD2test;
_PADabout PAD2about;
// SPU2
_SPU2init SPU2init;
_SPU2open SPU2open;
_SPU2close SPU2close;
_SPU2shutdown SPU2shutdown;
_SPU2write SPU2write;
_SPU2read SPU2read;
_SPU2readDMA4Mem SPU2readDMA4Mem;
_SPU2writeDMA4Mem SPU2writeDMA4Mem;
_SPU2interruptDMA4 SPU2interruptDMA4;
_SPU2readDMA7Mem SPU2readDMA7Mem;
_SPU2writeDMA7Mem SPU2writeDMA7Mem;
_SPU2interruptDMA7 SPU2interruptDMA7;
_SPU2irqCallback SPU2irqCallback;
_SPU2async SPU2async;
_SPU2freeze SPU2freeze;
_SPU2configure SPU2configure;
_SPU2test SPU2test;
_SPU2about SPU2about;
// CDVD
_CDVDinit CDVDinit;
_CDVDopen CDVDopen;
_CDVDclose CDVDclose;
_CDVDshutdown CDVDshutdown;
_CDVDreadTrack CDVDreadTrack;
_CDVDgetBuffer CDVDgetBuffer;
_CDVDreadSubQ CDVDreadSubQ;
_CDVDgetTN CDVDgetTN;
_CDVDgetTD CDVDgetTD;
_CDVDgetTOC CDVDgetTOC;
_CDVDgetDiskType CDVDgetDiskType;
_CDVDgetTrayStatus CDVDgetTrayStatus;
_CDVDctrlTrayOpen CDVDctrlTrayOpen;
_CDVDctrlTrayClose CDVDctrlTrayClose;
_CDVDconfigure CDVDconfigure;
_CDVDtest CDVDtest;
_CDVDabout CDVDabout;
// DEV9
_DEV9init DEV9init;
_DEV9open DEV9open;
_DEV9close DEV9close;
_DEV9shutdown DEV9shutdown;
_DEV9read8 DEV9read8;
_DEV9read16 DEV9read16;
_DEV9read32 DEV9read32;
_DEV9write8 DEV9write8;
_DEV9write16 DEV9write16;
_DEV9write32 DEV9write32;
_DEV9readDMA8Mem DEV9readDMA8Mem;
_DEV9writeDMA8Mem DEV9writeDMA8Mem;
_DEV9irqCallback DEV9irqCallback;
_DEV9irqHandler DEV9irqHandler;
_DEV9configure DEV9configure;
_DEV9freeze DEV9freeze;
_DEV9test DEV9test;
_DEV9about DEV9about;
// USB
_USBinit USBinit;
_USBopen USBopen;
_USBclose USBclose;
_USBshutdown USBshutdown;
_USBread8 USBread8;
_USBread16 USBread16;
_USBread32 USBread32;
_USBwrite8 USBwrite8;
_USBwrite16 USBwrite16;
_USBwrite32 USBwrite32;
_USBirqCallback USBirqCallback;
_USBirqHandler USBirqHandler;
_USBsetRAM USBsetRAM;
_USBconfigure USBconfigure;
_USBfreeze USBfreeze;
_USBtest USBtest;
_USBabout USBabout;
// FireWire
_FireWireinit FireWireinit;
_FireWireopen FireWireopen;
_FireWireclose FireWireclose;
_FireWireshutdown FireWireshutdown;
_FireWireread32 FireWireread32;
_FireWirewrite32 FireWirewrite32;
_FireWireirqCallback FireWireirqCallback;
_FireWireconfigure FireWireconfigure;
_FireWirefreeze FireWirefreeze;
_FireWiretest FireWiretest;
_FireWireabout FireWireabout;
#endif
#endif /* __PS2EDEFS_H__ */

View File

@ -1,43 +0,0 @@
#ifndef __PS2ETYPES_H__
#define __PS2ETYPES_H__
// Basic types
#if defined(__MSCW32__)
typedef __int8 s8;
typedef __int16 s16;
typedef __int32 s32;
typedef __int64 s64;
typedef unsigned __int8 u8;
typedef unsigned __int16 u16;
typedef unsigned __int32 u32;
typedef unsigned __int64 u64;
#if defined(__x86_64__)
typedef u64 uptr;
#else
typedef u32 uptr;
#endif
#elif defined(__LINUX__) || defined(__MINGW32__)
typedef char s8;
typedef short s16;
typedef int s32;
typedef long long s64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
#if defined(__x86_64__)
typedef u64 uptr;
#else
typedef u32 uptr;
#endif
#endif
#endif /* __PS2ETYPES_H__ */

View File

@ -1,66 +0,0 @@
========================================================================
MICROSOFT FOUNDATION CLASS LIBRARY : cdvddraft
========================================================================
AppWizard has created this cdvddraft DLL for you. This DLL not only
demonstrates the basics of using the Microsoft Foundation classes but
is also a starting point for writing your DLL.
This file contains a summary of what you will find in each of the files that
make up your cdvddraft DLL.
cdvddraft.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
cdvddraft.h
This is the main header file for the DLL. It declares the
CCdvddraftApp class.
cdvddraft.cpp
This is the main DLL source file. It contains the class CCdvddraftApp.
cdvddraft.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
cdvddraft.clw
This file contains information used by ClassWizard to edit existing
classes or add new classes. ClassWizard also uses this file to store
information needed to create and edit message maps and dialog data
maps and to create prototype member functions.
res\cdvddraft.rc2
This file contains resources that are not edited by Microsoft
Visual C++. You should place all resources not editable by
the resource editor in this file.
cdvddraft.def
This file contains information about the DLL that must be
provided to run with Microsoft Windows. It defines parameters
such as the name and description of the DLL. It also exports
functions from the DLL.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named cdvddraft.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////

View File

@ -1,8 +0,0 @@
// stdafx.cpp : source file that includes just the standard includes
// cdvddraft.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@ -1,41 +0,0 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__A0D50EAA_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_STDAFX_H__A0D50EAA_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC Automation classes
#endif // _AFX_NO_OLE_SUPPORT
#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT
#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__A0D50EAA_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,842 +0,0 @@
// Aspi.cpp: implementation of the aspi methods
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "cdvd.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#define MOVESCSIDWORD(pdwSrc,pdwDst) \
{\
((PBYTE)(pdwDst))[0] = ((PBYTE)(pdwSrc))[3];\
((PBYTE)(pdwDst))[1] = ((PBYTE)(pdwSrc))[2];\
((PBYTE)(pdwDst))[2] = ((PBYTE)(pdwSrc))[1];\
((PBYTE)(pdwDst))[3] = ((PBYTE)(pdwSrc))[0];\
}
#define MOVESCSIWORD(pwSrc,pwDst) \
{\
((PBYTE)(pwDst))[0] = ((PBYTE)(pwSrc))[1];\
((PBYTE)(pwDst))[1] = ((PBYTE)(pwSrc))[0];\
}
/***********************************************************/
/* ASPI Init/Shutdown related methods */
/***********************************************************/
// using MFC classes, no aspi in other systems.
int CCdvd::Aspi_CheckValidInstallation()
{
int retval = CDVD_ERROR_FAIL;
CFileStatus fstat;
TCHAR szDir[MAX_PATH];
if(GetSystemDirectory(szDir,MAX_PATH))
{
CString directory = szDir;
WIN32OSTYPE ostype = GetWin32OSType();
if(ostype != WINNTNEW && ostype != WINNTOLD)
{
if(CFile::GetStatus(directory+_T("\\wnaspi32.dll"), fstat) &&
CFile::GetStatus(directory+_T("\\winaspi.dll"), fstat) &&
CFile::GetStatus(directory+_T("\\iosubsys\\apix.vxd"), fstat))
{
retval = CDVD_ERROR_SUCCESS;
}
}
else
{
if(CFile::GetStatus(directory+_T("\\wnaspi32.dll"), fstat) &&
CFile::GetStatus(directory+_T("\\drivers\\aspi32.sys"), fstat))
{
retval = CDVD_ERROR_SUCCESS;
}
}
}
else
{
// are you crazy? o_O, no fucking windows directory? o_O
retval = CDVD_ERROR_FAIL;
}
return retval;
}
// called once to init Aspi
int CCdvd::Aspi_Init()
{
int retval = CDVD_ERROR_FAIL;
if(m_bAspiInitialized)
return CDVD_ERROR_SUCCESS;
if(Aspi_CheckValidInstallation() == CDVD_ERROR_SUCCESS)
{
if((m_hAspi = AfxLoadLibrary("WNASPI32")) != NULL)
{
SendASPI32Command = (CDROMSendASPI32Command) GetProcAddress(m_hAspi,"SendASPI32Command");
GetASPI32SupportInfo = (CDROMGetASPI32SupportInfo) GetProcAddress(m_hAspi,"GetASPI32SupportInfo");
if(SendASPI32Command != NULL &&
GetASPI32SupportInfo != NULL)
{
UI32 support_info = GetASPI32SupportInfo();
if( HIBYTE(LOWORD(support_info)) != SS_COMP &&
HIBYTE(LOWORD(support_info)) != SS_NO_ADAPTERS )
{
Aspi_Shutdown();
}
else
{
if(InitializeBuffers() == CDVD_ERROR_SUCCESS)
{
if(Aspi_ScsiBusScan() == CDVD_ERROR_SUCCESS)
{
SetCurrentBuffer(0);
m_bAspiInitialized = TRUE;
retval = CDVD_ERROR_SUCCESS;
GetNumSectors = Aspi_GetNumSectors;
GetToc = Aspi_GetToc;
// GetHeader = Aspi_GetHeader;
SetSpeed = Aspi_SetSpeed;
Stop = Aspi_Stop;
SetSectorSize = Aspi_SetSectorSize;
Play = Aspi_Play;
TestReady = Aspi_TestReady;
ReadSector = Dummy_T4;
UpdateInterfaceObject();
}
}
}
}
else
{
Aspi_Shutdown();
}
}
}
return retval;
}
// shuts down aspi
int CCdvd::Aspi_Shutdown()
{
int retval = CDVD_ERROR_SUCCESS;
// gota detect the read_mode first before i do this
// but just reset to 2048 for now.
Aspi_SetSectorSize(CDVD_SECTOR_SIZE_DVD);
// the old ASPI drivers suck shit to hell and damnation,
// freeing them up immediately after init will crash sometimes
::Sleep(200);
if(m_hAspi != NULL)
AfxFreeLibrary(m_hAspi);
m_hAspi = NULL;
SendASPI32Command = NULL;
GetASPI32SupportInfo = NULL;
GetNumSectors = Dummy_T1;
GetToc = Dummy_T1;
Stop = Dummy_T1;
Play = Dummy_T3;
TestReady = Dummy_T1;
// GetHeader = Dummy_T1;
SetSpeed = Dummy_T2;
SetSectorSize = Dummy_T2;
ReadSector = Dummy_T4;
UpdateInterfaceObject();
ShutdownBuffers();
m_bAspiInitialized = FALSE;
return retval;
}
// open a drive for reading
int CCdvd::Aspi_OpenDrive(int drv_num)
{
int retval = CDVD_ERROR_SUCCESS;
CloseDrive();
m_nCurrentDrive = drv_num;
return retval;
}
// dummy for now
int CCdvd::Aspi_CloseDrive()
{
int retval = CDVD_ERROR_SUCCESS;
m_nCurrentDrive = -1;
return retval;
}
// get srb status
int CCdvd::Aspi_GetSrbStatus(int srb_num)
{
int retval = CDVD_SRB_ERROR;
switch(m_nCurrentReadMode)
{
case CDVD_READ_MMC: retval = m_srbReadCd [srb_num].SRB_Status; break;
case CDVD_READ_SCSI10: retval = m_srbRead10 [srb_num].SRB_Status; break;
case CDVD_READ_D8: retval = m_srbReadMat [srb_num].SRB_Status; break;
case CDVD_READ_D410: retval = m_srbReadSony[srb_num].SRB_Status; break;
case CDVD_READ_D412: retval = m_srbReadNec [srb_num].SRB_Status; break;
default: break;
}
if(retval == SS_COMP) retval = CDVD_SRB_COMPLETED;
else if(retval == SS_PENDING) retval = CDVD_SRB_PENDING;
else //if(retval == SS_ERR)
retval = CDVD_SRB_ERROR;
return retval;
}
// set read mode
int CCdvd::Aspi_SetReadMode(CDVD_READ_MODE read_mode)
{
int retval = CDVD_ERROR_SUCCESS;
switch(read_mode)
{
case CDVD_READ_MMC: ReadSector = Aspi_ReadSector_mmc; break;
case CDVD_READ_SCSI10: TRACE("cdvdlib: setting scsi10 readmode.\n");
ReadSector = Aspi_ReadSector_scsi10;
if(((this)->*(SetSectorSize))((m_nMmcDataMode == CDVD_MMC_DATAMODE_RAW) ?
CDVD_SECTOR_SIZE_CD : CDVD_SECTOR_SIZE_DVD) != CDVD_ERROR_SUCCESS)
{
retval = CDVD_ERROR_FAIL;
}
break;
case CDVD_READ_D8: ReadSector = Aspi_ReadSector_matsu; break;
case CDVD_READ_D410: ReadSector = Aspi_ReadSector_sony; break;
case CDVD_READ_D412: ReadSector = Aspi_ReadSector_nec; break;
default: retval = CDVD_ERROR_FAIL; break;
}
UpdateInterfaceObject();
return retval;
}
// search for scsi adapters with c/dvd drives.
int CCdvd::Aspi_ScsiBusScan()
{
int retval = CDVD_ERROR_SUCCESS;
SRB_HAInquiry srbHAInquiry;
m_nDrives = 0;
memset(m_drvDetails, 0, CDVD_MAX_SUPPORTED_DRIVES * sizeof(ADAPTERINFO));
memset(&srbHAInquiry, 0, sizeof (SRB_HAInquiry) );
srbHAInquiry.SRB_Cmd = SC_HA_INQUIRY;
srbHAInquiry.SRB_HaId = 0;
SendASPI32Command ((LPSRB) &srbHAInquiry);
if (srbHAInquiry.SRB_Status != SS_COMP)
{
return CDVD_ERROR_FAIL;
}
UI08 HA_Count = srbHAInquiry.HA_Count;
srbHAInquiry.HA_ManagerId[16] = 0;
for (UI08 HA_num = 0; HA_num < HA_Count; HA_num++)
{
char szHA_num[10];
itoa((int) HA_num, szHA_num, 10);
memset(&srbHAInquiry, 0, sizeof(SRB_HAInquiry));
srbHAInquiry.SRB_Cmd = SC_HA_INQUIRY;
srbHAInquiry.SRB_HaId = HA_num;
SendASPI32Command ((LPSRB) &srbHAInquiry);
if (srbHAInquiry.SRB_Status != SS_COMP)
{
return CDVD_ERROR_FAIL;
}
else
{
srbHAInquiry.HA_Identifier[16] = 0;
for (UI08 SCSI_Id = 0; SCSI_Id < 8; SCSI_Id++)
{
char szSCSI_Id[10];
itoa ((int) SCSI_Id, szSCSI_Id, 10);
for(UI08 SCSI_Lun = 0; SCSI_Lun < 8; SCSI_Lun++)
{
char szSCSI_Lun[10];
itoa ((int) SCSI_Lun, szSCSI_Lun, 10);
SRB_GDEVBlock srbGDEVBlock;
memset(&srbGDEVBlock, 0, sizeof(srbGDEVBlock));
srbGDEVBlock.SRB_Cmd = SC_GET_DEV_TYPE;
srbGDEVBlock.SRB_HaId = HA_num;
srbGDEVBlock.SRB_Target = SCSI_Id;
srbGDEVBlock.SRB_Lun = SCSI_Lun;
SendASPI32Command ((LPSRB) &srbGDEVBlock);
if (srbGDEVBlock.SRB_Status != SS_COMP ||
srbGDEVBlock.SRB_DeviceType != DTYPE_CDROM) continue;
char temp[40];
if(Aspi_ScsiInquiry(HA_num, SCSI_Id, SCSI_Lun, temp) == CDVD_ERROR_SUCCESS)
{
if(m_nDrives < CDVD_MAX_SUPPORTED_DRIVES)
{
TRACE("drive %ld: [%ld:%ld:%ld] - %s %s\n", m_nDrives, HA_num, SCSI_Id, SCSI_Lun,
m_drvDetails[m_nDrives].hostname,
temp);
m_drvDetails[m_nDrives].ha = HA_num;
m_drvDetails[m_nDrives].id = SCSI_Id;
m_drvDetails[m_nDrives].lun = SCSI_Lun;
strcpy(m_drvDetails[m_nDrives].hostname, (const char*) srbHAInquiry.HA_Identifier);
strcpy(m_drvDetails[m_nDrives].name, temp);
++m_nDrives;
}
else
{
break;
}
}
else
{
retval = CDVD_ERROR_FAIL;
break;
}
}
}
}
}
return retval;
}
// retrieve ha info
int CCdvd::Aspi_ScsiInquiry(UI08 ha, UI08 id, UI08 lun, char *destination)
{
int retval = CDVD_ERROR_SUCCESS;
UI08 buffer[36];
SRB_ExecSCSICmd srb;
memset(buffer, 0x20, sizeof(buffer));
memset(&srb, 0, sizeof(SRB_ExecSCSICmd));
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = ha;
srb.SRB_Flags = SRB_DIR_IN;
srb.SRB_Target = id;
srb.SRB_Lun = lun;
srb.SRB_BufLen = 36;
srb.SRB_BufPointer = buffer;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_CDBLen = 6;
srb.CDBByte[0] = SCSI_INQUIRY;
srb.CDBByte[4] = 36; // allocation length per buffer
if (Aspi_ExecuteSrb(srb, NULL, 0) == CDVD_ERROR_SUCCESS)
{
memcpy(destination, buffer + 8, 27);
destination[27] = '\0';
}
else
{
destination[0] = '\0';
}
return retval;
}
/***********************************************************/
/* ASPI Execute SRB */
/***********************************************************/
// if HANDLE = NULL, SRB is synchronous, else its asynchronous
int CCdvd::Aspi_ExecuteSrb(SRB_ExecSCSICmd &srbExec, HANDLE *handle, int nretry)
{
int retval = CDVD_ERROR_SUCCESS;
++nretry;
// lets do sync with handle == NULL
if(handle == NULL)
{
TRACE("executing synchronous SRB.\n");
while(nretry)
{
HANDLE heventExec = CreateEvent( NULL, TRUE, FALSE, NULL );
if(heventExec) // do event based notification
{
srbExec.SRB_Flags |= SRB_EVENT_NOTIFY;
srbExec.SRB_PostProc = (LPVOID)heventExec;
DWORD dwASPIStatus = SendASPI32Command((LPSRB) &srbExec);
if(dwASPIStatus == SS_ERR)
{
CloseHandle(heventExec);
return CDVD_ERROR_FAIL;
}
if(dwASPIStatus == SS_PENDING)
{
WaitForSingleObject(heventExec, INFINITE);
}
CloseHandle(heventExec);
}
else // do shitty polling
{
SendASPI32Command((LPSRB)&srbExec);
while(srbExec.SRB_Status == SS_PENDING);
}
TRACE("SRB_Status: %ld\n", srbExec.SRB_Status);
if( srbExec.SRB_Status != SS_COMP )
{
if(nretry-- &&
(srbExec.SRB_TargStat != STATUS_CHKCOND ||
(srbExec.SenseArea[2] & 0x0F) != KEY_UNITATT) )
{
UI08 sense = srbExec.SenseArea[2] & 0x0F;
UI08 asc = srbExec.SenseArea[12];
UI08 ascq = srbExec.SenseArea[13];
TRACE("sensekey: %02Xh, %02Xh, %02Xh\n", sense, asc, ascq);
continue;
}
}
else
{
// we're done.
break;
}
}
}
else
{
TRACE("executing asynchronous SRB.\n");
ResetEvent(*handle);
srbExec.SRB_Flags |= SRB_EVENT_NOTIFY;
srbExec.SRB_PostProc = *handle;
DWORD dwASPIStatus = SendASPI32Command((LPSRB) &srbExec);
if(dwASPIStatus == SS_ERR)
{
SetEvent(*handle);
TRACE("SRB unrecoverable error.\n");
return CDVD_ERROR_FAIL;
}
if(dwASPIStatus == SS_PENDING)
{
TRACE("SRB Pending completion.\n");
return CDVD_ERROR_PENDING;
}
TRACE("SRB completed immediately.\n");
}
if(nretry == 0) retval = CDVD_ERROR_FAIL;
return retval;
}
/***********************************************************/
/* ASPI C/DVD Methods */
/***********************************************************/
// read using mmc 0xbe command
int CCdvd::Aspi_ReadSector_mmc(int sect, HANDLE *handle)
{
_ASSERT(m_bAspiInitialized == TRUE);
m_srbReadCd[m_nCurrentBuffer].SRB_Cmd = SC_EXEC_SCSI_CMD;
m_srbReadCd[m_nCurrentBuffer].SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
m_srbReadCd[m_nCurrentBuffer].SRB_Flags = SRB_DIR_IN | SRB_ENABLE_RESIDUAL_COUNT;
m_srbReadCd[m_nCurrentBuffer].SRB_Target = m_drvDetails[m_nCurrentDrive].id;
m_srbReadCd[m_nCurrentBuffer].SRB_BufPointer = m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer;
m_srbReadCd[m_nCurrentBuffer].SRB_BufLen = m_ReadBuffer[m_nCurrentBuffer].AB_BufLen;
m_srbReadCd[m_nCurrentBuffer].SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
m_srbReadCd[m_nCurrentBuffer].SRB_SenseLen = SENSE_LEN;
m_srbReadCd[m_nCurrentBuffer].SRB_CDBLen = 12;
m_srbReadCd[m_nCurrentBuffer].CDBByte[0] = 0xBE;
m_srbReadCd[m_nCurrentBuffer].CDBByte[1] = 0x00;
m_srbReadCd[m_nCurrentBuffer].CDBByte[2] = HIBYTE(HIWORD(sect));
m_srbReadCd[m_nCurrentBuffer].CDBByte[3] = LOBYTE(HIWORD(sect));
m_srbReadCd[m_nCurrentBuffer].CDBByte[4] = HIBYTE(LOWORD(sect));
m_srbReadCd[m_nCurrentBuffer].CDBByte[5] = LOBYTE(LOWORD(sect));
m_srbReadCd[m_nCurrentBuffer].CDBByte[6] = 0x00;
m_srbReadCd[m_nCurrentBuffer].CDBByte[7] = 0x00;
m_srbReadCd[m_nCurrentBuffer].CDBByte[8] = CDVD_NUM_SECTORS_PER_BUFF;
m_srbReadCd[m_nCurrentBuffer].CDBByte[9] = (UI08) m_nMmcDataMode;
m_srbReadCd[m_nCurrentBuffer].CDBByte[10] = 0x00;
m_srbReadCd[m_nCurrentBuffer].CDBByte[11] = 0x00;
return Aspi_ExecuteSrb(m_srbReadCd[m_nCurrentBuffer], handle, CDVD_MAX_RETRY);
}
// read using scsi-10 (0x28) command, size is dependent on SetSectorSize
int CCdvd::Aspi_ReadSector_scsi10(int sect, HANDLE *handle)
{
_ASSERT(m_bAspiInitialized == TRUE);
m_srbRead10[m_nCurrentBuffer].SRB_Cmd = SC_EXEC_SCSI_CMD;
m_srbRead10[m_nCurrentBuffer].SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
m_srbRead10[m_nCurrentBuffer].SRB_Flags = SRB_DIR_IN;// | SRB_ENABLE_RESIDUAL_COUNT;
m_srbRead10[m_nCurrentBuffer].SRB_Target = m_drvDetails[m_nCurrentDrive].id;
m_srbRead10[m_nCurrentBuffer].SRB_BufPointer = m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer;
m_srbRead10[m_nCurrentBuffer].SRB_BufLen = m_ReadBuffer[m_nCurrentBuffer].AB_BufLen;
m_srbRead10[m_nCurrentBuffer].SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
m_srbRead10[m_nCurrentBuffer].SRB_SenseLen = SENSE_LEN;
m_srbRead10[m_nCurrentBuffer].SRB_CDBLen = 10;
m_srbRead10[m_nCurrentBuffer].CDBByte[0] = 0x28;
m_srbRead10[m_nCurrentBuffer].CDBByte[1] = 0x00;
m_srbRead10[m_nCurrentBuffer].CDBByte[2] = HIBYTE(HIWORD(sect));
m_srbRead10[m_nCurrentBuffer].CDBByte[3] = LOBYTE(HIWORD(sect));
m_srbRead10[m_nCurrentBuffer].CDBByte[4] = HIBYTE(LOWORD(sect));
m_srbRead10[m_nCurrentBuffer].CDBByte[5] = LOBYTE(LOWORD(sect));
m_srbRead10[m_nCurrentBuffer].CDBByte[6] = 0x00;
m_srbRead10[m_nCurrentBuffer].CDBByte[7] = 0x00;
m_srbRead10[m_nCurrentBuffer].CDBByte[8] = CDVD_NUM_SECTORS_PER_BUFF;
m_srbRead10[m_nCurrentBuffer].CDBByte[9] = 0x00;
return Aspi_ExecuteSrb(m_srbRead10[m_nCurrentBuffer], handle, CDVD_MAX_RETRY);
}
// read using proprietary matsushita command, heck if it works
int CCdvd::Aspi_ReadSector_matsu(int sect, HANDLE *handle)
{
_ASSERT(m_bAspiInitialized == TRUE);
m_srbReadMat[m_nCurrentBuffer].SRB_Cmd = SC_EXEC_SCSI_CMD;
m_srbReadMat[m_nCurrentBuffer].SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
m_srbReadMat[m_nCurrentBuffer].SRB_Flags = SRB_DIR_IN | SRB_ENABLE_RESIDUAL_COUNT;
m_srbReadMat[m_nCurrentBuffer].SRB_Target = m_drvDetails[m_nCurrentDrive].id;
m_srbReadMat[m_nCurrentBuffer].SRB_BufPointer = m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer;
m_srbReadMat[m_nCurrentBuffer].SRB_BufLen = m_ReadBuffer[m_nCurrentBuffer].AB_BufLen;
m_srbReadMat[m_nCurrentBuffer].SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
m_srbReadMat[m_nCurrentBuffer].SRB_SenseLen = SENSE_LEN;
m_srbReadMat[m_nCurrentBuffer].SRB_CDBLen = 12;
m_srbReadMat[m_nCurrentBuffer].CDBByte[0] = 0xd4;
m_srbReadMat[m_nCurrentBuffer].CDBByte[1] = 0x00;
m_srbReadMat[m_nCurrentBuffer].CDBByte[2] = HIBYTE(HIWORD(sect));
m_srbReadMat[m_nCurrentBuffer].CDBByte[3] = LOBYTE(HIWORD(sect));
m_srbReadMat[m_nCurrentBuffer].CDBByte[4] = HIBYTE(LOWORD(sect));
m_srbReadMat[m_nCurrentBuffer].CDBByte[5] = LOBYTE(LOWORD(sect));
m_srbReadMat[m_nCurrentBuffer].CDBByte[6] = 0x00;
m_srbReadMat[m_nCurrentBuffer].CDBByte[7] = 0x00;
m_srbReadMat[m_nCurrentBuffer].CDBByte[8] = CDVD_NUM_SECTORS_PER_BUFF;
m_srbReadMat[m_nCurrentBuffer].CDBByte[9] = 0x00;
m_srbReadMat[m_nCurrentBuffer].CDBByte[10] = 0x00;
m_srbReadMat[m_nCurrentBuffer].CDBByte[11] = 0x00;
return Aspi_ExecuteSrb(m_srbReadMat[m_nCurrentBuffer], handle, CDVD_MAX_RETRY);
}
// read using proprietary sony command, heck if it works
int CCdvd::Aspi_ReadSector_sony(int sect, HANDLE *handle)
{
_ASSERT(m_bAspiInitialized == TRUE);
m_srbReadSony[m_nCurrentBuffer].SRB_Cmd = SC_EXEC_SCSI_CMD;
m_srbReadSony[m_nCurrentBuffer].SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
m_srbReadSony[m_nCurrentBuffer].SRB_Flags = SRB_DIR_IN | SRB_ENABLE_RESIDUAL_COUNT;
m_srbReadSony[m_nCurrentBuffer].SRB_Target = m_drvDetails[m_nCurrentDrive].id;
m_srbReadSony[m_nCurrentBuffer].SRB_BufPointer = m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer;
m_srbReadSony[m_nCurrentBuffer].SRB_BufLen = m_ReadBuffer[m_nCurrentBuffer].AB_BufLen;
m_srbReadSony[m_nCurrentBuffer].SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
m_srbReadSony[m_nCurrentBuffer].SRB_SenseLen = SENSE_LEN;
m_srbReadSony[m_nCurrentBuffer].SRB_CDBLen = 12;
m_srbReadSony[m_nCurrentBuffer].CDBByte[0] = 0xd8;
m_srbReadSony[m_nCurrentBuffer].CDBByte[1] = 0x00;
m_srbReadSony[m_nCurrentBuffer].CDBByte[2] = HIBYTE(HIWORD(sect));
m_srbReadSony[m_nCurrentBuffer].CDBByte[3] = LOBYTE(HIWORD(sect));
m_srbReadSony[m_nCurrentBuffer].CDBByte[4] = HIBYTE(LOWORD(sect));
m_srbReadSony[m_nCurrentBuffer].CDBByte[5] = LOBYTE(LOWORD(sect));
m_srbReadSony[m_nCurrentBuffer].CDBByte[6] = 0x00;
m_srbReadSony[m_nCurrentBuffer].CDBByte[7] = 0x00;
m_srbReadSony[m_nCurrentBuffer].CDBByte[8] = CDVD_NUM_SECTORS_PER_BUFF;
m_srbReadSony[m_nCurrentBuffer].CDBByte[9] = 0x00;
m_srbReadSony[m_nCurrentBuffer].CDBByte[10] = 0x00;
m_srbReadSony[m_nCurrentBuffer].CDBByte[11] = 0x00;
return Aspi_ExecuteSrb(m_srbReadSony[m_nCurrentBuffer], handle, CDVD_MAX_RETRY);
}
// read using proprietary nec command, heck if it works
int CCdvd::Aspi_ReadSector_nec(int sect, HANDLE *handle)
{
_ASSERT(m_bAspiInitialized == TRUE);
m_srbReadNec[m_nCurrentBuffer].SRB_Cmd = SC_EXEC_SCSI_CMD;
m_srbReadNec[m_nCurrentBuffer].SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
m_srbReadNec[m_nCurrentBuffer].SRB_Flags = SRB_DIR_IN | SRB_ENABLE_RESIDUAL_COUNT;
m_srbReadNec[m_nCurrentBuffer].SRB_Target = m_drvDetails[m_nCurrentDrive].id;
m_srbReadNec[m_nCurrentBuffer].SRB_BufPointer = m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer;
m_srbReadNec[m_nCurrentBuffer].SRB_BufLen = m_ReadBuffer[m_nCurrentBuffer].AB_BufLen;
m_srbReadNec[m_nCurrentBuffer].SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
m_srbReadNec[m_nCurrentBuffer].SRB_SenseLen = SENSE_LEN;
m_srbReadNec[m_nCurrentBuffer].SRB_CDBLen = 10;
m_srbReadNec[m_nCurrentBuffer].CDBByte[0] = 0xd4;
m_srbReadNec[m_nCurrentBuffer].CDBByte[1] = 0x00;
m_srbReadNec[m_nCurrentBuffer].CDBByte[2] = HIBYTE(HIWORD(sect));
m_srbReadNec[m_nCurrentBuffer].CDBByte[3] = LOBYTE(HIWORD(sect));
m_srbReadNec[m_nCurrentBuffer].CDBByte[4] = HIBYTE(LOWORD(sect));
m_srbReadNec[m_nCurrentBuffer].CDBByte[5] = LOBYTE(LOWORD(sect));
m_srbReadNec[m_nCurrentBuffer].CDBByte[6] = 0x00;
m_srbReadNec[m_nCurrentBuffer].CDBByte[7] = 0x00;
m_srbReadNec[m_nCurrentBuffer].CDBByte[8] = CDVD_NUM_SECTORS_PER_BUFF;
m_srbReadNec[m_nCurrentBuffer].CDBByte[9] = 0x00;
return Aspi_ExecuteSrb(m_srbReadNec[m_nCurrentBuffer], handle, CDVD_MAX_RETRY);
}
// retrieve number of sectors present in c/dvd media
int CCdvd::Aspi_GetNumSectors()
{
_ASSERT(m_bAspiInitialized == TRUE);
SRB_ExecSCSICmd srb;
UI08 capacity[8];
UI32 max_sector;
memset(&srb, 0, sizeof(SRB_ExecSCSICmd));
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Flags = SRB_DIR_IN;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_BufLen = 8;
srb.SRB_BufPointer = capacity;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_CDBLen = 10;
srb.CDBByte[0] = SCSI_RD_CAPAC;
if(Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY)
!= CDVD_ERROR_SUCCESS)
return 0; // no sectors found
MOVESCSIDWORD(&capacity[0], &max_sector);
return max_sector+1;
}
// retrieve TOC data
int CCdvd::Aspi_GetToc()
{
_ASSERT(m_bAspiInitialized == TRUE);
SRB_ExecSCSICmd srb;
UI08 buff[804];
memset(buff, 0, sizeof(buff));
memset (&srb, 0, sizeof(SRB_ExecSCSICmd));
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_Flags = SRB_DIR_IN;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_BufPointer = buff;
srb.SRB_BufLen = sizeof(buff);
srb.SRB_CDBLen = 10;
srb.CDBByte[0] = SCSI_READ_TOC;
srb.CDBByte[6] = 0;
srb.CDBByte[7] = 0x03;
srb.CDBByte[8] = 0x24;
if(Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY)
!= CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
if(ExtractTocData(buff) != CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
return CDVD_ERROR_SUCCESS;
}
// set cdrom speed
int CCdvd::Aspi_SetSpeed(int speed)
{
_ASSERT(m_bAspiInitialized == TRUE);
SRB_ExecSCSICmd srb;
UI16 kbSpeed = 0xFFFF;
switch(speed)
{
case 0: kbSpeed = 0xFFFF; break;
case 1: kbSpeed = 176; break;
case 2: kbSpeed = 353; break;
case 3: kbSpeed = 528; break;
case 4: kbSpeed = 706; break;
case 5: kbSpeed = 1400; break;
case 6: kbSpeed = 2800; break;
default: kbSpeed = 0xFFFF; break; // max
}
memset(&srb,0,sizeof(srb));
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_Flags = SRB_DIR_OUT; //|SRB_ENABLE_RESIDUAL_COUNT;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_CDBLen = 12;
srb.CDBByte[0] = 0xBB;
srb.CDBByte[2] = HIBYTE(kbSpeed);
srb.CDBByte[3] = LOBYTE(kbSpeed);
return Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY);
}
// used for scsi only, sets sector size (i.e, 2352, 2048)
int CCdvd::Aspi_SetSectorSize(int sect_size)
{
_ASSERT(m_bAspiInitialized == TRUE);
TRACE("sectorsize: %ld\n", sect_size);
MODESELHEADER mh;
SRB_ExecSCSICmd srb;
memset (&srb, 0, sizeof(SRB_ExecSCSICmd));
memset (&mh, 0, sizeof(MODESELHEADER));
mh.block_desc_length = 0x08;
mh.block_length_med = HIBYTE(LOWORD(sect_size));
mh.block_length_lo = LOBYTE(LOWORD(sect_size));
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_Flags = SRB_DIR_OUT;
srb.SRB_BufLen = sizeof(mh);
srb.SRB_BufPointer = (UI08 *) &mh;
srb.SRB_CDBLen = 6;
srb.CDBByte[0] = 0x15;
srb.CDBByte[1] = 0x10;
srb.CDBByte[4] = 0x0C;
return Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY);
}
// start cddda playback, dunno if it works right really.. :p
int CCdvd::Aspi_Play(int sect_start, int sect_stop)
{
_ASSERT(m_bAspiInitialized == TRUE);
SRB_ExecSCSICmd srb;
memset( &srb, 0, sizeof(SRB_ExecSCSICmd) );
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_Flags = SRB_DIR_IN;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_CDBLen = 12;
srb.CDBByte[0] = 0xa5;
srb.CDBByte[2] = HIBYTE(HIWORD(sect_start));
srb.CDBByte[3] = LOBYTE(HIWORD(sect_start));
srb.CDBByte[4] = HIBYTE(LOWORD(sect_start));
srb.CDBByte[5] = LOBYTE(LOWORD(sect_start));
srb.CDBByte[6] = HIBYTE(HIWORD(sect_stop));
srb.CDBByte[7] = LOBYTE(HIWORD(sect_stop));
srb.CDBByte[8] = HIBYTE(LOWORD(sect_stop));
srb.CDBByte[9] = LOBYTE(LOWORD(sect_stop));
// srb.CDBByte[10] = 0x8F;
return Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY);
}
// stop cdda playback, dunno if it works right really.. :p
int CCdvd::Aspi_Stop()
{
_ASSERT(m_bAspiInitialized == TRUE);
SRB_ExecSCSICmd srb;
memset(&srb, 0, sizeof(SRB_ExecSCSICmd));
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_Flags = SRB_DIR_IN;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_CDBLen = 10;
srb.CDBByte[0] = 0x4E;
return Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY);
}
// detect if media/LUN is ready, legacy command,
// can prolly be substituted with GetMediaType(), with some modifs
int CCdvd::Aspi_TestReady()
{
SRB_ExecSCSICmd srb;
memset (&srb, 0, sizeof(SRB_ExecSCSICmd));
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_CDBLen = 6;
srb.CDBByte[0] = SCSI_TST_U_RDY;
return Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY);
}
// retrieve feature details
int CCdvd::Aspi_GetConfiguration(UI16 feature, UI08 *dest, UI32 dest_size)
{
_ASSERT(m_bAspiInitialized == TRUE);
int retval = CDVD_ERROR_SUCCESS;
SRB_ExecSCSICmd srb;
memset(&srb, 0, sizeof(SRB_ExecSCSICmd));
memset(dest, 0, dest_size);
srb.SRB_Cmd = SC_EXEC_SCSI_CMD;
srb.SRB_HaId = m_drvDetails[m_nCurrentDrive].ha;
srb.SRB_Target = m_drvDetails[m_nCurrentDrive].id;
srb.SRB_Lun = m_drvDetails[m_nCurrentDrive].lun;
srb.SRB_Flags = SRB_DIR_IN;
srb.SRB_SenseLen = SENSE_LEN;
srb.SRB_BufPointer = dest;
srb.SRB_BufLen = dest_size;
srb.SRB_CDBLen = 12;
srb.CDBByte[0] = 0x46;
srb.CDBByte[1] = 0x02; // return a single feature set ONLY.
srb.CDBByte[2] = HIBYTE(feature);
srb.CDBByte[3] = LOBYTE(feature);
srb.CDBByte[7] = HIBYTE(dest_size);
srb.CDBByte[8] = LOBYTE(dest_size);
return Aspi_ExecuteSrb(srb, NULL, CDVD_MAX_RETRY);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1,616 +0,0 @@
// Cdvd.cpp: implementation of the CCdvd class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Cdvd.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#if defined(CDVD_SIMPLE_INTERFACE)
// our fuckup method of interfacing ;p
CCdvd OBJECT_HOLDER_CDVD;
CDVD_INTF_FUNC_T1 FUNCTION_GETNUMSECTORS;
CDVD_INTF_FUNC_T1 FUNCTION_GETTOC;
CDVD_INTF_FUNC_T1 FUNCTION_TESTREADY;
CDVD_INTF_FUNC_T2 FUNCTION_SETSPEED;
CDVD_INTF_FUNC_T1 FUNCTION_STOP;
CDVD_INTF_FUNC_T2 FUNCTION_SETSECTORSIZE;
CDVD_INTF_FUNC_T3 FUNCTION_PLAY;
CDVD_INTF_FUNC_T4 FUNCTION_READSECTOR;
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CCdvd::CCdvd()
{
m_hIoctlDrv = NULL;
m_hAspi = NULL;
m_bAspiInitialized = FALSE;
m_bIoctlInitialized = FALSE;
m_bDriveOpened = FALSE;
m_nCurrentDrive = -1;
m_nCurrentBuffer = 0;
m_nDrives = 0;
m_IntfType = CDVD_INTF_UNKNOWN;
m_nMmcDataMode = CDVD_MMC_DATAMODE_RAW;
m_nCurrentReadMode = CDVD_READ_MMC;
memset(m_drvDetails, 0, CDVD_MAX_SUPPORTED_DRIVES * sizeof(ADAPTERINFO));
memset(m_srbReadCd, 0, CDVD_NUM_BUFFERS * sizeof(SRB_ExecSCSICmd));
memset(m_srbRead10, 0, CDVD_NUM_BUFFERS * sizeof(SRB_ExecSCSICmd));
memset(m_srbReadMat, 0, CDVD_NUM_BUFFERS * sizeof(SRB_ExecSCSICmd));
memset(m_srbReadSony, 0, CDVD_NUM_BUFFERS * sizeof(SRB_ExecSCSICmd));
memset(m_srbReadNec, 0, CDVD_NUM_BUFFERS * sizeof(SRB_ExecSCSICmd));
memset(m_sptwbReadCd, 0, CDVD_NUM_BUFFERS * sizeof(SPTD_WITH_SENSE_BUFF));
memset(m_sptwbRead10, 0, CDVD_NUM_BUFFERS * sizeof(SPTD_WITH_SENSE_BUFF));
memset(m_sptwbReadMat, 0, CDVD_NUM_BUFFERS * sizeof(SPTD_WITH_SENSE_BUFF));
memset(m_sptwbReadSony, 0, CDVD_NUM_BUFFERS * sizeof(SPTD_WITH_SENSE_BUFF));
memset(m_sptwbReadNec, 0, CDVD_NUM_BUFFERS * sizeof(SPTD_WITH_SENSE_BUFF));
memset(&m_tocDetails, 0, sizeof(TOCDATA));
GetNumSectors = Dummy_T1;
GetToc = Dummy_T1;
Stop = Dummy_T1;
Play = Dummy_T3;
TestReady = Dummy_T1;
// GetHeader = Dummy_T1;
SetSpeed = Dummy_T2;
SetSectorSize = Dummy_T2;
ReadSector = Dummy_T4;
UpdateInterfaceObject();
}
CCdvd::~CCdvd()
{
CloseDrive();
Shutdown();
}
// based on msdn example
WIN32OSTYPE CCdvd::GetWin32OSType()
{
WIN32OSTYPE wintype;
UI32 version;
OSVERSIONINFO *osvi;
version = GetVersion();
if(version < 0x80000000)
{
osvi = (OSVERSIONINFO *) malloc(sizeof(OSVERSIONINFO));
if (osvi)
{
memset(osvi, 0, sizeof(OSVERSIONINFO));
osvi->dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(osvi);
if (osvi->dwMajorVersion >= 4L)
wintype = WINNTNEW;
else
wintype = WINNTOLD;
free(osvi);
}
}
else if (LOBYTE(LOWORD(version)) < 4L)
wintype = WIN32S;
else
wintype = WIN95;
return wintype;
}
// Initializes an interface, only one should be initialized. :)
int CCdvd::Init(CDVD_INTERFACE_TYPE intf_type)
{
int retval = CDVD_ERROR_SUCCESS;
switch(intf_type)
{
case CDVD_INTF_ASPI:
m_IntfType = CDVD_INTF_ASPI;
Aspi_Init();
break;
//case CDVD_INTF_IOCTL:
// m_IntfType = CDVD_INTF_IOCTL;
// Ioctl_Init();
// break;
case CDVD_INTF_UNKNOWN:
if(m_bAspiInitialized)
retval = CDVD_INTF_ASPI;
else
if(m_bIoctlInitialized) retval = CDVD_INTF_IOCTL;
else
retval = CDVD_INTF_UNKNOWN;
break;
default:
retval = CDVD_ERROR_FAIL;
break;
}
return retval;
}
// shutsdown previously opened interface
int CCdvd::Shutdown()
{
int retval = CDVD_ERROR_SUCCESS;
switch(m_IntfType)
{
case CDVD_INTF_ASPI:
Aspi_Shutdown();
break;
//case CDVD_INTF_IOCTL:
// Ioctl_Shutdown();
// break;
default: break;
}
m_IntfType = CDVD_INTF_UNKNOWN;
return retval;
}
// retrieve number of c/dvd drives
int CCdvd::GetNumDrives() const
{
return m_nDrives;
}
// open a drive for reading
int CCdvd::OpenDrive(int drv_num)
{
int retval = CDVD_ERROR_FAIL;
_ASSERT(drv_num < CDVD_MAX_SUPPORTED_DRIVES);
// run-time check, for now.
if(drv_num > (int) m_nDrives)
return CDVD_ERROR_FAIL;
m_bDriveOpened = FALSE;
switch(m_IntfType)
{
case CDVD_INTF_ASPI:
if(Aspi_OpenDrive(drv_num) == CDVD_ERROR_SUCCESS)
{
m_bDriveOpened = TRUE;
retval = CDVD_ERROR_SUCCESS;
}
break;
//case CDVD_INTF_IOCTL:
// if(Ioctl_OpenDrive(drv_num) == CDVD_ERROR_SUCCESS)
// {
// m_bDriveOpened = TRUE;
// retval = CDVD_ERROR_SUCCESS;
// }
default: break;
}
return retval;
}
// close a previously opened drive
int CCdvd::CloseDrive()
{
int retval = CDVD_ERROR_SUCCESS;
switch(m_IntfType)
{
case CDVD_INTF_ASPI: Aspi_CloseDrive(); break;
//case CDVD_INTF_IOCTL: Ioctl_CloseDrive(); break;
default: break;
}
return retval;
}
// allocate and initialize buffers for BOTH aspi and ioctl
int CCdvd::InitializeBuffers()
{
int retval = CDVD_ERROR_SUCCESS;
UI32 result = 0xFFFFFFFF;
for(int i=0; i < CDVD_NUM_BUFFERS; i++)
{
if(m_ReadBuffer[i].AB_BufPointer != NULL) continue;
m_ReadBuffer[i].AB_BufLen = CDVD_NUM_SECTORS_PER_BUFF * CDVD_SECTOR_SIZE_CD;
m_ReadBuffer[i].AB_BufPointer = (PBYTE) VirtualAlloc
(
NULL,
m_ReadBuffer[i].AB_BufLen,
MEM_COMMIT,
PAGE_READWRITE
);
result &= (UI32) m_ReadBuffer[i].AB_BufPointer;
if(m_ReadBuffer[i].AB_BufPointer != NULL)
memset(m_ReadBuffer[i].AB_BufPointer, 0, m_ReadBuffer[i].AB_BufLen);
}
if(result == 0)
{
ShutdownBuffers();
retval = CDVD_ERROR_FAIL;
TRACE("unable to allocate all buffers\n");
}
return retval;
}
// free-up previously allocated buffers
int CCdvd::ShutdownBuffers()
{
int retval = CDVD_ERROR_SUCCESS;
for(int i=0; i < CDVD_NUM_BUFFERS; i++)
{
if(m_ReadBuffer[i].AB_BufPointer != NULL)
VirtualFree( m_ReadBuffer[i].AB_BufPointer, 0, MEM_RELEASE );
m_ReadBuffer[i].AB_BufPointer = NULL;
m_ReadBuffer[i].AB_BufLen = 0;
}
return retval;
}
// set the current buffer to be used
// only 2! at the moment
int CCdvd::SetCurrentBuffer(int buf_num)
{
int retval = CDVD_ERROR_SUCCESS;
if(buf_num >= CDVD_NUM_BUFFERS)
return CDVD_ERROR_FAIL;
m_nCurrentBuffer = buf_num;
return retval;
}
// this is terribly WRONG :P, but i dont care, works most of the time :p
int CCdvd::ExtractTocData(UI08 *buffer)
{
int retval = CDVD_ERROR_SUCCESS;
LPTOCDATA pdata = (LPTOCDATA) buffer;
memcpy(&m_tocDetails, buffer, sizeof(TOCDATA));
int total_tracks = 0;
int mediatype = GetCdvdMediaType();
UI32 numRead = ((UI32) pdata->datalen_byte1) << 8 | (UI32) (pdata->datalen_byte0);
SetCurrentBuffer(0);
memset(&m_trkDetails, 0, sizeof(DECODEDTRACKINFO));
int offset = 4;
for(int i = 0; i < pdata->last_track_num; i++)
{
offset = i*8+4;
LPTOCTRACKDESCRIPTOR pdesc = (LPTOCTRACKDESCRIPTOR) (buffer + offset);
UI32 start_track = ((UI32) pdesc->lba_byte3) << 24 |
((UI32) pdesc->lba_byte2) << 16 |
((UI32) pdesc->lba_byte1) << 8 |
(UI32) pdesc->lba_byte0;
// track types, 0x00 - cdda, 0x01 - data, 0x02 - cdxa
UI08 tracktype = 0;
if(mediatype == CDVD_MEDIATYPE_DVD)
{
tracktype = 0x01; // data sector
}
else if(((this)->*(ReadSector))(start_track, NULL) == CDVD_ERROR_SUCCESS)
{
tracktype = (UI08) * (m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer+15);
}
else
{
// skip setting info for this track, and try to proceed with others
++total_tracks;
continue;
}
// okay, something is fucked.. just lie and say its a cdda :p
if(tracktype > 2) tracktype = 0;
m_trkDetails.track_offset[i] = start_track;
m_trkDetails.track_type[i] = tracktype;
TRACE("track %ld -> start_at: %ld with type: %ld\n", i, start_track, tracktype);
++total_tracks;
}
if(total_tracks) m_trkDetails.total_tracks = total_tracks;
return retval;
}
// set read mode (i.e. mmc, scsi10 etc).
// Note: only mmc and scsi10 is enabled
// i've disabled all goddamn proprietary read modes
// on this version (sony, nec, matsushita)
int CCdvd::SetReadMode(CDVD_READ_MODE read_mode, int data_mode)
{
_ASSERT(read_mode >= CDVD_READ_MMC && read_mode <= CDVD_READ_SCSI10);
m_nCurrentReadMode = read_mode;
m_nMmcDataMode = data_mode;
int retval = CDVD_ERROR_SUCCESS;
switch(m_IntfType)
{
case CDVD_INTF_ASPI:
retval = Aspi_SetReadMode(read_mode);
break;
//case CDVD_INTF_IOCTL:
// retval = Ioctl_SetReadMode();
// break;
default:
retval = CDVD_ERROR_FAIL;
break;
}
return CDVD_ERROR_SUCCESS;
}
// returns CDVD_ERROR_PENDING if SS_PENDING, CDVD_ERROR_SUCCESS if SS_COMP
// and CDVD_ERROR_FAIL if you are a dumbass and you haven't set any read_mode
int CCdvd::GetSrbStatus(int srb_num)
{
int retval = CDVD_ERROR_SUCCESS;
switch(m_IntfType)
{
case CDVD_INTF_ASPI:
retval = Aspi_GetSrbStatus(srb_num);
break;
//case CDVD_INTF_IOCTL:
// retval = Ioctl_GetSrbStatus(srb_num);
// break;
default:
retval = CDVD_ERROR_FAIL;
break;
}
return retval;
}
int CCdvd::GetCdvdConfiguration(UI16 feature, UI08 *dest, UI32 dest_size)
{
int retval = CDVD_ERROR_SUCCESS;
switch(m_IntfType)
{
case CDVD_INTF_ASPI:
retval = Aspi_GetConfiguration(feature, dest, dest_size);
break;
//case CDVD_INTF_IOCTL:
// retval = Ioctl_GetConfiguration(feature, dest, dest_size);
// break;
default:
retval = CDVD_ERROR_FAIL;
break;
}
return retval;
}
const UI16 CDVD_FEATURE_READCD = 0x001E;
const UI16 CDVD_FEATURE_READDVD = 0x001F;
// as the name says
int CCdvd::GetCdvdDriveType()
{
int drivetype = CDVD_DRIVETYPE_UNKNOWN;
UI08 buffer[1024];
UI16 feature_available = 0;
BOOL is_cdromdrive = FALSE;
BOOL is_dvddrive = FALSE;
if(GetCdvdConfiguration(CDVD_FEATURE_READCD, buffer, sizeof(buffer))
== CDVD_ERROR_SUCCESS)
{
feature_available = (UI16) buffer[8] << 8 | (UI16) buffer[9];
if(feature_available == CDVD_FEATURE_READCD)
{
is_cdromdrive = TRUE;
}
}
if(GetCdvdConfiguration(CDVD_FEATURE_READDVD, buffer, sizeof(buffer))
== CDVD_ERROR_SUCCESS)
{
feature_available = (UI16) buffer[8] << 8 | (UI16) buffer[9];
if(feature_available == CDVD_FEATURE_READDVD)
{
is_dvddrive = TRUE;
}
}
if(is_dvddrive && is_cdromdrive) drivetype = CDVD_DRIVETYPE_CDVD;
if(is_dvddrive && !is_cdromdrive) drivetype = CDVD_DRIVETYPE_DVD;
if(!is_dvddrive && is_cdromdrive) drivetype = CDVD_DRIVETYPE_CD;
return drivetype;
}
// as the naem says
int CCdvd::GetCdvdMediaType()
{
int mediatype = CDVD_MEDIATYPE_UNKNOWN;
UI08 buffer[1024];
UI08 media;
if(GetCdvdConfiguration(CDVD_FEATURE_READCD, buffer, sizeof(buffer))
== CDVD_ERROR_SUCCESS)
{
media = buffer[10] & 0x01; // current loaded media is a cdrom if "Current" bit is on
if(media)
{
return CDVD_MEDIATYPE_CD;
}
}
if(GetCdvdConfiguration(CDVD_FEATURE_READDVD, buffer, sizeof(buffer))
== CDVD_ERROR_SUCCESS)
{
media = buffer[10] & 0x01; // current loaded media is a dvd if "Current" bit is on
if(media)
{
return CDVD_MEDIATYPE_DVD;
}
}
return mediatype;
}
// automatically detect read_mode as well as set it.
int CCdvd::DetectAndSetReadMode()
{
#define CHECKMODE(m) memset(m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer, 0xCC, m_ReadBuffer[m_nCurrentBuffer].AB_BufLen); \
SetReadMode((m), m_nMmcDataMode);\
if(((this)->*(ReadSector))(0, NULL) == CDVD_ERROR_SUCCESS){\
if(*((UI32*) m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer) != 0xCCCCCCCC){\
TRACE("data: %08Xh, detected read mode: %ld\n", *((UI32*) m_ReadBuffer[m_nCurrentBuffer].AB_BufPointer), (m));\
return (m);\
}\
}
int retval = CDVD_ERROR_FAIL;
if(GetCdvdDriveType() != CDVD_DRIVETYPE_UNKNOWN)
{
int mediatype = GetCdvdMediaType();
if(mediatype != CDVD_MEDIATYPE_UNKNOWN) // no freaking media present dipshit
{
if(mediatype == CDVD_MEDIATYPE_DVD)
{
m_nMmcDataMode = CDVD_MMC_DATAMODE_USER;
}
else if(mediatype == CDVD_MEDIATYPE_CD)
{
m_nMmcDataMode = CDVD_MMC_DATAMODE_RAW;
}
// start checking which one will work;
SetCurrentBuffer(0);
// lets try scsi10 first, since scsi10/scsi12 is mandatory for dvd's
if(((this)->*(SetSectorSize))((m_nMmcDataMode == CDVD_MMC_DATAMODE_RAW) ?
CDVD_SECTOR_SIZE_CD : CDVD_SECTOR_SIZE_DVD) == CDVD_ERROR_SUCCESS)
{
CHECKMODE(CDVD_READ_SCSI10);
}
// then check for mmc
CHECKMODE(CDVD_READ_MMC);
// mmc doesnt work? lets try the others
TRACE("cdvdlib: failed to retrieve mode. \n");
// disabled all other read_modes for now.
//CHECKMODE(CDVD_READ_D8);
//CHECKMODE(CDVD_READ_D410);
//CHECKMODE(CDVD_READ_D412);
}
}
return retval;
}
// update the global interface for some magic
void CCdvd::UpdateInterfaceObject()
{
#if defined(CDVD_SIMPLE_INTERFACE)
FUNCTION_GETNUMSECTORS = GetNumSectors;
FUNCTION_GETTOC = GetToc;
FUNCTION_TESTREADY = TestReady;
FUNCTION_SETSPEED = SetSpeed;
FUNCTION_STOP = Stop;
FUNCTION_SETSECTORSIZE = SetSectorSize;
FUNCTION_PLAY = Play;
FUNCTION_READSECTOR = ReadSector;
#endif
}
TOCDATA CCdvd::GetTocData()
{
TOCDATA dummy;
if(m_nCurrentDrive == -1)
{
memset(&dummy, 0, sizeof(TOCDATA));
return dummy;
}
return m_tocDetails;
}
DECODEDTRACKINFO CCdvd::GetTrackDetail()
{
DECODEDTRACKINFO dummy;
if(m_nCurrentDrive == -1)
{
memset(&dummy, 0, sizeof(DECODEDTRACKINFO));
return dummy;
}
return m_trkDetails;
}
UI08 *CCdvd::GetBufferAddress(int buff_num) const
{
_ASSERT(buff_num < CDVD_NUM_BUFFERS);
return m_ReadBuffer[buff_num].AB_BufPointer;
}
ADAPTERINFO CCdvd::GetAdapterDetail(int drv_num)
{
_ASSERT(drv_num < CDVD_MAX_SUPPORTED_DRIVES);
ADAPTERINFO dummy;
if(m_nDrives == 0)
{
memset(&dummy, 0, sizeof(ADAPTERINFO));
return dummy;
}
return m_drvDetails[drv_num];
}
/***********************************************************/
/* DUMMY C/DVD Methods */
/***********************************************************/
int CCdvd::Dummy_T1()
{
TRACE("cdvdlib: dummy_t1\n");
return CDVD_ERROR_UNINITIALIZED;
}
int CCdvd::Dummy_T2(int a)
{
TRACE("cdvdlib: dummy_t2\n");
return CDVD_ERROR_UNINITIALIZED;
}
int CCdvd::Dummy_T3(int a, int b)
{
TRACE("cdvdlib: dummy_t3\n");
return CDVD_ERROR_UNINITIALIZED;
}
int CCdvd::Dummy_T4(int a, HANDLE *b)
{
TRACE("cdvdlib: dummy_t4\n");
return CDVD_ERROR_UNINITIALIZED;
}

View File

@ -1,252 +0,0 @@
// Cdvd.h: interface for the CCdvd class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CDVD_H__1189B8A5_BC21_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_CDVD_H__1189B8A5_BC21_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <devioctl.h>
#include <ntdddisk.h>
#include <ntddscsi.h>
#include <ntddcdrm.h>
#include "winaspi/wnaspi32.h"
#include "winaspi/scsidefs.h"
#include "constants.h"
#include "typedefs.h"
#define CDVD_SIMPLE_INTERFACE
// [normal sequence of operation]
// 1. [open]
// Init -> GetNumDrives -> OpenDrive -> SetReadMode -> (DO WHATEVER, read, toc, etc)
// 2. [close]
// CloseDrive -> Shutdown;
// 3. [synchrounous read]
// ReadSector -> (verify if successful)
// 4. [asynchronous read]
// ReadSector -> GetSrbStatus -> (verify if successful)
// CDVD class, don't complain.
class CCdvd
{
// public interfaces only
public:
int Init(CDVD_INTERFACE_TYPE intf_type); // initialize an interface, closes previously opened one.
int Shutdown(); // shutsdown an interface
int GetNumDrives() const; // get num of c/dvd drives available
int OpenDrive(int drv_num); // open a drive
int CloseDrive(); // close previously opened drive
int SetCurrentBuffer(int buf_num); // currently there are ONLY 2!
// call, when doing asynchronous requests to retrieve an srb status (i.e. buffer0 = srb0)
// the return value is only valid when an asynchronous read was previously issued
int GetSrbStatus(int srb_num);
// manually set read_mode, if mmc mode is specified, data_filter is also set.
// data_mode can be CDVD_MMC_DATAMODE_RAW / CDVD_MMC_DATAMODE_USER
// note that CDVD_MMC_DATAMODE_USER should always be used for DVD medias,
// and the only read_mode's enabled are CDVD_READ_MMC and CDVD_READ_SCSI10
// i've disabled all the other modes in this version (unlike the previous one.)
int SetReadMode(CDVD_READ_MODE read_mode, int data_mode = CDVD_MMC_DATAMODE_RAW);
// determine drive type
int GetCdvdDriveType();
// determine media type
int GetCdvdMediaType();
// automatically detect media type, read_type and set it.
// returns detected read mode, else CDVD_ERROR_FAIL if error
int DetectAndSetReadMode();
UI08 *GetBufferAddress(int buff_num) const;
CDVD_INTF_FUNC_T1 GetNumSectors;
CDVD_INTF_FUNC_T1 GetToc;
CDVD_INTF_FUNC_T1 TestReady;
CDVD_INTF_FUNC_T2 SetSpeed;
CDVD_INTF_FUNC_T1 Stop;
CDVD_INTF_FUNC_T2 SetSectorSize;
CDVD_INTF_FUNC_T3 Play;
CDVD_INTF_FUNC_T4 ReadSector;
ADAPTERINFO GetAdapterDetail(int drv_num);
// for both gettrackdetail and gettocdata
// only valid if there was previous call to GetToc;
DECODEDTRACKINFO GetTrackDetail();
TOCDATA GetTocData();
// auxilliary function
static WIN32OSTYPE GetWin32OSType();
static int Aspi_CheckValidInstallation();
protected:
int Aspi_Init();
int Aspi_Shutdown();
int Aspi_OpenDrive (int drv_num);
int Aspi_CloseDrive ();
int Aspi_GetSrbStatus (int srb_num);
int Aspi_GetNumSectors();
int Aspi_TestReady (); // legacy
int Aspi_GetToc (); // legacy
//int Aspi_GetHeader ();
int Aspi_SetSpeed (int speed);
int Aspi_Stop ();
int Aspi_SetSectorSize(int sect_size);
int Aspi_Play (int sect_start, int sect_stop);
int Aspi_SetReadMode (CDVD_READ_MODE read_mode);
// if handle is not NULL, then the read is asynchronous
int Aspi_ReadSector_mmc (int sect, HANDLE *handle = NULL);
int Aspi_ReadSector_scsi10 (int sect, HANDLE *handle = NULL);
int Aspi_ReadSector_matsu (int sect, HANDLE *handle = NULL);
int Aspi_ReadSector_sony (int sect, HANDLE *handle = NULL);
int Aspi_ReadSector_nec (int sect, HANDLE *handle = NULL);
// retrieve a configuration from the cdvd drive
int Aspi_GetConfiguration(UI16 feature, UI08 *dest, UI32 dest_size);
int Ioctl_Init();
int Ioctl_Shutdown();
int Ioctl_OpenDrive (int drv_num);
int Ioctl_CloseDrive ();
int Ioctl_GetSrbStatus (int srb_num);
int Ioctl_GetNumSectors();
int Ioctl_TestReady (); // legacy
int Ioctl_GetToc (); // legacy
//int Ioctl_GetHeader ();
int Ioctl_SetSpeed (int speed);
int Ioctl_Stop ();
int Ioctl_SetSectorSize(int sect_size);
int Ioctl_Play (int sect_start, int sect_stop);
int Ioctl_SetReadMode (CDVD_READ_MODE read_mode);
// if handle is not NULL, read is still NOT ASYNCHRONOUS,
// stupid IOCTL BLOCKS OVERLAPPED OPERATIONS -_-
int Ioctl_ReadSector_mmc (int sect, HANDLE *handle = NULL);
int Ioctl_ReadSector_scsi10 (int sect, HANDLE *handle = NULL);
int Ioctl_ReadSector_matsu (int sect, HANDLE *handle = NULL);
int Ioctl_ReadSector_sony (int sect, HANDLE *handle = NULL);
int Ioctl_ReadSector_nec (int sect, HANDLE *handle = NULL);
// retrieve a configuration from the cdvd drive
int Ioctl_GetConfiguration(UI16 feature, UI08 *dest, UI32 dest_size);
// dummy functions, used for init only so that stupid mofu's
// calling no-initialized interfaces won't crash
int Dummy_T1();
int Dummy_T2(int a);
int Dummy_T3(int a, int b);
int Dummy_T4(int a, HANDLE *b = NULL);
protected:
int Aspi_ScsiBusScan();
int Aspi_ScsiInquiry(UI08 ha, UI08 id, UI08 lun, char *destination);
int Aspi_ExecuteSrb(SRB_ExecSCSICmd &srbExec, HANDLE *handle, int nretry);
int Ioctl_ScsiBusScan();
int Ioctl_AddAdapter(int adptr_num, UI08 *buffer);
int InitializeBuffers();
int ShutdownBuffers();
int ExtractTocData(UI08 *buffer);
int GetCdvdConfiguration(UI16 feature, UI08 *dest, UI32 dest_size);
void UpdateInterfaceObject();
protected:
ADAPTERINFO m_drvDetails[CDVD_MAX_SUPPORTED_DRIVES];
TOCDATA m_tocDetails ;
DECODEDTRACKINFO m_trkDetails;
SI32 m_nCurrentDrive;
SI32 m_nCurrentBuffer;
HANDLE m_hIoctlDrv;
HINSTANCE m_hAspi;
BOOL m_bAspiInitialized;
BOOL m_bIoctlInitialized;
BOOL m_bDriveOpened;
UI32 m_nDrives;
SI32 m_nMmcDataMode;
CDVD_INTERFACE_TYPE m_IntfType;
CDVD_READ_MODE m_nCurrentReadMode;
protected:
CDROMSendASPI32Command SendASPI32Command;
CDROMGetASPI32SupportInfo GetASPI32SupportInfo;
ASPI32BUFF m_ReadBuffer[CDVD_NUM_BUFFERS]; // our buffers
// SRB's for ASPI
SRB_ExecSCSICmd m_srbReadCd [CDVD_NUM_BUFFERS];
SRB_ExecSCSICmd m_srbRead10 [CDVD_NUM_BUFFERS];
SRB_ExecSCSICmd m_srbReadMat [CDVD_NUM_BUFFERS];
SRB_ExecSCSICmd m_srbReadSony[CDVD_NUM_BUFFERS];
SRB_ExecSCSICmd m_srbReadNec [CDVD_NUM_BUFFERS];
// SRB's for IOCTL
SPTD_WITH_SENSE_BUFF m_sptwbReadCd [CDVD_NUM_BUFFERS];
SPTD_WITH_SENSE_BUFF m_sptwbRead10 [CDVD_NUM_BUFFERS];
SPTD_WITH_SENSE_BUFF m_sptwbReadMat [CDVD_NUM_BUFFERS];
SPTD_WITH_SENSE_BUFF m_sptwbReadSony[CDVD_NUM_BUFFERS];
SPTD_WITH_SENSE_BUFF m_sptwbReadNec [CDVD_NUM_BUFFERS];
public:
CCdvd();
virtual ~CCdvd();
};
#if defined(CDVD_SIMPLE_INTERFACE)
// declare our global interface functions ;P
EXTERN CCdvd OBJECT_HOLDER_CDVD;
EXTERN CDVD_INTF_FUNC_T1 FUNCTION_GETNUMSECTORS;
EXTERN CDVD_INTF_FUNC_T1 FUNCTION_GETTOC;
EXTERN CDVD_INTF_FUNC_T1 FUNCTION_TESTREADY;
EXTERN CDVD_INTF_FUNC_T2 FUNCTION_SETSPEED;
EXTERN CDVD_INTF_FUNC_T1 FUNCTION_STOP;
EXTERN CDVD_INTF_FUNC_T2 FUNCTION_SETSECTORSIZE;
EXTERN CDVD_INTF_FUNC_T3 FUNCTION_PLAY;
EXTERN CDVD_INTF_FUNC_T4 FUNCTION_READSECTOR;
// this is where the weird shit starts
// wrap C++ to C, who said i didn't obfuscate :P
#define cdvd_getnumsectors (OBJECT_HOLDER_CDVD.*FUNCTION_GETNUMSECTORS)
#define cdvd_gettoc (OBJECT_HOLDER_CDVD.*FUNCTION_GETTOC)
#define cdvd_testready (OBJECT_HOLDER_CDVD.*FUNCTION_TESTREADY)
#define cdvd_setspeed (OBJECT_HOLDER_CDVD.*FUNCTION_SETSPEED)
#define cdvd_stop (OBJECT_HOLDER_CDVD.*FUNCTION_STOP)
#define cdvd_setsectorsize (OBJECT_HOLDER_CDVD.*FUNCTION_SETSECTORSIZE)
#define cdvd_play (OBJECT_HOLDER_CDVD.*FUNCTION_PLAY)
#define cdvd_readsector (OBJECT_HOLDER_CDVD.*FUNCTION_READSECTOR)
#define cdvd_init (OBJECT_HOLDER_CDVD.Init)
#define cdvd_shutdown (OBJECT_HOLDER_CDVD.Shutdown)
#define cdvd_getnumdrives (OBJECT_HOLDER_CDVD.GetNumDrives)
#define cdvd_opendrive (OBJECT_HOLDER_CDVD.OpenDrive)
#define cdvd_closedrive (OBJECT_HOLDER_CDVD.CloseDrive)
#define cdvd_setcurrentbuffer (OBJECT_HOLDER_CDVD.SetCurrentBuffer)
#define cdvd_getsrbstatus (OBJECT_HOLDER_CDVD.GetSrbStatus)
#define cdvd_setreadmode (OBJECT_HOLDER_CDVD.SetReadMode)
#define cdvd_getmediatype (OBJECT_HOLDER_CDVD.GetCdvdMediaType)
#define cdvd_getdrivetype (OBJECT_HOLDER_CDVD.GetCdvdDriveType)
#define cdvd_getadapterdetail (OBJECT_HOLDER_CDVD.GetAdapterDetail)
#define cdvd_gettocdata (OBJECT_HOLDER_CDVD.GetTocData)
#define cdvd_gettrackdetail (OBJECT_HOLDER_CDVD.GetTrackDetail)
#define cdvd_detectandsetreadmode (OBJECT_HOLDER_CDVD.DetectAndSetReadMode)
#define cdvd_getbufferaddress (OBJECT_HOLDER_CDVD.GetBufferAddress)
#endif
#endif // !defined(AFX_CDVD_H__1189B8A5_BC21_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,194 +0,0 @@
// cdvdcompat.cpp: implementation of the cdvdcompat class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "cdvddraft.h"
#include "cdvdcompat.h"
#include "cdvdmisc.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
///////////////////////////////////////////////////////////////////////////
// test cdrom-from old interface ;p //
// added for psemupro compatibility and testing only! //
// although, its seems more stable than my old one hehe.. //
///////////////////////////////////////////////////////////////////////////
static char *libraryName = "PSEmuPro (C/DVD) Compatibility Driver";
const unsigned char version = 1;
const unsigned char revision = 0;
const unsigned char build = 22;
#define INT2BCD(n) ((n)/10)*16 + (n)%10
#define BCD2INT(n) ((n & 0x0F) + 10 * ( (n & 0xF0) >> 4))
#define MSF2SECT(m,s,f) (((m)*60 + (s) - 2)*75 + (f) )
#define SECT2MSF(sect,m,s,f){ (f) =(UI08)(sect%75);(s) =(UI08)(((sect - (f))/75)%60);(m) = (UI08)((((sect - (f))/75)-(s))/60); }
#define NORMALIZE(m,s,f) { while((f) >= 75){ (f) -= 75; (s) += 1; } while((s) >= 60){ (s) -= 60; (m) += 1;} }
/*************************************************************************/
/* psemupro library identifier functions */
/*************************************************************************/
char * CALLBACK PSEgetLibName()
{
return libraryName;
}
unsigned int CALLBACK PSEgetLibType()
{
return 1; // PSE_LT_CDR
}
unsigned int CALLBACK PSEgetLibVersion()
{
return version<<16|revision<<8|build;
}
/*************************************************************************/
/* psemupro config/test functions */
/*************************************************************************/
int CALLBACK CDRconfigure(void)
{
CDVDconfigure();
return CDVD_ERROR_SUCCESS;
}
void CALLBACK CDRabout(void)
{
CDVDabout();
}
int CALLBACK CDRtest(void)
{
return CDVDtest();
}
/*************************************************************************/
/* psemupro library init/shutdown functions */
/*************************************************************************/
int CALLBACK CDRinit()
{
return CDVDinit();
}
int CALLBACK CDRshutdown()
{
CDVDshutdown();
return CDVD_ERROR_SUCCESS;
}
int CALLBACK CDRopen()
{
return CDVDopen();
}
int CALLBACK CDRclose()
{
CDVDclose();
return CDVD_ERROR_SUCCESS;
}
/*************************************************************************/
/* psemupro library cdrom functions */
/*************************************************************************/
int CALLBACK CDRgetTN(cdvdTN *buffer)
{
return CDVDgetTN(buffer);
}
int CALLBACK CDRgetTD(unsigned char track, unsigned char *buffer)
{
/* cdvdTD td;
int retval = CDVDgetTD(track, &td);
if(retval == CDVD_ERROR_FAIL)
return CDVD_ERROR_FAIL;
//SECT2MSF(retval, m, s, f);
NORMALIZE(td.minute, td.second, td.frame);
buffer[0] = INT2BCD(td.minute);
buffer[2] = INT2BCD(td.frame);
if(track == 0)
{
buffer[1] = INT2BCD(td.second);
}
else
{
// (add 0:2:0 to convert to pysical addr)
buffer[1] = INT2BCD(td.second+2);
}*/
return CDVD_ERROR_SUCCESS;
}
int CALLBACK CDRreadTrack(unsigned char *time)
{
int lsn = MSF2SECT(BCD2INT(time[0]), BCD2INT(time[1]), BCD2INT(time[2]));
return CDVDreadTrack(lsn, CDVD_MODE_2352);
}
unsigned char *CALLBACK CDRgetBuffer(void)
{
return (CDVDgetBuffer() + 12);
}
// heck if i know if this works -_-
int CALLBACK CDRplay(unsigned char *sector)
{
flush_all();
int sect = MSF2SECT(sector[0], sector[1], sector[2]);
cdvd_play(sect, 0xFFFFFF);
return CDVD_ERROR_SUCCESS;
}
int CALLBACK CDRstop(void)
{
flush_all();
cdvd_stop();
return CDVD_ERROR_SUCCESS;
}
/*************************************************************************/
/* psemupro library extended functions */
/*************************************************************************/
typedef struct tagCDRSTAT
{
unsigned long Type;
unsigned long Status;
unsigned char Time[3]; // current playing time
} CDRSTAT, *LPCDRSTAT;
int CALLBACK CDRgetStatus(LPCDRSTAT stat)
{
memset(stat, 0, sizeof(CDRSTAT));
stat->Type = 0x01; //always data for now..
if(cdvd_testready() != CDVD_ERROR_SUCCESS)
{
stat->Type = 0xff;
stat->Status |= 0x10;
}
else
{
// new disc, flush cashe markers
flush_all();
}
return CDVD_ERROR_SUCCESS;
}

View File

@ -1,20 +0,0 @@
// cdvdcompat.h: interface for the cdvdcompat class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CDVDCOMPAT_H__0980F843_C2E7_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_CDVDCOMPAT_H__0980F843_C2E7_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class cdvdcompat
{
public:
cdvdcompat();
virtual ~cdvdcompat();
};
#endif // !defined(AFX_CDVDCOMPAT_H__0980F843_C2E7_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,48 +0,0 @@
; CLW file contains information for the MFC ClassWizard
[General Info]
Version=1
ClassCount=1
Class1=CConfig
LastClass=CConfig
NewFileInclude2=#include "cdvddraft.h"
ResourceCount=2
NewFileInclude1=#include "stdafx.h"
LastTemplate=CDialog
Resource1=IDD_CONFIG
Resource2=IDD_ABOUT
[DLG:IDD_CONFIG]
Type=1
Class=CConfig
ControlCount=11
Control1=IDOK,button,1342242817
Control2=IDC_STATIC,static,1342308352
Control3=IDCANCEL,button,1342242816
Control4=IDC_STATIC,static,1342308352
Control5=IDC_DRIVE,combobox,1344339971
Control6=IDC_STATIC,static,1342308352
Control7=IDC_STATIC,static,1342308352
Control8=IDC_INTERFACE,combobox,1478557699
Control9=IDC_READMODE,combobox,1344339971
Control10=IDC_STATIC,button,1342177287
Control11=IDC_PREFETCH,combobox,1344339971
[CLS:CConfig]
Type=0
HeaderFile=Config.h
ImplementationFile=Config.cpp
BaseClass=CDialog
Filter=D
LastObject=IDC_READMODE
VirtualFilter=dWC
[DLG:IDD_ABOUT]
Type=1
Class=?
ControlCount=4
Control1=IDOK,button,1342242817
Control2=IDC_STATIC,static,1342308352
Control3=IDC_STATIC,static,1342177294
Control4=IDC_STATIC,static,1342308352

View File

@ -1,599 +0,0 @@
// cdvddraft.cpp : Defines the initialization routines for the DLL.
//
#include "stdafx.h"
#include "cdvddraft.h"
#include "ps2etypes.h"
#include "ps2edefs.h"
#include "cdvdmisc.h"
#include "config.h"
#include "resource.h"
#include "aboutbox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*************************************************************************/
/* ps2emu cdvddraft history */
/*************************************************************************/
/* */
/* v0.62 Initial release */
/* v0.63 Changed CDVDgetTD for new specs */
/* */
/*************************************************************************/
/*************************************************************************/
/* ps2emu library MFC application placeholder */
/*************************************************************************/
class CCdvdDraft : public CWinApp
{
public:
CCdvdDraft();
};
CCdvdDraft::CCdvdDraft(){}
CCdvdDraft theApp;
/*************************************************************************/
/* ps2emu library versions */
/*************************************************************************/
static char *libraryName = "PCXS2 (C/DVD) Draft Driver";
const unsigned char version = PS2E_CDVD_VERSION;
const unsigned char revision = 0;
const unsigned char build = 64;
/*************************************************************************/
/* global variables start here */
/*************************************************************************/
static BOOL g_library_opened = FALSE; // open flag
static BOOL g_library_initialized = FALSE; // init flag
static int g_current_drvtype = CDVD_DRIVETYPE_CD; // drive type (cd/dvd/cdvd)
static int g_current_medtype = CDVD_MEDIATYPE_CD; // media type (cd/dvd)
static UI08 *g_current_buff = NULL; // current buffer pointer
static int g_current_buffnum = -1; // current buffer number
static TOCDATA g_current_tocdata = {0}; // current tocdata;
static DECODEDTRACKINFO g_current_trkinfo = {0}; // current trkdata;
static int g_request_offset = 0; // offset from base of buffer
CDVD_BUFFER_MODE g_current_buffmode = CDVD_BUFFER_SYNC; // current buffer mode (sync/async)
CDVD_INTERFACE_TYPE g_current_intftype = CDVD_INTF_ASPI; // interface type (aspi/ioctl)
CDVD_READ_MODE g_current_readmode = CDVD_READ_MMC; // current read mode (mmc/scsi10)
int g_current_drivenum = -1; // currently opened drive number
int g_status [CDVD_NUM_BUFFERS]; // status of read to buffer-n, (srb status, for asynchronous)
HANDLE g_handle [CDVD_NUM_BUFFERS]; // handle used to read to buffer-n, (for asynchronous)
int g_sectstart[CDVD_NUM_BUFFERS]; // start of sector read to buffer-n
BOOL g_filled [CDVD_NUM_BUFFERS]; // check if buffer-n was filled
#define CHECKLIBRARYOPENED() if(g_library_opened == FALSE) return CDVD_ERROR_FAIL;
#define SECT2MSF(sect,m,s,f){ (f) =(UI08)(sect%75);(s) =(UI08)(((sect - (f))/75)%60);(m) = (UI08)((((sect - (f))/75)-(s))/60); }
/*************************************************************************/
/* ps2emu library identifier functions */
/*************************************************************************/
unsigned int CALLBACK PS2EgetLibType()
{
return PS2E_LT_CDVD;
}
char *CALLBACK PS2EgetLibName()
{
return libraryName;
}
unsigned int CALLBACK PS2EgetLibVersion2(unsigned int type)
{
return (version<<16)|(revision<<8)|build;
}
/*************************************************************************/
/* ps2emu config/test functions */
/*************************************************************************/
// empty for now
void CALLBACK CDVDconfigure()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CConfig config;
config.DoModal();
//::MessageBox(NULL, _T("No Configuration.\n\n"), _T("Config"), MB_OK);
}
// empty for now
void CALLBACK CDVDabout()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CAboutBox about;
about.DoModal();
}
// return bogus for now
int CALLBACK CDVDtest()
{
return CDVD_ERROR_SUCCESS;
}
/*************************************************************************/
/* ps2emu library c/dvd functions */
/*************************************************************************/
// init, normally called once, setup for aspi for now?
int CALLBACK CDVDinit()
{
if(g_library_initialized)
return CDVD_ERROR_SUCCESS;
for(int i=0; i<CDVD_NUM_BUFFERS; i++)
g_handle[i] = NULL;
g_library_initialized = TRUE;
return CDVD_ERROR_SUCCESS;
}
// shutdown, normally called once?
void CALLBACK CDVDshutdown()
{
if(g_library_initialized)
{
cdvd_shutdown();
g_library_initialized = FALSE;
}
}
// open, called everytime emulation starts?
int CALLBACK CDVDopen()
{
//if(g_library_initialized == FALSE)
// return CDVD_ERROR_FAIL;
// instead, lets do the Init for lazy emus.
if(g_library_initialized == FALSE)
if(CDVDinit() != CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
// already opened
if(g_library_opened)
return CDVD_ERROR_SUCCESS;
//-----------------------------------------
// LOAD REGISTRY SETTINGS HERE!
if(load_registrysettings()
== CDVD_ERROR_SUCCESS)
{
TRACE("CDVDopen: registry loaded successfully.\n");
// override registry set values for now
// ioctl doesnt exist yet and although
// async seems to work fine, havent tested thoroughly
//g_current_buffmode = CDVD_BUFFER_ASYNC;
// set interface type
TRACE("CDVDopen: registry read_mode: %ld\n", g_current_buffmode);
g_current_intftype = CDVD_INTF_ASPI;
}
else // set some bs values
{
TRACE("CDVDopen: unable to load registry\n");
g_current_drivenum = 0;
// set to sync
g_current_buffmode = CDVD_BUFFER_SYNC;
// set interface type
g_current_intftype = CDVD_INTF_ASPI;
}
//-----------------------------------------
if(cdvd_init(g_current_intftype)
!= CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
int num_drives = cdvd_getnumdrives();
if(num_drives == 0)
return CDVD_ERROR_FAIL;
if(cdvd_opendrive(g_current_drivenum)
!= CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
if(g_current_readmode == CDVD_READ_UNKNOWN)
{
// wait for media ready
cdvd_testready();
TRACE("CDVDopen: autodetecting read-mode.\n");
if((g_current_readmode = (CDVD_READ_MODE) cdvd_detectandsetreadmode())
== CDVD_ERROR_FAIL)
{
// try setting to mmc again
if(cdvd_setreadmode(CDVD_READ_MMC, CDVD_MMC_DATAMODE_RAW)
!= CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
else
g_current_readmode = CDVD_READ_MMC;
}
}
else
{
TRACE("CDVDopen: setting read-mode: %ld\n", g_current_readmode);
int mediatype = cdvd_getmediatype();
int mmc_mode = (mediatype == CDVD_MEDIATYPE_DVD) ? CDVD_MMC_DATAMODE_USER : CDVD_MMC_DATAMODE_RAW;
if(cdvd_setreadmode(g_current_readmode, mmc_mode)
== CDVD_ERROR_FAIL)
{
return CDVD_ERROR_FAIL;
}
}
g_current_drvtype = cdvd_getdrivetype();
g_current_medtype = cdvd_getmediatype();
init_buffersandflags();
// set to first buffer
g_current_buffnum = 0;
cdvd_setcurrentbuffer(0);
g_library_opened = TRUE;
return CDVD_ERROR_SUCCESS;
}
// close, called everytime emulation stops?
void CALLBACK CDVDclose()
{
cdvd_closedrive();
shut_buffersandflags();
g_library_opened = FALSE;
}
// readtrack, called during emulation
// it's a mess right now.
int CALLBACK CDVDreadTrack(unsigned int lsn, int mode)
{
CHECKLIBRARYOPENED();
int max_loop = (g_current_buffmode == CDVD_BUFFER_ASYNC) ? CDVD_NUM_BUFFERS : 1;
int rq_sector = lsn;
BOOL rq_isinbuff = FALSE;
//------------------------------------------
// return a clean buffer when no media present in tray
// for psemupro compatibility only, since i dont
// use the pemupro return code definitions :p
if(g_current_medtype == CDVD_MEDIATYPE_UNKNOWN)
{
// lets see if user inserted/initialized a disc afterwards
if((g_current_medtype = cdvd_getmediatype())
== CDVD_MEDIATYPE_UNKNOWN)
{
g_current_buff = cdvd_getbufferaddress(0);;
g_request_offset = 0;
memset(g_current_buff, 0, CDVD_SECTOR_SIZE_CD);
return CDVD_ERROR_SUCCESS;
}
else
{
cdvd_testready();
if((g_current_readmode = (CDVD_READ_MODE) cdvd_detectandsetreadmode())
== CDVD_ERROR_FAIL)
return CDVD_ERROR_FAIL;
}
}
//------------------------------------------
for(;;)
{
rq_isinbuff = FALSE;
g_current_buffnum = -1;
for(int i=0; i < max_loop; i++)
{
if(rq_sector >= g_sectstart[i] &&
rq_sector < (g_sectstart[i] + CDVD_NUM_SECTORS_PER_BUFF)
&& g_sectstart[i] != -1)
{
rq_isinbuff = TRUE;
g_current_buffnum = i;
break;
}
}
if(rq_isinbuff == TRUE)
{
// bufffilled? else
if(g_filled[g_current_buffnum] == FALSE)
{
int ret = WaitForSingleObject(g_handle[g_current_buffnum], INFINITE); // ->> check error here!
if(g_status[g_current_buffnum] == CDVD_ERROR_FAIL ||
cdvd_getsrbstatus(g_current_buffnum) != CDVD_SRB_COMPLETED) // there was an error
{
TRACE("CDVDreadTrack: error srb not completed1 stat: %ld, srb: %ld\n", g_status[g_current_buffnum],
cdvd_getsrbstatus(g_current_buffnum));
TRACE("CDVDreadTrack: waitret: %ld, extended: %ld\n", ret, GetLastError());
//-----------------------------------------
// one last try, we might get lucky :p
cdvd_setcurrentbuffer(g_current_buffnum);
g_status[g_current_buffnum] = cdvd_readsector(rq_sector, NULL);
if(g_status[g_current_buffnum] != CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
else
return CDVD_ERROR_SUCCESS;
//-----------------------------------------
//return CDVD_ERROR_FAIL;
}
g_filled[g_current_buffnum] = TRUE;
}
int sect_in_buff = rq_sector - g_sectstart[g_current_buffnum];
// okay, just send another async read (prefetch)
// ONLY supports 2 buffers
if(g_current_buffmode == CDVD_BUFFER_ASYNC)
{
int altbuff = !g_current_buffnum;
if(g_sectstart[g_current_buffnum] > g_sectstart[altbuff])
{
TRACE("CDVDreadTrack: sending prefetch.\n");
WaitForSingleObject(g_handle[altbuff], INFINITE);
g_sectstart[altbuff] = g_sectstart[g_current_buffnum] + CDVD_NUM_SECTORS_PER_BUFF;
cdvd_setcurrentbuffer(altbuff);
_ASSERTE(g_handle[altbuff] != NULL);
g_status[altbuff] = cdvd_readsector(g_sectstart[altbuff], &g_handle[altbuff]);
g_filled[altbuff] = FALSE;
}
}
g_current_buff = cdvd_getbufferaddress(g_current_buffnum);
static const UI32 mode_pad[] = {0, 12, 24, 24};
if(g_current_medtype == CDVD_MEDIATYPE_DVD)
{
g_request_offset = sect_in_buff * CDVD_SECTOR_SIZE_DVD;
}
else
{
g_request_offset = (sect_in_buff * CDVD_SECTOR_SIZE_CD) + mode_pad[mode];
}
return CDVD_ERROR_SUCCESS;
}
else
{
for(int i=0; i < max_loop; i++)
{
// wait for any previous srb's pending
if(g_filled[i] == FALSE &&
cdvd_getsrbstatus(i) == CDVD_SRB_PENDING)
WaitForSingleObject(g_handle[i], INFINITE);
g_sectstart[i] = rq_sector + (CDVD_NUM_SECTORS_PER_BUFF * i);
cdvd_setcurrentbuffer(i);
_ASSERTE(g_handle[i] != NULL);
g_status[i] = cdvd_readsector(g_sectstart[i], &g_handle[i]);
if(g_current_buffmode == CDVD_BUFFER_SYNC)
{
WaitForSingleObject(g_handle[i], INFINITE);
if(g_status[g_current_buffnum] == CDVD_ERROR_FAIL ||
cdvd_getsrbstatus(i) != CDVD_SRB_COMPLETED)
{
TRACE("CDVDreadTrack: error srb not completed1 stat: %ld, srb: %ld\n", g_status[i],
cdvd_getsrbstatus(i));
return CDVD_ERROR_FAIL;
}
g_filled[i] = TRUE;
}
else
{
g_filled[i] = FALSE;
}
}
}
}
return CDVD_ERROR_SUCCESS;
}
// getbuffer, retrieve previously read sector buffer
unsigned char *CALLBACK CDVDgetBuffer()
{
return (g_current_buff + g_request_offset);
}
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ* subq) {
// fake it
u8 min, sec, frm;
subq->ctrl = 4;
subq->mode = 1;
subq->trackNum = itob(1);
subq->trackIndex= itob(1);
lba_to_msf(lsn, &min, &sec, &frm);
subq->trackM = itob(min);
subq->trackS = itob(sec);
subq->trackF = itob(frm);
subq->pad = 0;
lba_to_msf(lsn + (2*75), &min, &sec, &frm);
subq->discM = itob(min);
subq->discS = itob(sec);
subq->discF = itob(frm);
return 0;
}
// retrieve track number
int CALLBACK CDVDgetTN(cdvdTN *buffer)
{
CHECKLIBRARYOPENED();
if(cdvd_gettoc() != CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
g_current_tocdata = cdvd_gettocdata();
if(g_current_tocdata.first_track_num == 0 ||
g_current_tocdata.last_track_num == 0)
{
//fail? then lie ;P
buffer->strack = 1;
buffer->etrack = 1;
return CDVD_ERROR_SUCCESS; // TODO: or fail???
}
buffer->strack = g_current_tocdata.first_track_num;
buffer->etrack = g_current_tocdata.last_track_num;
//printf("s: %ld, e: %ld\n", buffer->strack, buffer->etrack);
return CDVD_ERROR_SUCCESS;
}
// retrives total sects OR offset of track
int CALLBACK CDVDgetTD(unsigned char track, cdvdTD *buffer)
{
CHECKLIBRARYOPENED();
if(track == 0)
{
buffer->lsn = cdvd_getnumsectors();
buffer->type = 0x00; // well, dunno if its even needed here.
return CDVD_ERROR_SUCCESS;
}
if(track > 0xAA) // max tracks per session
return CDVD_ERROR_FAIL;
if(cdvd_gettoc() != CDVD_ERROR_SUCCESS)
return CDVD_ERROR_FAIL;
g_current_trkinfo = cdvd_gettrackdetail();
// okay, not sure if you need to add a 0:2:0 lead-in for cds?
buffer->lsn = g_current_trkinfo.track_offset[track-1];
switch(g_current_medtype)
{
case CDVD_MEDIATYPE_DVD:
buffer->type = CDVD_MODE1_TRACK; // always data track
break;
case CDVD_MEDIATYPE_CD:
switch(g_current_trkinfo.track_type[track-1])
{
case 0x01: buffer->type = CDVD_MODE1_TRACK; break;
case 0x02: buffer->type = CDVD_MODE2_TRACK; break;
default: buffer->type = CDVD_AUDIO_TRACK; break; // for 0x00 and everything else
}
break;
default:
buffer->type = CDVD_AUDIO_TRACK; // lets lie.
break;
}
return CDVD_ERROR_SUCCESS; //g_current_trkinfo.track_offset[track-1];
}
s32 CALLBACK CDVDgetTOC(void* toc) {
u8 type = CDVDgetDiskType();
u8* tocBuff = (u8*)toc;
if( type == CDVD_TYPE_DVDV ||
type == CDVD_TYPE_PS2DVD)
{
// get dvd structure format
// scsi command 0x43
memset(tocBuff, 0, 2048);
// fake it
tocBuff[ 0] = 0x04;
tocBuff[ 1] = 0x02;
tocBuff[ 2] = 0xF2;
tocBuff[ 3] = 0x00;
tocBuff[ 4] = 0x86;
tocBuff[ 5] = 0x72;
tocBuff[16] = 0x00;
tocBuff[17] = 0x03;
tocBuff[18] = 0x00;
tocBuff[19] = 0x00;
}
else if(type == CDVD_TYPE_CDDA ||
type == CDVD_TYPE_PS2CDDA ||
type == CDVD_TYPE_PS2CD ||
type == CDVD_TYPE_PSCDDA ||
type == CDVD_TYPE_PSCD)
{
// cd toc
// (could be replaced by 1 command that reads the full toc)
u8 min, sec, frm;
s32 i, err;
cdvdTN diskInfo;
cdvdTD trackInfo;
memset(tocBuff, 0, 1024);
if (CDVDgetTN(&diskInfo) == -1) { diskInfo.etrack = 0;diskInfo.strack = 1; }
if (CDVDgetTD(0, &trackInfo) == -1) trackInfo.lsn = 0;
tocBuff[0] = 0x41;
tocBuff[1] = 0x00;
//Number of FirstTrack
tocBuff[2] = 0xA0;
tocBuff[7] = itob(diskInfo.strack);
//Number of LastTrack
tocBuff[12] = 0xA1;
tocBuff[17] = itob(diskInfo.etrack);
//DiskLength
lba_to_msf(trackInfo.lsn, &min, &sec, &frm);
tocBuff[22] = 0xA2;
tocBuff[27] = itob(min);
tocBuff[28] = itob(sec);
for (i=diskInfo.strack; i<=diskInfo.etrack; i++)
{
err = CDVDgetTD(i, &trackInfo);
lba_to_msf(trackInfo.lsn, &min, &sec, &frm);
tocBuff[i*10+30] = trackInfo.type;
tocBuff[i*10+32] = err == -1 ? 0 : itob(i); //number
tocBuff[i*10+37] = itob(min);
tocBuff[i*10+38] = itob(sec);
tocBuff[i*10+39] = itob(frm);
}
}
else
return -1;
return 0;
}
// return bogus data for now
int CALLBACK CDVDgetDiskType()
{
CHECKLIBRARYOPENED();
int mediatype = cdvd_getmediatype();
// TODO: need to retrieve dvd subtype here
if(mediatype == CDVD_MEDIATYPE_DVD)
return CDVD_TYPE_PS2DVD;
// TODO: need to retrieve cd subtype here
if(mediatype == CDVD_MEDIATYPE_CD)
return CDVD_TYPE_PS2CD;
return CDVD_TYPE_UNKNOWN;
}
// return bogus data for now
int CALLBACK CDVDgetTrayStatus()
{
CHECKLIBRARYOPENED();
return CDVD_TRAY_CLOSE;
}
s32 CALLBACK CDVDctrlTrayOpen() {
return 0;
}
s32 CALLBACK CDVDctrlTrayClose() {
return 0;
}

View File

@ -1,49 +0,0 @@
; cdvddraft.def : Declares the module parameters for the DLL.
LIBRARY "cdvddraft"
DESCRIPTION 'cdvddraft Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here
CDVDinit
CDVDshutdown
CDVDopen
CDVDclose
CDVDreadTrack
CDVDgetBuffer
CDVDreadSubQ
CDVDgetTN
CDVDgetTD
CDVDgetTOC
CDVDconfigure
CDVDtest
CDVDabout
CDVDgetDiskType
CDVDgetTrayStatus
CDVDctrlTrayOpen
CDVDctrlTrayClose
PS2EgetLibType
PS2EgetLibName
PS2EgetLibVersion2
PSEgetLibType
PSEgetLibName
PSEgetLibVersion
CDRinit
CDRshutdown
CDRopen
CDRclose
CDRconfigure
CDRabout
CDRtest
CDRgetTN
CDRgetTD
CDRreadTrack
CDRgetBuffer
CDRplay
CDRstop
CDRgetStatus

View File

@ -1,138 +0,0 @@
# Microsoft Developer Studio Generated Dependency File, included by cdvddraft.mak
.\Config.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\cdvd.h"\
".\cdvddraft.h"\
".\Config.h"\
".\constants.h"\
".\PS2Edefs.h"\
".\PS2Etypes.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\
.\AboutBox.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\AboutBox.h"\
".\cdvd.h"\
".\cdvddraft.h"\
".\constants.h"\
".\PS2Edefs.h"\
".\PS2Etypes.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\
.\cdvdcompat.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\cdvd.h"\
".\cdvdcompat.h"\
".\cdvddraft.h"\
".\cdvdmisc.h"\
".\constants.h"\
".\PS2Edefs.h"\
".\PS2Etypes.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\
.\cdvddraft.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\AboutBox.h"\
".\cdvd.h"\
".\cdvddraft.h"\
".\cdvdmisc.h"\
".\Config.h"\
".\constants.h"\
".\PS2Edefs.h"\
".\PS2Etypes.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\
.\cdvddraft.rc : \
".\bitmap1.bmp"\
".\res\cdvddraft.rc2"\
.\cdvdmisc.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\cdvd.h"\
".\cdvddraft.h"\
".\cdvdmisc.h"\
".\constants.h"\
".\PS2Edefs.h"\
".\PS2Etypes.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\
.\StdAfx.cpp : \
"..\mssdk\include\basetsd.h"\
".\StdAfx.h"\
.\aspi.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\cdvd.h"\
".\constants.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\
.\cdvd.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\cdvd.h"\
".\constants.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\
.\ioctl.cpp : \
"..\program files\microsoft visual studio\vc98\include\devioctl.h"\
"..\program files\microsoft visual studio\vc98\include\ntddcdrm.h"\
"..\program files\microsoft visual studio\vc98\include\ntdddisk.h"\
"..\program files\microsoft visual studio\vc98\include\ntddscsi.h"\
"..\program files\microsoft visual studio\vc98\include\ntddstor.h"\
".\cdvd.h"\
".\constants.h"\
".\typedefs.h"\
".\winaspi\scsidefs.h"\
".\winaspi\wnaspi32.h"\

View File

@ -1,219 +0,0 @@
# Microsoft Developer Studio Project File - Name="cdvddraft" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=cdvddraft - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "cdvddraft.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "cdvddraft.mak" CFG="cdvddraft - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "cdvddraft - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "cdvddraft - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "cdvddraft - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 /nologo /subsystem:windows /dll /machine:I386 /def:".\cdvddraft.def"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "cdvddraft - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__MSCW32__" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__MSCW32__" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /def:".\cdvddraft.def" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "cdvddraft - Win32 Release"
# Name "cdvddraft - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Group "config"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Config.cpp
# End Source File
# Begin Source File
SOURCE=.\Config.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\AboutBox.cpp
# End Source File
# Begin Source File
SOURCE=.\cdvdcompat.cpp
# End Source File
# Begin Source File
SOURCE=.\cdvddraft.cpp
# End Source File
# Begin Source File
SOURCE=.\cdvddraft.def
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\cdvddraft.rc
# End Source File
# Begin Source File
SOURCE=.\cdvdmisc.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\AboutBox.h
# End Source File
# Begin Source File
SOURCE=.\cdvddraft.h
# End Source File
# Begin Source File
SOURCE=.\cdvdmisc.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\bitmap1.bmp
# End Source File
# Begin Source File
SOURCE=.\res\cdvddraft.rc2
# End Source File
# End Group
# Begin Group "cdvdlib"
# PROP Default_Filter ""
# Begin Group "headers"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\cdvd.h
# End Source File
# Begin Source File
SOURCE=.\constants.h
# End Source File
# Begin Source File
SOURCE=.\PS2Edefs.h
# End Source File
# Begin Source File
SOURCE=.\PS2Etypes.h
# End Source File
# Begin Source File
SOURCE=.\typedefs.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\aspi.cpp
# End Source File
# Begin Source File
SOURCE=.\cdvd.cpp
# End Source File
# Begin Source File
SOURCE=.\ioctl.cpp
# End Source File
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project

View File

@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "cdvddraft"=".\cdvddraft.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -1,56 +0,0 @@
// cdvddraft.h : main header file for the CDVDDRAFT DLL
//
#if !defined(AFX_CDVDDRAFT_H__A0D50EA8_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_CDVDDRAFT_H__A0D50EA8_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#define __WIN32__
#include "resource.h" // main symbols
#include "ps2etypes.h"
#include "ps2edefs.h"
#include "cdvd.h"
#define PLUGIN_REG_PATH _T("Software\\PS2EPlugin\\CDVD\\CdvdXeven")
/*************************************************************************/
/* ps2emu library identifier functions */
/*************************************************************************/
unsigned int CALLBACK PS2EgetLibType();
char *CALLBACK PS2EgetLibName();
unsigned int CALLBACK PS2EgetLibVersion2(unsigned int type);
/*************************************************************************/
/* ps2emu config/test functions */
/*************************************************************************/
void CALLBACK CDVDconfigure();
void CALLBACK CDVDabout();
int CALLBACK CDVDtest();
/*************************************************************************/
/* ps2emu library c/dvd functions */
/*************************************************************************/
int CALLBACK CDVDinit();
void CALLBACK CDVDshutdown();
int CALLBACK CDVDopen();
void CALLBACK CDVDclose();
int CALLBACK CDVDreadTrack(unsigned int lsn, int mode);
unsigned char *CALLBACK CDVDgetBuffer();
int CALLBACK CDVDgetTN(cdvdTN *buffer);
int CALLBACK CDVDgetTD(unsigned char track, cdvdTD *buffer);
int CALLBACK CDVDgetType();
int CALLBACK CDVDgetTrayStatus();
#endif // !defined(AFX_CDVDDRAFT_H__A0D50EA8_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,68 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: cdvddraft - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating command line "rc.exe /l 0x409 /fo"Release/cdvddraft.res" /d "NDEBUG" /d "_AFXDLL" "C:\cdvddraft\cdvddraft.rc""
Creating temporary file "C:\WINDOWS\TEMP\RSP4241.TMP" with contents
[
/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Fp"Release/cdvddraft.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\cdvddraft\Config.cpp"
"C:\cdvddraft\AboutBox.cpp"
"C:\cdvddraft\cdvdcompat.cpp"
"C:\cdvddraft\cdvddraft.cpp"
"C:\cdvddraft\cdvdmisc.cpp"
"C:\cdvddraft\aspi.cpp"
"C:\cdvddraft\cdvd.cpp"
"C:\cdvddraft\ioctl.cpp"
]
Creating command line "cl.exe @C:\WINDOWS\TEMP\RSP4241.TMP"
Creating temporary file "C:\WINDOWS\TEMP\RSP4242.TMP" with contents
[
/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Fp"Release/cdvddraft.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
"C:\cdvddraft\StdAfx.cpp"
]
Creating command line "cl.exe @C:\WINDOWS\TEMP\RSP4242.TMP"
Creating temporary file "C:\WINDOWS\TEMP\RSP4243.TMP" with contents
[
/nologo /subsystem:windows /dll /incremental:no /pdb:"Release/cdvddraft.pdb" /machine:I386 /def:".\cdvddraft.def" /out:"Release/cdvddraft.dll" /implib:"Release/cdvddraft.lib"
.\Release\Config.obj
.\Release\AboutBox.obj
.\Release\cdvdcompat.obj
.\Release\cdvddraft.obj
.\Release\cdvdmisc.obj
.\Release\StdAfx.obj
.\Release\aspi.obj
.\Release\cdvd.obj
.\Release\ioctl.obj
.\Release\cdvddraft.res
]
Creating command line "link.exe @C:\WINDOWS\TEMP\RSP4243.TMP"
<h3>Output Window</h3>
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
Config.cpp
AboutBox.cpp
cdvdcompat.cpp
cdvddraft.cpp
cdvdmisc.cpp
aspi.cpp
cdvd.cpp
ioctl.cpp
Generating Code...
Linking...
link: executing 'C:\PROGRA~1\MICROS~5\VC98\BIN\link.exe'
Creating library Release/cdvddraft.lib and object Release/cdvddraft.exp
<h3>Results</h3>
cdvddraft.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -1,227 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\cdvddraft.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "cdvddraft DLL\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "cdvddraft\0"
VALUE "LegalCopyright", "Copyright (C) 2003\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "cdvddraft.DLL\0"
VALUE "ProductName", "cdvddraft Dynamic Link Library\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_CONFIG DIALOG DISCARDABLE 0, 0, 236, 118
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configure C/DVD Plugin"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,45,97,50,14
LTEXT "Interface:",IDC_STATIC,8,36,48,8
PUSHBUTTON "Cancel",IDCANCEL,144,97,50,14
LTEXT "Read Mode:",IDC_STATIC,134,36,48,8
COMBOBOX IDC_DRIVE,8,17,218,95,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Buffering Mode:",IDC_STATIC,8,65,65,8
LTEXT "Drive:",IDC_STATIC,8,7,23,8
COMBOBOX IDC_INTERFACE,8,46,99,47,CBS_DROPDOWNLIST | WS_DISABLED |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_READMODE,128,46,98,58,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
GROUPBOX "",IDC_STATIC,1,1,231,114
COMBOBOX IDC_PREFETCH,8,75,99,47,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
END
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 186, 125
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,71,104,50,14
LTEXT "Coded by Xeven",IDC_STATIC,69,9,61,8
CONTROL 7010,IDC_STATIC,"Static",SS_BITMAP,67,31,57,50
LTEXT "http://batard.psxfanatics.com",IDC_STATIC,48,18,97,10
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_CONFIG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 231
TOPMARGIN, 7
END
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 118
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
IDD_CONFIG DLGINIT
BEGIN
IDC_INTERFACE, 0x403, 5, 0
0x5341, 0x4950, "\000"
IDC_INTERFACE, 0x403, 6, 0
0x4f49, 0x5443, 0x004c,
IDC_READMODE, 0x403, 11, 0
0x5541, 0x4f54, 0x4544, 0x4554, 0x5443, "\000"
IDC_READMODE, 0x403, 7, 0
0x4552, 0x4441, 0x4443, "\000"
IDC_READMODE, 0x403, 7, 0
0x4353, 0x4953, 0x3031, "\000"
IDC_PREFETCH, 0x403, 12, 0
0x5953, 0x434e, 0x5248, 0x4e4f, 0x554f, 0x0053,
IDC_PREFETCH, 0x403, 13, 0
0x5341, 0x4e59, 0x4843, 0x4f52, 0x4f4e, 0x5355, "\000"
0
END
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_BITMAP1 BITMAP DISCARDABLE "bitmap1.bmp"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\cdvddraft.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdvddraft", "cdvddraft_2003.vcproj", "{1FAB7EBD-BE78-4375-B134-F5295148C5EA}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{1FAB7EBD-BE78-4375-B134-F5295148C5EA}.Debug.ActiveCfg = Debug|Win32
{1FAB7EBD-BE78-4375-B134-F5295148C5EA}.Debug.Build.0 = Debug|Win32
{1FAB7EBD-BE78-4375-B134-F5295148C5EA}.Release.ActiveCfg = Release|Win32
{1FAB7EBD-BE78-4375-B134-F5295148C5EA}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@ -1,399 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="cdvddraft"
SccProjectName=""
SccLocalPath=""
Keyword="MFCProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;__MSCW32__;_DEBUG;_WINDOWS;_USRDLL"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Debug/cdvddraft.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile=".\Debug/cdvddraft.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\cdvddraft.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/cdvddraft.pdb"
SubSystem="2"
ImportLibrary=".\Debug/cdvddraft.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/cdvddraft.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;__MSCW32__;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Release/cdvddraft.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile=".\Release/cdvddraft.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\cdvddraft.def"
ProgramDatabaseFile=".\Release/cdvddraft.pdb"
SubSystem="2"
ImportLibrary=".\Release/cdvddraft.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/cdvddraft.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="AboutBox.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="cdvdcompat.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="cdvddraft.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="cdvddraft.def">
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="cdvddraft.rc">
</File>
<File
RelativePath="cdvdmisc.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="StdAfx.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
<Filter
Name="config"
Filter="">
<File
RelativePath="Config.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="Config.h">
</File>
</Filter>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="AboutBox.h">
</File>
<File
RelativePath="cdvddraft.h">
</File>
<File
RelativePath="cdvdmisc.h">
</File>
<File
RelativePath="Resource.h">
</File>
<File
RelativePath="StdAfx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File
RelativePath="bitmap1.bmp">
</File>
<File
RelativePath="res\cdvddraft.rc2">
</File>
</Filter>
<Filter
Name="cdvdlib"
Filter="">
<File
RelativePath="aspi.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="cdvd.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="ioctl.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<Filter
Name="headers"
Filter="">
<File
RelativePath="cdvd.h">
</File>
<File
RelativePath="constants.h">
</File>
<File
RelativePath="PS2Edefs.h">
</File>
<File
RelativePath="PS2Etypes.h">
</File>
<File
RelativePath="typedefs.h">
</File>
</Filter>
</Filter>
<File
RelativePath="ReadMe.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,93 +0,0 @@
// cdvdmisc.cpp: implementation of the cdvdmisc class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "cdvddraft.h"
#include "cdvdmisc.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
extern int g_status [CDVD_NUM_BUFFERS]; // status of read to buffer-n
extern HANDLE g_handle [CDVD_NUM_BUFFERS]; // handle used to read to buffer-n
extern int g_sectstart[CDVD_NUM_BUFFERS]; // start of sector read to buffer-n
extern BOOL g_filled [CDVD_NUM_BUFFERS]; // check if buffer-n was filled
extern CDVD_BUFFER_MODE g_current_buffmode;
extern CDVD_INTERFACE_TYPE g_current_intftype;
extern int g_current_drivenum;
extern CDVD_READ_MODE g_current_readmode;
int init_buffersandflags()
{
for(int i=0; i<CDVD_NUM_BUFFERS; i++)
{
g_status[i] = -1;
g_sectstart[i] = -1;
g_filled[i] = FALSE;
if(g_handle != NULL) CloseHandle(g_handle[i]);
g_handle[i] = CreateEvent(NULL, TRUE, TRUE, NULL);
}
return CDVD_ERROR_SUCCESS;
}
int shut_buffersandflags()
{
for(int i=0; i<CDVD_NUM_BUFFERS; i++)
{
g_status[i] = -1;
g_sectstart[i] = -1;
g_filled[i] = FALSE;
if(g_handle[i]) CloseHandle(g_handle[i]);
}
return CDVD_ERROR_SUCCESS;
}
int flush_all()
{
for(int i=0; i<CDVD_NUM_BUFFERS; i++)
{
g_status[i] = -1;
g_sectstart[i] = -1;
g_filled[i] = FALSE;
if(g_handle[i])
WaitForSingleObject(g_handle[i], INFINITE);
}
return CDVD_ERROR_SUCCESS;
}
#include <atlbase.h>
int load_registrysettings()
{
CRegKey rKey;
if(rKey.Create(HKEY_CURRENT_USER, PLUGIN_REG_PATH) == ERROR_SUCCESS)
{
DWORD val;
g_current_readmode = CDVD_READ_UNKNOWN;
if(rKey.QueryValue(val, _T("DriveNum")) == ERROR_SUCCESS)
g_current_drivenum = val;
if(rKey.QueryValue(val, _T("BuffMode")) == ERROR_SUCCESS)
g_current_buffmode = (CDVD_BUFFER_MODE) val;
TRACE("---- buffmode: %ld -----\n", g_current_buffmode);
if(rKey.QueryValue(val, _T("Interface")) == ERROR_SUCCESS)
g_current_intftype = (CDVD_INTERFACE_TYPE) val;
if(rKey.QueryValue(val, _T("ReadMode")) == ERROR_SUCCESS)
{
if(val == 0) g_current_readmode = CDVD_READ_UNKNOWN;
else
g_current_readmode = (CDVD_READ_MODE) (val - 1);
}
rKey.Close();
}
else return CDVD_ERROR_FAIL;
return CDVD_ERROR_SUCCESS;
}

View File

@ -1,17 +0,0 @@
// cdvdmisc.h: interface for the cdvdmisc class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CDVDMISC_H__A0D50EB2_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_CDVDMISC_H__A0D50EB2_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
int init_buffersandflags();
int shut_buffersandflags();
int load_registrysettings();
int flush_all();
#endif // !defined(AFX_CDVDMISC_H__A0D50EB2_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,109 +0,0 @@
// constants.h: interface for the constants class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CONSTANTS_H__A0D50EAF_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_CONSTANTS_H__A0D50EAF_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// win32 o/s types
typedef enum WIN32OSTYPE
{
WIN32S,
WIN95,
WINNTOLD,
WINNTNEW
};
// available read modes supported (only mmc & scsi10 are enabled atm)
typedef enum CDVD_READ_MODE
{
CDVD_READ_MMC = 0,
CDVD_READ_SCSI10 = 1,
CDVD_READ_D8 = 2, // disabled
CDVD_READ_D410 = 3, // disabled
CDVD_READ_D412 = 4, // disabled
CDVD_READ_UNKNOWN = 5,
CDVD_READ_RESERVE = 6,
};
// available buffer modes supported (only sync & async are enabled atm)
typedef enum CDVD_BUFFER_MODE
{
CDVD_BUFFER_SYNC = 0,
CDVD_BUFFER_ASYNC = 1,
CDVD_BUFFER_SINGLE = 2, // unused
CDVD_BUFFER_UNKNOWN = 3, // unused
CDVD_BUFFER_RESERVE = 4
};
// available interfaces (only aspi & ioctl are enabled atm)
typedef enum CDVD_INTERFACE_TYPE
{
CDVD_INTF_ASPI = 0,
CDVD_INTF_IOCTL = 1,
CDVD_INTF_IOCTL_RAW = 2, // unused
CDVD_INTF_UNKNOWN = 3, // unused
CDVD_INTF_RESERVE = 4
};
// return codes
const int CDVD_ERROR_SUCCESS = 0;
const int CDVD_ERROR_FAIL = -1;
const int CDVD_ERROR_UNINITIALIZED = -2;
const int CDVD_ERROR_PENDING = 1;
// srb codes
const int CDVD_SRB_ERROR = -1;
const int CDVD_SRB_COMPLETED = 0;
const int CDVD_SRB_PENDING = 1;
// max number of c/dvd drives to be supported
const int CDVD_MAX_SUPPORTED_DRIVES = 26;
// max number of sectors returned per read
const int CDVD_NUM_SECTORS_PER_BUFF = 26;
// num buffers selectable (used by c/dvd reads)
const int CDVD_NUM_BUFFERS = 2;
// supported sector sizes
const int CDVD_SECTOR_SIZE_CD = 2352;
const int CDVD_SECTOR_SIZE_DVD = 2048;
// retry for srb
const int CDVD_MAX_RETRY = 2;
// mmc datamodes (indicates return fields)
const int CDVD_MMC_DATAMODE_RAW = 0xF8;
const int CDVD_MMC_DATAMODE_USER = 0x10;
// c/dvd drive types
const int CDVD_DRIVETYPE_UNKNOWN = -1; // everything is fucked, dunno what type of drive it is
const int CDVD_DRIVETYPE_CD = 1; // it's a cd ONLY drive
const int CDVD_DRIVETYPE_DVD = 2; // it's a dvd ONLY drive
const int CDVD_DRIVETYPE_CDVD = 3; // it's a c/dvd drive (read's both cdrom & dvd's)
// c/dvd media types
const int CDVD_MEDIATYPE_UNKNOWN = -1; // everything is fucked, unknown dumbfuck media
const int CDVD_MEDIATYPE_CD = 1; // its a cd, yay (yes i know there's various types of cd's)
const int CDVD_MEDIATYPE_DVD = 2; // it's a dvd, (okay various types of dvd and all that shit, but who cares)
// prelim, unused
const int CDVD_CDTYPE_UNKNOWN = -1;
const int CDVD_CDTYPE_CDDA = 0;
const int CDVD_CDTYPE_DATA = 1;
const int CDVD_CDTYPE_CDXA = 2;
// prelim, unused
const int CDVD_DVDTYPE_UNKNOWN = -1;
const int CDVD_DVDTYPE_DVDROM = 0;
const int CDVD_DVDTYPE_DVDMINRW = 1;
const int CDVD_DVDTYPE_DVDPLSRW = 2;
const int CDVD_DVDTYPE_DVDRAM = 3;
#endif // !defined(AFX_CONSTANTS_H__A0D50EAF_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,208 +0,0 @@
// Ioctl.cpp: implementation of the ioctl methods
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "cdvd.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
/***********************************************************/
/* IOCTL Init/Shutdown related methods */
/***********************************************************/
int CCdvd::Ioctl_Init()
{
int retval = CDVD_ERROR_FAIL;
if(m_bIoctlInitialized)
return CDVD_ERROR_SUCCESS;
return retval;
}
// shuts down ioctl
int CCdvd::Ioctl_Shutdown()
{
int retval = CDVD_ERROR_SUCCESS;
GetNumSectors = Dummy_T1;
GetToc = Dummy_T1;
Stop = Dummy_T1;
Play = Dummy_T3;
TestReady = Dummy_T1;
SetSpeed = Dummy_T2;
SetSectorSize = Dummy_T2;
ReadSector = Dummy_T4;
UpdateInterfaceObject();
ShutdownBuffers();
return retval;
}
// open a drive for reading
int CCdvd::Ioctl_OpenDrive(int drv_num)
{
int retval = CDVD_ERROR_SUCCESS;
CloseDrive();
m_nCurrentDrive = drv_num;
return retval;
}
// dummy for now
int CCdvd::Ioctl_CloseDrive()
{
int retval = CDVD_ERROR_SUCCESS;
m_nCurrentDrive = -1;
return retval;
}
// get srb status
int CCdvd::Ioctl_GetSrbStatus(int srb_num)
{
int retval = CDVD_SRB_ERROR;
switch(m_nCurrentReadMode)
{
case CDVD_READ_MMC:
case CDVD_READ_SCSI10:
case CDVD_READ_D8:
case CDVD_READ_D410:
case CDVD_READ_D412:
default: break;
}
if(retval == SS_COMP) retval = CDVD_SRB_COMPLETED;
else if(retval == SS_PENDING) retval = CDVD_SRB_PENDING;
else retval = CDVD_SRB_ERROR;
return retval;
}
// set read mode
int CCdvd::Ioctl_SetReadMode(CDVD_READ_MODE read_mode)
{
int retval = CDVD_ERROR_SUCCESS;
switch(read_mode)
{
case CDVD_READ_MMC:
case CDVD_READ_SCSI10:
case CDVD_READ_D8:
case CDVD_READ_D410:
case CDVD_READ_D412:
default: retval = CDVD_ERROR_FAIL; break;
}
UpdateInterfaceObject();
return retval;
}
// search for scsi adapters with c/dvd drives.
int CCdvd::Ioctl_ScsiBusScan()
{
int retval = CDVD_ERROR_SUCCESS;
HANDLE handle;
char adapter_name[16];
UI08 buffer[2048];
int adapter_num = 0;
memset(m_drvDetails, 0, CDVD_MAX_SUPPORTED_DRIVES * sizeof(ADAPTERINFO));
m_nDrives = 0;
for(;;)
{
wsprintf(adapter_name,"\\\\.\\SCSI%d:", adapter_num);
++adapter_num;
if((handle = CreateFile(adapter_name,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0,
NULL)) == INVALID_HANDLE_VALUE)
{
break; // no more scsi adapters
}
UI32 nreturned;
if(DeviceIoControl(handle,
IOCTL_SCSI_GET_INQUIRY_DATA,
NULL,
0,
buffer,
sizeof(buffer),
&nreturned,
FALSE) == 0)
{
continue; // failed
}
Ioctl_AddAdapter(adapter_num, buffer);
}
return retval;
}
// add an adapter to the adapter list
int CCdvd::Ioctl_AddAdapter(int adptr_num, UI08 *buffer)
{
int retval = CDVD_ERROR_SUCCESS;
SCSI_ADAPTER_BUS_INFO *adapter_info = (SCSI_ADAPTER_BUS_INFO *) buffer;
char string[40];
memset(string, 0, sizeof(string));
for (int i = 0; i < adapter_info->NumberOfBuses; i++)
{
SCSI_INQUIRY_DATA *inquiry_data =
(PSCSI_INQUIRY_DATA) (buffer + adapter_info->BusData[i].InquiryDataOffset);
//while
if(adapter_info->BusData[i].InquiryDataOffset)
{
if(inquiry_data->InquiryData[0] == 0x05) // c/dvd drive
{
m_drvDetails[m_nDrives].ha = adptr_num;
m_drvDetails[m_nDrives].id = inquiry_data->TargetId;
m_drvDetails[m_nDrives].lun = inquiry_data->Lun;
m_drvDetails[m_nDrives].hostname[0] = '\0';
memcpy(m_drvDetails[m_nDrives].name,
&inquiry_data->InquiryData[8] + 9, 27);
m_drvDetails[m_nDrives].name[27] = '\0';
++m_nDrives;
}
if(inquiry_data->NextInquiryDataOffset == 0)
{
break;
}
inquiry_data = (SCSI_INQUIRY_DATA *) (buffer + inquiry_data->NextInquiryDataOffset);
}
}
return retval;
}
/***********************************************************/
/* IOCTL Execute SRB */
/***********************************************************/
/***********************************************************/
/* ASPI C/DVD Methods */
/***********************************************************/

View File

@ -1,2 +0,0 @@
/cdvddraft.rc2/1.1.1.1/Wed Aug 27 00:52:39 2003//
D

View File

@ -1 +0,0 @@
/cdvddraft.rc2///

View File

@ -1 +0,0 @@
plugins/cdvd/CDVDdraft/Src/res

View File

@ -1 +0,0 @@
:ext:aumatt@cvs.sourceforge.net:/cvsroot/pcsx2

View File

@ -1,13 +0,0 @@
//
// CDVDDRAFT.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////

View File

@ -1,25 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by cdvddraft.rc
//
#define IDD_CONFIG 7000
#define IDC_COMBO1 7001
#define IDC_DRIVE 7001
#define IDC_COMBO2 7002
#define IDC_INTERFACE 7002
#define IDC_COMBO3 7003
#define IDC_READMODE 7003
#define IDC_PREFETCH 7004
#define IDD_ABOUT 7007
#define IDB_BITMAP1 7010
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 7011
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 7000
#define _APS_NEXT_SYMED_VALUE 7000
#endif
#endif

View File

@ -1,125 +0,0 @@
// typedefs.h: interface for the typedefs class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TYPEDEFS_H__A0D50EB0_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)
#define AFX_TYPEDEFS_H__A0D50EB0_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#if !defined(UI32)
typedef unsigned long UI32;
#endif
#if !defined(SI32)
typedef long SI32;
#endif
#if !defined(UI16)
typedef unsigned short UI16;
#endif
#if !defined(SI16)
typedef short SI16;
#endif
#if !defined(UI08)
typedef unsigned char UI08;
#endif
#if !defined(SI08)
typedef char SI08;
#endif
#if !defined(MAX_PATH)
const int MAX_PATH = 256;
#endif
#if !defined(EXTERN)
#define EXTERN extern
#endif
class CCdvd;
typedef int (CCdvd::*CDVD_INTF_FUNC_T1)();
typedef int (CCdvd::*CDVD_INTF_FUNC_T2)(int a);
typedef int (CCdvd::*CDVD_INTF_FUNC_T3)(int a, int b);
typedef int (CCdvd::*CDVD_INTF_FUNC_T4)(int a, HANDLE *b);
typedef DWORD (*CDROMSendASPI32Command)(LPSRB);
typedef DWORD (*CDROMGetASPI32SupportInfo)(void);
// adapater info
typedef struct tagADAPTERINFO
{
UI08 ha;
UI08 id;
UI08 lun;
char hostname[MAX_PATH];
char name[MAX_PATH];
} ADAPTERINFO, *LPADAPTERINFO;
// SPTI command buffer
typedef struct tagSPTD_WITH_SENSE_BUFF
{
SCSI_PASS_THROUGH_DIRECT sptd;
UI32 filler;
UI08 sensebuff[32];
} SPTD_WITH_SENSE_BUFF, *PSPTD_WITH_SENSE_BUFF;
// scsi mode/block selection header
typedef struct tagMODESELHEADER
{
UI08 reserved1;
UI08 medium;
UI08 reserved2;
UI08 block_desc_length;
UI08 density;
UI08 number_of_blocks_hi;
UI08 number_of_blocks_med;
UI08 number_of_blocks_lo;
UI08 reserved3;
UI08 block_length_hi;
UI08 block_length_med;
UI08 block_length_lo;
} MODESELHEADER, *PMODESELHEADER;
// toc track descriptor definition
typedef struct tagTOCTRACKDESCRIPTOR
{
UI08 reserved1;
UI08 adr_control;
UI08 track_num; // based 1
UI08 reserved2;
UI08 lba_byte3;
UI08 lba_byte2;
UI08 lba_byte1;
UI08 lba_byte0;
} TOCTRACK_DESCRIPTOR, *LPTOCTRACKDESCRIPTOR;
// toc data definition
typedef struct tagTOCDATA
{
UI08 datalen_byte1;
UI08 datalen_byte0;
UI08 first_track_num; //based 1
UI08 last_track_num; //based 1
} TOCDATA, *LPTOCDATA;
// information recovered per track (start offset & track_type only)
typedef struct tagDECODEDTRACKINFO
{
UI32 track_offset[256];
UI08 track_type[256];
UI32 total_tracks;
} DECODEDTRACKINFO, *LPDECODEDTRACKINFO;
#endif // !defined(AFX_TYPEDEFS_H__A0D50EB0_BD80_11D7_8E2C_0050DA15DE89__INCLUDED_)

View File

@ -1,279 +0,0 @@
#pragma pack(1)
//***************************************************************************
//
// Name: SCSIDEFS.H
//
// Description: SCSI definitions ('C' Language)
//
//***************************************************************************
//***************************************************************************
// %%% TARGET STATUS VALUES %%%
//***************************************************************************
#define STATUS_GOOD 0x00 // Status Good
#define STATUS_CHKCOND 0x02 // Check Condition
#define STATUS_CONDMET 0x04 // Condition Met
#define STATUS_BUSY 0x08 // Busy
#define STATUS_INTERM 0x10 // Intermediate
#define STATUS_INTCDMET 0x14 // Intermediate-condition met
#define STATUS_RESCONF 0x18 // Reservation conflict
#define STATUS_COMTERM 0x22 // Command Terminated
#define STATUS_QFULL 0x28 // Queue full
//***************************************************************************
// %%% SCSI MISCELLANEOUS EQUATES %%%
//***************************************************************************
#define MAXLUN 7 // Maximum Logical Unit Id
#define MAXTARG 7 // Maximum Target Id
#define MAX_SCSI_LUNS 64 // Maximum Number of SCSI LUNs
#define MAX_NUM_HA 8 // Maximum Number of SCSI HA's
//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
//
// %%% SCSI COMMAND OPCODES %%%
//
///\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
//***************************************************************************
// %%% Commands for all Device Types %%%
//***************************************************************************
#define SCSI_CHANGE_DEF 0x40 // Change Definition (Optional)
#define SCSI_COMPARE 0x39 // Compare (O)
#define SCSI_COPY 0x18 // Copy (O)
#define SCSI_COP_VERIFY 0x3A // Copy and Verify (O)
#define SCSI_INQUIRY 0x12 // Inquiry (MANDATORY)
#define SCSI_LOG_SELECT 0x4C // Log Select (O)
#define SCSI_LOG_SENSE 0x4D // Log Sense (O)
#define SCSI_MODE_SEL6 0x15 // Mode Select 6-byte (Device Specific)
#define SCSI_MODE_SEL10 0x55 // Mode Select 10-byte (Device Specific)
#define SCSI_MODE_SEN6 0x1A // Mode Sense 6-byte (Device Specific)
#define SCSI_MODE_SEN10 0x5A // Mode Sense 10-byte (Device Specific)
#define SCSI_READ_BUFF 0x3C // Read Buffer (O)
#define SCSI_REQ_SENSE 0x03 // Request Sense (MANDATORY)
#define SCSI_SEND_DIAG 0x1D // Send Diagnostic (O)
#define SCSI_TST_U_RDY 0x00 // Test Unit Ready (MANDATORY)
#define SCSI_WRITE_BUFF 0x3B // Write Buffer (O)
//***************************************************************************
// %%% Commands Unique to Direct Access Devices %%%
//***************************************************************************
#define SCSI_COMPARE 0x39 // Compare (O)
#define SCSI_FORMAT 0x04 // Format Unit (MANDATORY)
#define SCSI_LCK_UN_CAC 0x36 // Lock Unlock Cache (O)
#define SCSI_PREFETCH 0x34 // Prefetch (O)
#define SCSI_MED_REMOVL 0x1E // Prevent/Allow medium Removal (O)
#define SCSI_READ6 0x08 // Read 6-byte (MANDATORY)
#define SCSI_READ10 0x28 // Read 10-byte (MANDATORY)
#define SCSI_RD_CAPAC 0x25 // Read Capacity (MANDATORY)
#define SCSI_RD_DEFECT 0x37 // Read Defect Data (O)
#define SCSI_READ_LONG 0x3E // Read Long (O)
#define SCSI_REASS_BLK 0x07 // Reassign Blocks (O)
#define SCSI_RCV_DIAG 0x1C // Receive Diagnostic Results (O)
#define SCSI_RELEASE 0x17 // Release Unit (MANDATORY)
#define SCSI_REZERO 0x01 // Rezero Unit (O)
#define SCSI_SRCH_DAT_E 0x31 // Search Data Equal (O)
#define SCSI_SRCH_DAT_H 0x30 // Search Data High (O)
#define SCSI_SRCH_DAT_L 0x32 // Search Data Low (O)
#define SCSI_SEEK6 0x0B // Seek 6-Byte (O)
#define SCSI_SEEK10 0x2B // Seek 10-Byte (O)
#define SCSI_SEND_DIAG 0x1D // Send Diagnostics (MANDATORY)
#define SCSI_SET_LIMIT 0x33 // Set Limits (O)
#define SCSI_START_STP 0x1B // Start/Stop Unit (O)
#define SCSI_SYNC_CACHE 0x35 // Synchronize Cache (O)
#define SCSI_VERIFY 0x2F // Verify (O)
#define SCSI_WRITE6 0x0A // Write 6-Byte (MANDATORY)
#define SCSI_WRITE10 0x2A // Write 10-Byte (MANDATORY)
#define SCSI_WRT_VERIFY 0x2E // Write and Verify (O)
#define SCSI_WRITE_LONG 0x3F // Write Long (O)
#define SCSI_WRITE_SAME 0x41 // Write Same (O)
//***************************************************************************
// %%% Commands Unique to Sequential Access Devices %%%
//***************************************************************************
#define SCSI_ERASE 0x19 // Erase (MANDATORY)
#define SCSI_LOAD_UN 0x1B // Load/Unload (O)
#define SCSI_LOCATE 0x2B // Locate (O)
#define SCSI_RD_BLK_LIM 0x05 // Read Block Limits (MANDATORY)
#define SCSI_READ_POS 0x34 // Read Position (O)
#define SCSI_READ_REV 0x0F // Read Reverse (O)
#define SCSI_REC_BF_DAT 0x14 // Recover Buffer Data (O)
#define SCSI_RESERVE 0x16 // Reserve Unit (MANDATORY)
#define SCSI_REWIND 0x01 // Rewind (MANDATORY)
#define SCSI_SPACE 0x11 // Space (MANDATORY)
#define SCSI_VERIFY_T 0x13 // Verify (Tape) (O)
#define SCSI_WRT_FILE 0x10 // Write Filemarks (MANDATORY)
//***************************************************************************
// %%% Commands Unique to Printer Devices %%%
//***************************************************************************
#define SCSI_PRINT 0x0A // Print (MANDATORY)
#define SCSI_SLEW_PNT 0x0B // Slew and Print (O)
#define SCSI_STOP_PNT 0x1B // Stop Print (O)
#define SCSI_SYNC_BUFF 0x10 // Synchronize Buffer (O)
//***************************************************************************
// %%% Commands Unique to Processor Devices %%%
//***************************************************************************
#define SCSI_RECEIVE 0x08 // Receive (O)
#define SCSI_SEND 0x0A // Send (O)
//***************************************************************************
// %%% Commands Unique to Write-Once Devices %%%
//***************************************************************************
#define SCSI_MEDIUM_SCN 0x38 // Medium Scan (O)
#define SCSI_SRCHDATE10 0x31 // Search Data Equal 10-Byte (O)
#define SCSI_SRCHDATE12 0xB1 // Search Data Equal 12-Byte (O)
#define SCSI_SRCHDATH10 0x30 // Search Data High 10-Byte (O)
#define SCSI_SRCHDATH12 0xB0 // Search Data High 12-Byte (O)
#define SCSI_SRCHDATL10 0x32 // Search Data Low 10-Byte (O)
#define SCSI_SRCHDATL12 0xB2 // Search Data Low 12-Byte (O)
#define SCSI_SET_LIM_10 0x33 // Set Limits 10-Byte (O)
#define SCSI_SET_LIM_12 0xB3 // Set Limits 10-Byte (O)
#define SCSI_VERIFY10 0x2F // Verify 10-Byte (O)
#define SCSI_VERIFY12 0xAF // Verify 12-Byte (O)
#define SCSI_WRITE12 0xAA // Write 12-Byte (O)
#define SCSI_WRT_VER10 0x2E // Write and Verify 10-Byte (O)
#define SCSI_WRT_VER12 0xAE // Write and Verify 12-Byte (O)
//***************************************************************************
// %%% Commands Unique to CD-ROM Devices %%%
//***************************************************************************
#define SCSI_PLAYAUD_10 0x45 // Play Audio 10-Byte (O)
#define SCSI_PLAYAUD_12 0xA5 // Play Audio 12-Byte 12-Byte (O)
#define SCSI_PLAYAUDMSF 0x47 // Play Audio MSF (O)
#define SCSI_PLAYA_TKIN 0x48 // Play Audio Track/Index (O)
#define SCSI_PLYTKREL10 0x49 // Play Track Relative 10-Byte (O)
#define SCSI_PLYTKREL12 0xA9 // Play Track Relative 12-Byte (O)
#define SCSI_READCDCAP 0x25 // Read CD-ROM Capacity (MANDATORY)
#define SCSI_READHEADER 0x44 // Read Header (O)
#define SCSI_SUBCHANNEL 0x42 // Read Subchannel (O)
#define SCSI_READ_TOC 0x43 // Read TOC (O)
//***************************************************************************
// %%% Commands Unique to Scanner Devices %%%
//***************************************************************************
#define SCSI_GETDBSTAT 0x34 // Get Data Buffer Status (O)
#define SCSI_GETWINDOW 0x25 // Get Window (O)
#define SCSI_OBJECTPOS 0x31 // Object Postion (O)
#define SCSI_SCAN 0x1B // Scan (O)
#define SCSI_SETWINDOW 0x24 // Set Window (MANDATORY)
//***************************************************************************
// %%% Commands Unique to Optical Memory Devices %%%
//***************************************************************************
#define SCSI_UpdateBlk 0x3D // Update Block (O)
//***************************************************************************
// %%% Commands Unique to Medium Changer Devices %%%
//***************************************************************************
#define SCSI_EXCHMEDIUM 0xA6 // Exchange Medium (O)
#define SCSI_INITELSTAT 0x07 // Initialize Element Status (O)
#define SCSI_POSTOELEM 0x2B // Position to Element (O)
#define SCSI_REQ_VE_ADD 0xB5 // Request Volume Element Address (O)
#define SCSI_SENDVOLTAG 0xB6 // Send Volume Tag (O)
//***************************************************************************
// %%% Commands Unique to Communication Devices %%%
//***************************************************************************
#define SCSI_GET_MSG_6 0x08 // Get Message 6-Byte (MANDATORY)
#define SCSI_GET_MSG_10 0x28 // Get Message 10-Byte (O)
#define SCSI_GET_MSG_12 0xA8 // Get Message 12-Byte (O)
#define SCSI_SND_MSG_6 0x0A // Send Message 6-Byte (MANDATORY)
#define SCSI_SND_MSG_10 0x2A // Send Message 10-Byte (O)
#define SCSI_SND_MSG_12 0xAA // Send Message 12-Byte (O)
//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
//
// %%% END OF SCSI COMMAND OPCODES %%%
//
///\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
//***************************************************************************
// %%% Request Sense Data Format %%%
//***************************************************************************
typedef struct {
BYTE ErrorCode; // Error Code (70H or 71H)
BYTE SegmentNum; // Number of current segment descriptor
BYTE SenseKey; // Sense Key(See bit definitions too)
BYTE InfoByte0; // Information MSB
BYTE InfoByte1; // Information MID
BYTE InfoByte2; // Information MID
BYTE InfoByte3; // Information LSB
BYTE AddSenLen; // Additional Sense Length
BYTE ComSpecInf0; // Command Specific Information MSB
BYTE ComSpecInf1; // Command Specific Information MID
BYTE ComSpecInf2; // Command Specific Information MID
BYTE ComSpecInf3; // Command Specific Information LSB
BYTE AddSenseCode; // Additional Sense Code
BYTE AddSenQual; // Additional Sense Code Qualifier
BYTE FieldRepUCode; // Field Replaceable Unit Code
BYTE SenKeySpec15; // Sense Key Specific 15th byte
BYTE SenKeySpec16; // Sense Key Specific 16th byte
BYTE SenKeySpec17; // Sense Key Specific 17th byte
BYTE AddSenseBytes; // Additional Sense Bytes
} SENSE_DATA_FMT;
//***************************************************************************
// %%% REQUEST SENSE ERROR CODE %%%
//***************************************************************************
#define SERROR_CURRENT 0x70 // Current Errors
#define SERROR_DEFERED 0x71 // Deferred Errors
//***************************************************************************
// %%% REQUEST SENSE BIT DEFINITIONS %%%
//***************************************************************************
#define SENSE_VALID 0x80 // Byte 0 Bit 7
#define SENSE_FILEMRK 0x80 // Byte 2 Bit 7
#define SENSE_EOM 0x40 // Byte 2 Bit 6
#define SENSE_ILI 0x20 // Byte 2 Bit 5
//***************************************************************************
// %%% REQUEST SENSE SENSE KEY DEFINITIONS %%%
//***************************************************************************
#define KEY_NOSENSE 0x00 // No Sense
#define KEY_RECERROR 0x01 // Recovered Error
#define KEY_NOTREADY 0x02 // Not Ready
#define KEY_MEDIUMERR 0x03 // Medium Error
#define KEY_HARDERROR 0x04 // Hardware Error
#define KEY_ILLGLREQ 0x05 // Illegal Request
#define KEY_UNITATT 0x06 // Unit Attention
#define KEY_DATAPROT 0x07 // Data Protect
#define KEY_BLANKCHK 0x08 // Blank Check
#define KEY_VENDSPEC 0x09 // Vendor Specific
#define KEY_COPYABORT 0x0A // Copy Abort
#define KEY_EQUAL 0x0C // Equal (Search)
#define KEY_VOLOVRFLW 0x0D // Volume Overflow
#define KEY_MISCOMP 0x0E // Miscompare (Search)
#define KEY_RESERVED 0x0F // Reserved
//***************************************************************************
// %%% PERIPHERAL DEVICE TYPE DEFINITIONS %%%
//***************************************************************************
#define DTYPE_DASD 0x00 // Disk Device
#define DTYPE_SEQD 0x01 // Tape Device
#define DTYPE_PRNT 0x02 // Printer
#define DTYPE_PROC 0x03 // Processor
#define DTYPE_WORM 0x04 // Write-once read-multiple
#define DTYPE_CROM 0x05 // CD-ROM device
#define DTYPE_CDROM 0x05 // CD-ROM device
#define DTYPE_SCAN 0x06 // Scanner device
#define DTYPE_OPTI 0x07 // Optical memory device
#define DTYPE_JUKE 0x08 // Medium Changer device
#define DTYPE_COMM 0x09 // Communications device
#define DTYPE_RESL 0x0A // Reserved (low)
#define DTYPE_RESH 0x1E // Reserved (high)
#define DTYPE_UNKNOWN 0x1F // Unknown or no device type
//***************************************************************************
// %%% ANSI APPROVED VERSION DEFINITIONS %%%
//***************************************************************************
#define ANSI_MAYBE 0x0 // Device may or may not be ANSI approved stand
#define ANSI_SCSI1 0x1 // Device complies to ANSI X3.131-1986 (SCSI-1)
#define ANSI_SCSI2 0x2 // Device complies to SCSI-2
#define ANSI_RESLO 0x3 // Reserved (low)
#define ANSI_RESHI 0x7 // Reserved (high)
#pragma pack()

View File

@ -1,325 +0,0 @@
/******************************************************************************
**
** Module Name: wnaspi32.h
**
** Description: Header file for ASPI for Win32. This header includes
** macro and type declarations, and can be included without
** modification when using Borland C++ or Microsoft Visual
** C++ with 32-bit compilation. If you are using a different
** compiler then you MUST ensure that structures are packed
** onto byte alignments, and that C++ name mangling is turned
** off.
**
** Notes: This file created using 4 spaces per tab.
**
******************************************************************************/
#ifndef __WNASPI32_H__
#define __WNASPI32_H__
/*
** Make sure structures are packed and undecorated.
*/
#ifdef __BORLANDC__
#pragma option -a1
#endif //__BORLANDC__
#ifdef _MSC_VER
#pragma pack(1)
#endif //__MSC_VER
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
//*****************************************************************************
// %%% SCSI MISCELLANEOUS EQUATES %%%
//*****************************************************************************
#define SENSE_LEN 14 // Default sense buffer length
#define SRB_DIR_SCSI 0x00 // Direction determined by SCSI
#define SRB_POSTING 0x01 // Enable ASPI posting
#define SRB_ENABLE_RESIDUAL_COUNT 0x04 // Enable residual byte count reporting
#define SRB_DIR_IN 0x08 // Transfer from SCSI target to host
#define SRB_DIR_OUT 0x10 // Transfer from host to SCSI target
#define SRB_EVENT_NOTIFY 0x40 // Enable ASPI event notification
#define RESIDUAL_COUNT_SUPPORTED 0x02 // Extended buffer flag
#define MAX_SRB_TIMEOUT 108000lu // 30 hour maximum timeout in s
#define DEFAULT_SRB_TIMEOUT 108000lu // Max timeout by default
//*****************************************************************************
// %%% ASPI Command Definitions %%%
//*****************************************************************************
#define SC_HA_INQUIRY 0x00 // Host adapter inquiry
#define SC_GET_DEV_TYPE 0x01 // Get device type
#define SC_EXEC_SCSI_CMD 0x02 // Execute SCSI command
#define SC_ABORT_SRB 0x03 // Abort an SRB
#define SC_RESET_DEV 0x04 // SCSI bus device reset
#define SC_SET_HA_PARMS 0x05 // Set HA parameters
#define SC_GET_DISK_INFO 0x06 // Get Disk information
#define SC_RESCAN_SCSI_BUS 0x07 // ReBuild SCSI device map
#define SC_GETSET_TIMEOUTS 0x08 // Get/Set target timeouts
//*****************************************************************************
// %%% SRB Status %%%
//*****************************************************************************
#define SS_PENDING 0x00 // SRB being processed
#define SS_COMP 0x01 // SRB completed without error
#define SS_ABORTED 0x02 // SRB aborted
#define SS_ABORT_FAIL 0x03 // Unable to abort SRB
#define SS_ERR 0x04 // SRB completed with error
#define SS_INVALID_CMD 0x80 // Invalid ASPI command
#define SS_INVALID_HA 0x81 // Invalid host adapter number
#define SS_NO_DEVICE 0x82 // SCSI device not installed
#define SS_INVALID_SRB 0xE0 // Invalid parameter set in SRB
#define SS_OLD_MANAGER 0xE1 // ASPI manager doesn't support Windows
#define SS_BUFFER_ALIGN 0xE1 // Buffer not aligned (replaces OLD_MANAGER in Win32)
#define SS_ILLEGAL_MODE 0xE2 // Unsupported Windows mode
#define SS_NO_ASPI 0xE3 // No ASPI managers resident
#define SS_FAILED_INIT 0xE4 // ASPI for windows failed init
#define SS_ASPI_IS_BUSY 0xE5 // No resources available to execute cmd
#define SS_BUFFER_TO_BIG 0xE6 // Buffer size to big to handle!
#define SS_MISMATCHED_COMPONENTS 0xE7 // The DLLs/EXEs of ASPI don't version check
#define SS_NO_ADAPTERS 0xE8 // No host adapters to manage
#define SS_INSUFFICIENT_RESOURCES 0xE9 // Couldn't allocate resources needed to init
#define SS_ASPI_IS_SHUTDOWN 0xEA // Call came to ASPI after PROCESS_DETACH
#define SS_BAD_INSTALL 0xEB // The DLL or other components are installed wrong
//*****************************************************************************
// %%% Host Adapter Status %%%
//*****************************************************************************
#define HASTAT_OK 0x00 // Host adapter did not detect an // error
#define HASTAT_SEL_TO 0x11 // Selection Timeout
#define HASTAT_DO_DU 0x12 // Data overrun data underrun
#define HASTAT_BUS_FREE 0x13 // Unexpected bus free
#define HASTAT_PHASE_ERR 0x14 // Target bus phase sequence // failure
#define HASTAT_TIMEOUT 0x09 // Timed out while SRB was waiting to beprocessed.
#define HASTAT_COMMAND_TIMEOUT 0x0B // Adapter timed out processing SRB.
#define HASTAT_MESSAGE_REJECT 0x0D // While processing SRB, the // adapter received a MESSAGE
#define HASTAT_BUS_RESET 0x0E // A bus reset was detected.
#define HASTAT_PARITY_ERROR 0x0F // A parity error was detected.
#define HASTAT_REQUEST_SENSE_FAILED 0x10 // The adapter failed in issuing
//*****************************************************************************
// %%% SRB - HOST ADAPTER INQUIRY - SC_HA_INQUIRY (0) %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_HA_INQUIRY
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 ASPI request flags
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved, MUST = 0
BYTE HA_Count; // 08/008 Number of host adapters present
BYTE HA_SCSI_ID; // 09/009 SCSI ID of host adapter
BYTE HA_ManagerId[16]; // 0A/010 String describing the manager
BYTE HA_Identifier[16]; // 1A/026 String describing the host adapter
BYTE HA_Unique[16]; // 2A/042 Host Adapter Unique parameters
WORD HA_Rsvd1; // 3A/058 Reserved, MUST = 0
}
SRB_HAInquiry, *PSRB_HAInquiry, FAR *LPSRB_HAInquiry;
//*****************************************************************************
// %%% SRB - GET DEVICE TYPE - SC_GET_DEV_TYPE (1) %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_GET_DEV_TYPE
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 Reserved, MUST = 0
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved, MUST = 0
BYTE SRB_Target; // 08/008 Target's SCSI ID
BYTE SRB_Lun; // 09/009 Target's LUN number
BYTE SRB_DeviceType; // 0A/010 Target's peripheral device type
BYTE SRB_Rsvd1; // 0B/011 Reserved, MUST = 0
}
SRB_GDEVBlock, *PSRB_GDEVBlock, FAR *LPSRB_GDEVBlock;
//*****************************************************************************
// %%% SRB - EXECUTE SCSI COMMAND - SC_EXEC_SCSI_CMD (2) %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_EXEC_SCSI_CMD
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 ASPI request flags
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved
BYTE SRB_Target; // 08/008 Target's SCSI ID
BYTE SRB_Lun; // 09/009 Target's LUN number
WORD SRB_Rsvd1; // 0A/010 Reserved for Alignment
DWORD SRB_BufLen; // 0C/012 Data Allocation Length
BYTE FAR *SRB_BufPointer; // 10/016 Data Buffer Pointer
BYTE SRB_SenseLen; // 14/020 Sense Allocation Length
BYTE SRB_CDBLen; // 15/021 CDB Length
BYTE SRB_HaStat; // 16/022 Host Adapter Status
BYTE SRB_TargStat; // 17/023 Target Status
VOID FAR *SRB_PostProc; // 18/024 Post routine
BYTE SRB_Rsvd2[20]; // 1C/028 Reserved, MUST = 0
BYTE CDBByte[16]; // 30/048 SCSI CDB
BYTE SenseArea[SENSE_LEN+2]; // 50/064 Request Sense buffer
}
SRB_ExecSCSICmd, *PSRB_ExecSCSICmd, FAR *LPSRB_ExecSCSICmd;
//*****************************************************************************
// %%% SRB - ABORT AN SRB - SC_ABORT_SRB (3) %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_ABORT_SRB
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 Reserved
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved
VOID FAR *SRB_ToAbort; // 08/008 Pointer to SRB to abort
}
SRB_Abort, *PSRB_Abort, FAR *LPSRB_Abort;
//*****************************************************************************
// %%% SRB - BUS DEVICE RESET - SC_RESET_DEV (4) %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_RESET_DEV
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 ASPI request flags
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved
BYTE SRB_Target; // 08/008 Target's SCSI ID
BYTE SRB_Lun; // 09/009 Target's LUN number
BYTE SRB_Rsvd1[12]; // 0A/010 Reserved for Alignment
BYTE SRB_HaStat; // 16/022 Host Adapter Status
BYTE SRB_TargStat; // 17/023 Target Status
VOID FAR *SRB_PostProc; // 18/024 Post routine
BYTE SRB_Rsvd2[36]; // 1C/028 Reserved, MUST = 0
}
SRB_BusDeviceReset, *PSRB_BusDeviceReset, FAR *LPSRB_BusDeviceReset;
//*****************************************************************************
// %%% SRB - GET DISK INFORMATION - SC_GET_DISK_INFO %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_GET_DISK_INFO
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 Reserved, MUST = 0
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved, MUST = 0
BYTE SRB_Target; // 08/008 Target's SCSI ID
BYTE SRB_Lun; // 09/009 Target's LUN number
BYTE SRB_DriveFlags; // 0A/010 Driver flags
BYTE SRB_Int13HDriveInfo; // 0B/011 Host Adapter Status
BYTE SRB_Heads; // 0C/012 Preferred number of heads translation
BYTE SRB_Sectors; // 0D/013 Preferred number of sectors translation
BYTE SRB_Rsvd1[10]; // 0E/014 Reserved, MUST = 0
}
SRB_GetDiskInfo, *PSRB_GetDiskInfo, FAR *LPSRB_GetDiskInfo;
//*****************************************************************************
// %%% SRB - RESCAN SCSI BUS(ES) ON SCSIPORT %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_RESCAN_SCSI_BUS
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 Reserved, MUST = 0
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved, MUST = 0
}
SRB_RescanPort, *PSRB_RescanPort, FAR *LPSRB_RescanPort;
//*****************************************************************************
// %%% SRB - GET/SET TARGET TIMEOUTS %%%
//*****************************************************************************
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_GETSET_TIMEOUTS
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 ASPI request flags
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved, MUST = 0
BYTE SRB_Target; // 08/008 Target's SCSI ID
BYTE SRB_Lun; // 09/009 Target's LUN number
DWORD SRB_Timeout; // 0A/010 Timeout in half seconds
}
SRB_GetSetTimeouts, *PSRB_GetSetTimeouts, FAR *LPSRB_GetSetTimeouts;
//*****************************************************************************
// %%% ASPIBUFF - Structure For Controllng I/O Buffers %%%
//*****************************************************************************
typedef struct tag_ASPI32BUFF // Offset
{ // HX/DEC
PBYTE AB_BufPointer; // 00/000 Pointer to the ASPI allocated buffer
DWORD AB_BufLen; // 04/004 Length in bytes of the buffer
DWORD AB_ZeroFill; // 08/008 Flag set to 1 if buffer should be zeroed
DWORD AB_Reserved; // 0C/012 Reserved
}
ASPI32BUFF, *PASPI32BUFF, FAR *LPASPI32BUFF;
//*****************************************************************************
// %%% PROTOTYPES - User Callable ASPI for Win32 Functions %%%
//*****************************************************************************
typedef void *LPSRB;
#if defined(__BORLANDC__)
DWORD _import GetASPI32SupportInfo( void );
DWORD _import SendASPI32Command( LPSRB );
BOOL _import GetASPI32Buffer( PASPI32BUFF );
BOOL _import FreeASPI32Buffer( PASPI32BUFF );
BOOL _import TranslateASPI32Address( PDWORD, PDWORD );
#elif defined(_MSC_VER)
__declspec(dllimport) DWORD GetASPI32SupportInfo( void );
__declspec(dllimport) DWORD SendASPI32Command( LPSRB );
__declspec(dllimport) BOOL GetASPI32Buffer( PASPI32BUFF );
__declspec(dllimport) BOOL FreeASPI32Buffer( PASPI32BUFF );
__declspec(dllimport) BOOL TranslateASPI32Address( PDWORD, PDWORD );
#else
extern DWORD GetASPI32SupportInfo( void );
extern DWORD GetASPI32Command( LPSRB );
extern BOOL GetASPI32Buffer( PASPI32BUFF );
extern BOOL FreeASPI32Buffer( PASPI32BUFF );
extern BOOL TranslateASPI32Address( PDWORD, PDWORD );
#endif
/*
** Restore compiler default packing and close off the C declarations.
*/
#ifdef __BORLANDC__
#pragma option -a.
#endif //__BORLANDC__
#ifdef _MSC_VER
#pragma pack()
#endif //_MSC_VER
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__WNASPI32_H__

View File

@ -1,78 +0,0 @@
CDVDiso v0.5
------------
This is an extension to use with play station2 emulators
as PCSX2 (only one right now).
The plugin is free open source code.
Linux requeriments:
------------------
You need the GTK library, compiled with GTK v1.2.5,
the Zlib library (v1.1.3) and the bz2 library (v1.0.0).
Usage:
-----
Place the file "libCDVDiso.so" (linux) or "CDVDiso.dll" (win32) at the Plugin
directory of the Emulator to use it.
Linux only: Also place the cfgCDVDiso file at your $HOME directory or at the
Emulator directory.
Configuration:
-------------
You can either write the iso you want to use in the config dialog, or everytime
you run the emu open it, if you're doing this don't write anything in the dialog.
Creating an iso (linux only):
---------------
To create an iso you can use the buttons 'Create Iso' or 'Create Compressed Iso',
the file will be the one in the Iso Edit, and the Cdrom Device is the cdrom that
will be used as source.
The compression method is specified by the Compression Method Combo.
Note: This will fail if the file in the Iso Edit already exists (if it's
compressed the .Z or .bz suffix will be added).
Compressed isos:
---------------
You must create them by the Compress Iso button, this will create a .Z or .bz
file (the compressed image) and a .Z.table or .bz.index file (this is a table,
for speed reasons), both will be created in the same dir the selected iso
image, the original image will not be deleted and/or changed, and also you can
decompress the compressed iso with Decompress Iso button.
The compression method is specified by the Compression Method Combo.
Note: you only can decompress the images with the Decompress button, not with
compress or bzip2.
Compression Method:
------------------
.Z - compress faster: this will compress faster, but not as good as the .bz.
.bz - compress better: will compress better, but slower.
Changes:
-------
v0.5:
* Added block dumping code
* Added BZ2/Z2 format ;)
* Added optimaze asm code of zlib with vsnet2003 only. Compression / Uncompression should be faster now (shadow)
* Added Vsnet2005 beta1 project files + amd64 asm optimaze code for zlib (shadow)
v0.4:
* Rewrote mostly ;)
* .bz is still unsupported
v0.3:
* Better Iso detection, thx florin :)
* Updated to PS2Edefs v0.4.5
v0.2:
* Added support for isos using 2048 blocksize
* Nero images are supported
* Better extension filtering
v0.1:
* First Release
* Tested with Pcsx2
Email: <linuzappz@hotmail.com>

View File

@ -1,16 +0,0 @@
#!/bin/sh
curdir=`pwd`
echo ----------------
echo Building CDVDiso
echo ----------------
cd ${curdir}/src/Linux
make $@
# copy the files
if [ -s cfgCDVDiso ] && [ -s libCDVDiso.so ]
then
cp cfgCDVDiso libCDVDiso.so ${PCSX2PLUGINS}
fi

View File

@ -1,80 +0,0 @@
/* CDVDiso
* Copyright (C) 2002-2004 CDVDiso Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef __MSCW32__
#pragma warning(disable:4018)
#endif
#define CDVDdefs
#include "PS2Edefs.h"
#include "libiso.h"
#define CDVD_LOG __Log
extern FILE *cdvdLog;
void __Log(char *fmt, ...);
#define VERBOSE 1
char IsoFile[256];
#define DEV_DEF ""
char CdDev[256];
#define CDDEV_DEF "/dev/cdrom"
int BlockDump;
isoFile *fdump;
isoFile *iso;
typedef struct {
int slsn;
int elsn;
#ifdef __WIN32__
HANDLE handle;
#else
FILE *handle;
#endif
} _cdIso;
_cdIso cdIso[8];
#define CD_FRAMESIZE_RAW 2352
#define DATA_SIZE (CD_FRAMESIZE_RAW-12)
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
#define MSF2SECT(m,s,f) (((m)*60+(s)-2)*75+(f))
extern unsigned char cdbuffer[];
unsigned char *pbuffer;
int cdblocksize;
int cdblockofs;
int cdoffset;
int cdtype;
int cdblocks;
int Zmode; // 1 Z - 2 bz2
int fmode; // 0 - file / 1 - Zfile
char *Ztable;
extern char *methods[];
void UpdateZmode();
void CfgOpenFile();
void SysMessage(char *fmt, ...);

View File

@ -1,418 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
#include <string.h>
#include "CDVDiso.h"
#include "Config.h"
#ifndef MAX_PATH
#define MAX_PATH 255
#endif
FILE *cdvdLog = NULL;
char *methods[] = {
".Z - compress faster",
".BZ - compress better",
NULL
};
#ifdef _DEBUG
char *LibName = "Linuzappz Iso CDVD (Debug) ";
#else
char *LibName = "Linuzappz Iso CDVD ";
#endif
const unsigned char version = PS2E_CDVD_VERSION;
const unsigned char revision = 0;
const unsigned char build = 7;
unsigned char cdbuffer[CD_FRAMESIZE_RAW * 10] = {0};
s32 msf_to_lba(u8 m, u8 s, u8 f) {
u32 lsn;
lsn = f;
lsn+=(s - 2) * 75;
lsn+= m * 75 * 60;
return lsn;
}
void lba_to_msf(s32 lba, u8* m, u8* s, u8* f) {
lba += 150;
*m = lba / (60*75);
*s = (lba / 75) % 60;
*f = lba % 75;
}
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
char* CALLBACK PS2EgetLibName() {
return LibName;
}
u32 CALLBACK PS2EgetLibType() {
return PS2E_LT_CDVD;
}
u32 CALLBACK PS2EgetLibVersion2(u32 type) {
return (version << 16) | (revision << 8) | build;
}
#ifdef _DEBUG
void __Log(char *fmt, ...) {
va_list list;
if( cdvdLog == NULL )
return;
va_start(list, fmt);
vfprintf(cdvdLog, fmt, list);
va_end(list);
}
#else
#define __Log 0&&
#endif
s32 CALLBACK CDVDinit() {
#ifdef _DEBUG
cdvdLog = fopen("logs/cdvdLog.txt", "w");
if (cdvdLog == NULL) {
cdvdLog = fopen("cdvdLog.txt", "w");
if (cdvdLog == NULL) {
SysMessage("Can't create cdvdLog.txt"); return -1;
}
}
setvbuf(cdvdLog, NULL, _IONBF, 0);
CDVD_LOG("CDVDinit\n");
#endif
memset(cdIso, 0, sizeof(cdIso));
return 0;
}
void CALLBACK CDVDshutdown() {
#ifdef CDVD_LOG
if( cdvdLog != NULL )
fclose(cdvdLog);
#endif
}
s32 CALLBACK CDVDopen(const char* pTitle) {
LoadConf();
if( pTitle != NULL ) strcpy(IsoFile, pTitle);
if (*IsoFile == 0) {
char temp[256];
CfgOpenFile();
LoadConf();
strcpy(temp, IsoFile);
*IsoFile = 0;
SaveConf();
strcpy(IsoFile, temp);
}
iso = isoOpen(IsoFile);
if (iso == NULL) {
SysMessage("Error loading %s\n", IsoFile);
return -1;
}
if (iso->type == ISOTYPE_DVD) {
cdtype = CDVD_TYPE_PS2DVD;
} else
if (iso->type == ISOTYPE_AUDIO) {
cdtype = CDVD_TYPE_CDDA;
} else {
cdtype = CDVD_TYPE_PS2CD;
}
if (BlockDump) {
char fname_only[MAX_PATH];
char* p, *plast;
#ifdef _WIN32
char fname[MAX_PATH],ext[MAX_PATH];
_splitpath(IsoFile,NULL,NULL,fname,ext);
_makepath(fname_only,NULL,NULL,fname,NULL);
#else
plast = p = strchr(IsoFile, '/');
while(p != NULL) {
plast = p;
p = strchr(p+1, '/');
}
if( plast != NULL ) strcpy(fname_only, plast+1);
else strcpy(fname_only, IsoFile);
plast = p = strchr(fname_only, '.');
while(p != NULL) {
plast = p;
p = strchr(p+1, '.');
}
if( plast != NULL ) *plast = 0;
#endif
strcat(fname_only, ".dump");
fdump = isoCreate(fname_only, ISOFLAGS_BLOCKDUMP);
if (fdump) {
isoSetFormat(fdump, iso->blockofs, iso->blocksize, iso->blocks);
}
} else {
fdump = NULL;
}
return 0;
}
void CALLBACK CDVDclose() {
isoClose(iso);
if (fdump != NULL) {
isoClose(fdump);
}
}
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ* subq) {
// fake it
u8 min, sec, frm;
subq->ctrl = 4;
subq->mode = 1;
subq->trackNum = itob(1);
subq->trackIndex= itob(1);
lba_to_msf(lsn, &min, &sec, &frm);
subq->trackM = itob(min);
subq->trackS = itob(sec);
subq->trackF = itob(frm);
subq->pad = 0;
lba_to_msf(lsn + (2*75), &min, &sec, &frm);
subq->discM = itob(min);
subq->discS = itob(sec);
subq->discF = itob(frm);
return 0;
}
s32 CALLBACK CDVDgetTN(cdvdTN *Buffer) {
Buffer->strack = 1;
Buffer->etrack = 1;
return 0;
}
s32 CALLBACK CDVDgetTD(u8 Track, cdvdTD *Buffer) {
if (Track == 0) {
Buffer->lsn = iso->blocks;
} else {
Buffer->type = CDVD_MODE1_TRACK;
Buffer->lsn = 0;
}
return 0;
}
static int layer1start = -1;
s32 CALLBACK CDVDgetTOC(void* toc) {
u8 type = CDVDgetDiskType();
u8* tocBuff = (u8*)toc;
//__Log("CDVDgetTOC\n");
if( type == CDVD_TYPE_DVDV || type == CDVD_TYPE_PS2DVD)
{
int i;
// get dvd structure format
// scsi command 0x43
memset(tocBuff, 0, 2048);
if( layer1start != -2 && iso->blocks >= 0x300000 ) {
int off = iso->blockofs;
char* tempbuffer;
// dual sided
tocBuff[ 0] = 0x24;
tocBuff[ 1] = 0x02;
tocBuff[ 2] = 0xF2;
tocBuff[ 3] = 0x00;
tocBuff[ 4] = 0x41;
tocBuff[ 5] = 0x95;
tocBuff[14] = 0x60; // dual sided, ptp
tocBuff[16] = 0x00;
tocBuff[17] = 0x03;
tocBuff[18] = 0x00;
tocBuff[19] = 0x00;
// search for it
if( layer1start == -1 ) {
printf("CDVD: searching for layer1...");
tempbuffer = (char*)malloc(CD_FRAMESIZE_RAW * 10);
for(layer1start = (iso->blocks/2-0x10)&~0xf; layer1start < 0x200010; layer1start += 16) {
isoReadBlock(iso, tempbuffer, layer1start);
// CD001
if( tempbuffer[off+1] == 0x43 && tempbuffer[off+2] == 0x44 && tempbuffer[off+3] == 0x30 && tempbuffer[off+4] == 0x30 && tempbuffer[off+5] == 0x31 ) {
break;
}
}
free(tempbuffer);
if( layer1start == 0x200010 ) {
printf("Couldn't find second layer on dual layer... ignoring\n");
// fake it
tocBuff[ 0] = 0x04;
tocBuff[ 1] = 0x02;
tocBuff[ 2] = 0xF2;
tocBuff[ 3] = 0x00;
tocBuff[ 4] = 0x86;
tocBuff[ 5] = 0x72;
tocBuff[16] = 0x00;
tocBuff[17] = 0x03;
tocBuff[18] = 0x00;
tocBuff[19] = 0x00;
layer1start = -2;
return 0;
}
printf("found at 0x%8.8x\n", layer1start);
layer1start = layer1start+0x30000-1;
}
tocBuff[20] = layer1start>>24;
tocBuff[21] = (layer1start>>16)&0xff;
tocBuff[22] = (layer1start>>8)&0xff;
tocBuff[23] = (layer1start>>0)&0xff;
}
else {
// fake it
tocBuff[ 0] = 0x04;
tocBuff[ 1] = 0x02;
tocBuff[ 2] = 0xF2;
tocBuff[ 3] = 0x00;
tocBuff[ 4] = 0x86;
tocBuff[ 5] = 0x72;
tocBuff[16] = 0x00;
tocBuff[17] = 0x03;
tocBuff[18] = 0x00;
tocBuff[19] = 0x00;
}
}
else if(type == CDVD_TYPE_CDDA ||
type == CDVD_TYPE_PS2CDDA ||
type == CDVD_TYPE_PS2CD ||
type == CDVD_TYPE_PSCDDA ||
type == CDVD_TYPE_PSCD)
{
// cd toc
// (could be replaced by 1 command that reads the full toc)
u8 min, sec, frm;
s32 i, err;
cdvdTN diskInfo;
cdvdTD trackInfo;
memset(tocBuff, 0, 1024);
if (CDVDgetTN(&diskInfo) == -1) { diskInfo.etrack = 0;diskInfo.strack = 1; }
if (CDVDgetTD(0, &trackInfo) == -1) trackInfo.lsn = 0;
tocBuff[0] = 0x41;
tocBuff[1] = 0x00;
//Number of FirstTrack
tocBuff[2] = 0xA0;
tocBuff[7] = itob(diskInfo.strack);
//Number of LastTrack
tocBuff[12] = 0xA1;
tocBuff[17] = itob(diskInfo.etrack);
//DiskLength
lba_to_msf(trackInfo.lsn, &min, &sec, &frm);
tocBuff[22] = 0xA2;
tocBuff[27] = itob(min);
tocBuff[28] = itob(sec);
for (i=diskInfo.strack; i<=diskInfo.etrack; i++)
{
err = CDVDgetTD(i, &trackInfo);
lba_to_msf(trackInfo.lsn, &min, &sec, &frm);
tocBuff[i*10+30] = trackInfo.type;
tocBuff[i*10+32] = err == -1 ? 0 : itob(i); //number
tocBuff[i*10+37] = itob(min);
tocBuff[i*10+38] = itob(sec);
tocBuff[i*10+39] = itob(frm);
}
}
else
return -1;
return 0;
}
s32 CALLBACK CDVDreadTrack(u32 lsn, int mode) {
int _lsn = lsn;
//__Log("CDVDreadTrack: %x %x\n", lsn, mode);
if (_lsn < 0) {
// lsn = 2097152 + (-_lsn);
lsn = iso->blocks - (-_lsn);
}
// printf ("CDRreadTrack %d\n", lsn);
isoReadBlock(iso, cdbuffer, lsn);
if (fdump != NULL) {
isoWriteBlock(fdump, cdbuffer, lsn);
}
pbuffer = cdbuffer;
switch (mode) {
case CDVD_MODE_2352: break;
case CDVD_MODE_2340: pbuffer+= 12; break;
case CDVD_MODE_2328: pbuffer+= 24; break;
case CDVD_MODE_2048: pbuffer+= 24; break;
}
return 0;
}
u8* CALLBACK CDVDgetBuffer() {
return pbuffer;
}
s32 CALLBACK CDVDgetDiskType() {
return cdtype;
}
s32 CALLBACK CDVDgetTrayStatus() {
return CDVD_TRAY_CLOSE;
}
s32 CALLBACK CDVDctrlTrayOpen() {
return 0;
}
s32 CALLBACK CDVDctrlTrayClose() {
return 0;
}
s32 CALLBACK CDVDtest() {
if (*IsoFile == 0)
return 0;
iso = isoOpen(IsoFile);
if (iso == NULL) return -1;
isoClose(iso);
return 0;
}

View File

@ -1,368 +0,0 @@
<?xml version="1.0"?>
<GTK-Interface>
<project>
<name>cdriso</name>
<program_name>cdriso</program_name>
<directory></directory>
<source_directory></source_directory>
<pixmaps_directory></pixmaps_directory>
<language>C</language>
<gnome_support>False</gnome_support>
<gettext_support>False</gettext_support>
<output_main_file>False</output_main_file>
<output_build_files>False</output_build_files>
<backup_source_files>False</backup_source_files>
</project>
<widget>
<class>GtkWindow</class>
<name>Config</name>
<border_width>5</border_width>
<title>CDVD Config Dialog</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_CENTER</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<widget>
<class>GtkVBox</class>
<name>vbox1</name>
<border_width>5</border_width>
<homogeneous>False</homogeneous>
<spacing>5</spacing>
<widget>
<class>GtkHBox</class>
<name>hbox1</name>
<homogeneous>False</homogeneous>
<spacing>10</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkEntry</class>
<name>GtkEntry_Iso</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>button5</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnFileSel</handler>
<last_modification_time>Tue, 19 Feb 2002 05:35:24 GMT</last_modification_time>
</signal>
<label>Select Iso</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox2</name>
<homogeneous>False</homogeneous>
<spacing>10</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkProgressBar</class>
<name>GtkProgressBar_Progress</name>
<value>0</value>
<lower>0</lower>
<upper>100</upper>
<bar_style>GTK_PROGRESS_CONTINUOUS</bar_style>
<orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation>
<activity_mode>False</activity_mode>
<show_text>False</show_text>
<format>%P %%</format>
<text_xalign>0.5</text_xalign>
<text_yalign>0.5</text_yalign>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>button6</name>
<width>61</width>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnStop</handler>
<last_modification_time>Tue, 19 Feb 2002 05:34:11 GMT</last_modification_time>
</signal>
<label>Stop</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
<pack>GTK_PACK_END</pack>
</child>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox4</name>
<homogeneous>False</homogeneous>
<spacing>5</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label2</name>
<label>Compression Method:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>GtkCombo_Method</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>combo-entry1</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
</widget>
<widget>
<class>GtkHButtonBox</class>
<name>hbuttonbox2</name>
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
<spacing>0</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkButton</class>
<name>GtkButton_Compress</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnCompress</handler>
<last_modification_time>Tue, 19 Feb 2002 05:40:44 GMT</last_modification_time>
</signal>
<label>Compress Iso</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>GtkButton_Decompress</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnDecompress</handler>
<last_modification_time>Tue, 19 Feb 2002 06:56:17 GMT</last_modification_time>
</signal>
<label>Decompress Iso</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox3</name>
<homogeneous>False</homogeneous>
<spacing>5</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label1</name>
<label>Cdrom Device: </label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkEntry</class>
<name>GtkEntry_CdDev</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkHButtonBox</class>
<name>hbuttonbox3</name>
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
<spacing>0</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkButton</class>
<name>GtkButton_Create</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnCreate</handler>
<last_modification_time>Tue, 19 Feb 2002 21:06:29 GMT</last_modification_time>
</signal>
<label>Create Iso</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>GtkButton_CreateZ</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnCreateZ</handler>
<last_modification_time>Tue, 19 Feb 2002 21:06:19 GMT</last_modification_time>
</signal>
<label>Create Compressed Iso</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
<widget>
<class>GtkHButtonBox</class>
<name>hbuttonbox1</name>
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
<spacing>0</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkButton</class>
<name>button1</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnOk</handler>
<last_modification_time>Tue, 19 Feb 2002 05:42:17 GMT</last_modification_time>
</signal>
<label>Ok</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>button2</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>OnCancel</handler>
<last_modification_time>Tue, 19 Feb 2002 05:42:24 GMT</last_modification_time>
</signal>
<label>Cancel</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</widget>
</widget>
</GTK-Interface>

View File

@ -1,59 +0,0 @@
/* CDVDiso
* Copyright (C) 2002-2004 CDVDiso Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include "CDVDiso.h"
void LoadConf() {
FILE *f;
char cfg[256];
sprintf(cfg, "%s/.PS2E/CDVDiso.cfg", getenv("HOME"));
f = fopen(cfg, "r");
if (f == NULL) {
strcpy(IsoFile, DEV_DEF);
strcpy(CdDev, CDDEV_DEF);
return;
}
fscanf(f, "IsoFile = %[^\n]\n", IsoFile);
fscanf(f, "CdDev = %[^\n]\n", CdDev);
if (!strncmp(IsoFile, "CdDev =", 9)) *IsoFile = 0; // quick fix
if (*CdDev == 0) strcpy(CdDev, CDDEV_DEF);
fclose(f);
}
void SaveConf() {
FILE *f;
char cfg[256];
sprintf(cfg, "%s/.PS2E", getenv("HOME"));
mkdir(cfg, 0755);
sprintf(cfg, "%s/.PS2E/CDVDiso.cfg", getenv("HOME"));
f = fopen(cfg, "w");
if (f == NULL)
return;
fprintf(f, "IsoFile = %s\n", IsoFile);
fprintf(f, "CdDev = %s\n", CdDev);
fclose(f);
}

View File

@ -1,20 +0,0 @@
/* CDVDiso
* Copyright (C) 2002-2004 CDVDiso Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
void SaveConf();
void LoadConf();

View File

@ -1,76 +0,0 @@
/* CDVDiso
* Copyright (C) 2002-2004 CDVDiso Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/stat.h>
#include "Config.h"
#include "CDVDiso.h"
void ExecCfg(char *arg) {
char cfg[256];
struct stat buf;
strcpy(cfg, "./cfgCDVDiso");
if (stat(cfg, &buf) != -1) {
sprintf(cfg, "%s %s", cfg, arg);
system(cfg); return;
}
strcpy(cfg, "./cfg/cfgCDVDiso");
if (stat(cfg, &buf) != -1) {
sprintf(cfg, "%s %s", cfg, arg);
system(cfg); return;
}
sprintf(cfg, "%s/cfgCDVDiso", getenv("HOME"));
if (stat(cfg, &buf) != -1) {
sprintf(cfg, "%s %s", cfg, arg);
system(cfg); return;
}
printf("cfgCDVDiso file not found!\n");
}
void CDVDconfigure() {
ExecCfg("configure");
}
void CDVDabout() {
ExecCfg("about");
}
void CfgOpenFile() {
ExecCfg("open");
}
void SysMessage(char *fmt, ...) {
va_list list;
char tmp[256];
char cmd[256];
va_start(list, fmt);
vsprintf(tmp, fmt, list);
va_end(list);
sprintf(cmd, "message \"%s\"", tmp);
ExecCfg(cmd);
}

View File

@ -1,33 +0,0 @@
CC = gcc
PLUGIN = libCDVDiso.so
CFG = cfgCDVDiso
MKISO = mkiso
CFLAGS = -fPIC -Wall -g -I.. -I. -D__LINUX__
OBJS = ../CDVDisop.o Config.o Linux.o ../libiso.o
CFGOBJS = conf.o interface.o support.o ${OBJS}
LIBS = -lz -lbz2 -lstdc++
CFGLIBS = $(shell pkg-config --libs gtk+-2.0) ${LIBS}
CFLAGS += $(shell pkg-config --cflags gtk+-2.0)
DEPS:= $(OBJS:.o=.d) $(CFGOBJS:.o=.d)
all: plugin cfg
install: all
plugin: ${OBJS}
rm -f ${PLUGIN}
${CC} -shared -Wl,-soname,${PLUGIN} ${CFLAGS} ${OBJS} -o ${PLUGIN} ${LIBS}
cfg: ${CFGOBJS}
rm -f ${CFG}
${CC} ${CFLAGS} ${CFGOBJS} -o ${CFG} ${CFGLIBS}
strip ${CFG}
clean:
rm -f ${OBJS} ${DEPS} ${PLUGIN} ${CFGOBJS} ${CFG}
%.o: %.c
${CC} ${CFLAGS} -c -o $@ $< -MD -MF $(patsubst %.o,%.d,$@)
-include ${DEPS}

View File

@ -1,98 +0,0 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
void
OnFileSel (GtkButton *button,
gpointer user_data)
{
}
void
OnStop (GtkButton *button,
gpointer user_data)
{
}
void
OnCreate (GtkButton *button,
gpointer user_data)
{
}
void
OnCompress (GtkButton *button,
gpointer user_data)
{
}
void
OnConfig_Ok (GtkButton *button,
gpointer user_data)
{
}
void
OnConfig_Cancel (GtkButton *button,
gpointer user_data)
{
}
void
OnOk (GtkButton *button,
gpointer user_data)
{
}
void
OnCancel (GtkButton *button,
gpointer user_data)
{
}
void
OnDecompress (GtkButton *button,
gpointer user_data)
{
}
void
OnCreate (GtkButton *button,
gpointer user_data)
{
}
void
OnCreateZ (GtkButton *button,
gpointer user_data)
{
}

View File

@ -1,46 +0,0 @@
#include <gtk/gtk.h>
void
OnFileSel (GtkButton *button,
gpointer user_data);
void
OnStop (GtkButton *button,
gpointer user_data);
void
OnCreate (GtkButton *button,
gpointer user_data);
void
OnCompress (GtkButton *button,
gpointer user_data);
void
OnConfig_Ok (GtkButton *button,
gpointer user_data);
void
OnConfig_Cancel (GtkButton *button,
gpointer user_data);
void
OnOk (GtkButton *button,
gpointer user_data);
void
OnCancel (GtkButton *button,
gpointer user_data);
void
OnDecompress (GtkButton *button,
gpointer user_data);
void
OnCreate (GtkButton *button,
gpointer user_data);
void
OnCreateZ (GtkButton *button,
gpointer user_data);

View File

@ -1,865 +0,0 @@
/* CDVDiso
* Copyright (C) 2002-2004 CDVDiso Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
#include <time.h>
#include <string.h>
#include <zlib.h>
#include <bzlib.h>
#include <gtk/gtk.h>
#include "interface.h"
#include "support.h"
#include "CDVDiso.h"
#include "Config.h"
unsigned char Zbuf[CD_FRAMESIZE_RAW * 10 * 2];
extern char *LibName;
extern const unsigned char revision;
extern const unsigned char build;
GtkWidget *FileSel;
void OnFile_Ok() {
gchar *File;
gtk_widget_hide(FileSel);
File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel));
strcpy(IsoFile, File);
gtk_main_quit();
}
void OnFile_Cancel() {
gtk_widget_hide(FileSel);
gtk_main_quit();
}
void _CDRopen() {
GtkWidget *Ok, *Cancel;
FileSel = gtk_file_selection_new("Select Iso File");
Ok = GTK_FILE_SELECTION(FileSel)->ok_button;
gtk_signal_connect(GTK_OBJECT(Ok), "clicked",
GTK_SIGNAL_FUNC(OnFile_Ok), NULL);
gtk_widget_show(Ok);
Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button;
gtk_signal_connect(GTK_OBJECT(Cancel), "clicked",
GTK_SIGNAL_FUNC(OnFile_Cancel), NULL);
gtk_widget_show(Cancel);
gtk_widget_show(FileSel);
gdk_window_raise(FileSel->window);
gtk_main();
SaveConf();
}
GtkWidget *MsgDlg;
void OnMsg_Ok() {
gtk_widget_destroy(MsgDlg);
gtk_main_quit();
}
static void SysMessageLoc(char *fmt, ...) {
GtkWidget *Ok,*Txt;
GtkWidget *Box,*Box1;
va_list list;
int w;
char msg[512];
va_start(list, fmt);
vsprintf(msg, fmt, list);
va_end(list);
if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0;
w = strlen(msg) * 6 + 20;
MsgDlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(MsgDlg, w, 70);
gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER);
gtk_window_set_title(GTK_WINDOW(MsgDlg), "cdriso Msg");
gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 0);
Box = gtk_vbox_new(0, 0);
gtk_container_add(GTK_CONTAINER(MsgDlg), Box);
gtk_widget_show(Box);
Txt = gtk_label_new(msg);
gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5);
gtk_widget_show(Txt);
Box1 = gtk_hbutton_box_new();
gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0);
gtk_widget_show(Box1);
Ok = gtk_button_new_with_label("Ok");
gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL);
gtk_container_add(GTK_CONTAINER(Box1), Ok);
GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT);
gtk_widget_show(Ok);
gtk_widget_show(MsgDlg);
gtk_main();
}
GtkWidget *ConfDlg;
GtkWidget *Edit, *CdEdit;
GtkWidget *FileSel;
GtkWidget *Progress;
GtkWidget *BtnCompress;
GtkWidget *BtnDecompress;
GtkWidget *BtnCreate;
GtkWidget *BtnCreateZ;
GtkWidget *Method;
GList *methodlist;
extern char *methods[];
int stop;
void OnOk(GtkMenuItem * menuitem, gpointer userdata) {
char *tmp;
stop=1;
tmp = gtk_entry_get_text(GTK_ENTRY(Edit));
strcpy(IsoFile, tmp);
tmp = gtk_entry_get_text(GTK_ENTRY(CdEdit));
strcpy(CdDev, tmp);
SaveConf();
gtk_widget_destroy(ConfDlg);
gtk_main_quit();
}
void OnCancel(GtkMenuItem * menuitem, gpointer userdata) {
stop=1;
gtk_widget_destroy(ConfDlg);
gtk_main_quit();
}
void OnFileSel_Ok() {
gchar *File;
File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel));
gtk_entry_set_text(GTK_ENTRY(Edit), File);
gtk_widget_destroy(FileSel);
}
void OnFileSel_Cancel() {
gtk_widget_destroy(FileSel);
}
void OnFileSel() {
GtkWidget *Ok,*Cancel;
FileSel = gtk_file_selection_new("Select Psx Iso File");
gtk_file_selection_set_filename(GTK_FILE_SELECTION(FileSel), IsoFile);
Ok = GTK_FILE_SELECTION(FileSel)->ok_button;
gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnFileSel_Ok), NULL);
gtk_widget_show(Ok);
Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button;
gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnFileSel_Cancel), NULL);
gtk_widget_show(Cancel);
gtk_widget_show(FileSel);
gdk_window_raise(FileSel->window);
}
void OnStop() {
stop=1;
}
void UpdZmode() {
char *tmp;
tmp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(Method)->entry));
if (!strcmp(tmp, methods[0])) Zmode = 1;
else Zmode = 2;
}
char buffer[2352 * 10];
void OnCompress() {
struct stat buf;
u32 lsn;
u8 cdbuff[10*2352];
char Zfile[256];
char *tmp;
int ret;
isoFile *src;
isoFile *dst;
tmp = gtk_entry_get_text(GTK_ENTRY(Edit));
strcpy(IsoFile, tmp);
UpdZmode();
if (Zmode == 1) sprintf(Zfile, "%s.Z2", IsoFile);
if (Zmode == 2) sprintf(Zfile, "%s.BZ2", IsoFile);
if (stat(Zfile, &buf) != -1) {
char str[256];
return;
/* sprintf(str, "'%s' already exists, overwrite?", Zfile);
if (MessageBox(hDlg, str, "Question", MB_YESNO) != IDYES) {
return;
}*/
}
src = isoOpen(IsoFile);
if (src == NULL) return;
dst = isoCreate(Zfile, Zmode == 1 ? ISOFLAGS_Z2 : ISOFLAGS_BZ2);
if (dst == NULL) return;
gtk_widget_set_sensitive(BtnCompress, FALSE);
gtk_widget_set_sensitive(BtnDecompress, FALSE);
gtk_widget_set_sensitive(BtnCreate, FALSE);
gtk_widget_set_sensitive(BtnCreateZ, FALSE);
stop=0;
for (lsn = 0; lsn<src->blocks; lsn++) {
printf("block %d ", lsn);
putchar(13);
fflush(stdout);
ret = isoReadBlock(src, cdbuff, lsn);
if (ret == -1) break;
ret = isoWriteBlock(dst, cdbuff, lsn);
if (ret == -1) break;
gtk_progress_bar_update(GTK_PROGRESS_BAR(Progress), (lsn * 100) / src->blocks);
while (gtk_events_pending()) gtk_main_iteration();
if (stop) break;
}
isoClose(src);
isoClose(dst);
if (!stop) gtk_entry_set_text(GTK_ENTRY(Edit), IsoFile);
gtk_widget_set_sensitive(BtnCompress, TRUE);
gtk_widget_set_sensitive(BtnDecompress, TRUE);
gtk_widget_set_sensitive(BtnCreate, TRUE);
gtk_widget_set_sensitive(BtnCreateZ, TRUE);
if (!stop) {
if (ret == -1) {
SysMessageLoc("Error compressing iso image");
} else {
SysMessageLoc("Iso image compressed OK");
}
}
}
void OnDecompress() {
#if 0
struct stat buf;
FILE *f;
unsigned long c=0, p=0, s;
char table[256];
char *tmp;
int blocks;
tmp = gtk_entry_get_text(GTK_ENTRY(Edit));
strcpy(IsoFile, tmp);
if (strstr(IsoFile, ".Z") != NULL) Zmode = 1;
else Zmode = 2;
strcpy(table, IsoFile);
if (Zmode == 1) strcat(table, ".table");
else strcat(table, ".index");
if (stat(table, &buf) == -1) {
return;
}
if (Zmode == 1) c = s = buf.st_size / 6;
else c = s = (buf.st_size / 4) - 1;
f = fopen(table, "rb");
Ztable = (char*)malloc(buf.st_size);
fread(Ztable, 1, buf.st_size, f);
fclose(f);
cdHandle[0] = fopen(IsoFile, "rb");
if (cdHandle[0] == NULL) {
return;
}
if (Zmode == 1) IsoFile[strlen(IsoFile) - 2] = 0;
else IsoFile[strlen(IsoFile) - 3] = 0;
f = fopen(IsoFile, "wb");
if (f == NULL) {
return;
}
gtk_widget_set_sensitive(BtnCompress, FALSE);
gtk_widget_set_sensitive(BtnDecompress, FALSE);
gtk_widget_set_sensitive(BtnCreate, FALSE);
gtk_widget_set_sensitive(BtnCreateZ, FALSE);
stop=0;
if (Zmode == 1) {
blocks = 1;
} else {
blocks = 10;
}
while (c--) {
unsigned long size, pos, ssize;
float per;
if (Zmode == 1) {
pos = *(unsigned long*)&Ztable[p * 6];
fseek(cdHandle[0], pos, SEEK_SET);
ssize = *(unsigned short*)&Ztable[p * 6 + 4];
fread(Zbuf, 1, ssize, cdHandle[0]);
} else {
pos = *(unsigned long*)&Ztable[p * 4];
fseek(cdHandle[0], pos, SEEK_SET);
ssize = *(unsigned long*)&Ztable[p * 4 + 4] - pos;
fread(Zbuf, 1, ssize, cdHandle[0]);
}
size = CD_FRAMESIZE_RAW * blocks;
if (Zmode == 1) uncompress(cdbuffer, &size, Zbuf, ssize);
else BZ2_bzBuffToBuffDecompress(cdbuffer, (unsigned int*)&size, Zbuf, ssize, 0, 0);
fwrite(cdbuffer, 1, size, f);
p++;
per = ((float)p / s);
gtk_progress_bar_update(GTK_PROGRESS_BAR(Progress), per);
while (gtk_events_pending()) gtk_main_iteration();
if (stop) break;
}
if (!stop) gtk_entry_set_text(GTK_ENTRY(Edit), IsoFile);
fclose(f);
fclose(cdHandle[0]); cdHandle[0] = NULL;
free(Ztable); Ztable = NULL;
gtk_widget_set_sensitive(BtnCompress, TRUE);
gtk_widget_set_sensitive(BtnDecompress, TRUE);
gtk_widget_set_sensitive(BtnCreate, TRUE);
gtk_widget_set_sensitive(BtnCreateZ, TRUE);
if (!stop) SysMessageLoc("Iso Image Decompressed OK");
#endif
}
#define CD_LEADOUT (0xaa)
unsigned char param[4];
int cddev = -1;
union {
struct cdrom_msf msf;
unsigned char buf[CD_FRAMESIZE_RAW];
} cr;
void incSector() {
param[2]++;
if (param[2] == 75) {
param[2] = 0;
param[1]++;
}
if (param[1] == 60) {
param[1] = 0;
param[0]++;
}
}
long CDR_open(void) {
if (cddev != -1)
return 0;
cddev = open(CdDev, O_RDONLY);
if (cddev == -1) {
printf("CDR: Could not open %s\n", CdDev);
return -1;
}
return 0;
}
long CDR_close(void) {
if (cddev == -1) return 0;
close(cddev);
cddev = -1;
return 0;
}
// return Starting and Ending Track
// buffer:
// byte 0 - start track
// byte 1 - end track
long CDR_getTN(unsigned char *buffer) {
struct cdrom_tochdr toc;
if (ioctl(cddev, CDROMREADTOCHDR, &toc) == -1) return -1;
buffer[0] = toc.cdth_trk0; // start track
buffer[1] = toc.cdth_trk1; // end track
return 0;
}
// return Track Time
// buffer:
// byte 0 - frame
// byte 1 - second
// byte 2 - minute
long CDR_getTD(unsigned char track, unsigned char *buffer) {
struct cdrom_tocentry entry;
if (track == 0) track = 0xaa; // total time
entry.cdte_track = track;
entry.cdte_format = CDROM_MSF;
if (ioctl(cddev, CDROMREADTOCENTRY, &entry) == -1) return -1;
buffer[0] = entry.cdte_addr.msf.minute; /* minute */
buffer[1] = entry.cdte_addr.msf.second; /* second */
buffer[2] = entry.cdte_addr.msf.frame; /* frame */
return 0;
}
// read track
// time:
// byte 0 - minute
// byte 1 - second
// byte 2 - frame
char *CDR_readTrack(unsigned char *time) {
cr.msf.cdmsf_min0 = time[0];
cr.msf.cdmsf_sec0 = time[1];
cr.msf.cdmsf_frame0 = time[2];
if (ioctl(cddev, CDROMREADRAW, &cr) == -1) return NULL;
return cr.buf;
}
void OnCreate() {
FILE *f;
struct stat buf;
struct tm *Tm;
time_t Ttime;
unsigned long ftrack, ltrack;
unsigned long p=0,s;
unsigned char *buffer;
unsigned char bufferz[2352];
unsigned char start[4], end[4];
char *tmp;
#ifdef VERBOSE
unsigned long count = 0;
int i=0;
#endif
memset(bufferz, 0, sizeof(bufferz));
ftrack = 1;
ltrack = CD_LEADOUT;
tmp = gtk_entry_get_text(GTK_ENTRY(Edit));
strcpy(IsoFile, tmp);
if (stat(IsoFile, &buf) == 0) {
printf("File %s Already exists\n", IsoFile);
return;
}
if (CDR_open() == -1) {
return;
}
if (CDR_getTD(ftrack, start) == -1) {
printf("Error getting TD\n");
CDR_close();
return;
}
if (CDR_getTD(ltrack, end) == -1) {
printf("Error getting TD\n");
CDR_close();
return;
}
f = fopen(IsoFile, "wb");
if (f == NULL) {
CDR_close();
printf("Error opening %s", IsoFile);
return;
}
printf("Making Iso: from %2.2d:%2.2d:%2.2d to %2.2d:%2.2d:%2.2d\n",
start[0], start[1], start[2], end[0], end[1], end[2]);
memcpy(param, start, 3);
time(&Ttime);
stop = 0;
s = MSF2SECT(end[0], end[1], end[2]);
gtk_widget_set_sensitive(BtnCompress, FALSE);
gtk_widget_set_sensitive(BtnDecompress, FALSE);
gtk_widget_set_sensitive(BtnCreate, FALSE);
gtk_widget_set_sensitive(BtnCreateZ, FALSE);
for (;;) { /* loop until end */
float per;
if ((param[0] == end[0]) & (param[1] == end[1]) & (param[2] == end[2]))
break;
buffer = CDR_readTrack(param);
if (buffer == NULL) {
int i;
for (i=0; i<10; i++) {
buffer = CDR_readTrack(param);
if (buffer != NULL) break;
}
if (buffer == NULL) {
printf("Error Reading %2d:%2d:%2d\n", param[0], param[1], param[2]);
buffer = bufferz;
buffer[12] = param[0];
buffer[13] = param[1];
buffer[14] = param[2];
buffer[15] = 0x2;
}
}
fwrite(buffer, 1, 2352, f);
#ifdef VERBOSE
count+= CD_FRAMESIZE_RAW;
printf("reading %2d:%2d:%2d ", param[0], param[1], param[2]);
if ((time(NULL) - Ttime) != 0) {
i = (count / 1024) / (time(NULL) - Ttime);
printf("( %5dKbytes/s, %dX)", i, i / 150);
}
putchar(13);
fflush(stdout);
#endif
incSector();
p++;
per = ((float)p / s);
gtk_progress_bar_update(GTK_PROGRESS_BAR(Progress), per);
while (gtk_events_pending()) gtk_main_iteration();
if (stop) break;
}
Ttime = time(NULL) - Ttime;
Tm = gmtime(&Ttime);
printf("\nTotal Time used: %d:%d:%d\n", Tm->tm_hour, Tm->tm_min,
Tm->tm_sec);
CDR_close();
fclose(f);
gtk_widget_set_sensitive(BtnCompress, TRUE);
gtk_widget_set_sensitive(BtnDecompress, TRUE);
gtk_widget_set_sensitive(BtnCreate, TRUE);
gtk_widget_set_sensitive(BtnCreateZ, TRUE);
if (!stop) SysMessageLoc("Iso Image Created OK");
}
void OnCreateZ() {
FILE *f;
FILE *t;
struct stat buf;
struct tm *Tm;
time_t Ttime;
unsigned long ftrack, ltrack;
unsigned long p=0,s,c=0;
unsigned char *buffer;
unsigned char bufferz[2352];
unsigned char start[4], end[4];
char table[256];
char *tmp;
int b, blocks;
#ifdef VERBOSE
unsigned long count = 0;
int i=0;
#endif
memset(bufferz, 0, sizeof(bufferz));
ftrack = 1;
ltrack = CD_LEADOUT;
tmp = gtk_entry_get_text(GTK_ENTRY(Edit));
strcpy(IsoFile, tmp);
UpdZmode();
if (Zmode == 1) {
blocks = 1;
if (strstr(IsoFile, ".Z") == NULL) strcat(IsoFile, ".Z");
} else {
blocks = 10;
if (strstr(IsoFile, ".bz") == NULL) strcat(IsoFile, ".bz");
}
if (stat(IsoFile, &buf) == 0) {
printf("File %s Already exists\n", IsoFile);
return;
}
strcpy(table, IsoFile);
if (Zmode == 1) strcat(table, ".table");
else strcat(table, ".index");
t = fopen(table, "wb");
if (t == NULL) {
return;
}
if (CDR_open() == -1) {
return;
}
if (CDR_getTD(ftrack, start) == -1) {
printf("Error getting TD\n");
CDR_close();
return;
}
if (CDR_getTD(ltrack, end) == -1) {
printf("Error getting TD\n");
CDR_close();
return;
}
f = fopen(IsoFile, "wb");
if (f == NULL) {
CDR_close();
printf("Error opening %s", IsoFile);
return;
}
printf("Making Iso: from %2.2d:%2.2d:%2.2d to %2.2d:%2.2d:%2.2d\n",
start[0], start[1], start[2], end[0], end[1], end[2]);
memcpy(param, start, 3);
time(&Ttime);
stop = 0;
s = MSF2SECT(end[0], end[1], end[2]) / blocks;
gtk_widget_set_sensitive(BtnCompress, FALSE);
gtk_widget_set_sensitive(BtnDecompress, FALSE);
gtk_widget_set_sensitive(BtnCreate, FALSE);
gtk_widget_set_sensitive(BtnCreateZ, FALSE);
for (;;) { /* loop until end */
unsigned long size;
unsigned char Zbuf[CD_FRAMESIZE_RAW * 10 * 2];
float per;
for (b=0; b<blocks; b++) {
if ((param[0] == end[0]) & (param[1] == end[1]) & (param[2] == end[2]))
break;
buffer = CDR_readTrack(param);
if (buffer == NULL) {
int i;
for (i=0; i<10; i++) {
buffer = CDR_readTrack(param);
if (buffer != NULL) break;
}
if (buffer == NULL) {
printf("Error Reading %2d:%2d:%2d\n", param[0], param[1], param[2]);
buffer = bufferz;
buffer[12] = param[0];
buffer[13] = param[1];
buffer[14] = param[2];
buffer[15] = 0x2;
}
}
memcpy(cdbuffer + b * CD_FRAMESIZE_RAW, buffer, CD_FRAMESIZE_RAW);
incSector();
}
if ((param[0] == end[0]) & (param[1] == end[1]) & (param[2] == end[2]))
break;
size = CD_FRAMESIZE_RAW * blocks * 2;
if (Zmode == 1) compress(Zbuf, &size, cdbuffer, CD_FRAMESIZE_RAW);
else BZ2_bzBuffToBuffCompress(Zbuf, (unsigned int*)&size, cdbuffer, CD_FRAMESIZE_RAW * 10, 1, 0, 30);
fwrite(&c, 1, 4, t);
if (Zmode == 1) fwrite(&size, 1, 2, t);
fwrite(Zbuf, 1, size, f);
c+=size;
#ifdef VERBOSE
count+= CD_FRAMESIZE_RAW * blocks;
printf("reading %2d:%2d:%2d ", param[0], param[1], param[2]);
if ((time(NULL) - Ttime) != 0) {
i = (count / 1024) / (time(NULL) - Ttime);
printf("( %5dKbytes/s, %dX)", i, i / 150);
}
putchar(13);
fflush(stdout);
#endif
p++;
per = ((float)p / s);
gtk_progress_bar_update(GTK_PROGRESS_BAR(Progress), per);
while (gtk_events_pending()) gtk_main_iteration();
if (stop) break;
}
if (Zmode == 2) fwrite(&c, 1, 4, f);
if (!stop) gtk_entry_set_text(GTK_ENTRY(Edit), IsoFile);
Ttime = time(NULL) - Ttime;
Tm = gmtime(&Ttime);
printf("\nTotal Time used: %d:%d:%d\n", Tm->tm_hour, Tm->tm_min,
Tm->tm_sec);
CDR_close();
fclose(f);
fclose(t);
gtk_widget_set_sensitive(BtnCompress, TRUE);
gtk_widget_set_sensitive(BtnDecompress, TRUE);
gtk_widget_set_sensitive(BtnCreate, TRUE);
gtk_widget_set_sensitive(BtnCreateZ, TRUE);
if (!stop) SysMessageLoc("Compressed Iso Image Created OK");
}
long CDRconfigure(void) {
int i;
LoadConf();
ConfDlg = create_Config();
Edit = lookup_widget(ConfDlg, "GtkEntry_Iso");
gtk_entry_set_text(GTK_ENTRY(Edit), IsoFile);
CdEdit = lookup_widget(ConfDlg, "GtkEntry_CdDev");
gtk_entry_set_text(GTK_ENTRY(CdEdit), CdDev);
Progress = lookup_widget(ConfDlg, "GtkProgressBar_Progress");
BtnCompress = lookup_widget(ConfDlg, "GtkButton_Compress");
BtnDecompress = lookup_widget(ConfDlg, "GtkButton_Decompress");
BtnCreate = lookup_widget(ConfDlg, "GtkButton_Create");
BtnCreateZ = lookup_widget(ConfDlg, "GtkButton_CreateZ");
methodlist = NULL;
for (i=0; i<2; i++)
methodlist = g_list_append(methodlist, methods[i]);
Method = lookup_widget(ConfDlg, "GtkCombo_Method");
gtk_combo_set_popdown_strings(GTK_COMBO(Method), methodlist);
if (strstr(IsoFile, ".Z") != NULL)
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(Method)->entry), methods[0]);
else gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(Method)->entry), methods[1]);
gtk_widget_show_all(ConfDlg);
gtk_main();
return 0;
}
GtkWidget *AboutDlg;
void OnAboutOk(GtkMenuItem * menuitem, gpointer userdata) {
gtk_widget_hide(AboutDlg);
gtk_main_quit();
}
void CDRabout(void) {
GtkWidget *Label;
GtkWidget *Ok;
GtkWidget *Box, *BBox;
char AboutText[255];
sprintf(AboutText, "%s %d.%d\n", LibName, revision, build);
AboutDlg = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(AboutDlg, 260, 80);
gtk_window_set_title(GTK_WINDOW(AboutDlg), "CDVD About Dialog");
gtk_window_set_position(GTK_WINDOW(AboutDlg), GTK_WIN_POS_CENTER);
gtk_container_set_border_width(GTK_CONTAINER(AboutDlg), 10);
Box = gtk_vbox_new(0, 0);
gtk_container_add(GTK_CONTAINER(AboutDlg), Box);
gtk_widget_show(Box);
Label = gtk_label_new(AboutText);
gtk_box_pack_start(GTK_BOX(Box), Label, FALSE, FALSE, 0);
gtk_widget_show(Label);
BBox = gtk_hbutton_box_new();
gtk_box_pack_start(GTK_BOX(Box), BBox, FALSE, FALSE, 0);
gtk_widget_show(BBox);
Ok = gtk_button_new_with_label("Ok");
gtk_signal_connect(GTK_OBJECT(Ok), "clicked",
GTK_SIGNAL_FUNC(OnAboutOk), NULL);
gtk_container_add(GTK_CONTAINER(BBox), Ok);
GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT);
gtk_widget_show(Ok);
gtk_widget_show(AboutDlg);
gtk_main();
}
int main(int argc, char *argv[]) {
if (argc < 2) return 0;
gtk_init(NULL, NULL);
if (!strcmp(argv[1], "open")) {
_CDRopen();
} else if (!strcmp(argv[1], "configure")) {
CDRconfigure();
} else if (!strcmp(argv[1], "message")) {
if (argc > 2) SysMessageLoc(argv[2]);
} else {
CDRabout();
}
return 0;
}

View File

@ -1,253 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
GtkWidget*
create_Config (void)
{
GtkWidget *Config;
GtkWidget *vbox1;
GtkWidget *hbox1;
GtkWidget *GtkEntry_Iso;
GtkWidget *button5;
GtkWidget *hbox2;
GtkWidget *GtkProgressBar_Progress;
GtkWidget *button6;
GtkWidget *hbox4;
GtkWidget *label2;
GtkWidget *GtkCombo_Method;
GtkWidget *combo_entry1;
GtkWidget *hbuttonbox2;
GtkWidget *GtkButton_Compress;
GtkWidget *GtkButton_Decompress;
GtkWidget *hbox3;
GtkWidget *label1;
GtkWidget *GtkEntry_CdDev;
GtkWidget *hbuttonbox3;
GtkWidget *GtkButton_Create;
GtkWidget *GtkButton_CreateZ;
GtkWidget *hbuttonbox1;
GtkWidget *button1;
GtkWidget *button2;
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_object_set_data (GTK_OBJECT (Config), "Config", Config);
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
gtk_window_set_title (GTK_WINDOW (Config), "CDVD Config Dialog");
gtk_window_set_position (GTK_WINDOW (Config), GTK_WIN_POS_CENTER);
vbox1 = gtk_vbox_new (FALSE, 5);
gtk_widget_ref (vbox1);
gtk_object_set_data_full (GTK_OBJECT (Config), "vbox1", vbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (Config), vbox1);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
hbox1 = gtk_hbox_new (FALSE, 10);
gtk_widget_ref (hbox1);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbox1", hbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
GtkEntry_Iso = gtk_entry_new ();
gtk_widget_ref (GtkEntry_Iso);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkEntry_Iso", GtkEntry_Iso,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkEntry_Iso);
gtk_box_pack_start (GTK_BOX (hbox1), GtkEntry_Iso, TRUE, TRUE, 0);
button5 = gtk_button_new_with_label ("Select Iso");
gtk_widget_ref (button5);
gtk_object_set_data_full (GTK_OBJECT (Config), "button5", button5,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button5);
gtk_box_pack_start (GTK_BOX (hbox1), button5, FALSE, FALSE, 0);
hbox2 = gtk_hbox_new (FALSE, 10);
gtk_widget_ref (hbox2);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbox2", hbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (vbox1), hbox2, FALSE, FALSE, 0);
GtkProgressBar_Progress = gtk_progress_bar_new ();
gtk_widget_ref (GtkProgressBar_Progress);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkProgressBar_Progress", GtkProgressBar_Progress,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkProgressBar_Progress);
gtk_box_pack_start (GTK_BOX (hbox2), GtkProgressBar_Progress, TRUE, FALSE, 0);
button6 = gtk_button_new_with_label ("Stop");
gtk_widget_ref (button6);
gtk_object_set_data_full (GTK_OBJECT (Config), "button6", button6,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button6);
gtk_box_pack_end (GTK_BOX (hbox2), button6, FALSE, FALSE, 0);
gtk_widget_set_usize (button6, 61, -2);
hbox4 = gtk_hbox_new (FALSE, 5);
gtk_widget_ref (hbox4);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbox4", hbox4,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox4);
gtk_box_pack_start (GTK_BOX (vbox1), hbox4, TRUE, TRUE, 0);
label2 = gtk_label_new ("Compression Method:");
gtk_widget_ref (label2);
gtk_object_set_data_full (GTK_OBJECT (Config), "label2", label2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label2);
gtk_box_pack_start (GTK_BOX (hbox4), label2, FALSE, FALSE, 0);
GtkCombo_Method = gtk_combo_new ();
gtk_widget_ref (GtkCombo_Method);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkCombo_Method", GtkCombo_Method,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkCombo_Method);
gtk_box_pack_start (GTK_BOX (hbox4), GtkCombo_Method, TRUE, FALSE, 0);
combo_entry1 = GTK_COMBO (GtkCombo_Method)->entry;
gtk_widget_ref (combo_entry1);
gtk_object_set_data_full (GTK_OBJECT (Config), "combo_entry1", combo_entry1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (combo_entry1);
hbuttonbox2 = gtk_hbutton_box_new ();
gtk_widget_ref (hbuttonbox2);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbuttonbox2", hbuttonbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox2);
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox2, TRUE, TRUE, 0);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox2), 0);
GtkButton_Compress = gtk_button_new_with_label ("Compress Iso");
gtk_widget_ref (GtkButton_Compress);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkButton_Compress", GtkButton_Compress,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkButton_Compress);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), GtkButton_Compress);
GTK_WIDGET_SET_FLAGS (GtkButton_Compress, GTK_CAN_DEFAULT);
GtkButton_Decompress = gtk_button_new_with_label ("Decompress Iso");
gtk_widget_ref (GtkButton_Decompress);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkButton_Decompress", GtkButton_Decompress,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkButton_Decompress);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), GtkButton_Decompress);
GTK_WIDGET_SET_FLAGS (GtkButton_Decompress, GTK_CAN_DEFAULT);
hbox3 = gtk_hbox_new (FALSE, 5);
gtk_widget_ref (hbox3);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbox3", hbox3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox3);
gtk_box_pack_start (GTK_BOX (vbox1), hbox3, FALSE, FALSE, 0);
label1 = gtk_label_new ("Cdrom Device: ");
gtk_widget_ref (label1);
gtk_object_set_data_full (GTK_OBJECT (Config), "label1", label1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (hbox3), label1, FALSE, FALSE, 0);
GtkEntry_CdDev = gtk_entry_new ();
gtk_widget_ref (GtkEntry_CdDev);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkEntry_CdDev", GtkEntry_CdDev,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkEntry_CdDev);
gtk_box_pack_start (GTK_BOX (hbox3), GtkEntry_CdDev, TRUE, TRUE, 0);
hbuttonbox3 = gtk_hbutton_box_new ();
gtk_widget_ref (hbuttonbox3);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbuttonbox3", hbuttonbox3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox3);
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox3, TRUE, TRUE, 0);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox3), 0);
GtkButton_Create = gtk_button_new_with_label ("Create Iso");
gtk_widget_ref (GtkButton_Create);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkButton_Create", GtkButton_Create,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkButton_Create);
gtk_container_add (GTK_CONTAINER (hbuttonbox3), GtkButton_Create);
GTK_WIDGET_SET_FLAGS (GtkButton_Create, GTK_CAN_DEFAULT);
GtkButton_CreateZ = gtk_button_new_with_label ("Create Compressed Iso");
gtk_widget_ref (GtkButton_CreateZ);
gtk_object_set_data_full (GTK_OBJECT (Config), "GtkButton_CreateZ", GtkButton_CreateZ,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (GtkButton_CreateZ);
gtk_container_add (GTK_CONTAINER (hbuttonbox3), GtkButton_CreateZ);
GTK_WIDGET_SET_FLAGS (GtkButton_CreateZ, GTK_CAN_DEFAULT);
hbuttonbox1 = gtk_hbutton_box_new ();
gtk_widget_ref (hbuttonbox1);
gtk_object_set_data_full (GTK_OBJECT (Config), "hbuttonbox1", hbuttonbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 0);
button1 = gtk_button_new_with_label ("Ok");
gtk_widget_ref (button1);
gtk_object_set_data_full (GTK_OBJECT (Config), "button1", button1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button1);
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
button2 = gtk_button_new_with_label ("Cancel");
gtk_widget_ref (button2);
gtk_object_set_data_full (GTK_OBJECT (Config), "button2", button2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button2);
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button2);
GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button5), "clicked",
GTK_SIGNAL_FUNC (OnFileSel),
NULL);
gtk_signal_connect (GTK_OBJECT (button6), "clicked",
GTK_SIGNAL_FUNC (OnStop),
NULL);
gtk_signal_connect (GTK_OBJECT (GtkButton_Compress), "clicked",
GTK_SIGNAL_FUNC (OnCompress),
NULL);
gtk_signal_connect (GTK_OBJECT (GtkButton_Decompress), "clicked",
GTK_SIGNAL_FUNC (OnDecompress),
NULL);
gtk_signal_connect (GTK_OBJECT (GtkButton_Create), "clicked",
GTK_SIGNAL_FUNC (OnCreate),
NULL);
gtk_signal_connect (GTK_OBJECT (GtkButton_CreateZ), "clicked",
GTK_SIGNAL_FUNC (OnCreateZ),
NULL);
gtk_signal_connect (GTK_OBJECT (button1), "clicked",
GTK_SIGNAL_FUNC (OnOk),
NULL);
gtk_signal_connect (GTK_OBJECT (button2), "clicked",
GTK_SIGNAL_FUNC (OnCancel),
NULL);
return Config;
}

View File

@ -1,5 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_Config (void);

View File

@ -1,162 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include "support.h"
/* This is an internally used function to check if a pixmap file exists. */
static gchar* check_file_exists (const gchar *directory,
const gchar *filename);
/* This is an internally used function to create pixmaps. */
static GtkWidget* create_dummy_pixmap (GtkWidget *widget);
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
{
GtkWidget *parent, *found_widget;
for (;;)
{
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else
parent = widget->parent;
if (parent == NULL)
break;
widget = parent;
}
found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget),
widget_name);
if (!found_widget)
g_warning ("Widget not found: %s", widget_name);
return found_widget;
}
/* This is a dummy pixmap we use when a pixmap can't be found. */
static char *dummy_pixmap_xpm[] = {
/* columns rows colors chars-per-pixel */
"1 1 1 1",
" c None",
/* pixels */
" "
};
/* This is an internally used function to create pixmaps. */
static GtkWidget*
create_dummy_pixmap (GtkWidget *widget)
{
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
NULL, dummy_pixmap_xpm);
if (gdkpixmap == NULL)
g_error ("Couldn't create replacement pixmap.");
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
static GList *pixmaps_directories = NULL;
/* Use this function to set the directory containing installed pixmaps. */
void
add_pixmap_directory (const gchar *directory)
{
pixmaps_directories = g_list_prepend (pixmaps_directories,
g_strdup (directory));
}
/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap (GtkWidget *widget,
const gchar *filename)
{
gchar *found_filename = NULL;
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
GList *elem;
if (!filename || !filename[0])
return create_dummy_pixmap (widget);
/* We first try any pixmaps directories set by the application. */
elem = pixmaps_directories;
while (elem)
{
found_filename = check_file_exists ((gchar*)elem->data, filename);
if (found_filename)
break;
elem = elem->next;
}
/* If we haven't found the pixmap, try the source directory. */
if (!found_filename)
{
found_filename = check_file_exists ("", filename);
}
if (!found_filename)
{
g_warning ("Couldn't find pixmap file: %s", filename);
return create_dummy_pixmap (widget);
}
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask,
NULL, found_filename);
if (gdkpixmap == NULL)
{
g_warning ("Error loading pixmap file: %s", found_filename);
g_free (found_filename);
return create_dummy_pixmap (widget);
}
g_free (found_filename);
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
/* This is an internally used function to check if a pixmap file exists. */
gchar*
check_file_exists (const gchar *directory,
const gchar *filename)
{
gchar *full_filename;
struct stat s;
gint status;
full_filename = (gchar*) g_malloc (strlen (directory) + 1
+ strlen (filename) + 1);
strcpy (full_filename, directory);
strcat (full_filename, G_DIR_SEPARATOR_S);
strcat (full_filename, filename);
status = stat (full_filename, &s);
if (status == 0 && S_ISREG (s.st_mode))
return full_filename;
g_free (full_filename);
return NULL;
}

View File

@ -1,38 +0,0 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
/*
* Public Functions.
*/
/*
* This function returns a widget in a component created by Glade.
* Call it with the toplevel widget in the component (i.e. a window/dialog),
* or alternatively any widget in the component, and the name of the widget
* you want returned.
*/
GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name);
/* get_widget() is deprecated. Use lookup_widget instead. */
#define get_widget lookup_widget
/* Use this function to set the directory containing installed pixmaps. */
void add_pixmap_directory (const gchar *directory);
/*
* Private Functions.
*/
/* This is used to create the pixmaps in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename);

View File

@ -1,812 +0,0 @@
#ifndef __PS2EDEFS_H__
#define __PS2EDEFS_H__
/*
* PS2E Definitions v0.6.2 (beta)
*
* Author: linuzappz@hotmail.com
* shadowpcsx2@yahoo.gr
* florinsasu@hotmail.com
*/
/*
Notes:
* Since this is still beta things may change.
* OSflags:
__LINUX__ (linux OS)
_WIN32 (win32 OS)
* common return values (for ie. GSinit):
0 - success
-1 - error
* reserved keys:
F1 to F10 are reserved for the emulator
* plugins should NOT change the current
working directory.
(on win32, add flag OFN_NOCHANGEDIR for
GetOpenFileName)
*/
#include "PS2Etypes.h"
#ifdef __LINUX__
#define CALLBACK
#else
#include <windows.h>
#endif
/* common defines */
#ifndef C_ASSERT
#define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1]
#endif
#if defined(GSdefs) || defined(PADdefs) || defined(SIOdefs) || \
defined(SPU2defs) || defined(CDVDdefs) || defined(DEV9defs) || \
defined(USBdefs) || defined(FWdefs)
#define COMMONdefs
#endif
// PS2EgetLibType returns (may be OR'd)
#define PS2E_LT_GS 0x01
#define PS2E_LT_PAD 0x02 // -=[ OBSOLETE ]=-
#define PS2E_LT_SPU2 0x04
#define PS2E_LT_CDVD 0x08
#define PS2E_LT_DEV9 0x10
#define PS2E_LT_USB 0x20
#define PS2E_LT_FW 0x40
#define PS2E_LT_SIO 0x80
// PS2EgetLibVersion2 (high 16 bits)
#define PS2E_GS_VERSION 0x0006
#define PS2E_PAD_VERSION 0x0002 // -=[ OBSOLETE ]=-
#define PS2E_SPU2_VERSION 0x0005
#define PS2E_CDVD_VERSION 0x0005
#define PS2E_DEV9_VERSION 0x0003
#define PS2E_USB_VERSION 0x0003
#define PS2E_FW_VERSION 0x0002
#define PS2E_SIO_VERSION 0x0001
#ifdef COMMONdefs
u32 CALLBACK PS2EgetLibType(void);
u32 CALLBACK PS2EgetLibVersion2(u32 type);
char* CALLBACK PS2EgetLibName(void);
#endif
// key values:
/* key values must be OS dependant:
win32: the VK_XXX will be used (WinUser)
linux: the XK_XXX will be used (XFree86)
*/
// event values:
#define KEYPRESS 1
#define KEYRELEASE 2
typedef struct {
u32 key;
u32 event;
} keyEvent;
// for 64bit compilers
typedef char __keyEvent_Size__[(sizeof(keyEvent) == 8)?1:-1];
// plugin types
#define SIO_TYPE_PAD 0x00000001
#define SIO_TYPE_MTAP 0x00000004
#define SIO_TYPE_RM 0x00000040
#define SIO_TYPE_MC 0x00000100
typedef int (CALLBACK * SIOchangeSlotCB)(int slot);
typedef struct {
u8 ctrl:4; // control and mode bits
u8 mode:4; // control and mode bits
u8 trackNum; // current track number (1 to 99)
u8 trackIndex; // current index within track (0 to 99)
u8 trackM; // current minute location on the disc (BCD encoded)
u8 trackS; // current sector location on the disc (BCD encoded)
u8 trackF; // current frame location on the disc (BCD encoded)
u8 pad; // unused
u8 discM; // current minute offset from first track (BCD encoded)
u8 discS; // current sector offset from first track (BCD encoded)
u8 discF; // current frame offset from first track (BCD encoded)
} cdvdSubQ;
typedef struct { // NOT bcd coded
u32 lsn;
u8 type;
} cdvdTD;
typedef struct {
u8 strack; //number of the first track (usually 1)
u8 etrack; //number of the last track
} cdvdTN;
// CDVDreadTrack mode values:
#define CDVD_MODE_2352 0 // full 2352 bytes
#define CDVD_MODE_2340 1 // skip sync (12) bytes
#define CDVD_MODE_2328 2 // skip sync+head+sub (24) bytes
#define CDVD_MODE_2048 3 // skip sync+head+sub (24) bytes
#define CDVD_MODE_2368 4 // full 2352 bytes + 16 subq
// CDVDgetDiskType returns:
#define CDVD_TYPE_ILLEGAL 0xff // Illegal Disc
#define CDVD_TYPE_DVDV 0xfe // DVD Video
#define CDVD_TYPE_CDDA 0xfd // Audio CD
#define CDVD_TYPE_PS2DVD 0x14 // PS2 DVD
#define CDVD_TYPE_PS2CDDA 0x13 // PS2 CD (with audio)
#define CDVD_TYPE_PS2CD 0x12 // PS2 CD
#define CDVD_TYPE_PSCDDA 0x11 // PS CD (with audio)
#define CDVD_TYPE_PSCD 0x10 // PS CD
#define CDVD_TYPE_UNKNOWN 0x05 // Unknown
#define CDVD_TYPE_DETCTDVDD 0x04 // Detecting Dvd Dual Sided
#define CDVD_TYPE_DETCTDVDS 0x03 // Detecting Dvd Single Sided
#define CDVD_TYPE_DETCTCD 0x02 // Detecting Cd
#define CDVD_TYPE_DETCT 0x01 // Detecting
#define CDVD_TYPE_NODISC 0x00 // No Disc
// CDVDgetTrayStatus returns:
#define CDVD_TRAY_CLOSE 0x00
#define CDVD_TRAY_OPEN 0x01
// cdvdTD.type (track types for cds)
#define CDVD_AUDIO_TRACK 0x01
#define CDVD_MODE1_TRACK 0x41
#define CDVD_MODE2_TRACK 0x61
#define CDVD_AUDIO_MASK 0x00
#define CDVD_DATA_MASK 0x40
// CDROM_DATA_TRACK 0x04 //do not enable this! (from linux kernel)
typedef void (*DEV9callback)(int cycles);
typedef int (*DEV9handler)(void);
typedef void (*USBcallback)(int cycles);
typedef int (*USBhandler)(void);
// freeze modes:
#define FREEZE_LOAD 0
#define FREEZE_SAVE 1
#define FREEZE_SIZE 2
typedef struct {
char name[8];
void *common;
} GSdriverInfo;
#ifdef _WIN32
typedef struct { // unsupported values must be set to zero
HWND hWnd;
HMENU hMenu;
HWND hStatusWnd;
} winInfo;
#endif
/* GS plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef GSdefs
// basic funcs
s32 CALLBACK GSinit();
s32 CALLBACK GSopen(void *pDsp, char *Title, int multithread);
void CALLBACK GSclose();
void CALLBACK GSshutdown();
void CALLBACK GSvsync(int field);
void CALLBACK GSgifTransfer1(u32 *pMem, u32 addr);
void CALLBACK GSgifTransfer2(u32 *pMem, u32 size);
void CALLBACK GSgifTransfer3(u32 *pMem, u32 size);
void CALLBACK GSgifSoftReset(u32 mask);
void CALLBACK GSreadFIFO(u64 *mem);
void CALLBACK GSreadFIFO2(u64 *mem, int qwc);
// extended funcs
// GSkeyEvent gets called when there is a keyEvent from the PAD plugin
void CALLBACK GSkeyEvent(keyEvent *ev);
void CALLBACK GSchangeSaveState(int, const char* filename);
void CALLBACK GSmakeSnapshot(char *path);
void CALLBACK GSmakeSnapshot2(char *pathname, int* snapdone, int savejpg);
void CALLBACK GSirqCallback(void (*callback)());
void CALLBACK GSprintf(int timeout, char *fmt, ...);
void CALLBACK GSsetBaseMem(void*);
void CALLBACK GSsetGameCRC(int);
// controls frame skipping in the GS, if this routine isn't present, frame skipping won't be done
void CALLBACK GSsetFrameSkip(int frameskip);
void CALLBACK GSreset();
void CALLBACK GSwriteCSR(u32 value);
void CALLBACK GSgetDriverInfo(GSdriverInfo *info);
#ifdef _WIN32
s32 CALLBACK GSsetWindowInfo(winInfo *info);
#endif
s32 CALLBACK GSfreeze(int mode, freezeData *data);
void CALLBACK GSconfigure();
void CALLBACK GSabout();
s32 CALLBACK GStest();
#endif
/* PAD plugin API -=[ OBSOLETE ]=- */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef PADdefs
// basic funcs
s32 CALLBACK PADinit(u32 flags);
s32 CALLBACK PADopen(void *pDsp);
void CALLBACK PADclose();
void CALLBACK PADshutdown();
// PADkeyEvent is called every vsync (return NULL if no event)
keyEvent* CALLBACK PADkeyEvent();
u8 CALLBACK PADstartPoll(int pad);
u8 CALLBACK PADpoll(u8 value);
// returns: 1 if supported pad1
// 2 if supported pad2
// 3 if both are supported
u32 CALLBACK PADquery();
// extended funcs
void CALLBACK PADgsDriverInfo(GSdriverInfo *info);
void CALLBACK PADconfigure();
void CALLBACK PADabout();
s32 CALLBACK PADtest();
#endif
/* SIO plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef SIOdefs
// basic funcs
s32 CALLBACK SIOinit(u32 port, u32 slot, SIOchangeSlotCB f);
s32 CALLBACK SIOopen(void *pDsp);
void CALLBACK SIOclose();
void CALLBACK SIOshutdown();
u8 CALLBACK SIOstartPoll(u8 value);
u8 CALLBACK SIOpoll(u8 value);
// returns: SIO_TYPE_{PAD,MTAP,RM,MC}
u32 CALLBACK SIOquery();
// extended funcs
void CALLBACK SIOconfigure();
void CALLBACK SIOabout();
s32 CALLBACK SIOtest();
#endif
/* SPU2 plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef SPU2defs
// basic funcs
s32 CALLBACK SPU2init();
s32 CALLBACK SPU2open(void *pDsp);
void CALLBACK SPU2close();
void CALLBACK SPU2shutdown();
void CALLBACK SPU2write(u32 mem, u16 value);
u16 CALLBACK SPU2read(u32 mem);
void CALLBACK SPU2readDMA4Mem(u16 *pMem, int size);
void CALLBACK SPU2writeDMA4Mem(u16 *pMem, int size);
void CALLBACK SPU2interruptDMA4();
void CALLBACK SPU2readDMA7Mem(u16* pMem, int size);
void CALLBACK SPU2writeDMA7Mem(u16 *pMem, int size);
void CALLBACK SPU2interruptDMA7();
u32 CALLBACK SPU2ReadMemAddr(int core);
void CALLBACK SPU2WriteMemAddr(int core,u32 value);
void CALLBACK SPU2irqCallback(void (*SPU2callback)(),void (*DMA4callback)(),void (*DMA7callback)());
// extended funcs
void CALLBACK SPU2async(u32 cycles);
s32 CALLBACK SPU2freeze(int mode, freezeData *data);
void CALLBACK SPU2configure();
void CALLBACK SPU2about();
s32 CALLBACK SPU2test();
#endif
/* CDVD plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef CDVDdefs
// basic funcs
s32 CALLBACK CDVDinit();
s32 CALLBACK CDVDopen(const char* pTitleFilename);
void CALLBACK CDVDclose();
void CALLBACK CDVDshutdown();
s32 CALLBACK CDVDreadTrack(u32 lsn, int mode);
// return can be NULL (for async modes)
u8* CALLBACK CDVDgetBuffer();
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ* subq);//read subq from disc (only cds have subq data)
s32 CALLBACK CDVDgetTN(cdvdTN *Buffer); //disk information
s32 CALLBACK CDVDgetTD(u8 Track, cdvdTD *Buffer); //track info: min,sec,frame,type
s32 CALLBACK CDVDgetTOC(void* toc); //gets ps2 style toc from disc
s32 CALLBACK CDVDgetDiskType(); //CDVD_TYPE_xxxx
s32 CALLBACK CDVDgetTrayStatus(); //CDVD_TRAY_xxxx
s32 CALLBACK CDVDctrlTrayOpen(); //open disc tray
s32 CALLBACK CDVDctrlTrayClose(); //close disc tray
// extended funcs
void CALLBACK CDVDconfigure();
void CALLBACK CDVDabout();
s32 CALLBACK CDVDtest();
void CALLBACK CDVDnewDiskCB(void (*callback)());
#endif
/* DEV9 plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef DEV9defs
// basic funcs
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
s32 CALLBACK DEV9init();
s32 CALLBACK DEV9open(void *pDsp);
void CALLBACK DEV9close();
void CALLBACK DEV9shutdown();
u8 CALLBACK DEV9read8(u32 addr);
u16 CALLBACK DEV9read16(u32 addr);
u32 CALLBACK DEV9read32(u32 addr);
void CALLBACK DEV9write8(u32 addr, u8 value);
void CALLBACK DEV9write16(u32 addr, u16 value);
void CALLBACK DEV9write32(u32 addr, u32 value);
void CALLBACK DEV9readDMA8Mem(u32 *pMem, int size);
void CALLBACK DEV9writeDMA8Mem(u32 *pMem, int size);
// cycles = IOP cycles before calling callback,
// if callback returns 1 the irq is triggered, else not
void CALLBACK DEV9irqCallback(DEV9callback callback);
DEV9handler CALLBACK DEV9irqHandler(void);
// extended funcs
s32 CALLBACK DEV9freeze(int mode, freezeData *data);
void CALLBACK DEV9configure();
void CALLBACK DEV9about();
s32 CALLBACK DEV9test();
#endif
/* USB plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef USBdefs
// basic funcs
s32 CALLBACK USBinit();
s32 CALLBACK USBopen(void *pDsp);
void CALLBACK USBclose();
void CALLBACK USBshutdown();
u8 CALLBACK USBread8(u32 addr);
u16 CALLBACK USBread16(u32 addr);
u32 CALLBACK USBread32(u32 addr);
void CALLBACK USBwrite8(u32 addr, u8 value);
void CALLBACK USBwrite16(u32 addr, u16 value);
void CALLBACK USBwrite32(u32 addr, u32 value);
// cycles = IOP cycles before calling callback,
// if callback returns 1 the irq is triggered, else not
void CALLBACK USBirqCallback(USBcallback callback);
USBhandler CALLBACK USBirqHandler(void);
void CALLBACK USBsetRAM(void *mem);
// extended funcs
s32 CALLBACK USBfreeze(int mode, freezeData *data);
void CALLBACK USBconfigure();
void CALLBACK USBabout();
s32 CALLBACK USBtest();
#endif
/* FW plugin API */
// if this file is included with this define
// the next api will not be skipped by the compiler
#ifdef FWdefs
// basic funcs
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
s32 CALLBACK FWinit();
s32 CALLBACK FWopen(void *pDsp);
void CALLBACK FWclose();
void CALLBACK FWshutdown();
u32 CALLBACK FWread32(u32 addr);
void CALLBACK FWwrite32(u32 addr, u32 value);
void CALLBACK FWirqCallback(void (*callback)());
// extended funcs
s32 CALLBACK FWfreeze(int mode, freezeData *data);
void CALLBACK FWconfigure();
void CALLBACK FWabout();
s32 CALLBACK FWtest();
#endif
// might be useful for emulators
#ifdef PLUGINtypedefs
typedef u32 (CALLBACK* _PS2EgetLibType)(void);
typedef u32 (CALLBACK* _PS2EgetLibVersion2)(u32 type);
typedef char*(CALLBACK* _PS2EgetLibName)(void);
// GS
// NOTE: GSreadFIFOX/GSwriteCSR functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
typedef s32 (CALLBACK* _GSinit)();
typedef s32 (CALLBACK* _GSopen)(void *pDsp, char *Title, int multithread);
typedef void (CALLBACK* _GSclose)();
typedef void (CALLBACK* _GSshutdown)();
typedef void (CALLBACK* _GSvsync)(int field);
typedef void (CALLBACK* _GSgifTransfer1)(u32 *pMem, u32 addr);
typedef void (CALLBACK* _GSgifTransfer2)(u32 *pMem, u32 size);
typedef void (CALLBACK* _GSgifTransfer3)(u32 *pMem, u32 size);
typedef void (CALLBACK* _GSgifSoftReset)(u32 mask);
typedef void (CALLBACK* _GSreadFIFO)(u64 *pMem);
typedef void (CALLBACK* _GSreadFIFO2)(u64 *pMem, int qwc);
typedef void (CALLBACK* _GSkeyEvent)(keyEvent* ev);
typedef void (CALLBACK* _GSchangeSaveState)(int, const char* filename);
typedef void (CALLBACK* _GSirqCallback)(void (*callback)());
typedef void (CALLBACK* _GSprintf)(int timeout, char *fmt, ...);
typedef void (CALLBACK* _GSsetBaseMem)(void*);
typedef void (CALLBACK* _GSsetGameCRC)(int);
typedef void (CALLBACK* _GSsetFrameSkip)(int frameskip);
typedef void (CALLBACK* _GSreset)();
typedef void (CALLBACK* _GSwriteCSR)(u32 value);
typedef void (CALLBACK* _GSgetDriverInfo)(GSdriverInfo *info);
#ifdef _WIN32
typedef s32 (CALLBACK* _GSsetWindowInfo)(winInfo *info);
#endif
typedef void (CALLBACK* _GSmakeSnapshot)(char *path);
typedef void (CALLBACK* _GSmakeSnapshot2)(char *path, int*, int);
typedef s32 (CALLBACK* _GSfreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _GSconfigure)();
typedef s32 (CALLBACK* _GStest)();
typedef void (CALLBACK* _GSabout)();
// PAD
typedef s32 (CALLBACK* _PADinit)(u32 flags);
typedef s32 (CALLBACK* _PADopen)(void *pDsp);
typedef void (CALLBACK* _PADclose)();
typedef void (CALLBACK* _PADshutdown)();
typedef keyEvent* (CALLBACK* _PADkeyEvent)();
typedef u8 (CALLBACK* _PADstartPoll)(int pad);
typedef u8 (CALLBACK* _PADpoll)(u8 value);
typedef u32 (CALLBACK* _PADquery)();
typedef void (CALLBACK* _PADgsDriverInfo)(GSdriverInfo *info);
typedef void (CALLBACK* _PADconfigure)();
typedef s32 (CALLBACK* _PADtest)();
typedef void (CALLBACK* _PADabout)();
// SIO
typedef s32 (CALLBACK* _SIOinit)(u32 port, u32 slot, SIOchangeSlotCB f);
typedef s32 (CALLBACK* _SIOopen)(void *pDsp);
typedef void (CALLBACK* _SIOclose)();
typedef void (CALLBACK* _SIOshutdown)();
typedef u8 (CALLBACK* _SIOstartPoll)(u8 value);
typedef u8 (CALLBACK* _SIOpoll)(u8 value);
typedef u32 (CALLBACK* _SIOquery)();
typedef void (CALLBACK* _SIOconfigure)();
typedef s32 (CALLBACK* _SIOtest)();
typedef void (CALLBACK* _SIOabout)();
// SPU2
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
typedef s32 (CALLBACK* _SPU2init)();
typedef s32 (CALLBACK* _SPU2open)(void *pDsp);
typedef void (CALLBACK* _SPU2close)();
typedef void (CALLBACK* _SPU2shutdown)();
typedef void (CALLBACK* _SPU2write)(u32 mem, u16 value);
typedef u16 (CALLBACK* _SPU2read)(u32 mem);
typedef void (CALLBACK* _SPU2readDMA4Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2writeDMA4Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2interruptDMA4)();
typedef void (CALLBACK* _SPU2readDMA7Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2writeDMA7Mem)(u16 *pMem, int size);
typedef void (CALLBACK* _SPU2interruptDMA7)();
typedef void (CALLBACK* _SPU2irqCallback)(void (*SPU2callback)(),void (*DMA4callback)(),void (*DMA7callback)());
typedef u32 (CALLBACK* _SPU2ReadMemAddr)(int core);
typedef void (CALLBACK* _SPU2WriteMemAddr)(int core,u32 value);
typedef void (CALLBACK* _SPU2async)(u32 cycles);
typedef s32 (CALLBACK* _SPU2freeze)(int mode, freezeData *data);
typedef void (CALLBACK* _SPU2configure)();
typedef s32 (CALLBACK* _SPU2test)();
typedef void (CALLBACK* _SPU2about)();
// CDVD
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
typedef s32 (CALLBACK* _CDVDinit)();
typedef s32 (CALLBACK* _CDVDopen)(const char* pTitleFilename);
typedef void (CALLBACK* _CDVDclose)();
typedef void (CALLBACK* _CDVDshutdown)();
typedef s32 (CALLBACK* _CDVDreadTrack)(u32 lsn, int mode);
typedef u8* (CALLBACK* _CDVDgetBuffer)();
typedef s32 (CALLBACK* _CDVDreadSubQ)(u32 lsn, cdvdSubQ* subq);
typedef s32 (CALLBACK* _CDVDgetTN)(cdvdTN *Buffer);
typedef s32 (CALLBACK* _CDVDgetTD)(u8 Track, cdvdTD *Buffer);
typedef s32 (CALLBACK* _CDVDgetTOC)(void* toc);
typedef s32 (CALLBACK* _CDVDgetDiskType)();
typedef s32 (CALLBACK* _CDVDgetTrayStatus)();
typedef s32 (CALLBACK* _CDVDctrlTrayOpen)();
typedef s32 (CALLBACK* _CDVDctrlTrayClose)();
typedef void (CALLBACK* _CDVDconfigure)();
typedef s32 (CALLBACK* _CDVDtest)();
typedef void (CALLBACK* _CDVDabout)();
typedef void (CALLBACK* _CDVDnewDiskCB)(void (*callback)());
// DEV9
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
typedef s32 (CALLBACK* _DEV9init)();
typedef s32 (CALLBACK* _DEV9open)(void *pDsp);
typedef void (CALLBACK* _DEV9close)();
typedef void (CALLBACK* _DEV9shutdown)();
typedef u8 (CALLBACK* _DEV9read8)(u32 mem);
typedef u16 (CALLBACK* _DEV9read16)(u32 mem);
typedef u32 (CALLBACK* _DEV9read32)(u32 mem);
typedef void (CALLBACK* _DEV9write8)(u32 mem, u8 value);
typedef void (CALLBACK* _DEV9write16)(u32 mem, u16 value);
typedef void (CALLBACK* _DEV9write32)(u32 mem, u32 value);
typedef void (CALLBACK* _DEV9readDMA8Mem)(u32 *pMem, int size);
typedef void (CALLBACK* _DEV9writeDMA8Mem)(u32 *pMem, int size);
typedef void (CALLBACK* _DEV9irqCallback)(DEV9callback callback);
typedef DEV9handler (CALLBACK* _DEV9irqHandler)(void);
typedef s32 (CALLBACK* _DEV9freeze)(int mode, freezeData *data);
typedef void (CALLBACK* _DEV9configure)();
typedef s32 (CALLBACK* _DEV9test)();
typedef void (CALLBACK* _DEV9about)();
// USB
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
typedef s32 (CALLBACK* _USBinit)();
typedef s32 (CALLBACK* _USBopen)(void *pDsp);
typedef void (CALLBACK* _USBclose)();
typedef void (CALLBACK* _USBshutdown)();
typedef u8 (CALLBACK* _USBread8)(u32 mem);
typedef u16 (CALLBACK* _USBread16)(u32 mem);
typedef u32 (CALLBACK* _USBread32)(u32 mem);
typedef void (CALLBACK* _USBwrite8)(u32 mem, u8 value);
typedef void (CALLBACK* _USBwrite16)(u32 mem, u16 value);
typedef void (CALLBACK* _USBwrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _USBirqCallback)(USBcallback callback);
typedef USBhandler (CALLBACK* _USBirqHandler)(void);
typedef void (CALLBACK* _USBsetRAM)(void *mem);
typedef s32 (CALLBACK* _USBfreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _USBconfigure)();
typedef s32 (CALLBACK* _USBtest)();
typedef void (CALLBACK* _USBabout)();
//FW
typedef s32 (CALLBACK* _FWinit)();
typedef s32 (CALLBACK* _FWopen)(void *pDsp);
typedef void (CALLBACK* _FWclose)();
typedef void (CALLBACK* _FWshutdown)();
typedef u32 (CALLBACK* _FWread32)(u32 mem);
typedef void (CALLBACK* _FWwrite32)(u32 mem, u32 value);
typedef void (CALLBACK* _FWirqCallback)(void (*callback)());
typedef s32 (CALLBACK* _FWfreeze)(int mode, freezeData *data);
typedef void (CALLBACK* _FWconfigure)();
typedef s32 (CALLBACK* _FWtest)();
typedef void (CALLBACK* _FWabout)();
#endif
#ifdef PLUGINfuncs
// GS
_GSinit GSinit;
_GSopen GSopen;
_GSclose GSclose;
_GSshutdown GSshutdown;
_GSvsync GSvsync;
_GSgifTransfer1 GSgifTransfer1;
_GSgifTransfer2 GSgifTransfer2;
_GSgifTransfer3 GSgifTransfer3;
_GSgifSoftReset GSgifSoftReset;
_GSreadFIFO GSreadFIFO;
_GSreadFIFO2 GSreadFIFO2;
_GSkeyEvent GSkeyEvent;
_GSchangeSaveState GSchangeSaveState;
_GSmakeSnapshot GSmakeSnapshot;
_GSmakeSnapshot2 GSmakeSnapshot2;
_GSirqCallback GSirqCallback;
_GSprintf GSprintf;
_GSsetBaseMem GSsetBaseMem;
_GSsetGameCRC GSsetGameCRC;
_GSsetFrameSkip GSsetFrameSkip;
_GSreset GSreset;
_GSwriteCSR GSwriteCSR;
_GSgetDriverInfo GSgetDriverInfo;
#ifdef _WIN32
_GSsetWindowInfo GSsetWindowInfo;
#endif
_GSfreeze GSfreeze;
_GSconfigure GSconfigure;
_GStest GStest;
_GSabout GSabout;
// PAD1
_PADinit PAD1init;
_PADopen PAD1open;
_PADclose PAD1close;
_PADshutdown PAD1shutdown;
_PADkeyEvent PAD1keyEvent;
_PADstartPoll PAD1startPoll;
_PADpoll PAD1poll;
_PADquery PAD1query;
_PADgsDriverInfo PAD1gsDriverInfo;
_PADconfigure PAD1configure;
_PADtest PAD1test;
_PADabout PAD1about;
// PAD2
_PADinit PAD2init;
_PADopen PAD2open;
_PADclose PAD2close;
_PADshutdown PAD2shutdown;
_PADkeyEvent PAD2keyEvent;
_PADstartPoll PAD2startPoll;
_PADpoll PAD2poll;
_PADquery PAD2query;
_PADgsDriverInfo PAD2gsDriverInfo;
_PADconfigure PAD2configure;
_PADtest PAD2test;
_PADabout PAD2about;
// SIO[2]
_SIOinit SIOinit[2][9];
_SIOopen SIOopen[2][9];
_SIOclose SIOclose[2][9];
_SIOshutdown SIOshutdown[2][9];
_SIOstartPoll SIOstartPoll[2][9];
_SIOpoll SIOpoll[2][9];
_SIOquery SIOquery[2][9];
_SIOconfigure SIOconfigure[2][9];
_SIOtest SIOtest[2][9];
_SIOabout SIOabout[2][9];
// SPU2
_SPU2init SPU2init;
_SPU2open SPU2open;
_SPU2close SPU2close;
_SPU2shutdown SPU2shutdown;
_SPU2write SPU2write;
_SPU2read SPU2read;
_SPU2readDMA4Mem SPU2readDMA4Mem;
_SPU2writeDMA4Mem SPU2writeDMA4Mem;
_SPU2interruptDMA4 SPU2interruptDMA4;
_SPU2readDMA7Mem SPU2readDMA7Mem;
_SPU2writeDMA7Mem SPU2writeDMA7Mem;
_SPU2interruptDMA7 SPU2interruptDMA7;
_SPU2ReadMemAddr SPU2ReadMemAddr;
_SPU2WriteMemAddr SPU2WriteMemAddr;
_SPU2irqCallback SPU2irqCallback;
_SPU2async SPU2async;
_SPU2freeze SPU2freeze;
_SPU2configure SPU2configure;
_SPU2test SPU2test;
_SPU2about SPU2about;
// CDVD
_CDVDinit CDVDinit;
_CDVDopen CDVDopen;
_CDVDclose CDVDclose;
_CDVDshutdown CDVDshutdown;
_CDVDreadTrack CDVDreadTrack;
_CDVDgetBuffer CDVDgetBuffer;
_CDVDreadSubQ CDVDreadSubQ;
_CDVDgetTN CDVDgetTN;
_CDVDgetTD CDVDgetTD;
_CDVDgetTOC CDVDgetTOC;
_CDVDgetDiskType CDVDgetDiskType;
_CDVDgetTrayStatus CDVDgetTrayStatus;
_CDVDctrlTrayOpen CDVDctrlTrayOpen;
_CDVDctrlTrayClose CDVDctrlTrayClose;
_CDVDconfigure CDVDconfigure;
_CDVDtest CDVDtest;
_CDVDabout CDVDabout;
_CDVDnewDiskCB CDVDnewDiskCB;
// DEV9
_DEV9init DEV9init;
_DEV9open DEV9open;
_DEV9close DEV9close;
_DEV9shutdown DEV9shutdown;
_DEV9read8 DEV9read8;
_DEV9read16 DEV9read16;
_DEV9read32 DEV9read32;
_DEV9write8 DEV9write8;
_DEV9write16 DEV9write16;
_DEV9write32 DEV9write32;
_DEV9readDMA8Mem DEV9readDMA8Mem;
_DEV9writeDMA8Mem DEV9writeDMA8Mem;
_DEV9irqCallback DEV9irqCallback;
_DEV9irqHandler DEV9irqHandler;
_DEV9configure DEV9configure;
_DEV9freeze DEV9freeze;
_DEV9test DEV9test;
_DEV9about DEV9about;
// USB
_USBinit USBinit;
_USBopen USBopen;
_USBclose USBclose;
_USBshutdown USBshutdown;
_USBread8 USBread8;
_USBread16 USBread16;
_USBread32 USBread32;
_USBwrite8 USBwrite8;
_USBwrite16 USBwrite16;
_USBwrite32 USBwrite32;
_USBirqCallback USBirqCallback;
_USBirqHandler USBirqHandler;
_USBsetRAM USBsetRAM;
_USBconfigure USBconfigure;
_USBfreeze USBfreeze;
_USBtest USBtest;
_USBabout USBabout;
// FW
_FWinit FWinit;
_FWopen FWopen;
_FWclose FWclose;
_FWshutdown FWshutdown;
_FWread32 FWread32;
_FWwrite32 FWwrite32;
_FWirqCallback FWirqCallback;
_FWconfigure FWconfigure;
_FWfreeze FWfreeze;
_FWtest FWtest;
_FWabout FWabout;
#endif
#endif /* __PS2EDEFS_H__ */

View File

@ -1,43 +0,0 @@
#ifndef __PS2ETYPES_H__
#define __PS2ETYPES_H__
// Basic types
#if defined(__MSCW32__)
typedef __int8 s8;
typedef __int16 s16;
typedef __int32 s32;
typedef __int64 s64;
typedef unsigned __int8 u8;
typedef unsigned __int16 u16;
typedef unsigned __int32 u32;
typedef unsigned __int64 u64;
#if defined(__x86_64__)
typedef u64 uptr;
#else
typedef u32 uptr;
#endif
#elif defined(__LINUX__) || defined(__MINGW32__)
typedef char s8;
typedef short s16;
typedef int s32;
typedef long long s64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
#if defined(__x86_64__)
typedef u64 uptr;
#else
typedef u32 uptr;
#endif
#endif
#endif /* __PS2ETYPES_H__ */

View File

@ -1,17 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDiso", "CDVDiso 2005 x64.vcproj", "{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release|x64.ActiveCfg = Release|x64
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,563 +0,0 @@
<?xml version="1.0" encoding="windows-1253"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="CDVDiso"
ProjectGUID="{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}"
RootNamespace="CDVDiso"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
<Platform
Name="Win64 (AMD64)"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../;../ZLIB;./;../bzip2"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;__x86_64__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib ..\zlib\inffasx64.obj ..\zlib\gvmat64.obj"
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary=".\Release/CDVDiso.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; ..\..\..\..\..\bin\plugins"
/>
</Configuration>
<Configuration
Name="Release|Win64 (AMD64)"
OutputDirectory="amd64\$(ConfigurationName)"
IntermediateDirectory="amd64\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="3"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../;../ZLIB;./"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;__x86_64__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateManifest="FALSE"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary=".\Release/CDVDiso.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="CDVDiso.def"
>
</File>
<File
RelativePath="..\CDVDisop.c"
>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win64 (AMD64)"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
</File>
<File
RelativePath="Config.c"
>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win64 (AMD64)"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\libiso.c"
>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win64 (AMD64)"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\PS2Etypes.h"
>
</File>
<File
RelativePath="Win32.c"
>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win64 (AMD64)"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\CDVDiso.h"
>
</File>
<File
RelativePath="Config.h"
>
</File>
<File
RelativePath="..\libiso.h"
>
</File>
<File
RelativePath="..\PS2Edefs.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="CDVDiso.rc"
>
</File>
</Filter>
<Filter
Name="zlib"
>
<File
RelativePath="..\zlib\adler32.c"
>
</File>
<File
RelativePath="..\zlib\compress.c"
>
</File>
<File
RelativePath="..\zlib\crc32.c"
>
</File>
<File
RelativePath="..\zlib\crc32.h"
>
</File>
<File
RelativePath="..\zlib\deflate.c"
>
</File>
<File
RelativePath="..\zlib\deflate.h"
>
</File>
<File
RelativePath="..\zlib\gzio.c"
>
</File>
<File
RelativePath="..\zlib\infback.c"
>
</File>
<File
RelativePath="..\zlib\inffas8664.c"
>
</File>
<File
RelativePath="..\zlib\inffast.c"
>
</File>
<File
RelativePath="..\zlib\inffast.h"
>
</File>
<File
RelativePath="..\zlib\inffixed.h"
>
</File>
<File
RelativePath="..\zlib\inflate.c"
>
</File>
<File
RelativePath="..\zlib\inflate.h"
>
</File>
<File
RelativePath="..\zlib\inftrees.c"
>
</File>
<File
RelativePath="..\zlib\inftrees.h"
>
</File>
<File
RelativePath="..\zlib\trees.c"
>
</File>
<File
RelativePath="..\zlib\trees.h"
>
</File>
<File
RelativePath="..\zlib\uncompr.c"
>
</File>
<File
RelativePath="..\zlib\zconf.h"
>
</File>
<File
RelativePath="..\zlib\zlib.h"
>
</File>
<File
RelativePath="..\zlib\zutil.c"
>
</File>
<File
RelativePath="..\zlib\zutil.h"
>
</File>
</Filter>
<Filter
Name="bzip2"
>
<File
RelativePath="..\bzip2\blocksort.c"
>
</File>
<File
RelativePath="..\bzip2\bzlib.c"
>
</File>
<File
RelativePath="..\bzip2\bzlib.h"
>
</File>
<File
RelativePath="..\bzip2\bzlib_private.h"
>
</File>
<File
RelativePath="..\bzip2\compress.c"
>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\crctable.c"
>
</File>
<File
RelativePath="..\bzip2\decompress.c"
>
</File>
<File
RelativePath="..\bzip2\huffman.c"
>
</File>
<File
RelativePath="..\bzip2\randtable.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,29 +0,0 @@
; CDVDiso.def : Declares the module parameters for the DLL.
LIBRARY "CDVDiso"
DESCRIPTION 'CDVDiso Driver'
EXPORTS
; Explicit exports can go here
PS2EgetLibType @2
PS2EgetLibName @3
PS2EgetLibVersion2 @4
CDVDinit @5
CDVDshutdown @6
CDVDopen @7
CDVDclose @8
CDVDreadTrack @9
CDVDgetBuffer @10
CDVDreadSubQ @11
CDVDgetTN @12
CDVDgetTD @13
CDVDgetTOC @14
CDVDgetDiskType @15
CDVDgetTrayStatus @16
CDVDctrlTrayOpen @17
CDVDctrlTrayClose @18
CDVDconfigure @19
CDVDtest @20
CDVDabout @21

View File

@ -1,111 +0,0 @@
# Microsoft Developer Studio Project File - Name="CDVDiso" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=CDVDiso - WIN32 RELEASE
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "CDVDiso.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "CDVDiso.mak" CFG="CDVDiso - WIN32 RELEASE"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "CDVDiso - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__MSCW32__" /D "_MBCS" /D "_USRDLL" /D "CDVDiso_EXPORTS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "./" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__MSCW32__" /D "_MBCS" /D "_USRDLL" /D "CDVDiso_EXPORTS" /D "__WIN32__" /D "_LARGEFILE_SOURCE" /D _FILE_OFFSET_BITS=64 /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x408 /d "NDEBUG"
# ADD RSC /l 0x408 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib libbz2.lib zlib.lib /nologo /dll /machine:I386 /nodefaultlib:"msvcrt.lib"
# SUBTRACT LINK32 /nodefaultlib
# Begin Target
# Name "CDVDiso - Win32 Release"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\CDVDiso.c
# End Source File
# Begin Source File
SOURCE=.\CDVDiso.def
# End Source File
# Begin Source File
SOURCE=.\Config.c
# End Source File
# Begin Source File
SOURCE=..\libiso.c
# End Source File
# Begin Source File
SOURCE=.\Win32.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\CDVDiso.h
# End Source File
# Begin Source File
SOURCE=.\Config.h
# End Source File
# Begin Source File
SOURCE=..\libiso.h
# End Source File
# Begin Source File
SOURCE=..\PS2Edefs.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\CDVDiso.rc
# End Source File
# End Group
# End Target
# End Project

View File

@ -1,30 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "CDVDiso"=".\CDVDiso.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -1,134 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Spanish (Argentina) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESS)
#ifdef _WIN32
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_ARGENTINA
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_CONFIG DIALOGEX 0, 0, 212, 161
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CDVDconfigure"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "OK",IDOK,105,140,50,14
EDITTEXT IDC_ISOFILE,10,10,145,14,ES_AUTOHSCROLL
PUSHBUTTON "Cancel",IDCANCEL,160,140,50,14
PUSHBUTTON "Select Iso",IDC_SELECTISO,160,10,45,14
PUSHBUTTON "Compress Iso",IDC_COMPRESSISO,33,75,65,14
PUSHBUTTON "Decompress Iso",IDC_DECOMPRESSISO,113,75,65,14
COMBOBOX IDC_METHOD,120,55,85,50,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER |
0x1,10,35,145,14
LTEXT "Compression Method:",IDC_STATIC,29,57,69,8
PUSHBUTTON "Stop",IDC_STOP,160,35,45,14
GROUPBOX "",IDC_STATIC,5,0,205,95
GROUPBOX "Options",IDC_STATIC,5,100,205,30
CONTROL "Enable Block Dump => ""ISO name.dump""",IDC_BLOCKDUMP,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,115,148,10
END
IDD_ABOUT DIALOG 0, 0, 177, 106
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "CDVDabout"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,65,85,50,14
LTEXT "CDVDiso Driver",IDC_NAME,70,10,50,8
GROUPBOX "",IDC_STATIC,5,35,170,40
LTEXT "Thanks to:\n mooby - coding hints and .bz support\n Brenden Conte - linux conf bugfix",
IDC_STATIC,10,45,160,25
LTEXT "Author: linuzappz <linuzappz@hotmail.com>",IDC_STATIC,
20,20,141,10
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_CONFIG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 205
TOPMARGIN, 7
BOTTOMMARGIN, 154
END
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 170
TOPMARGIN, 7
BOTTOMMARGIN, 99
END
END
#endif // APSTUDIO_INVOKED
#endif // Spanish (Argentina) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,18 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDiso", "CDVDiso.vcproj", "{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release.ActiveCfg = Release|Win32
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@ -1,258 +0,0 @@
<?xml version="1.0" encoding="windows-1253"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="CDVDiso"
RootNamespace="CDVDiso"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../;../ZLIB;./"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib "
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary=".\Release/CDVDiso.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\CDVDisop.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;"/>
</FileConfiguration>
</File>
<File
RelativePath="CDVDiso.def">
</File>
<File
RelativePath="Config.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"/>
</FileConfiguration>
</File>
<File
RelativePath="..\libiso.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"/>
</FileConfiguration>
</File>
<File
RelativePath="..\PS2Etypes.h">
</File>
<File
RelativePath="Win32.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\CDVDiso.h">
</File>
<File
RelativePath="Config.h">
</File>
<File
RelativePath="..\libiso.h">
</File>
<File
RelativePath="..\PS2Edefs.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File
RelativePath="CDVDiso.rc">
</File>
</Filter>
<Filter
Name="zlib"
Filter="">
<File
RelativePath="..\zlib\adler32.c">
</File>
<File
RelativePath="..\zlib\compress.c">
</File>
<File
RelativePath="..\zlib\crc32.c">
</File>
<File
RelativePath="..\zlib\crc32.h">
</File>
<File
RelativePath="..\zlib\deflate.c">
</File>
<File
RelativePath="..\zlib\deflate.h">
</File>
<File
RelativePath="..\zlib\gvmat32.asm">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCustomBuildTool"
CommandLine="ml /coff /Zi /c /Flgvmat32.lst ../ZLIB/gvmat32.asm "
AdditionalDependencies=""
Outputs="gvmat32.obj"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\gvmat32c.c">
</File>
<File
RelativePath="..\zlib\gzio.c">
</File>
<File
RelativePath="..\zlib\infback.c">
</File>
<File
RelativePath="..\zlib\inffas32.asm">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCustomBuildTool"
CommandLine="ml /coff /Zi /c /Flinffas32.lst ../ZLIB/inffas32.asm "
Outputs="inffas32.obj"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\inffast.c">
</File>
<File
RelativePath="..\zlib\inffast.h">
</File>
<File
RelativePath="..\zlib\inffixed.h">
</File>
<File
RelativePath="..\zlib\inflate.c">
</File>
<File
RelativePath="..\zlib\inflate.h">
</File>
<File
RelativePath="..\zlib\inftrees.c">
</File>
<File
RelativePath="..\zlib\inftrees.h">
</File>
<File
RelativePath="..\zlib\trees.c">
</File>
<File
RelativePath="..\zlib\trees.h">
</File>
<File
RelativePath="..\zlib\uncompr.c">
</File>
<File
RelativePath="..\zlib\zconf.h">
</File>
<File
RelativePath="..\zlib\zlib.h">
</File>
<File
RelativePath="..\zlib\zutil.c">
</File>
<File
RelativePath="..\zlib\zutil.h">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDiso", "CDVDiso_2003.vcproj", "{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Debug.ActiveCfg = Debug|Win32
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Debug.Build.0 = Debug|Win32
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release.ActiveCfg = Release|Win32
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@ -1,539 +0,0 @@
<?xml version="1.0" encoding="windows-1253"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="CDVDiso"
ProjectGUID="{96431026-4ED8-453C-BE84-771210094CBC}"
RootNamespace="CDVDiso"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../;../ZLIB;../BZIP2;./"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib "
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary="$(OutDir)/$(TargetName).lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; ..\..\..\..\..\bin\plugins"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../;../ZLIB;../BZIP2;./"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="3"
EnableFunctionLevelLinking="FALSE"
PrecompiledHeaderFile=".\Debug/CDVDiso.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib "
OutputFile=".\Debug/CDVDisod.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/$(ProjectName).pdb"
ImportLibrary="$(OutDir)/$(TargetName).lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; ..\..\..\..\..\bin\plugins"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="CDVDiso.def">
</File>
<File
RelativePath="..\CDVDisop.c">
</File>
<File
RelativePath="Config.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\libiso.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="Win32.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;$(NoInherit)"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\CDVDiso.h">
</File>
<File
RelativePath="Config.h">
</File>
<File
RelativePath="..\libiso.h">
</File>
<File
RelativePath="..\PS2Edefs.h">
</File>
<File
RelativePath="..\PS2Etypes.h">
</File>
<File
RelativePath=".\resource.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File
RelativePath="CDVDiso.rc">
</File>
</Filter>
<Filter
Name="zlib"
Filter="">
<File
RelativePath="..\zlib\adler32.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\compress.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\crc32.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\crc32.h">
</File>
<File
RelativePath="..\zlib\deflate.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\deflate.h">
</File>
<File
RelativePath="..\zlib\gvmat32.obj">
</File>
<File
RelativePath="..\zlib\gvmat32c.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\gzio.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\infback.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\inffas32.obj">
</File>
<File
RelativePath="..\zlib\inffast.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\inffast.h">
</File>
<File
RelativePath="..\zlib\inffixed.h">
</File>
<File
RelativePath="..\zlib\inflate.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\inflate.h">
</File>
<File
RelativePath="..\zlib\inftrees.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\inftrees.h">
</File>
<File
RelativePath="..\zlib\trees.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\trees.h">
</File>
<File
RelativePath="..\zlib\uncompr.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\zconf.h">
</File>
<File
RelativePath="..\zlib\zlib.h">
</File>
<File
RelativePath="..\zlib\zutil.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\zlib\zutil.h">
</File>
</Filter>
<Filter
Name="bzip2"
Filter="">
<File
RelativePath="..\bzip2\blocksort.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\bzlib.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\bzlib.h">
</File>
<File
RelativePath="..\bzip2\bzlib_private.h">
</File>
<File
RelativePath="..\bzip2\compress.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile="$(IntDir)/$(InputName)1.obj"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\crctable.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\decompress.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\huffman.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\randtable.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDVDiso", "CDVDiso_2005.vcproj", "{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Debug|Win32.ActiveCfg = Debug|Win32
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Debug|Win32.Build.0 = Debug|Win32
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release|Win32.ActiveCfg = Release|Win32
{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,538 +0,0 @@
<?xml version="1.0" encoding="windows-1253"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="CDVDiso"
ProjectGUID="{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}"
RootNamespace="CDVDiso"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="Win64 (AMD64)"
/>
</Platforms>
<ToolFiles>
<DefaultToolFile
FileName="masm.rules"
/>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..;..\ZLIB;..\bzip2;."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;_CRT_SECURE_NO_DEPRECATE;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib ..\zlib\inffas32.obj ..\zlib\gvmat32.obj"
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary=".\Release/CDVDiso.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; ..\..\..\..\..\bin\plugins"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..;..\ZLIB;..\bzip2;."
PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,_USRDLL,__MSCW32__,CDVDiso_EXPORTS,_CRT_SECURE_NO_DEPRECATE,__WIN32__,_LARGEFILE_SOURCE,_FILE_OFFSET_BITS=64,ASMV,ASMINF"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Debug\CDVDiso.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib ..\zlib\inffas32.obj ..\zlib\gvmat32.obj"
OutputFile=".\Debug\CDVDisod.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary=".\Debug/CDVDisod.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; ..\..\..\..\..\bin\plugins"
/>
</Configuration>
<Configuration
Name="Release|Win64 (AMD64)"
OutputDirectory="amd64\$(ConfigurationName)"
IntermediateDirectory="amd64\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="3"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../;../ZLIB;./"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;__x86_64__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateManifest="FALSE"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary=".\Release/CDVDiso.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\CDVDisop.c"
>
</File>
<File
RelativePath=".\Config.c"
>
</File>
<File
RelativePath="..\libiso.c"
>
</File>
<File
RelativePath=".\Win32.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\CDVDiso.h"
>
</File>
<File
RelativePath=".\Config.h"
>
</File>
<File
RelativePath="..\libiso.h"
>
</File>
<File
RelativePath="..\PS2Edefs.h"
>
</File>
<File
RelativePath="..\PS2Etypes.h"
>
</File>
<File
RelativePath=".\resource.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="CDVDiso.rc"
>
</File>
</Filter>
<Filter
Name="zlib"
>
<File
RelativePath="..\zlib\adler32.c"
>
</File>
<File
RelativePath="..\zlib\compress.c"
>
</File>
<File
RelativePath="..\zlib\crc32.c"
>
</File>
<File
RelativePath="..\zlib\crc32.h"
>
</File>
<File
RelativePath="..\zlib\deflate.c"
>
</File>
<File
RelativePath="..\zlib\deflate.h"
>
</File>
<File
RelativePath="..\zlib\gvmat32c.c"
>
</File>
<File
RelativePath="..\zlib\gzio.c"
>
</File>
<File
RelativePath="..\zlib\infback.c"
>
</File>
<File
RelativePath="..\zlib\inffast.c"
>
</File>
<File
RelativePath="..\zlib\inffast.h"
>
</File>
<File
RelativePath="..\zlib\inffixed.h"
>
</File>
<File
RelativePath="..\zlib\inflate.c"
>
</File>
<File
RelativePath="..\zlib\inflate.h"
>
</File>
<File
RelativePath="..\zlib\inftrees.c"
>
</File>
<File
RelativePath="..\zlib\inftrees.h"
>
</File>
<File
RelativePath="..\zlib\trees.c"
>
</File>
<File
RelativePath="..\zlib\trees.h"
>
</File>
<File
RelativePath="..\zlib\uncompr.c"
>
</File>
<File
RelativePath="..\zlib\zconf.h"
>
</File>
<File
RelativePath="..\zlib\zlib.h"
>
</File>
<File
RelativePath="..\zlib\zutil.c"
>
</File>
<File
RelativePath="..\zlib\zutil.h"
>
</File>
</Filter>
<Filter
Name="bzip2"
>
<File
RelativePath="..\bzip2\blocksort.c"
>
</File>
<File
RelativePath="..\bzip2\bzlib.c"
>
</File>
<File
RelativePath="..\bzip2\bzlib.h"
>
</File>
<File
RelativePath="..\bzip2\bzlib_private.h"
>
</File>
<File
RelativePath="..\bzip2\compress.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\crctable.c"
>
</File>
<File
RelativePath="..\bzip2\decompress.c"
>
</File>
<File
RelativePath="..\bzip2\huffman.c"
>
</File>
<File
RelativePath="..\bzip2\randtable.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,537 +0,0 @@
<?xml version="1.0" encoding="windows-1253"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="CDVDiso"
ProjectGUID="{BB27CC2C-28D1-4438-A0DF-3E120D01EDEC}"
RootNamespace="CDVDiso"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="Win64 (AMD64)"
/>
</Platforms>
<ToolFiles>
<DefaultToolFile
FileName="masm.rules"
/>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..;..\ZLIB;..\bzip2;."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;_CRT_SECURE_NO_DEPRECATE;__WIN32__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib ..\zlib\inffas32.obj ..\zlib\gvmat32.obj"
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\Release/CDVDiso.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; ..\..\..\..\..\bin\plugins"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..;..\ZLIB;..\bzip2;."
PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,_USRDLL,__MSCW32__,CDVDiso_EXPORTS,_CRT_SECURE_NO_DEPRECATE,__WIN32__,_LARGEFILE_SOURCE,_FILE_OFFSET_BITS=64,ASMV,ASMINF"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Debug\CDVDiso.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib ..\zlib\inffas32.obj ..\zlib\gvmat32.obj"
OutputFile=".\Debug\CDVDisod.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\Debug/CDVDisod.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; ..\..\..\..\..\bin\plugins"
/>
</Configuration>
<Configuration
Name="Release|Win64 (AMD64)"
OutputDirectory="amd64\$(ConfigurationName)"
IntermediateDirectory="amd64\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="3"
TypeLibraryName=".\Release/CDVDiso.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../;../ZLIB;./"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__MSCW32__;CDVDiso_EXPORTS;__WIN32__;__x86_64__;_LARGEFILE_SOURCE;_FILE_OFFSET_BITS=64;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/CDVDiso.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1032"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
OutputFile=".\Release/CDVDiso.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateManifest="FALSE"
IgnoreDefaultLibraryNames="msvcrt.lib"
ModuleDefinitionFile=".\CDVDiso.def"
ProgramDatabaseFile=".\Release/CDVDiso.pdb"
ImportLibrary=".\Release/CDVDiso.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\CDVDisop.c"
>
</File>
<File
RelativePath=".\Config.c"
>
</File>
<File
RelativePath="..\libiso.c"
>
</File>
<File
RelativePath=".\Win32.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\CDVDiso.h"
>
</File>
<File
RelativePath=".\Config.h"
>
</File>
<File
RelativePath="..\libiso.h"
>
</File>
<File
RelativePath="..\PS2Edefs.h"
>
</File>
<File
RelativePath="..\PS2Etypes.h"
>
</File>
<File
RelativePath=".\resource.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="CDVDiso.rc"
>
</File>
</Filter>
<Filter
Name="zlib"
>
<File
RelativePath="..\zlib\adler32.c"
>
</File>
<File
RelativePath="..\zlib\compress.c"
>
</File>
<File
RelativePath="..\zlib\crc32.c"
>
</File>
<File
RelativePath="..\zlib\crc32.h"
>
</File>
<File
RelativePath="..\zlib\deflate.c"
>
</File>
<File
RelativePath="..\zlib\deflate.h"
>
</File>
<File
RelativePath="..\zlib\gvmat32c.c"
>
</File>
<File
RelativePath="..\zlib\gzio.c"
>
</File>
<File
RelativePath="..\zlib\infback.c"
>
</File>
<File
RelativePath="..\zlib\inffast.c"
>
</File>
<File
RelativePath="..\zlib\inffast.h"
>
</File>
<File
RelativePath="..\zlib\inffixed.h"
>
</File>
<File
RelativePath="..\zlib\inflate.c"
>
</File>
<File
RelativePath="..\zlib\inflate.h"
>
</File>
<File
RelativePath="..\zlib\inftrees.c"
>
</File>
<File
RelativePath="..\zlib\inftrees.h"
>
</File>
<File
RelativePath="..\zlib\trees.c"
>
</File>
<File
RelativePath="..\zlib\trees.h"
>
</File>
<File
RelativePath="..\zlib\uncompr.c"
>
</File>
<File
RelativePath="..\zlib\zconf.h"
>
</File>
<File
RelativePath="..\zlib\zlib.h"
>
</File>
<File
RelativePath="..\zlib\zutil.c"
>
</File>
<File
RelativePath="..\zlib\zutil.h"
>
</File>
</Filter>
<Filter
Name="bzip2"
>
<File
RelativePath="..\bzip2\blocksort.c"
>
</File>
<File
RelativePath="..\bzip2\bzlib.c"
>
</File>
<File
RelativePath="..\bzip2\bzlib.h"
>
</File>
<File
RelativePath="..\bzip2\bzlib_private.h"
>
</File>
<File
RelativePath="..\bzip2\compress.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\bzip2\crctable.c"
>
</File>
<File
RelativePath="..\bzip2\decompress.c"
>
</File>
<File
RelativePath="..\bzip2\huffman.c"
>
</File>
<File
RelativePath="..\bzip2\randtable.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,45 +0,0 @@
#include <stdio.h>
#include <windows.h>
#include "CDVDiso.h"
#define GetKeyV(name, var, s, t) \
size = s; type = t; \
RegQueryValueEx(myKey, name, 0, &type, (LPBYTE) var, &size);
#define GetKeyVdw(name, var) \
GetKeyV(name, var, 4, REG_DWORD);
#define SetKeyV(name, var, s, t) \
RegSetValueEx(myKey, name, 0, t, (LPBYTE) var, s);
#define SetKeyVdw(name, var) \
SetKeyV(name, var, 4, REG_DWORD);
void SaveConf() {
HKEY myKey;
DWORD myDisp;
RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\PS2Eplugin\\CDVD\\CDVDiso", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &myKey, &myDisp);
SetKeyV("IsoFile", IsoFile, sizeof(IsoFile), REG_BINARY);
SetKeyVdw("BlockDump", &BlockDump);
RegCloseKey(myKey);
}
void LoadConf() {
HKEY myKey;
DWORD type, size;
memset(IsoFile, 0, sizeof(IsoFile));
if (RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\PS2Eplugin\\CDVD\\CDVDiso", 0, KEY_ALL_ACCESS, &myKey)!=ERROR_SUCCESS) {
SaveConf(); return;
}
GetKeyV("IsoFile", IsoFile, sizeof(IsoFile), REG_BINARY);
GetKeyVdw("BlockDump", &BlockDump);
RegCloseKey(myKey);
}

View File

@ -1,3 +0,0 @@
void SaveConf();
void LoadConf();

View File

@ -1,57 +0,0 @@
#
# Makefile for MINGW32
#
all: cdvdiso
PLUGIN = CDVDiso.dll
CC = gcc
NASM = nasmw
RM = rm -f
AR = ar
STRIP = strip
RC = windres
OPTIMIZE = -O2 -fomit-frame-pointer -finline-functions -ffast-math -fno-strict-aliasing
FLAGS = -D__WIN32__ -D__MINGW32__ # -DENABLE_NLS -DPACKAGE=\"pcsx2\"
RC1FLAGS = -d__MINGW32__
LIBS = -L./ -lcomctl32 -lwsock32 -lwinmm -lgdi32 -lcomdlg32 #-lintl
RESOBJ = cdvdiso.o
OBJS = ../CDVDiso.o ../libiso.o
OBJS+= Config.o Win32.o ${RESOBJ}
OBJS+= ../zlib/adler32.o ../zlib/compress.o ../zlib/crc32.o ../zlib/gzio.o ../zlib/uncompr.o ../zlib/deflate.o ../zlib/trees.o \
../zlib/zutil.o ../zlib/inflate.o ../zlib/infback.o ../zlib/inftrees.o ../zlib/inffast.o
OBJS+= ../bzip2/blocksort.o ../bzip2/bzlib.o \
../bzip2/compress.o ../bzip2/crctable.o \
../bzip2/decompress.o ../bzip2/huffman.o \
../bzip2/randtable.o
DEPS:= $(OBJS:.o=.d)
CFLAGS = -Wall ${OPTIMIZE} -I. -I.. -I/usr/local/include -I../zlib -I../bzip2 ${FLAGS}
cdvdiso: ${OBJS}
dllwrap --def plugin.def -o ${PLUGIN} ${OBJS} ${LIBS}
# ${CC} -shared -Wl,--kill-at,--output-def,plugin.def ${CFLAGS} ${OBJS} -o ${PLUGIN} ${LIBS}
${STRIP} ${PLUGIN}
.PHONY: clean cdvdiso
clean:
${RM} ${OBJS} ${DEPS} ${PCSX2}
%.o: %.asm
${NASM} ${ASMFLAGS} -o $@ $<
%.o: %.c
${CC} ${CFLAGS} -c -o $@ $< -MD -MF $(patsubst %.o,%.d,$@)
${RESOBJ}: CDVDiso.rc
${RC} -D__MINGW32__ -I rc -O coff -o $@ -i $<
-include ${DEPS}

View File

@ -1,311 +0,0 @@
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
#include <stdio.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <string.h>
#include <zlib.h>
#include "Config.h"
#include "CDVDiso.h"
#include "resource.h"
HINSTANCE hInst;
#define MAXFILENAME 256
u8 Zbuf[2352 * 10 * 2];
HWND hDlg;
HWND hProgress;
HWND hIsoFile;
HWND hMethod;
HWND hBlockDump;
int stop;
void SysMessage(char *fmt, ...) {
va_list list;
char tmp[512];
va_start(list,fmt);
vsprintf(tmp,fmt,list);
va_end(list);
MessageBox(0, tmp, "CDVDiso Msg", 0);
}
int _GetFile(char *out) {
OPENFILENAME ofn;
char szFileName[MAXFILENAME];
char szFileTitle[MAXFILENAME];
memset(&szFileName, 0, sizeof(szFileName));
memset(&szFileTitle, 0, sizeof(szFileTitle));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = GetActiveWindow();
ofn.lpstrFilter = "Supported Formats\0*.bin;*.iso;*.img;*.nrg;*.mdf;*.Z;*.Z2;*.BZ2;*.dump\0Cd Iso Format (*.bin;*.iso;*.img;*.nrg;*.mdf)\0*.bin;*.iso;*.img;*.nrg;*.mdf\0Compressed Z Iso Format (*.Z;*.Z2)\0*.Z;*.Z2\0Compressed BZ Iso Format (*.BZ2)\0*.BZ2\0Block Dumps (*.dump)\0*.dump\0All Files\0*.*\0";
ofn.lpstrCustomFilter = NULL;
ofn.nMaxCustFilter = 0;
ofn.nFilterIndex = 1;
ofn.lpstrFile = szFileName;
ofn.nMaxFile = MAXFILENAME;
ofn.lpstrInitialDir = NULL;
ofn.lpstrFileTitle = szFileTitle;
ofn.nMaxFileTitle = MAXFILENAME;
ofn.lpstrTitle = NULL;
ofn.lpstrDefExt = NULL;
ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
if (GetOpenFileName ((LPOPENFILENAME)&ofn)) {
strcpy(out, szFileName);
return 1;
}
return 0;
}
void CfgOpenFile() {
if (_GetFile(IsoFile) == 1)
SaveConf();
}
void UpdZmode() {
if (ComboBox_GetCurSel(hMethod) == 0) {
Zmode = 1;
} else {
Zmode = 2;
}
}
void SysUpdate() {
MSG msg;
while (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
void OnCompress() {
u32 lsn;
u8 cdbuff[10*2352];
char Zfile[256];
int ret;
isoFile *src;
isoFile *dst;
Edit_GetText(hIsoFile, IsoFile, 256);
UpdZmode();
if (Zmode == 1) {
sprintf(Zfile, "%s.Z2", IsoFile);
} else {
sprintf(Zfile, "%s.BZ2", IsoFile);
}
src = isoOpen(IsoFile);
if (src == NULL) return;
if (Zmode == 1) {
dst = isoCreate(Zfile, ISOFLAGS_Z2);
} else {
dst = isoCreate(Zfile, ISOFLAGS_BZ2);
}
if (dst == NULL) return;
isoSetFormat(dst, src->blockofs, src->blocksize, src->blocks);
Button_Enable(GetDlgItem(hDlg, IDC_COMPRESSISO), FALSE);
Button_Enable(GetDlgItem(hDlg, IDC_DECOMPRESSISO), FALSE);
stop=0;
for (lsn = 0; lsn<src->blocks; lsn++) {
printf("block %d ", lsn);
putchar(13);
fflush(stdout);
ret = isoReadBlock(src, cdbuff, lsn);
if (ret == -1) break;
ret = isoWriteBlock(dst, cdbuff, lsn);
if (ret == -1) break;
SendMessage(hProgress, PBM_SETPOS, (lsn * 100) / src->blocks, 0);
SysUpdate();
if (stop) break;
}
isoClose(src);
isoClose(dst);
if (!stop) Edit_SetText(hIsoFile, Zfile);
Button_Enable(GetDlgItem(hDlg, IDC_COMPRESSISO), TRUE);
Button_Enable(GetDlgItem(hDlg, IDC_DECOMPRESSISO), TRUE);
if (!stop) {
if (ret == -1) {
SysMessage("Error compressing iso image");
} else {
SysMessage("Iso image compressed OK");
}
}
}
void OnDecompress() {
char file[256];
u8 cdbuff[10*2352];
u32 lsn;
isoFile *src;
isoFile *dst;
int ret;
Edit_GetText(hIsoFile, IsoFile, 256);
src = isoOpen(IsoFile);
if (src == NULL) return;
strcpy(file, IsoFile);
if (src->flags & ISOFLAGS_Z) {
file[strlen(file) - 2] = 0;
} else
if (src->flags & ISOFLAGS_Z2) {
file[strlen(file) - 3] = 0;
} else
if (src->flags & ISOFLAGS_BZ2) {
file[strlen(file) - 3] = 0;
} else {
SysMessage("%s is not a compressed image", IsoFile);
return;
}
dst = isoCreate(file, 0);
if (dst == NULL) return;
isoSetFormat(dst, src->blockofs, src->blocksize, src->blocks);
Button_Enable(GetDlgItem(hDlg, IDC_COMPRESSISO), FALSE);
Button_Enable(GetDlgItem(hDlg, IDC_DECOMPRESSISO), FALSE);
stop=0;
for (lsn = 0; lsn<src->blocks; lsn++) {
printf("block %d ", lsn);
putchar(13);
fflush(stdout);
ret = isoReadBlock(src, cdbuff, lsn);
if (ret == -1) break;
ret = isoWriteBlock(dst, cdbuff, lsn);
if (ret == -1) break;
SendMessage(hProgress, PBM_SETPOS, (lsn * 100) / src->blocks, 0);
SysUpdate();
if (stop) break;
}
if (!stop) Edit_SetText(hIsoFile, file);
isoClose(src);
isoClose(dst);
Button_Enable(GetDlgItem(hDlg, IDC_COMPRESSISO), TRUE);
Button_Enable(GetDlgItem(hDlg, IDC_DECOMPRESSISO), TRUE);
if (!stop) {
if (ret == -1) {
SysMessage("Error decompressing iso image");
} else {
SysMessage("Iso image decompressed OK");
}
}
}
BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
int i;
switch(uMsg) {
case WM_INITDIALOG:
hDlg = hW;
LoadConf();
hProgress = GetDlgItem(hW, IDC_PROGRESS);
hIsoFile = GetDlgItem(hW, IDC_ISOFILE);
hMethod = GetDlgItem(hW, IDC_METHOD);
hBlockDump = GetDlgItem(hW, IDC_BLOCKDUMP);
for (i=0; methods[i] != NULL; i++) {
ComboBox_AddString(hMethod, methods[i]);
}
Edit_SetText(hIsoFile, IsoFile);
ComboBox_SetCurSel(hMethod, 0);
/* if (strstr(IsoFile, ".Z") != NULL)
ComboBox_SetCurSel(hMethod, 1);
else ComboBox_SetCurSel(hMethod, 0);*/
Button_SetCheck(hBlockDump, BlockDump);
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam)) {
case IDC_SELECTISO:
if (_GetFile(IsoFile) == 1)
Edit_SetText(hIsoFile, IsoFile);
return TRUE;
case IDC_COMPRESSISO:
OnCompress();
return TRUE;
case IDC_DECOMPRESSISO:
OnDecompress();
return TRUE;
case IDC_STOP:
stop = 1;
return TRUE;
case IDCANCEL:
EndDialog(hW, TRUE);
return TRUE;
case IDOK:
Edit_GetText(hIsoFile, IsoFile, 256);
BlockDump = Button_GetCheck(hBlockDump);
SaveConf();
EndDialog(hW, FALSE);
return TRUE;
}
}
return FALSE;
}
void CALLBACK CDVDconfigure() {
DialogBox(hInst,
MAKEINTRESOURCE(IDD_CONFIG),
GetActiveWindow(),
(DLGPROC)ConfigureDlgProc);
}
BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch(uMsg) {
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam)) {
case IDOK:
EndDialog(hW, FALSE);
return TRUE;
}
}
return FALSE;
}
void CALLBACK CDVDabout() {
DialogBox(hInst,
MAKEINTRESOURCE(IDD_ABOUT),
GetActiveWindow(),
(DLGPROC)AboutDlgProc);
}
BOOL APIENTRY DllMain(HANDLE hModule, // DLL INIT
DWORD dwReason,
LPVOID lpReserved) {
hInst = (HINSTANCE)hModule;
return TRUE; // very quick :)
}

View File

@ -1,5 +0,0 @@
#include <windows.h>
#include <winuser.h>
#define IDC_STATIC (-1)

View File

@ -1,21 +0,0 @@
EXPORTS
PS2EgetLibType = PS2EgetLibType@0 @2
PS2EgetLibName = PS2EgetLibName@0 @3
PS2EgetLibVersion2 = PS2EgetLibVersion2@4 @4
CDVDinit = CDVDinit@0 @5
CDVDshutdown = CDVDshutdown@0 @6
CDVDopen = CDVDopen@0 @7
CDVDclose = CDVDclose@0 @8
CDVDreadTrack = CDVDreadTrack@8 @9
CDVDgetBuffer = CDVDgetBuffer@0 @10
CDVDreadSubQ = CDVDreadSubQ@8 @11
CDVDgetTN = CDVDgetTN@4 @12
CDVDgetTD = CDVDgetTD@8 @13
CDVDgetTOC = CDVDgetTOC@4 @14
CDVDgetDiskType = CDVDgetDiskType@0 @15
CDVDgetTrayStatus = CDVDgetTrayStatus@0 @16
CDVDctrlTrayOpen = CDVDctrlTrayOpen@0 @17
CDVDctrlTrayClose = CDVDctrlTrayClose@0 @18
CDVDconfigure = CDVDconfigure@0 @19
CDVDtest = CDVDtest@0 @20
CDVDabout = CDVDabout@0 @21

Some files were not shown because too many files have changed in this diff Show More