mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 22:29:47 -06:00
implementation of VRAM and other misc crap
This commit is contained in:
@ -718,6 +718,33 @@ A_IMPLEMENT_ALU_OP(MVN)
|
||||
|
||||
|
||||
|
||||
s32 A_CLZ(ARM* cpu)
|
||||
{
|
||||
// TODO: ARM9 only
|
||||
|
||||
u32 val = cpu->R[cpu->CurInstr & 0xF];
|
||||
|
||||
u32 res = 0;
|
||||
while ((val & 0xFF000000) == 0)
|
||||
{
|
||||
res += 8;
|
||||
val <<= 8;
|
||||
val |= 0xFF;
|
||||
}
|
||||
while ((val & 0x80000000) == 0)
|
||||
{
|
||||
res++;
|
||||
val <<= 1;
|
||||
val |= 0x1;
|
||||
}
|
||||
|
||||
cpu->R[(cpu->CurInstr >> 12) & 0xF] = res;
|
||||
|
||||
return C_S(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---- THUMB ----------------------------------
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user