mirror of https://github.com/PCSX2/pcsx2.git
A few more minor changes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2223 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
0aae87e8fd
commit
4dc978f70a
|
@ -22,42 +22,45 @@
|
||||||
|
|
||||||
//THIS ALL IS FOR THE CDROM REGISTERS HANDLING
|
//THIS ALL IS FOR THE CDROM REGISTERS HANDLING
|
||||||
|
|
||||||
#define CdlSync 0
|
enum cdrom_registers
|
||||||
#define CdlNop 1
|
{
|
||||||
#define CdlSetloc 2
|
CdlSync = 0,
|
||||||
#define CdlPlay 3
|
CdlNop = 1,
|
||||||
#define CdlForward 4
|
CdlSetloc = 2,
|
||||||
#define CdlBackward 5
|
CdlPlay = 3,
|
||||||
#define CdlReadN 6
|
CdlForward = 4,
|
||||||
#define CdlStandby 7
|
CdlBackward = 5,
|
||||||
#define CdlStop 8
|
CdlReadN = 6,
|
||||||
#define CdlPause 9
|
CdlStandby = 7,
|
||||||
#define CdlInit 10
|
CdlStop = 8,
|
||||||
#define CdlMute 11
|
CdlPause = 9,
|
||||||
#define CdlDemute 12
|
CdlInit = 10,
|
||||||
#define CdlSetfilter 13
|
CdlMute = 11,
|
||||||
#define CdlSetmode 14
|
CdlDemute = 12,
|
||||||
#define CdlGetmode 15
|
CdlSetfilter = 13,
|
||||||
#define CdlGetlocL 16
|
CdlSetmode = 14,
|
||||||
#define CdlGetlocP 17
|
CdlGetmode = 15,
|
||||||
#define Cdl18 18
|
CdlGetlocL = 16,
|
||||||
#define CdlGetTN 19
|
CdlGetlocP = 17,
|
||||||
#define CdlGetTD 20
|
Cdl18 = 18,
|
||||||
#define CdlSeekL 21
|
CdlGetTN = 19,
|
||||||
#define CdlSeekP 22
|
CdlGetTD = 20,
|
||||||
#define CdlTest 25
|
CdlSeekL = 21,
|
||||||
#define CdlID 26
|
CdlSeekP = 22,
|
||||||
#define CdlReadS 27
|
CdlTest = 25,
|
||||||
#define CdlReset 28
|
CdlID = 26,
|
||||||
#define CdlReadToc 30
|
CdlReadS = 27,
|
||||||
|
CdlReset = 28,
|
||||||
|
CdlReadToc = 30,
|
||||||
|
|
||||||
#define AUTOPAUSE 249
|
AUTOPAUSE = 249,
|
||||||
#define READ_ACK 250
|
READ_ACK = 250,
|
||||||
#define READ 251
|
READ = 251,
|
||||||
#define REPPLAY_ACK 252
|
REPPLAY_ACK = 252,
|
||||||
#define REPPLAY 253
|
REPPLAY = 253,
|
||||||
#define ASYNC 254
|
ASYNC = 254
|
||||||
/* don't set 255, it's reserved */
|
/* don't set 255, it's reserved */
|
||||||
|
};
|
||||||
|
|
||||||
const char *CmdName[0x100]= {
|
const char *CmdName[0x100]= {
|
||||||
"CdlSync", "CdlNop", "CdlSetloc", "CdlPlay",
|
"CdlSync", "CdlNop", "CdlSetloc", "CdlPlay",
|
||||||
|
@ -128,12 +131,15 @@ static void ReadTrack() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// cdr.Stat:
|
// cdr.Stat:
|
||||||
#define NoIntr 0
|
enum cdr_stat_values
|
||||||
#define DataReady 1
|
{
|
||||||
#define Complete 2
|
NoIntr = 0,
|
||||||
#define Acknowledge 3
|
DataReady,
|
||||||
#define DataEnd 4
|
Complete,
|
||||||
#define DiskError 5
|
Acknowledge,
|
||||||
|
DataEnd,
|
||||||
|
DiskError
|
||||||
|
};
|
||||||
|
|
||||||
static void AddIrqQueue(u8 irq, u32 ecycle) {
|
static void AddIrqQueue(u8 irq, u32 ecycle) {
|
||||||
cdr.Irq = irq;
|
cdr.Irq = irq;
|
||||||
|
|
|
@ -62,13 +62,14 @@ u32 IsoFile::seek(u32 absoffset)
|
||||||
u32 endOffset = absoffset;
|
u32 endOffset = absoffset;
|
||||||
|
|
||||||
int oldSectorNumber = currentSectorNumber;
|
int oldSectorNumber = currentSectorNumber;
|
||||||
u32 newOffset = endOffset;
|
int newSectorNumber = fileEntry.lba + (int)(endOffset / sectorLength);
|
||||||
int newSectorNumber = fileEntry.lba + (int)(newOffset / sectorLength);
|
|
||||||
if(oldSectorNumber != newSectorNumber)
|
if(oldSectorNumber != newSectorNumber)
|
||||||
{
|
{
|
||||||
internalReader.readSector(currentSector, newSectorNumber);
|
internalReader.readSector(currentSector, newSectorNumber);
|
||||||
}
|
}
|
||||||
currentOffset = newOffset;
|
|
||||||
|
currentOffset = endOffset;
|
||||||
currentSectorNumber = newSectorNumber;
|
currentSectorNumber = newSectorNumber;
|
||||||
sectorOffset = (int)(currentOffset % sectorLength);
|
sectorOffset = (int)(currentOffset % sectorLength);
|
||||||
|
|
||||||
|
@ -109,12 +110,11 @@ s32 IsoFile::skip(s32 n)
|
||||||
{
|
{
|
||||||
s32 oldOffset = currentOffset;
|
s32 oldOffset = currentOffset;
|
||||||
|
|
||||||
if(n<0)
|
if (n<0) return 0;
|
||||||
return 0;
|
|
||||||
|
|
||||||
seek(currentOffset+n);
|
seek(currentOffset+n);
|
||||||
|
|
||||||
return currentOffset-oldOffset;
|
return currentOffset - oldOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 IsoFile::getSeekPos() const
|
u32 IsoFile::getSeekPos() const
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "IsoFileFormats.h"
|
#include "IsoFileFormats.h"
|
||||||
|
|
||||||
static bool detect(isoFile *iso)
|
static int detect(isoFile *iso)
|
||||||
{
|
{
|
||||||
u8 buf[2448];
|
u8 buf[2448];
|
||||||
u8* pbuf;
|
u8* pbuf;
|
||||||
|
|
Loading…
Reference in New Issue