forked from KolibriOS/kolibrios
new program to see the structure of blocks in the files 3ds
git-svn-id: svn://kolibrios.org@2051 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
12
programs/develop/info3ds/build_en.bat
Normal file
12
programs/develop/info3ds/build_en.bat
Normal file
@@ -0,0 +1,12 @@
|
||||
if not exist bin mkdir bin
|
||||
@erase lang.inc
|
||||
@echo lang fix en >lang.inc
|
||||
if not exist bin\objects.png @copy objects.png bin\objects.png
|
||||
if not exist bin\tl_sys_16.png @copy tl_sys_16.png bin\tl_sys_16.png
|
||||
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
|
||||
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 ..\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj
|
||||
@kpack bin\buf2d.obj
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
pause
|
12
programs/develop/info3ds/build_ru.bat
Normal file
12
programs/develop/info3ds/build_ru.bat
Normal file
@@ -0,0 +1,12 @@
|
||||
if not exist bin mkdir bin
|
||||
@erase lang.inc
|
||||
@echo lang fix ru >lang.inc
|
||||
if not exist bin\objects.png @copy objects.png bin\objects.png
|
||||
if not exist bin\tl_sys_16.png @copy tl_sys_16.png bin\tl_sys_16.png
|
||||
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
|
||||
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 ..\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj
|
||||
@kpack bin\buf2d.obj
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
pause
|
99
programs/develop/info3ds/dll.inc
Normal file
99
programs/develop/info3ds/dll.inc
Normal file
@@ -0,0 +1,99 @@
|
||||
|
||||
proc dll.Load, import_table:dword
|
||||
mov esi,[import_table]
|
||||
.next_lib: mov edx,[esi]
|
||||
or edx,edx
|
||||
jz .exit
|
||||
push esi
|
||||
mov esi,[esi+4]
|
||||
mov edi,s_libdir.fname
|
||||
@@: lodsb
|
||||
stosb
|
||||
or al,al
|
||||
jnz @b
|
||||
mcall 68,19,s_libdir
|
||||
or eax,eax
|
||||
jz .fail
|
||||
stdcall dll.Link,eax,edx
|
||||
push eax
|
||||
mov eax, [eax]
|
||||
cmp dword [eax], 'lib_'
|
||||
pop eax
|
||||
jnz @f
|
||||
stdcall dll.Init,[eax+4]
|
||||
@@:
|
||||
pop esi
|
||||
add esi,8
|
||||
jmp .next_lib
|
||||
.exit: xor eax,eax
|
||||
ret
|
||||
.fail: add esp,4
|
||||
xor eax,eax
|
||||
inc eax
|
||||
ret
|
||||
endp
|
||||
|
||||
proc dll.Link, exp:dword,imp:dword
|
||||
push eax
|
||||
mov esi,[imp]
|
||||
test esi,esi
|
||||
jz .done
|
||||
.next: lodsd
|
||||
test eax,eax
|
||||
jz .done
|
||||
stdcall dll.GetProcAddress,[exp],eax
|
||||
or eax,eax
|
||||
jz @f
|
||||
mov [esi-4],eax
|
||||
jmp .next
|
||||
@@: mov dword[esp],0
|
||||
.done: pop eax
|
||||
ret
|
||||
endp
|
||||
|
||||
proc dll.Init, dllentry:dword
|
||||
pushad
|
||||
mov eax,mem.Alloc
|
||||
mov ebx,mem.Free
|
||||
mov ecx,mem.ReAlloc
|
||||
mov edx,dll.Load
|
||||
stdcall [dllentry]
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
proc dll.GetProcAddress, exp:dword,sz_name:dword
|
||||
mov edx,[exp]
|
||||
xor eax,eax
|
||||
.next: or edx,edx
|
||||
jz .end
|
||||
cmp dword[edx],0
|
||||
jz .end
|
||||
stdcall strcmp,[edx],[sz_name]
|
||||
test eax,eax
|
||||
jz .ok
|
||||
add edx,8
|
||||
jmp .next
|
||||
.ok: mov eax,[edx+4]
|
||||
.end: ret
|
||||
endp
|
||||
|
||||
proc strcmp, str1:dword,str2:dword
|
||||
push esi edi
|
||||
mov esi,[str1]
|
||||
mov edi,[str2]
|
||||
xor eax,eax
|
||||
@@: lodsb
|
||||
scasb
|
||||
jne .fail
|
||||
or al,al
|
||||
jnz @b
|
||||
jmp .ok
|
||||
.fail: or eax,-1
|
||||
.ok: pop edi esi
|
||||
ret
|
||||
endp
|
||||
|
||||
s_libdir:
|
||||
db '/sys/lib/'
|
||||
.fname rb 32
|
1164
programs/develop/info3ds/info3ds.asm
Normal file
1164
programs/develop/info3ds/info3ds.asm
Normal file
File diff suppressed because it is too large
Load Diff
48
programs/develop/info3ds/mem.inc
Normal file
48
programs/develop/info3ds/mem.inc
Normal file
@@ -0,0 +1,48 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
proc mem.Alloc,size ;/////////////////////////////////////////////////////////
|
||||
;-----------------------------------------------------------------------------
|
||||
push ebx ecx
|
||||
mov ecx,[size]
|
||||
;*** add ecx,4
|
||||
mcall 68,12
|
||||
;*** add ecx,-4
|
||||
;*** mov [eax],ecx
|
||||
;*** add eax,4
|
||||
pop ecx ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
proc mem.ReAlloc,mptr,size ;//////////////////////////////////////////////////
|
||||
;-----------------------------------------------------------------------------
|
||||
push ebx ecx edx
|
||||
mov ecx,[size]
|
||||
or ecx,ecx
|
||||
jz @f
|
||||
;*** add ecx,4
|
||||
@@: mov edx,[mptr]
|
||||
or edx,edx
|
||||
jz @f
|
||||
;*** add edx,-4
|
||||
@@: mcall 68,20
|
||||
or eax,eax
|
||||
jz @f
|
||||
;*** add ecx,-4
|
||||
;*** mov [eax],ecx
|
||||
;*** add eax,4
|
||||
@@: pop edx ecx ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
proc mem.Free,mptr ;//////////////////////////////////////////////////////////
|
||||
;-----------------------------------------------------------------------------
|
||||
push ebx ecx
|
||||
mov ecx,[mptr]
|
||||
or ecx,ecx
|
||||
jz @f
|
||||
;*** add ecx,-4
|
||||
@@: mcall 68,13
|
||||
pop ecx ebx
|
||||
ret
|
||||
endp
|
BIN
programs/develop/info3ds/objects.png
Normal file
BIN
programs/develop/info3ds/objects.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
programs/develop/info3ds/tl_sys_16.png
Normal file
BIN
programs/develop/info3ds/tl_sys_16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
programs/develop/info3ds/toolbar.png
Normal file
BIN
programs/develop/info3ds/toolbar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@@ -75,9 +75,7 @@ fn_icon0 rb FILE_NAME_MAX ;
|
||||
fn_icon1 rb FILE_NAME_MAX ;<3B><><EFBFBD> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>楬
|
||||
fn_icon2 rb FILE_NAME_MAX ;<3B><><EFBFBD> 䠩<><E4A0A9> <20> <20><>栬<EFBFBD>
|
||||
fn_icon3 rb FILE_NAME_MAX ;<3B><><EFBFBD> 䠩<><E4A0A9> <20> 樯<><E6A8AF>⠬<EFBFBD>
|
||||
fn_font db 'font8x9.bmp',0
|
||||
|
||||
fn_icon_tl_sys db 'tl_sys_16.png',0
|
||||
TREE_ICON_SYS16_BMP_SIZE equ 256*3*11+54 ;ࠧ<><E0A0A7><EFBFBD> bmp 䠩<><E4A0A9> <20> <20><><EFBFBD>⥬<EFBFBD>묨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
ini_m_name db 'main.ini',0
|
||||
@@ -124,7 +122,18 @@ color_but_sm dd 0x808080 ;梥
|
||||
color_but_te dd 0xffffff ;梥<> ⥪<><E2A5AA><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
macro load_image_file path,buf,size { ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
copy_path path,sys_path,file_name,0x0 ;<3B><>ନ<EFBFBD>㥬 <20><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ࠧ㬥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>ணࠬ<EFBFBD><EFBFBD><EFBFBD>
|
||||
;path - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>ப<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC>
|
||||
if path eqtype '' ;<3B><EFBFBD><E0AEA2>塞 <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>ப<EFBFBD><E0AEAA> <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD> path
|
||||
jmp @f
|
||||
local .path_str
|
||||
.path_str db path ;<3B><>ନ<EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD>
|
||||
db 0
|
||||
@@:
|
||||
;32 - <20>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><>⥬
|
||||
copy_path .path_str,[32],file_name,0x0
|
||||
else
|
||||
copy_path path,[32],file_name,0x0 ;<3B><>ନ<EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>, <20><><EFBFBD>ࠧ㬥<E0A0A7><E3ACA5><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>
|
||||
end if
|
||||
|
||||
stdcall mem.Alloc, dword size ;<3B>뤥<EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
mov [buf],eax
|
||||
@@ -711,7 +720,7 @@ InitAll:
|
||||
stdcall LoadArrayBuffer, fn_icon2, buf_egg,22 ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 22 <20><><EFBFBD><EFBFBD> <20> <20><>栬<EFBFBD>
|
||||
stdcall LoadArrayBuffer, fn_icon3, buf_chi,13 ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> 13 <20><><EFBFBD><EFBFBD> <20> 樯<><E6A8AF>⠬<EFBFBD>
|
||||
|
||||
load_image_file fn_font, image_data_gray,IMAGE_FONT_SIZE
|
||||
load_image_file 'font8x9.bmp', image_data_gray,IMAGE_FONT_SIZE
|
||||
stdcall [buf2d_create_f_img], buf_font,[image_data_gray] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
@@ -765,7 +774,7 @@ start:
|
||||
;******************************************************************************
|
||||
stdcall dword[tl_data_init], tree1
|
||||
|
||||
load_image_file fn_icon_tl_sys, image_data_gray,TREE_ICON_SYS16_BMP_SIZE
|
||||
load_image_file 'tl_sys_16.png', image_data_gray,TREE_ICON_SYS16_BMP_SIZE
|
||||
stdcall [buf2d_create_f_img], buf_tree_sys,[image_data_gray] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall mem.Free,[image_data_gray] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
@@ -791,7 +800,7 @@ start:
|
||||
stdcall dword[tl_cur_beg], tree1 ;<3B><>७<EFBFBD>ᨬ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
mcall 26,9
|
||||
mov [last_time],ebx
|
||||
mov [last_time],eax
|
||||
|
||||
|
||||
|
||||
@@ -814,7 +823,6 @@ still: ;
|
||||
test ebx,ebx
|
||||
jz it_is_time_now
|
||||
mcall 23
|
||||
|
||||
cmp eax,0
|
||||
je it_is_time_now
|
||||
|
||||
@@ -847,8 +855,8 @@ it_is_time_now:
|
||||
mcall 26,9
|
||||
mov [last_time],eax
|
||||
|
||||
cmp byte[game_select_mode],0
|
||||
jne still
|
||||
;cmp byte[game_select_mode],0
|
||||
;jne still
|
||||
|
||||
;...<2E><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⢨<EFBFBD>, <20><><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> delay <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ᥪ㭤...
|
||||
call MoveEggs
|
||||
@@ -1218,7 +1226,7 @@ align 4
|
||||
ret ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 祭<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 室 <20>.<2E>. <20><><EFBFBD><EFBFBD> <20> <20>⥪<EFBFBD> <20>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20>맮<EFBFBD><EBA7AE><EFBFBD> <20><> <20>⮫쪮 ࠧ <20><> <20> <20>㤥<EFBFBD> <20><><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
last_time dd ?
|
||||
last_time dd 0
|
||||
image_data dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⨭<EFBFBD><E2A8AD> <20>㭪<EFBFBD><E3ADAA>ﬨ libimg
|
||||
image_data_gray dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>६<EFBFBD><E0A5AC><EFBFBD>묨 <20><><EFBFBD>묨 <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD>ﬨ <20> <20><>ଠ<EFBFBD><E0ACA0> 24-bit, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
Reference in New Issue
Block a user