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
|
||||
|
||||
#define CdlSync 0
|
||||
#define CdlNop 1
|
||||
#define CdlSetloc 2
|
||||
#define CdlPlay 3
|
||||
#define CdlForward 4
|
||||
#define CdlBackward 5
|
||||
#define CdlReadN 6
|
||||
#define CdlStandby 7
|
||||
#define CdlStop 8
|
||||
#define CdlPause 9
|
||||
#define CdlInit 10
|
||||
#define CdlMute 11
|
||||
#define CdlDemute 12
|
||||
#define CdlSetfilter 13
|
||||
#define CdlSetmode 14
|
||||
#define CdlGetmode 15
|
||||
#define CdlGetlocL 16
|
||||
#define CdlGetlocP 17
|
||||
#define Cdl18 18
|
||||
#define CdlGetTN 19
|
||||
#define CdlGetTD 20
|
||||
#define CdlSeekL 21
|
||||
#define CdlSeekP 22
|
||||
#define CdlTest 25
|
||||
#define CdlID 26
|
||||
#define CdlReadS 27
|
||||
#define CdlReset 28
|
||||
#define CdlReadToc 30
|
||||
enum cdrom_registers
|
||||
{
|
||||
CdlSync = 0,
|
||||
CdlNop = 1,
|
||||
CdlSetloc = 2,
|
||||
CdlPlay = 3,
|
||||
CdlForward = 4,
|
||||
CdlBackward = 5,
|
||||
CdlReadN = 6,
|
||||
CdlStandby = 7,
|
||||
CdlStop = 8,
|
||||
CdlPause = 9,
|
||||
CdlInit = 10,
|
||||
CdlMute = 11,
|
||||
CdlDemute = 12,
|
||||
CdlSetfilter = 13,
|
||||
CdlSetmode = 14,
|
||||
CdlGetmode = 15,
|
||||
CdlGetlocL = 16,
|
||||
CdlGetlocP = 17,
|
||||
Cdl18 = 18,
|
||||
CdlGetTN = 19,
|
||||
CdlGetTD = 20,
|
||||
CdlSeekL = 21,
|
||||
CdlSeekP = 22,
|
||||
CdlTest = 25,
|
||||
CdlID = 26,
|
||||
CdlReadS = 27,
|
||||
CdlReset = 28,
|
||||
CdlReadToc = 30,
|
||||
|
||||
#define AUTOPAUSE 249
|
||||
#define READ_ACK 250
|
||||
#define READ 251
|
||||
#define REPPLAY_ACK 252
|
||||
#define REPPLAY 253
|
||||
#define ASYNC 254
|
||||
AUTOPAUSE = 249,
|
||||
READ_ACK = 250,
|
||||
READ = 251,
|
||||
REPPLAY_ACK = 252,
|
||||
REPPLAY = 253,
|
||||
ASYNC = 254
|
||||
/* don't set 255, it's reserved */
|
||||
};
|
||||
|
||||
const char *CmdName[0x100]= {
|
||||
"CdlSync", "CdlNop", "CdlSetloc", "CdlPlay",
|
||||
|
@ -128,12 +131,15 @@ static void ReadTrack() {
|
|||
}
|
||||
|
||||
// cdr.Stat:
|
||||
#define NoIntr 0
|
||||
#define DataReady 1
|
||||
#define Complete 2
|
||||
#define Acknowledge 3
|
||||
#define DataEnd 4
|
||||
#define DiskError 5
|
||||
enum cdr_stat_values
|
||||
{
|
||||
NoIntr = 0,
|
||||
DataReady,
|
||||
Complete,
|
||||
Acknowledge,
|
||||
DataEnd,
|
||||
DiskError
|
||||
};
|
||||
|
||||
static void AddIrqQueue(u8 irq, u32 ecycle) {
|
||||
cdr.Irq = irq;
|
||||
|
|
|
@ -62,13 +62,14 @@ u32 IsoFile::seek(u32 absoffset)
|
|||
u32 endOffset = absoffset;
|
||||
|
||||
int oldSectorNumber = currentSectorNumber;
|
||||
u32 newOffset = endOffset;
|
||||
int newSectorNumber = fileEntry.lba + (int)(newOffset / sectorLength);
|
||||
int newSectorNumber = fileEntry.lba + (int)(endOffset / sectorLength);
|
||||
|
||||
if(oldSectorNumber != newSectorNumber)
|
||||
{
|
||||
internalReader.readSector(currentSector, newSectorNumber);
|
||||
}
|
||||
currentOffset = newOffset;
|
||||
|
||||
currentOffset = endOffset;
|
||||
currentSectorNumber = newSectorNumber;
|
||||
sectorOffset = (int)(currentOffset % sectorLength);
|
||||
|
||||
|
@ -109,8 +110,7 @@ s32 IsoFile::skip(s32 n)
|
|||
{
|
||||
s32 oldOffset = currentOffset;
|
||||
|
||||
if(n<0)
|
||||
return 0;
|
||||
if (n<0) return 0;
|
||||
|
||||
seek(currentOffset+n);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "IsoFileFormats.h"
|
||||
|
||||
static bool detect(isoFile *iso)
|
||||
static int detect(isoFile *iso)
|
||||
{
|
||||
u8 buf[2448];
|
||||
u8* pbuf;
|
||||
|
|
Loading…
Reference in New Issue