逆コンパイル向け > deHSP

編集途中(2011/06/19)

deHSPによる逆コンパイル方法


HSPのバージョン違いにより逆コンパイルできない出来ない場合の対処

※以下の変換コードはOpenHSPのソースコードから逆引きして追加した物です。
 コメントやHSP自体実装されていない物も含まれているので
 このままコピーしても逆コンパイルできませんので注意してください。

Dictionary.csv(HSP ver3.3b1まで対応)
#Keys,,Values,,,
#TypeCode,ValueCode,Name,Type,ExtraFlag,
$Code,,,,,
0x00,0x0000,+,Operator,Priority_3,
0x00,0x0001,-,Operator,Priority_3,
0x00,0x0002,*,Operator,Priority_4,
0x00,0x0003,/,Operator,Priority_4,
0x00,0x0004,\,Operator,Priority_4,
0x00,0x0005,&,Operator,Priority_0,
0x00,0x0006,|,Operator,Priority_0,
0x00,0x0007,^,Operator,Priority_0,
0x00,0x0008,=,Operator,Priority_1,
0x00,0x0009,!,Operator,Priority_1,
0x00,0x000A,>,Operator,Priority_1,
0x00,0x000B,<,Operator,Priority_1,
0x00,0x000C,>=,Operator,Priority_1,
0x00,0x000D,<=,Operator,Priority_1,
0x00,0x000E,>>,Operator,Priority_2,
0x00,0x000F,<<,Operator,Priority_2,
0x00,0x0028,(,Symbol,BracketStart,
0x00,0x0029,),Symbol,BracketEnd,
0x00,0x003F,?,Symbol,,
0x01,-1,var,Variable,,
0x02,-1,,String,,
0x03,-1,,Double,,
0x04,-1,,Integer,,
0x05,-1,prm,Param,,
0x07,-1,*label,Label,,
0x0C,-1,,UserFunction,,
0x10,-1,,DllFunction,,
#0x11,0x1000,,ComFunction,,hardcoded
#0x12,-1,,PlugInFunction,,hardcoded
,,,,,
#hsp3int.cpp TYPE_INTCMD(内蔵コマンド),,,,,
0x08,0x0000,onexit,OnEventStatement,,
0x08,0x0001,onerror,OnEventStatement,,
0x08,0x0002,onkey,OnEventStatement,,
0x08,0x0003,onclick,OnEventStatement,,
0x08,0x0004,oncmd,OnEventStatement,,
0x08,0x0011,exist,HspFunction,,
0x08,0x0012,delete,HspFunction,,
0x08,0x0013,mkdir,HspFunction,,
0x08,0x0014,chdir,HspFunction,,
0x08,0x0015,dirlist,HspFunction,,
0x08,0x0016,bload,HspFunction,,
0x08,0x0017,bsave,HspFunction,,
0x08,0x0018,bcopy,HspFunction,,
0x08,0x0019,memfile,HspFunction,,
0x08,0x001A,poke,HspFunction,,
0x08,0x001B,wpoke,HspFunction,,
0x08,0x001C,lpoke,HspFunction,,
0x08,0x001D,getstr,HspFunction,,
0x08,0x001E,chdpm,HspFunction,,
0x08,0x001F,memexpand,HspFunction,,
0x08,0x0020,memcpy,HspFunction,,
0x08,0x0021,memset,HspFunction,,
0x08,0x0022,notesel,HspFunction,,
0x08,0x0023,noteadd,HspFunction,,
0x08,0x0024,notedel,HspFunction,,
0x08,0x0025,noteload,HspFunction,,
0x08,0x0026,notesave,HspFunction,,
0x08,0x0027,randomize,HspFunction,,
0x08,0x0028,noteunsel,HspFunction,,
0x08,0x0029,noteget,HspFunction,,
0x08,0x002A,split,HspFunction,,//add
,,,,,
#hsp3gr_wingui.cpp TYPE_EXTCMD(内蔵GUIコマンド),,,,,
0x09,0x0000,button,OnEventStatement,,
0x09,0x0001,chgdisp,HspFunction,,
0x09,0x0002,exec,HspFunction,,
0x09,0x0003,dialog,HspFunction,,
0x09,0x0008,mmload,HspFunction,,
0x09,0x0009,mmplay,HspFunction,,
0x09,0x000A,mmstop,HspFunction,,
0x09,0x000B,mci,HspFunction,,
0x09,0x000C,pset,HspFunction,,
0x09,0x000D,pget,HspFunction,,
0x09,0x000E,syscolor,HspFunction,,
0x09,0x000F,mes,HspFunction,,
0x09,0x0010,title,HspFunction,,
0x09,0x0011,pos,HspFunction,,
0x09,0x0012,circle,HspFunction,,
0x09,0x0013,cls,HspFunction,,
0x09,0x0014,font,HspFunction,,
0x09,0x0015,sysfont,HspFunction,,
0x09,0x0016,objsize,HspFunction,,
0x09,0x0017,picload,HspFunction,,
0x09,0x0018,color,HspFunction,,
0x09,0x0019,palcolor,HspFunction,,
0x09,0x001A,palette,HspFunction,,
0x09,0x001B,redraw,HspFunction,,
0x09,0x001C,width,HspFunction,,
0x09,0x001D,gsel,HspFunction,,
0x09,0x001E,gcopy,HspFunction,,
0x09,0x001F,gzoom,HspFunction,,
0x09,0x0020,gmode,HspFunction,,
0x09,0x0021,bmpsave,HspFunction,,
0x09,0x0022,hsvcolor,HspFunction,,
0x09,0x0023,getkey,HspFunction,,
0x09,0x0024,listbox,HspFunction,,
0x09,0x0025,chkbox,HspFunction,,
0x09,0x0026,combox,HspFunction,,
0x09,0x0027,input,HspFunction,,
0x09,0x0028,mesbox,HspFunction,,
0x09,0x0029,buffer,HspFunction,,
0x09,0x002A,screen,HspFunction,,
0x09,0x002B,bgscr,HspFunction,,
0x09,0x002C,mouse,HspFunction,,
0x09,0x002D,objsel,HspFunction,,
0x09,0x002E,groll,HspFunction,,
0x09,0x002F,line,HspFunction,,
0x09,0x0030,clrobj,HspFunction,,
0x09,0x0031,boxf,HspFunction,,
0x09,0x0032,objprm,HspFunction,,
0x09,0x0033,objmode,HspFunction,,
0x09,0x0034,stick,HspFunction,,
0x09,0x0035,grect,HspFunction,,
0x09,0x0036,grotate,HspFunction,,
0x09,0x0037,gsquare,HspFunction,,
0x09,0x0038,gradf,HspFunction,,
0x09,0x0039,objimage,HspFunction,,
0x09,0x003A,objskip,HspFunction,,
0x09,0x003B,objenable,HspFunction,,
0x09,0x003C,celload,HspFunction,,
0x09,0x003D,celdiv,HspFunction,,
0x09,0x003E,celput,HspFunction,,
0x09,0x10000,button,HspFunction,,
,,,,,
#hsp3gr_wingui.cpp TYPE_EXTSYSVAR(拡張システム変数),,,,,
0x0A,0x0000,mousex,HspFunction,,
0x0A,0x0001,mousey,HspFunction,,
0x0A,0x0002,mousew,HspFunction,,
0x0A,0x0003,hwnd,HspFunction,,
0x0A,0x0004,hinstance,HspFunction,,
0x0A,0x0005,hdc,HspFunction,,
0x0A,0x0100,ginfo,HspFunction,,
0x0A,0x0101,objinfo,HspFunction,,
0x0A,0x0102,dirinfo,HspFunction,,
0x0A,0x0103,sysinfo,HspFunction,,
,,,,,
0x0B,0x0000,if,IfStatement,HasExtraInt16,
0x0B,0x0001,else,ElseStatement,HasExtraInt16,
,,,,,
#hsp3int.cpp TYPE_INTFUNC(内蔵関数),,,,,
0x0D,0x0000,int,HspFunction,,
0x0D,0x0001,rnd,HspFunction,,
0x0D,0x0002,strlen,HspFunction,,
0x0D,0x0003,length,HspFunction,,
0x0D,0x0004,length2,HspFunction,,
0x0D,0x0005,length3,HspFunction,,
0x0D,0x0006,length4,HspFunction,,
0x0D,0x0007,vartype,HspFunction,,
0x0D,0x0008,gettime,HspFunction,,
0x0D,0x0009,peek,HspFunction,,
0x0D,0x000A,wpeek,HspFunction,,
0x0D,0x000B,lpeek,HspFunction,,
0x0D,0x000C,varptr,HspFunction,,
0x0D,0x000D,varuse,HspFunction,,
0x0D,0x000E,noteinfo,HspFunction,,
0x0D,0x000F,instr,HspFunction,,
0x0D,0x0010,abs,HspFunction,,
0x0D,0x0011,limit,HspFunction,,
0x0D,0x0100,str,HspFunction,,
0x0D,0x0101,strmid,HspFunction,,
0x0D,0x0103,strf,HspFunction,,
0x0D,0x0104,getpath,HspFunction,,
0x0D,0x0105,strtrim,HspFunction,,//add
0x0D,0x0180,sin,HspFunction,,
0x0D,0x0181,cos,HspFunction,,
0x0D,0x0182,tan,HspFunction,,
0x0D,0x0183,atan,HspFunction,,
0x0D,0x0184,sqrt,HspFunction,,
0x0D,0x0185,double,HspFunction,,
0x0D,0x0186,absf,HspFunction,,
0x0D,0x0187,expf,HspFunction,,
0x0D,0x0188,logf,HspFunction,,
0x0D,0x0189,limitf,HspFunction,,
0x0D,0x018A,powf,HspFunction,,//add
,,,,,
#hsp3code.cpp TYPE_SYSVAR(内蔵システム変数),,,,,
0x0E,0x0000,system,HspFunction,,
0x0E,0x0001,hspstat,HspFunction,,
0x0E,0x0002,hspver,HspFunction,,
0x0E,0x0003,stat,HspFunction,,
0x0E,0x0004,cnt,HspFunction,,
0x0E,0x0005,err,HspFunction,,
0x0E,0x0006,strsize,HspFunction,,
0x0E,0x0007,looplev,HspFunction,,
0x0E,0x0008,sublev,HspFunction,,
0x0E,0x0009,iparam,HspFunction,,
0x0E,0x000A,wparam,HspFunction,,
0x0E,0x000B,lparam,HspFunction,,
0x0E,0x000C,refstr,HspFunction,,
0x0E,0x000D,refdval,HspFunction,,
,,,,,
#hsp3code.cpp TYPE_PROGCMD(プログラムコマンド),,,,,
0x0F,0x0000,goto,HspFunction,GotoFunction,
0x0F,0x0001,gosub,HspFunction,GotoFunction,
0x0F,0x0002,return,HspFunction,,
0x0F,0x0003,break,HspFunction,HasGhostLabel,
0x0F,0x0004,repeat,HspFunction,HasGhostLabel,AddTab
0x0F,0x0005,loop,HspFunction,RemoveTab,
0x0F,0x0006,continue,HspFunction,HasGhostLabel,
0x0F,0x0007,wait,HspFunction,,
0x0F,0x0008,await,HspFunction,,
0x0F,0x0009,dim,HspFunction,,
0x0F,0x000A,sdim,HspFunction,,
0x0F,0x000B,begin_foreach,HspFunction,HasGhostLabel,IsGhost
0x0F,0x000C,foreach,HspFunction,HasGhostLabel,AddTab
0x0F,0x000D,dimtype,HspFunction,,
0x0F,0x000E,dup,HspFunction,,
0x0F,0x000F,dupptr,HspFunction,,
0x0F,0x0010,end,HspFunction,,
0x0F,0x0011,stop,HspFunction,HasGhostGoto,
0x0F,0x0012,newmod,HspFunction,,
0x0F,0x0013,setmod,HspFunction,,
0x0F,0x0014,delmod,HspFunction,,
0x0F,0x0015,alloc,HspFunction.,//src_out?,//add
0x0F,0x0016,mref,HspFunction,,
0x0F,0x0017,run,HspFunction,,
0x0F,0x0018,exgoto,HspFunction,,
0x0F,0x0019,on,OnStatement,,
0x0F,0x001A,mcall,McallStatement,,
0x0F,0x001B,HSP未実装,HspFunction,//nosrc_write,//add
0x0F,0x001C,logmes,HspFunction,,//add
0x0F,0x001D,newlab,HspFunction,,//add
0x0F,0x001E,resume,HspFunction,,//add
0x0F,0x001F,yield,HspFunction,,//add
,,,,,
#hsp3ext_win.cpp TYPE_DLLCTRL(拡張DLLコントロールコマンド),,,,,
0x11,0x0000,newcom,HspFunction,,
0x11,0x0001,querycom,HspFunction,,
0x11,0x0002,delcom,HspFunction,,
0x11,0x0003,cnvstow,HspFunction,,
0x11,0x0004,comres,HspFunction,,
0x11,0x0005,axobj,HspFunction,,
0x11,0x0006,winobj,HspFunction,,
0x11,0x0007,sendmsg,HspFunction,,
0x11,0x0008,comevent,HspFunction,,
0x11,0x0009,comevarg,HspFunction,,
0x11,0x000A,sarrayconv,HspFunction,,
,,,,,
#hsp3ext_win.cpp TYPE_DLLCTRL(拡張DLLコントロール関数),,,,,
0x11,0x0100,callfunc,HspFunction,,
0x11,0x0101,cnvwtos,HspFunction,,
0x11,0x0102,comevdisp,HspFunction,,
0x11,0x0103,libptr,HspFunction,,
,,,,,
#,0x100,,{,Symbol,
#,0x100,,},Symbol,RemoveTab
#,0x101,,#deffunc,Preprocessor,
#,0x101,,#defcfunc,Preprocessor,
#,0x101,,#uselib,Preprocessor,
#,0x101,,#func,Preprocessor,
#,0x101,,#cfunc,Preprocessor,
#,0x101,,#runtime,Preprocessor,
#,0x101,,#module,Preprocessor,
#,0x101,,#modfunc,Preprocessor,
#,0x101,,#modinit,Preprocessor,
#,0x101,,#modterm,Preprocessor,
$End,,,,,
#TypeCode,name,size,,,
$ParamType,,,,,
0x0003,double,8,,,
0x0004,int,4,,,
0x0007,label,4,,,
0xFFFF,local,4,,,
0xFFFE,array,4,,,
0xFFFD,var,8,,,
0xFFFC,float,4,,,
0xFFFA,str,4,,,
0xFFF8,pval,4,,,
0xFFF7,bmscr,4,,,
0xFFF6,var,4,,,
0xFFF4,comobj,4,,,
0xFFF3,wstr,4,,,
0xFFF2,sptr,4,,,
0xFFF1,wptr,4,,,
0xFFF0,prefstr,4,,,
0xFFEF,pexinfo,4,,,
0xFFED,nullptr,4,,,
0xFFFB,struct,0,,,
0xFFF9,modvar,0,,,
0xFFF5,modinit,0,,,
0xFFEC,modterm,0,,,
$End,,,,,