Commit d3d3e838 authored by Libretro-Admin's avatar Libretro-Admin
Browse files
parent 9a897f5a
......@@ -386,11 +386,11 @@ void AWCartridge::recalc_dma_offset(int mode)
}
}
void *AWCartridge::GetDmaPtr(u32 &limit)
void *AWCartridge::GetDmaPtr(u32 &size)
{
limit = std::min(std::min(limit, (u32)32), dma_limit - dma_offset);
size = std::min(std::min(size, 32u), dma_limit - dma_offset);
u32 offset = dma_offset / 2;
for (u32 i = 0; i < limit / 2; i++)
for (u32 i = 0; i < size / 2; i++)
decrypted_buf[i] = decrypt16(offset + i);
// printf("AWCART Decrypted data @ %08x:\n", dma_offset);
......
......@@ -23,7 +23,7 @@ public:
virtual u32 ReadMem(u32 address, u32 size) override;
virtual void WriteMem(u32 address, u32 data, u32 size) override;
virtual void *GetDmaPtr(u32 &limit) override;
virtual void *GetDmaPtr(u32 &size) override;
virtual void AdvancePtr(u32 size) override;
virtual std::string GetGameId() override;
......
......@@ -150,7 +150,7 @@ bool M4Cartridge::Read(u32 offset, u32 size, void *dst) {
return NaomiCartridge::Read(offset & 0x1ffffffe, size, dst);
}
void *M4Cartridge::GetDmaPtr(u32 &limit)
void *M4Cartridge::GetDmaPtr(u32 &size)
{
static u8 retzero[2] = { 0, 0 };
......@@ -158,7 +158,7 @@ void *M4Cartridge::GetDmaPtr(u32 &limit)
int fpr_num = m4id & 0x7f;
if (((rom_cur_address >> 26) & 0x07) < fpr_num) {
limit = min(limit, (u32)2);
size = std::min(size, 2u);
return &cfidata[rom_cur_address & 0xffff];
}
}
......@@ -176,7 +176,7 @@ void *M4Cartridge::GetDmaPtr(u32 &limit)
}
if (encryption)
{
limit = min(limit, (u32)sizeof(buffer));
size = std::min(size, (u32)sizeof(buffer));
return buffer;
}
......@@ -184,12 +184,12 @@ void *M4Cartridge::GetDmaPtr(u32 &limit)
{
if ((DmaOffset & 0x1ffffffe) < RomSize)
{
limit = min(limit, RomSize - (DmaOffset & 0x1ffffffe));
size = std::min(size, RomSize - (DmaOffset & 0x1ffffffe));
return RomPtr + (DmaOffset & 0x1ffffffe);
}
else
{
limit = 2;
size = 2;
return retzero;
}
}
......
......@@ -8,15 +8,15 @@ void naomi_reg_Init();
void naomi_reg_Term();
void naomi_reg_Reset(bool Manual);
u32 ReadMem_naomi(u32 Addr, u32 sz);
void WriteMem_naomi(u32 Addr, u32 data, u32 sz);
u32 ReadMem_naomi(u32 Addr, u32 size);
void WriteMem_naomi(u32 Addr, u32 data, u32 size);
void NaomiBoardIDWrite(const u16 Data);
void NaomiBoardIDWriteControl(const u16 Data);
u16 NaomiBoardIDRead();
u16 NaomiGameIDRead();
void NaomiGameIDWrite(const u16 Data);
void naomi_process(u32 r3c,u32 r40,u32 r44, u32 r48);
void naomi_process(u32 command,u32 offset1,u32 parameterl, u32 parameterh);
extern u32 reg_dimm_command; // command, written, 0x1E03 some flag ?
extern u32 reg_dimm_offsetl;
......
......@@ -9,9 +9,7 @@
extern u8 pvr_regs[pvr_RegSize];
void Regs_Reset(bool Manual);
void Regs_Reset(bool hard);
#define ID_addr 0x00000000 // R Device ID
#define REVISION_addr 0x00000004 // R Revision number
......
......@@ -110,7 +110,7 @@ void bm_Periodical_1s();
void bm_Init();
void bm_Term();
void bm_vmem_pagefill(void** ptr,u32 PAGE_SZ);
void bm_vmem_pagefill(void** ptr,u32 size_bytes);
bool bm_RamWriteAccess(void *p);
void bm_RamWriteAccess(u32 addr);
static inline bool bm_IsRamPageProtected(u32 addr)
......
......@@ -477,17 +477,17 @@ static bool recSh4_IsCpuRunning(void)
return Sh4_int_IsCpuRunning();
}
void Get_Sh4Recompiler(sh4_if* rv)
void Get_Sh4Recompiler(sh4_if* cpu)
{
rv->Run = recSh4_Run;
rv->Stop = recSh4_Stop;
rv->Start = recSh4_Start;
rv->Step = recSh4_Step;
rv->Skip = recSh4_Skip;
rv->Reset = recSh4_Reset;
rv->Init = recSh4_Init;
rv->Term = recSh4_Term;
rv->IsCpuRunning = recSh4_IsCpuRunning;
rv->ResetCache = recSh4_ClearCache;
cpu->Run = recSh4_Run;
cpu->Stop = recSh4_Stop;
cpu->Start = recSh4_Start;
cpu->Step = recSh4_Step;
cpu->Skip = recSh4_Skip;
cpu->Reset = recSh4_Reset;
cpu->Init = recSh4_Init;
cpu->Term = recSh4_Term;
cpu->IsCpuRunning = recSh4_IsCpuRunning;
cpu->ResetCache = recSh4_ClearCache;
}
#endif // FEAT_SHREC != DYNAREC_NONE
......@@ -76,7 +76,7 @@ void emit_SetBaseAddr();
DynarecCodeEntryPtr DYNACALL rdv_FailedToFindBlock(u32 pc);
DynarecCodeEntryPtr DYNACALL rdv_FailedToFindBlock_pc();
//Called when a block check failed, and the block needs to be invalidated
DynarecCodeEntryPtr DYNACALL rdv_BlockCheckFail(u32 pc);
DynarecCodeEntryPtr DYNACALL rdv_BlockCheckFail(u32 addr);
//Called to compile code @pc
DynarecCodeEntryPtr rdv_CompilePC(u32 blockcheck_failures);
//Finds or compiles code @pc
......
......@@ -190,19 +190,19 @@ static void sh4_int_resetcache()
}
//Get an interface to sh4 interpreter
void Get_Sh4Interpreter(sh4_if* rv)
{
rv->Run=Sh4_int_Run;
rv->Stop=Sh4_int_Stop;
rv->Start=Sh4_int_Start;
rv->Step=Sh4_int_Step;
rv->Skip=Sh4_int_Skip;
rv->Reset=Sh4_int_Reset;
rv->Init=Sh4_int_Init;
rv->Term=Sh4_int_Term;
rv->IsCpuRunning=Sh4_int_IsCpuRunning;
rv->ResetCache=sh4_int_resetcache;
void Get_Sh4Interpreter(sh4_if *cpu)
{
cpu->Run = Sh4_int_Run;
cpu->Stop = Sh4_int_Stop;
cpu->Start = Sh4_int_Start;
cpu->Step = Sh4_int_Step;
cpu->Skip = Sh4_int_Skip;
cpu->Reset = Sh4_int_Reset;
cpu->Init = Sh4_int_Init;
cpu->Term = Sh4_int_Term;
cpu->IsCpuRunning = Sh4_int_IsCpuRunning;
cpu->ResetCache = sh4_int_resetcache;
}
void Sh4_int_Init()
......
......@@ -83,7 +83,7 @@ u32 mmu_instruction_translation(u32 va, u32& rv);
template<u32 translation_type, typename T>
extern u32 mmu_data_translation(u32 va, u32& rv);
void DoMMUException(u32 addr, u32 error_code, u32 access_type);
void DoMMUException(u32 addr, u32 mmu_error, u32 access_type);
template<u32 translation_type>
bool mmu_is_translated(u32 va, u32 size)
......@@ -127,7 +127,7 @@ bool mmu_is_translated(u32 va, u32 size)
template<typename T> void DYNACALL mmu_WriteMem(u32 adr, T data);
bool mmu_TranslateSQW(u32 addr, u32* mapped);
bool mmu_TranslateSQW(u32 adr, u32 *out);
template<typename T>
T DYNACALL mmu_ReadMemNoEx(u32 adr, u32 *exception_occurred)
......
......@@ -119,7 +119,7 @@ static inline void InterruptMask(InterruptID intr, u32 v)
int UpdateINTC();
bool Do_Exception(u32 lvl, u32 expEvn, u32 CallVect);
bool Do_Exception(u32 epc, u32 expEvn, u32 CallVect);
bool SRdecode(void);
void SIIDRebuild(void);
......
......@@ -62,7 +62,7 @@ void WriteMemBlock_nommu_dma(u32 dst,u32 src,u32 size);
//Init/Res/Term
void mem_Init();
void mem_Term();
void mem_Reset(bool Manual);
void mem_Reset(bool hard);
void mem_map_default();
//Get pointer to ram area , 0 if error
......
......@@ -28,7 +28,7 @@ void sh4_mmr_init();
void sh4_mmr_reset(bool hard);
void sh4_mmr_term();
void sh4_rio_reg(Array<RegisterStruct>& arr, u32 addr, RegIO flags, u32 sz, RegReadAddrFP* rp=0, RegWriteAddrFP* wp=0);
void sh4_rio_reg(Array<RegisterStruct>& arr, u32 addr, RegIO flags, u32 sz, RegReadAddrFP* rf=0, RegWriteAddrFP* wf=0);
#define A7_REG_HASH(addr) (((addr) >> 16) & 0x1FFF)
......
......@@ -35,9 +35,9 @@ public:
static void Shutdown();
void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line,
const char* fmt, va_list args);
const char* format, va_list args);
void LogWithFullPath(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file,
int line, const char* fmt, va_list args);
int line, const char* format, va_list args);
LogTypes::LOG_LEVELS GetLogLevel() const;
void SetLogLevel(LogTypes::LOG_LEVELS level);
......
......@@ -31,7 +31,7 @@ public:
~CustomTexture() { Terminate(); }
u8* LoadCustomTexture(u32 hash, int& width, int& height);
void LoadCustomTextureAsync(BaseTextureCacheData *texture_data);
void DumpTexture(u32 hash, int w, int h, TextureType textype, void *temp_tex_buffer);
void DumpTexture(u32 hash, int w, int h, TextureType textype, void *src_buffer);
void Terminate();
private:
......
......@@ -6,7 +6,7 @@ Drawing and related state management
Takes vertex, textures and renders to the currently set up target
*/
const static u32 CullMode[]=
const static u32 CullModes[]=
{
GL_NONE, //0 No culling No culling
GL_NONE, //1 Cull if Small Cull if ( |det| < fpu_cull_val )
......@@ -69,14 +69,14 @@ extern u32 gcflip;
GLuint vmuTextureId[4]={0,0,0,0};
GLuint lightgunTextureId[4]={0,0,0,0};
void SetCull(u32 CulliMode)
void SetCull(u32 CullMode)
{
if (CullMode[CulliMode]==GL_NONE)
if (CullModes[CullMode] == GL_NONE)
glcache.Disable(GL_CULL_FACE);
else
{
glcache.Enable(GL_CULL_FACE);
glcache.CullFace(CullMode[CulliMode]); //GL_FRONT/GL_BACK, ...
glcache.CullFace(CullModes[CullMode]); //GL_FRONT/GL_BACK, ...
}
}
......
......@@ -29,4 +29,4 @@ struct SortTrigDrawParam
};
// Sort based on min-z of each triangle
void GenSorted(int first, int count, vector<SortTrigDrawParam>& sorted_pp, vector<u32>& sorted_idx);
void GenSorted(int first, int count, std::vector<SortTrigDrawParam>& pidx_sort, std::vector<u32>& vidx_sort);
......@@ -161,7 +161,7 @@ private:
void SortTriangles();
void DrawPoly(const vk::CommandBuffer& cmdBuffer, u32 listType, bool sortTriangles, const PolyParam& poly, u32 first, u32 count);
void DrawSorted(const vk::CommandBuffer& cmdBuffer, const std::vector<SortTrigDrawParam>& polys);
void DrawList(const vk::CommandBuffer& cmdBuffer, u32 listType, bool sortTriangles, const List<PolyParam>& polys, u32 first, u32 count);
void DrawList(const vk::CommandBuffer& cmdBuffer, u32 listType, bool sortTriangles, const List<PolyParam>& polys, u32 first, u32 last);
void DrawModVols(const vk::CommandBuffer& cmdBuffer, int first, int count);
void UploadMainBuffer(const VertexShaderUniforms& vertexUniforms, const FragmentShaderUniforms& fragmentUniforms);
......
......@@ -112,10 +112,10 @@ protected:
vk::CommandBuffer currentCommandBuffer;
private:
void DrawPoly(const vk::CommandBuffer& cmdBuffer, u32 listType, bool sortTriangles, Pass pass,
void DrawPoly(const vk::CommandBuffer& cmdBuffer, u32 listType, bool autosort, Pass pass,
const PolyParam& poly, u32 first, u32 count);
void DrawList(const vk::CommandBuffer& cmdBuffer, u32 listType, bool sortTriangles, Pass pass,
const List<PolyParam>& polys, u32 first, u32 count);
void DrawList(const vk::CommandBuffer& cmdBuffer, u32 listType, bool sortTriangles, Pass pass,
const List<PolyParam>& polys, u32 first, u32 last);
template<bool Translucent>
void DrawModifierVolumes(const vk::CommandBuffer& cmdBuffer, int first, int count);
void UploadMainBuffer(const OITDescriptorSets::VertexShaderUniforms& vertexUniforms,
......
......@@ -677,7 +677,7 @@ void plugins_Reset(bool Manual);
//PVR
s32 libPvr_Init(void);
void libPvr_Reset(bool Manual);
void libPvr_Reset(bool hard);
void libPvr_Term(void);
void* libPvr_GetRenderTarget(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment