Fix bug in WriteMemBlock_nommu_ptr when size is not word-aligned
Bump max opaque polygon to 8192 (alpilot) Minor lr backport and clean up Fix corruption in doa2[m] and alpilot Fix missing sound in Jambo Safari
This commit is contained in:
parent
9c556007fb
commit
5763da184c
|
@ -2010,10 +2010,10 @@ extern "C" void CompileCode()
|
|||
if (op_flags & OP_SETS_PC)
|
||||
armv_imm_to_reg(R15_ARM_NEXT,pc+4);
|
||||
|
||||
#if HOST_CPU==CPU_X86
|
||||
if ( !(op_flags & OP_SETS_PC) )
|
||||
armv_imm_to_reg(R15_ARM_NEXT,pc+4);
|
||||
#endif
|
||||
#if HOST_CPU==CPU_X86
|
||||
if ( !(op_flags & OP_SETS_PC) )
|
||||
armv_imm_to_reg(R15_ARM_NEXT,pc+4);
|
||||
#endif
|
||||
|
||||
armv_intpr(opcd);
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
#include "hw/pvr/spg.h"
|
||||
#include <time.h>
|
||||
|
||||
#include "deps/zlib/zlib.h"
|
||||
#include "deps/xxhash/xxhash.h"
|
||||
|
||||
#if _ANDROID
|
||||
#include <android/log.h>
|
||||
#include <jni.h>
|
||||
|
@ -22,9 +25,6 @@
|
|||
#define LOGJVS(...)
|
||||
#endif
|
||||
|
||||
#include "deps/zlib/zlib.h"
|
||||
#include "deps/xxhash/xxhash.h"
|
||||
|
||||
#define SAVE_EPROM 1
|
||||
|
||||
const char* maple_sega_controller_name = "Dreamcast Controller";
|
||||
|
|
|
@ -203,7 +203,7 @@ struct TA_context
|
|||
|
||||
rend.verts.InitBytes(4 * 1024 * 1024, &rend.Overrun, "verts"); //up to 4 mb of vtx data/frame = ~ 96k vtx/frame
|
||||
rend.idx.Init(120 * 1024, &rend.Overrun, "idx"); //up to 120K indexes ( idx have stripification overhead )
|
||||
rend.global_param_op.Init(4096, &rend.Overrun, "global_param_op");
|
||||
rend.global_param_op.Init(8192, &rend.Overrun, "global_param_op");
|
||||
rend.global_param_pt.Init(4096, &rend.Overrun, "global_param_pt");
|
||||
rend.global_param_mvo.Init(4096, &rend.Overrun, "global_param_mvo");
|
||||
rend.global_param_tr.Init(10240, &rend.Overrun, "global_param_tr");
|
||||
|
|
|
@ -238,15 +238,6 @@ int DreamcastSecond(int tag, int c, int j)
|
|||
return SH4_MAIN_CLOCK;
|
||||
}
|
||||
|
||||
int UpdateSystem_rec()
|
||||
{
|
||||
//WIP
|
||||
if (Sh4cntx.sh4_sched_next<0)
|
||||
sh4_sched_tick(448);
|
||||
|
||||
return Sh4cntx.interrupt_pend;
|
||||
}
|
||||
|
||||
//448 Cycles (fixed)
|
||||
int UpdateSystem()
|
||||
{
|
||||
|
|
|
@ -47,14 +47,9 @@ bool UpdateSR()
|
|||
{
|
||||
printf("UpdateSR MD=0;RB=1 , this must not happen\n");
|
||||
sr.RB =0;//error - must always be 0
|
||||
if (old_sr.RB)
|
||||
ChangeGPR();//switch
|
||||
}
|
||||
else
|
||||
{
|
||||
if (old_sr.RB)
|
||||
ChangeGPR();//switch
|
||||
}
|
||||
if (old_sr.RB)
|
||||
ChangeGPR();//switch
|
||||
}
|
||||
|
||||
old_sr.status=sr.status;
|
||||
|
|
|
@ -248,6 +248,7 @@ void WriteMemBlock_nommu_dma(u32 dst,u32 src,u32 size)
|
|||
}
|
||||
else
|
||||
{
|
||||
verify(size % 4 == 0);
|
||||
for (u32 i=0;i<size;i+=4)
|
||||
{
|
||||
WriteMem32_nommu(dst+i,ReadMem32_nommu(src+i));
|
||||
|
@ -257,11 +258,6 @@ void WriteMemBlock_nommu_dma(u32 dst,u32 src,u32 size)
|
|||
void WriteMemBlock_nommu_ptr(u32 dst,u32* src,u32 size)
|
||||
{
|
||||
u32 dst_msk;
|
||||
if (size % 4 != 0)
|
||||
{
|
||||
EMUERROR("invalid size %d. Ignored", size);
|
||||
return;
|
||||
}
|
||||
|
||||
void* dst_ptr=_vmem_get_ptr2(dst,dst_msk);
|
||||
|
||||
|
@ -272,9 +268,21 @@ void WriteMemBlock_nommu_ptr(u32 dst,u32* src,u32 size)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (u32 i=0;i<size;i+=4)
|
||||
for (u32 i = 0; i < size;)
|
||||
{
|
||||
WriteMem32_nommu(dst+i,src[i>>2]);
|
||||
u32 left = size - i;
|
||||
if (left >= 4)
|
||||
{
|
||||
WriteMem32_nommu(dst + i, src[i >> 2]);
|
||||
i += 4;
|
||||
}
|
||||
else if (left >= 2)
|
||||
{
|
||||
WriteMem16_nommu(dst + i, ((u16 *)src)[i >> 1]);
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
WriteMem8_nommu(dst + i, ((u8 *)src)[i++]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue