mirror of
https://github.com/TheOnlyZac/sly1.git
synced 2024-11-23 05:39:54 +00:00
Match CBIS::DecrementCdReadLimit
This commit is contained in:
parent
a743bf87dc
commit
cf76638356
@ -16,6 +16,12 @@ _GLOBAL_$I$g_splotheapPair = 0x11C0E8; // type:func
|
||||
_GLOBAL_$D$g_splotheapPair = 0x11C108; // type:func
|
||||
|
||||
|
||||
// P2/989snd.c
|
||||
snd_StreamSafeCdBreak = 0x11e2a0; // type:func
|
||||
snd_SendIOPCommandAndWait = 0x11e6b8; // type:func
|
||||
snd_SendIOPCommandNoWait = 0x11e8c8; // type:func
|
||||
|
||||
|
||||
// P2/binoc.c
|
||||
InitBei = 0x130F48; // type:func
|
||||
GEvaluateBei = 0x131000; // type:func
|
||||
@ -657,6 +663,14 @@ EnableCamera__FP6CAMERA = 0x1F4ED0; // type:func
|
||||
__main__Fv = 0x1fae18; // type:func
|
||||
|
||||
|
||||
// sce/eecdvd.c
|
||||
sceCdBreak = 0x203e28; // type:func
|
||||
|
||||
|
||||
// sce/filestub.c
|
||||
sceClose = 0x1f8c38; // type:func
|
||||
|
||||
|
||||
// sce/rand.c
|
||||
srand = 0x1F66F8; // type:func
|
||||
rand = 0x1F6708; // type:func
|
||||
|
@ -3,11 +3,28 @@
|
||||
*
|
||||
* @brief 989snd sound driver.
|
||||
*/
|
||||
#ifndef 989SND_H
|
||||
#define 989SND_H
|
||||
#ifndef SND989_H
|
||||
#define SND989_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
// ...
|
||||
extern "C"
|
||||
{
|
||||
struct sceCdRMode
|
||||
{
|
||||
uchar trycount;
|
||||
uchar spindlctrl;
|
||||
uchar datapattern;
|
||||
uchar pad;
|
||||
};
|
||||
|
||||
#endif // 989SND_H
|
||||
uint snd_SendIOPCommandAndWait(int command, int data_used, int *in_data);
|
||||
uint snd_SendIOPCommandNoWait(int command, int data_used, uchar *done, ulong u_data);
|
||||
int snd_StreamSafeCheckCdIdle(int fBlockEeIop);
|
||||
int snd_StreamSafeCdRead(uint lbn, uint sectors, void *buf, sceCdRMode *mode);
|
||||
int snd_StreamSafeCdSync(int mode);
|
||||
int snd_StreamSafeCdBreak();
|
||||
int snd_StreamSafeCdGetError();
|
||||
}
|
||||
|
||||
#endif // SND989_H
|
||||
|
@ -50,9 +50,9 @@ public:
|
||||
byte *m_abSpool;
|
||||
int m_cbSpool;
|
||||
int m_cbFile;
|
||||
int m_cbRemaining; // File Stream Remaining Bytes.
|
||||
byte *m_pb; // File Stream Position
|
||||
int m_cb; // File Stream Size
|
||||
int m_cbRemaining; /* File Stream Remaining Bytes. */
|
||||
byte *m_pb; /* File Stream Position */
|
||||
int m_cb; /* File Stream Size */
|
||||
byte *m_pbRaw;
|
||||
int m_cbRaw;
|
||||
int m_grfDecomp;
|
||||
@ -64,7 +64,7 @@ public:
|
||||
int m_cbAsyncRequest;
|
||||
int m_cbAsyncRemaining;
|
||||
int m_cbPartialRead;
|
||||
uint m_isector; // Sector Offset in ISO
|
||||
uint32_t m_isector; /* Sector Offset in ISO */
|
||||
int m_cbuf;
|
||||
int m_cbufFill;
|
||||
int m_ibufMic;
|
||||
|
14
include/sce/eedvd.h
Normal file
14
include/sce/eedvd.h
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @file filestub.h
|
||||
*/
|
||||
#ifndef EEDVD_H
|
||||
#define EEDVD_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
int sceCdBreak();
|
||||
};
|
||||
|
||||
#endif // EEDVD_H
|
14
include/sce/filestub.h
Normal file
14
include/sce/filestub.h
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @file filestub.h
|
||||
*/
|
||||
#ifndef FILESTUB_H
|
||||
#define FILESTUB_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
int sceClose();
|
||||
};
|
||||
|
||||
#endif // FILESTUB_H
|
@ -8,16 +8,19 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
struct sceGsTex0
|
||||
extern "C"
|
||||
{
|
||||
undefined4 unk_0x0;
|
||||
undefined4 unk_0x4;
|
||||
};
|
||||
struct sceGsTex0
|
||||
{
|
||||
undefined4 unk_0x0;
|
||||
undefined4 unk_0x4;
|
||||
};
|
||||
|
||||
struct sceGsTex2
|
||||
{
|
||||
undefined4 unk_0x0;
|
||||
undefined4 unk_0x4;
|
||||
};
|
||||
struct sceGsTex2
|
||||
{
|
||||
undefined4 unk_0x0;
|
||||
undefined4 unk_0x4;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // GS_H
|
||||
|
@ -8,37 +8,46 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
struct RNG {
|
||||
undefined4 field0_0x0;
|
||||
undefined4 field1_0x4;
|
||||
undefined4 field2_0x8;
|
||||
undefined4 field3_0xc;
|
||||
undefined4 field4_0x10;
|
||||
undefined4 field5_0x14;
|
||||
undefined4 field6_0x18;
|
||||
undefined4 field7_0x1c;
|
||||
undefined4 field8_0x20;
|
||||
undefined4 field9_0x24;
|
||||
undefined4 field10_0x28;
|
||||
undefined4 field11_0x2c;
|
||||
undefined4 field12_0x30;
|
||||
undefined4 field13_0x34;
|
||||
undefined4 field14_0x38;
|
||||
undefined4 field15_0x3c;
|
||||
undefined4 field16_0x40;
|
||||
undefined4 field17_0x44;
|
||||
undefined4 field18_0x48;
|
||||
undefined4 field19_0x4c;
|
||||
undefined4 field20_0x50;
|
||||
undefined4 field21_0x54;
|
||||
uint next;
|
||||
extern "C"
|
||||
{
|
||||
struct RNG {
|
||||
undefined4 field0_0x0;
|
||||
undefined4 field1_0x4;
|
||||
undefined4 field2_0x8;
|
||||
undefined4 field3_0xc;
|
||||
undefined4 field4_0x10;
|
||||
undefined4 field5_0x14;
|
||||
undefined4 field6_0x18;
|
||||
undefined4 field7_0x1c;
|
||||
undefined4 field8_0x20;
|
||||
undefined4 field9_0x24;
|
||||
undefined4 field10_0x28;
|
||||
undefined4 field11_0x2c;
|
||||
undefined4 field12_0x30;
|
||||
undefined4 field13_0x34;
|
||||
undefined4 field14_0x38;
|
||||
undefined4 field15_0x3c;
|
||||
undefined4 field16_0x40;
|
||||
undefined4 field17_0x44;
|
||||
undefined4 field18_0x48;
|
||||
undefined4 field19_0x4c;
|
||||
undefined4 field20_0x50;
|
||||
undefined4 field21_0x54;
|
||||
uint next;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Seed the random number generator.
|
||||
*/
|
||||
void srand(uint seed);
|
||||
|
||||
/**
|
||||
* @brief Generate a random number.
|
||||
*/
|
||||
uint rand();
|
||||
|
||||
extern struct RNG g_rng;
|
||||
extern struct RNG *g_prng;
|
||||
};
|
||||
|
||||
extern "C" void srand(uint seed);
|
||||
|
||||
extern "C" uint rand();
|
||||
|
||||
extern struct RNG g_rng;
|
||||
extern struct RNG *g_prng;
|
||||
|
||||
#endif // RAND_H
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <bis.h>
|
||||
#include <989snd.h>
|
||||
|
||||
INCLUDE_ASM(const s32, "P2/bis", __18CBinaryInputStreamiPvi);
|
||||
|
||||
@ -51,7 +52,9 @@ int CBinaryInputStream::FOpenFile(CFileLocation *pfl)
|
||||
|
||||
INCLUDE_ASM(const s32, "P2/bis", Close__18CBinaryInputStream);
|
||||
|
||||
INCLUDE_ASM(const s32, "P2/bis", DecrementCdReadLimit__18CBinaryInputStreami);
|
||||
void CBinaryInputStream::DecrementCdReadLimit(int cb) {
|
||||
m_fd = m_fd - cb;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(const s32, "P2/bis", PumpCd__18CBinaryInputStream);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user