扫描仪怎么用-网络行为管理软件
2023年4月6日发(作者:鸿蒙系统官网报名)
安卓PSP模拟器PPSSPP⾦⼿指
PPSSPP⾦⼿指使⽤
1,⽹上找到对应的psp游戏cmf⾦⼿指,例如SULJM-05035
2,粘贴⾦⼿指到记事本,保存为UTF-8编码、ini后缀,⽂件名去掉“S”和“-”,最终为3,打开安卓机器上PSP⽂件夹,新建
Cheats⽂件夹,复制进去
3,启动安卓PPSSPP模拟器选“游戏设置”-“系统设置”-“开启⾦⼿指”
pspCw⾦⼿指解析
CheatOperationCWCheatEngine::InterpretNextCwCheat(constCheatCode&cheat,size_t&i){
constCheatLine&line1=[i++];
constuint32_t&arg=2;
//Filledasneeded.
u32addr;
inttype=1>>28;
switch(type){
case0x0://Write8-bitdata(upto4bytes.)
addr=GetAddress(1&0x0FFFFFFF);
if(arg&0xFFFF0000)
return{CheatOp::Write,addr,4,arg};
elseif(arg&0x0000FF00)
return{CheatOp::Write,addr,2,arg};
else
return{CheatOp::Write,addr,1,arg};
case0x1://Write16-bitdata.
addr=GetAddress(1&0x0FFFFFFF);
return{CheatOp::Write,addr,2,arg};
case0x2://Write32-bitdata.
addr=GetAddress(1&0x0FFFFFFF);
return{CheatOp::Write,addr,4,arg};
case0x3://Increment/decrementdata.
addr=GetAddress(arg&0x0FFFFFFF);
switch((1>>20)&0xF){
case1:
return{CheatOp::Add,addr,1,1&0xFF};
case2:
return{CheatOp::Subtract,addr,1,1&0xFF};
case3:
return{CheatOp::Add,addr,2,1&0xFFFF};
case4:
return{CheatOp::Subtract,addr,2,1&0xFFFF};
case5:
if(i<())
return{CheatOp::Add,addr,4,[i++].part1};
return{CheatOp::Invalid};
case6:
if(i<())
return{CheatOp::Subtract,addr,4,[i++].part1};
return{CheatOp::Invalid};
default:
return{CheatOp::Invalid};
}
break;
case0x4://32-bitmulti-writepatchdata.
addr=GetAddress(1&0x0FFFFFFF);
if(i<()){
constCheatLine&line2=[i++];
CheatOperationop={CheatOp::MultiWrite,addr,4,1};
CheatOperationop={CheatOp::MultiWrite,addr,4,1};
=arg>>16;
=(arg&0xFFFF)*4;
=2;
returnop;
}
return{CheatOp::Invalid};
case0x5://Memcpycommand.
addr=GetAddress(1&0x0FFFFFFF);
if(i<()){
constCheatLine&line2=[i++];
CheatOperationop={CheatOp::CopyBytesFrom,addr,0,arg};
dr=GetAddress(1&0x0FFFFFFF);
returnop;
}
return{CheatOp::Invalid};
case0x6://Pointercommands.
addr=GetAddress(1&0x0FFFFFFF);
if(i<()){
constCheatLine&line2=[i++];
intcount=(1&0xFFFF)-1;
//.
if(i+count>())
return{CheatOp::Invalid};
CheatOperationop={CheatOp::CwCheatPointerCommands,addr,0,arg};
=(int)2;
//TODO:reallysupposedtosignextend?
fset=((int)1>>20)*4;
=count;
=(1>>16)&0xF;
returnop;
}
return{CheatOp::Invalid};
case0x7://Booleandataoperations.
addr=GetAddress(1&0x0FFFFFFF);
switch(arg>>16){
case0x0000://8-bitOR.
return{CheatOp::Or,addr,1,arg&0xFF};
case0x0001://16-bitOR.
return{CheatOp::Or,addr,2,arg&0xFFFF};
case0x0002://8-bitAND.
return{CheatOp::And,addr,1,arg&0xFF};
case0x0003://16-bitAND.
return{CheatOp::And,addr,2,arg&0xFFFF};
case0x0004://8-bitXOR.
return{CheatOp::Xor,addr,1,arg&0xFF};
case0x0005://16-bitXOR.
return{CheatOp::Xor,addr,2,arg&0xFFFF};
}
return{CheatOp::Invalid};
case0x8://8-bitor16-bitmulti-writepatchdata.
addr=GetAddress(1&0x0FFFFFFF);
if(i<()){
constCheatLine&line2=[i++];
constboolis8Bit=(1&0xFFFF0000)==0;
constuint32_tval=is8Bit?(1&0xFF):(1&0xFFFF);
CheatOperationop={CheatOp::MultiWrite,addr,is8Bit?1:2,val};
=arg>>16;
=(arg&0xFFFF)*(is8Bit?1:2);
=2;
returnop;
}
return{CheatOp::Invalid};
case0xB://Delaycommand.
return{CheatOp::Delay,0,0,arg};
case0xC://32-bitequalcheck/codestopper.
addr=GetAddress(1&0x0FFFFFFF);
return{CheatOp::Assert,addr,4,arg};
case0xD://Lineskiptests&jokercodes.
switch(arg>>28){
case0x0://16-bitnextlineskiptest.
case0x2://8-bitnextlineskiptest.
addr=GetAddress(1&0x0FFFFFFF);
{
constboolis8Bit=(arg>>28)==0x2;
constuint32_tval=is8Bit?(arg&0xFF):(arg&0xFFFF);
CheatOpopcode;
switch((arg>>20)&0xF){
case0x0:
opcode=CheatOp::IfEqual;
break;
case0x1:
opcode=CheatOp::IfNotEqual;
break;
case0x2:
opcode=CheatOp::IfLess;
break;
case0x3:
opcode=CheatOp::IfGreater;
break;
default:
return{CheatOp::Invalid};
}
CheatOperationop={opcode,addr,is8Bit?1:2,val};
=1;
returnop;
}
case0x1://Jokercode-buttonpressed.
case0x3://Inversejokercode-buttonnotpressed.
{
boolpressed=(arg>>28)==0x1;
CheatOperationop={pressed?CheatOp::IfPressed:CheatOp::IfNotPressed,0,0,arg&0x0FFFFFFF};
=(1&0xFF)+1;
returnop;
}
case0x4://Adressequaltest.
case0x5://Addressnotequaltest.
case0x6://Addresslessthantest.
case0x7://Addressgreaterthantest.
addr=GetAddress(1&0x0FFFFFFF);
if(i<()){
constCheatLine&line2=[i++];
constintsz=1<<(2&0xF);
CheatOpopcode;
switch(arg>>28){
case0x4:
opcode=CheatOp::IfAddrEqual;
break;
case0x5:
opcode=CheatOp::IfAddrNotEqual;
break;
case0x6:
opcode=CheatOp::IfAddrLess;
break;
case0x7:
opcode=CheatOp::IfAddrGreater;
break;
default:
return{CheatOp::Invalid};
}
}
CheatOperationop={opcode,addr,sz,0};
=1;
eAddr=GetAddress(arg&0x0FFFFFFF);
returnop;
}
return{CheatOp::Invalid};
default:
return{CheatOp::Invalid};
}
case0xE://Multiplelineskiptests.
addr=GetAddress(arg&0x0FFFFFFF);
{
constboolis8Bit=(1>>24)==0xE1;
constuint32_tval=is8Bit?(1&0xFF):(1&0xFFFF);
CheatOpopcode;
switch(arg>>28){
case0x0:
opcode=CheatOp::IfEqual;
break;
case0x1:
opcode=CheatOp::IfNotEqual;
break;
case0x2:
opcode=CheatOp::IfLess;
break;
case0x3:
opcode=CheatOp::IfGreater;
break;
default:
return{CheatOp::Invalid};
}
CheatOperationop={opcode,addr,is8Bit?1:2,val};
=(1>>16)&(is8Bit?0xFF:0xFFF);
returnop;
}
default:
return{CheatOp::Invalid};
}
}
voidCWCheatEngine::ExecuteOp(constCheatOperation&op,constCheatCode&cheat,size_t&i){
switch(){
caseCheatOp::Invalid:
i=();
break;
caseCheatOp::Noop:
break;
caseCheatOp::Write:
if(Memory::IsValidAddress()){
InvalidateICache(,4);
if(==1)
Memory::Write_U8((u8),);
elseif(==2)
Memory::Write_U16((u16),);
elseif(==4)
Memory::Write_U32((u32),);
}
break;
caseCheatOp::Add:
ApplyMemoryOperator(op,[](uint32_ta,uint32_tb){
returna+b;
});
break;
break;
caseCheatOp::Subtract:
ApplyMemoryOperator(op,[](uint32_ta,uint32_tb){
returna-b;
});
break;
caseCheatOp::Or:
ApplyMemoryOperator(op,[](uint32_ta,uint32_tb){
returna|b;
});
break;
caseCheatOp::And:
ApplyMemoryOperator(op,[](uint32_ta,uint32_tb){
returna&b;
});
break;
caseCheatOp::Xor:
ApplyMemoryOperator(op,[](uint32_ta,uint32_tb){
returna^b;
});
break;
caseCheatOp::MultiWrite:
if(Memory::IsValidAddress()){
InvalidateICache(,*+);
uint32_tdata=;
uint32_taddr=;
for(uint32_ta=0;a<;a++){
if(Memory::IsValidAddress(addr)){
if(==1)
Memory::Write_U8((u8)data,addr);
elseif(==2)
Memory::Write_U16((u16)data,addr);
elseif(==4)
Memory::Write_U32((u32)data,addr);
}
addr+=;
data+=;
}
}
break;
caseCheatOp::CopyBytesFrom:
if(Memory::IsValidRange(,)&&Memory::IsValidRange(dr,)){
InvalidateICache(,);
InvalidateICache(dr,);
Memory::MemcpyUnchecked(dr,,);
}
break;
caseCheatOp::Delay:
//TODO:Notsupported.
break;
caseCheatOp::Assert:
if(Memory::IsValidAddress()){
InvalidateICache(,4);
if(Memory::Read_U32()!=){
i=();
}
}
break;
caseCheatOp::IfEqual:
if(!TestIf(op,[](inta,intb){returna==b;})){
i+=(size_t);
}
break;
caseCheatOp::IfNotEqual:
if(!TestIf(op,[](inta,intb){returna!=b;})){
i+=(size_t);
}
break;
caseCheatOp::IfLess:
if(!TestIf(op,[](inta,intb){returna
i+=(size_t);
}
break;
caseCheatOp::IfGreater:
if(!TestIf(op,[](inta,intb){returna>b;})){
i+=(size_t);
}
break;
caseCheatOp::IfAddrEqual:
if(!TestIfAddr(op,[](inta,intb){returna==b;})){
i+=(size_t);
}
break;
caseCheatOp::IfAddrNotEqual:
if(!TestIfAddr(op,[](inta,intb){returna!=b;})){
i+=(size_t);
}
break;
caseCheatOp::IfAddrLess:
if(!TestIfAddr(op,[](inta,intb){returna
i+=(size_t);
}
break;
caseCheatOp::IfAddrGreater:
if(!TestIfAddr(op,[](inta,intb){returna>b;})){
i+=(size_t);
}
break;
caseCheatOp::IfPressed:
//ButtonCode
//SELECT0x00000001
//START0x00000008
//DPADUP0x00000010
//DPADRIGHT0x00000020
//DPADDOWN0x00000040
//DPADLEFT0x00000080
//LTRIGGER0x00000100
//RTRIGGER0x00000200
//TRIANGLE0x00001000
//CIRCLE0x00002000
//CROSS0x00004000
//SQUARE0x00008000
//HOME0x00010000
//HOLD0x00020000
//WLAN0x00040000
//REMOTEHOLD0x00080000
//VOLUMEUP0x00100000
//VOLUMEDOWN0x00200000
//SCREEN0x00400000
//NOTE0x00800000
if((__CtrlPeekButtons()&)!=){
i+=(size_t);
}
break;
caseCheatOp::IfNotPressed:
if((__CtrlPeekButtons()&)==){
if((__CtrlPeekButtons()&)==){
i+=(size_t);
}
break;
caseCheatOp::CwCheatPointerCommands:
{
InvalidateICache(+fset,4);
u32base=Memory::Read_U32(+fset);
u32val=;
inttype=;
for(inta=0;a<;++a){
constCheatLine&line=[i++];
switch(1>>28){
case0x1://typecopybyte
{
InvalidateICache(,4);
u32srcAddr=Memory::Read_U32()+;
u32dstAddr=Memory::Read_U32(+fset)+(1&0x0FFFFFFF);
if(Memory::IsValidRange(dstAddr,val)&&Memory::IsValidRange(srcAddr,val)){
InvalidateICache(dstAddr,val);
InvalidateICache(srcAddr,val);
Memory::MemcpyUnchecked(dstAddr,srcAddr,val);
}
//Don'tperformanyfurtheraction.
type=-1;
}
break;
case0x2:
case0x3://typepointerwalk
{
intwalkOffset=(int)1&0x0FFFFFFF;
if((1>>28)==0x3){
walkOffset=-walkOffset;
}
InvalidateICache(base+walkOffset,4);
base=Memory::Read_U32(base+walkOffset);
switch(2>>28){
case0x2:
case0x3://typepointerwalk
walkOffset=2&0x0FFFFFFF;
if((2>>28)==0x3){
walkOffset=-walkOffset;
}
InvalidateICache(base+walkOffset,4);
base=Memory::Read_U32(base+walkOffset);
break;
default:
//Unexpectedvalueincheatline?
break;
}
}
break;
case0x9://typemultiaddresswrite
base+=1&0x0FFFFFFF;
val+=2;
break;
default:
//Unexpectedvalueincheatline?
break;
}
}
switch(type){
case0://8bitwrite
InvalidateICache(base+,4);
Memory::Write_U8((u8)val,base+);
break;
case1://16-bitwrite
InvalidateICache(base+,4);
InvalidateICache(base+,4);
Memory::Write_U16((u16)val,base+);
break;
case2://32-bitwrite
InvalidateICache(base+,4);
Memory::Write_U32((u32)val,base+);
break;
case3://8bitinversewrite
InvalidateICache(,4);
Memory::Write_U8((u8)val,);
break;
case4://16-bitinversewrite
InvalidateICache(,4);
Memory::Write_U16((u16)val,);
break;
case5://32-bitinversewrite
InvalidateICache(,4);
Memory::Write_U32((u32)val,);
break;
case-1://Operationalreadyperformed,nothingtodo
break;
}
}
break;
default:
assert(false);
}
}
voidCWCheatEngine::Run(){
for(CheatCodecheat:cheats_){
//InterpretNextOpandExecuteOpmovei.
for(size_ti=0;i<();){
CheatOperationop=InterpretNextOp(cheat,i);
ExecuteOp(op,cheat,i);
}
}
}
更多推荐
psp模拟器中文版
发布评论