Compare commits
5 Commits
PR-TidySVN
...
PR-TidySVN
Author | SHA1 | Date | |
---|---|---|---|
d3136b2b60 | |||
05fd3512a1 | |||
0d2ac7d185 | |||
5b7f903e92 | |||
2dfb3ddff3
|
@@ -154,7 +154,7 @@ extra_files = {
|
||||
{"kolibrios/3D/info3ds/INFO3DS.INI", SRC_PROGS .. "/develop/info3ds/info3ds.ini"},
|
||||
{"kolibrios/3D/info3ds/OBJECTS.PNG", SRC_PROGS .. "/develop/info3ds/objects.png"},
|
||||
{"kolibrios/3D/info3ds/TOOLBAR.PNG", SRC_PROGS .. "/develop/info3ds/toolbar.png"},
|
||||
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
|
||||
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/font8x9.bmp"},
|
||||
{"kolibrios/3D/blocks/blocks.kex", "../programs/bcc32/games/blocks/bin/blocks.kex"},
|
||||
{"kolibrios/3D/blocks/models/", "../programs/bcc32/games/blocks/models/*"},
|
||||
{"kolibrios/3D/md2view/", "common/3d/md2view/*"},
|
||||
@@ -164,7 +164,7 @@ extra_files = {
|
||||
{"kolibrios/3D/voxel_editor/HOUSE2.VOX", SRC_PROGS .. "/media/voxel_editor/trunk/house2.vox"},
|
||||
{"kolibrios/3D/voxel_editor/SQUIRREL.VOX", SRC_PROGS .. "/media/voxel_editor/trunk/squirrel.vox"},
|
||||
{"kolibrios/3D/voxel_utilites/VOX_MOVER.INI" , SRC_PROGS .. "/media/voxel_editor/utilites/vox_mover.ini"},
|
||||
{"kolibrios/3D/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
|
||||
{"kolibrios/3D/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/font8x9.bmp"},
|
||||
{"kolibrios/3D/TOOLB_1.PNG", SRC_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/toolb_1.png"},
|
||||
{"kolibrios/3D/TEST_GLU1", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/test_glu1"},
|
||||
{"kolibrios/3D/TEST_GLU2", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/test_glu2"},
|
||||
@@ -294,8 +294,8 @@ extra_files = {
|
||||
{"kolibrios/utils/cnc_editor/cnc_editor", VAR_PROGS .. "/other/cnc_editor/cnc_editor"},
|
||||
{"kolibrios/utils/cnc_editor/kolibri.NC", SRC_PROGS .. "/other/cnc_editor/kolibri.NC"},
|
||||
{"kolibrios/utils/kfm/kfm.ini", "common/File Managers/kfm.ini"},
|
||||
{"kolibrios/utils/kfm/kfm_keys_eng.txt", SRC_PROGS .. "/fs/kfm/trunk/docs/english/kfm_keys.txt"},
|
||||
{"kolibrios/utils/kfm/kfm_keys_rus.txt", SRC_PROGS .. "/fs/kfm/trunk/docs/russian/dos_kolibri/kfm_keys.txt"},
|
||||
{"kolibrios/utils/kfm/kfm_keys_eng.txt", SRC_PROGS .. "/fs/kfm/docs/english/kfm_keys.txt"},
|
||||
{"kolibrios/utils/kfm/kfm_keys_rus.txt", SRC_PROGS .. "/fs/kfm/docs/russian/dos_kolibri/kfm_keys.txt"},
|
||||
{"kolibrios/utils/fNav/", "common/File Managers/fNav/*"},
|
||||
{"kolibrios/utils/NDN/", "common/File Managers/ndn/*"},
|
||||
{"kolibrios/utils/NDN/COLORS/", "common/File Managers/ndn/COLORS/*"},
|
||||
@@ -486,7 +486,7 @@ tup.append_table(img_files, {
|
||||
{"DEVELOP/EXAMPLES/CONGET", VAR_PROGS .. "/develop/libraries/console_coff/examples/test_gets"},
|
||||
{"DEVELOP/EXAMPLES/CSLIDE", VAR_PROGS .. "/demos/cslide/trunk/cslide"},
|
||||
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/trunk/thread"},
|
||||
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
|
||||
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/kfar"},
|
||||
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
|
||||
{"LOD", VAR_PROGS .. "/fs/lod/lod"},
|
||||
{"GAMES/15", VAR_PROGS .. "/games/15/15"},
|
||||
@@ -505,7 +505,7 @@ tup.append_table(img_files, {
|
||||
{"GAMES/TANKS", VAR_PROGS .. "/games/tanks/tanks"},
|
||||
{"GAMES/TETRIS", VAR_PROGS .. "/games/tetris/tetris"},
|
||||
{"GAMES/C4", VAR_PROGS .. "/games/c4/c4"},
|
||||
{"LIB/ARCHIVER.OBJ", VAR_PROGS .. "/fs/kfar/trunk/kfar_arc/kfar_arc.obj"},
|
||||
{"LIB/ARCHIVER.OBJ", VAR_PROGS .. "/fs/kfar/kfar_arc/kfar_arc.obj"},
|
||||
{"LIB/BOX_LIB.OBJ", VAR_PROGS .. "/develop/libraries/box_lib/trunk/box_lib.obj"},
|
||||
{"LIB/BUF2D.OBJ", VAR_PROGS .. "/develop/libraries/buf2d/trunk/buf2d.obj"},
|
||||
{"LIB/CONSOLE.OBJ", VAR_PROGS .. "/develop/libraries/console_coff/console.obj"},
|
||||
@@ -628,7 +628,7 @@ tup.append_table(extra_files, {
|
||||
{"kolibrios/media/zsea/plugins/rotate.obj", VAR_PROGS .. "/media/zsea/plugins/rotate/rotate.obj"},
|
||||
{"kolibrios/media/zsea/plugins/scaling.obj", VAR_PROGS .. "/media/zsea/plugins/scaling/scaling.obj"},
|
||||
{"kolibrios/utils/AMDtemp", VAR_PROGS .. "/system/amd_temp_view/AMDtemp"},
|
||||
{"kolibrios/utils/kfm/kfm", VAR_PROGS .. "/fs/kfm/trunk/kfm"},
|
||||
{"kolibrios/utils/kfm/kfm", VAR_PROGS .. "/fs/kfm/kfm"},
|
||||
{"kolibrios/utils/tedit/t_edit", VAR_PROGS .. "/other/t_edit/t_edit"},
|
||||
{"kolibrios/3D/blocks/block.bin", VAR_PROGS .. "/bcc32/games/blocks/block.bin"}
|
||||
})
|
||||
|
@@ -1,3 +1,5 @@
|
||||
SERIAL_COMPATIBLE_API_VER = 0 ; increments in case of breaking changes
|
||||
|
||||
SERIAL_API_GET_VERSION = 0
|
||||
SERIAL_API_SRV_ADD_PORT = 1
|
||||
SERIAL_API_SRV_REMOVE_PORT = 2
|
||||
@@ -21,14 +23,18 @@ SERIAL_CONF_PARITY_ODD = 2
|
||||
SERIAL_CONF_PARITY_MARK = 3
|
||||
SERIAL_CONF_PARITY_SPACE = 4
|
||||
|
||||
SERIAL_CONF_STOP_BITS_1 = 0
|
||||
SERIAL_CONF_STOP_BITS_1_5 = 1
|
||||
SERIAL_CONF_STOP_BITS_2 = 2
|
||||
|
||||
SERIAL_CONF_FLOW_CTRL_NONE = 0
|
||||
|
||||
struct SP_DRIVER
|
||||
size dd ? ; size of this struct
|
||||
startup dd ? ; void __stdcall (*startup)(void *drv_data, const struct serial_conf *conf);
|
||||
shutdown dd ? ; void __stdcall (*shutdown)(void *drv_data);
|
||||
reconf dd ? ; void __stdcall (*reconf)(void *drv_data, const struct serial_conf *conf);
|
||||
tx dd ? ; void __stdcall (*tx)(void *drv_data);
|
||||
startup dd ? ; int __stdcall (*startup)(void *drv_data, const struct serial_conf *conf);
|
||||
shutdown dd ? ; int __stdcall (*shutdown)(void *drv_data);
|
||||
reconf dd ? ; int __stdcall (*reconf)(void *drv_data, const struct serial_conf *conf);
|
||||
tx dd ? ; int __stdcall (*tx)(void *drv_data);
|
||||
ends
|
||||
|
||||
struct SP_CONF
|
||||
@@ -123,6 +129,30 @@ proc serial_port_init
|
||||
ret
|
||||
endp
|
||||
|
||||
proc serial_port_get_version stdcall, version:dword
|
||||
locals
|
||||
.handler dd ?
|
||||
.io_code dd ?
|
||||
.input dd ?
|
||||
.inp_size dd ?
|
||||
.output dd ?
|
||||
.out_size dd ?
|
||||
endl
|
||||
mov eax, [serial_drv_handle]
|
||||
mov [.handler], eax
|
||||
mov dword [.io_code], SERIAL_API_GET_VERSION
|
||||
mov [.input], 0
|
||||
mov dword [.inp_size], 0
|
||||
mov eax, [version]
|
||||
mov [.output], eax
|
||||
mov dword [.out_size], 4
|
||||
|
||||
lea ecx, [.handler]
|
||||
mcall SF_SYS_MISC, SSF_CONTROL_DRIVER
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
proc serial_port_open stdcall uses ebx, port_id:dword, conf:dword, handle:dword
|
||||
locals
|
||||
.handler dd ?
|
||||
|
@@ -9,8 +9,6 @@ __DEBUG_LEVEL__ = L_DBG
|
||||
|
||||
SERIAL_RING_BUF_SIZE = 32768
|
||||
|
||||
API_VERSION = 1
|
||||
|
||||
section '.flat' readable writable executable
|
||||
|
||||
include '../struct.inc'
|
||||
@@ -23,6 +21,9 @@ include 'common.inc'
|
||||
include 'ring_buf.inc'
|
||||
include 'uart16550.inc'
|
||||
|
||||
CURRENT_API = 0x0001
|
||||
API_VERSION = (SERIAL_COMPATIBLE_API_VER shl 16) + CURRENT_API
|
||||
|
||||
struct SERIAL_OBJ
|
||||
magic dd ?
|
||||
destroy dd ?
|
||||
@@ -45,7 +46,7 @@ struct SERIAL_PORT
|
||||
conf SP_CONF
|
||||
ends
|
||||
|
||||
proc START c, reason:dword
|
||||
proc START c, reason:dword, cmdline:dword
|
||||
cmp [reason], DRV_ENTRY
|
||||
jne .fail
|
||||
|
||||
@@ -347,15 +348,12 @@ proc sp_validate_conf
|
||||
mov eax, [ecx + SP_CONF.baudrate]
|
||||
test eax, eax
|
||||
jz .fail
|
||||
mov al, [ecx + SP_CONF.word_size]
|
||||
cmp al, 8
|
||||
jne .fail ; TODO implement different word size
|
||||
mov al, [ecx + SP_CONF.stop_bits]
|
||||
cmp al, 1
|
||||
jne .fail ; TODO implement different stop bits count
|
||||
cmp al, SERIAL_CONF_STOP_BITS_2
|
||||
ja .fail
|
||||
mov al, [ecx + SP_CONF.parity]
|
||||
cmp al, SERIAL_CONF_PARITY_NONE
|
||||
jne .fail ; TODO implement parity
|
||||
cmp al, SERIAL_CONF_PARITY_SPACE
|
||||
ja .fail
|
||||
mov al, [ecx + SP_CONF.flow_ctrl]
|
||||
cmp al, SERIAL_CONF_FLOW_CTRL_NONE
|
||||
jne .fail ; TODO implement flow control
|
||||
@@ -550,7 +548,6 @@ proc sp_setup
|
||||
mov eax, [edi + SERIAL_PORT.drv]
|
||||
mov ecx, [edi + SERIAL_PORT.drv_data]
|
||||
stdcall dword [eax + SP_DRIVER.reconf], ecx, esi
|
||||
xor eax, eax
|
||||
push eax
|
||||
test eax, eax
|
||||
jnz @f
|
||||
|
@@ -350,10 +350,10 @@ endl
|
||||
; calc stop bits
|
||||
mov bx, LCR_STOP_1
|
||||
mov al, [esi + SP_CONF.stop_bits]
|
||||
cmp al, 1
|
||||
cmp al, SERIAL_CONF_STOP_BITS_1
|
||||
je .stop_bits_ok
|
||||
or bx, LCR_STOP_2
|
||||
cmp al, 2
|
||||
cmp al, SERIAL_CONF_STOP_BITS_2
|
||||
jne .fail
|
||||
.stop_bits_ok:
|
||||
or [lcr], bx
|
||||
|
@@ -1123,11 +1123,53 @@ proc uart_shutdown stdcall uses ebx, data:dword
|
||||
ret
|
||||
endp
|
||||
|
||||
proc uart_reconf stdcall uses ebx esi, dev:dword, conf:dword
|
||||
mov ebx, [dev]
|
||||
proc uart_reconf stdcall uses esi, dev:dword, conf:dword
|
||||
locals
|
||||
ConfPacket rb 8
|
||||
endl
|
||||
mov esi, [conf]
|
||||
stdcall ftdi_set_baudrate, ebx, [esi + SP_CONF.baudrate]
|
||||
; TODO set word_size, parity, etc.
|
||||
xor edx, edx
|
||||
mov al, [esi + SP_CONF.word_size]
|
||||
cmp al, 7
|
||||
jb .invalid
|
||||
cmp al, 8
|
||||
ja .invalid
|
||||
mov dl, al
|
||||
; odd and even parities are different from serial api
|
||||
; serial api: even=1 odd=2
|
||||
; ft232x api: odd=1 even=2
|
||||
movzx eax, [esi + SP_CONF.parity]
|
||||
cmp al, SERIAL_CONF_PARITY_SPACE
|
||||
ja .invalid
|
||||
cmp al, SERIAL_CONF_PARITY_ODD
|
||||
ja .parity_ok
|
||||
cmp al, SERIAL_CONF_PARITY_EVEN
|
||||
jb .parity_ok
|
||||
; swap bits
|
||||
xor al, 0x3
|
||||
.parity_ok:
|
||||
shl eax, 8 ; parity offset
|
||||
or edx, eax
|
||||
movzx eax, [esi + SP_CONF.stop_bits]
|
||||
cmp al, SERIAL_CONF_STOP_BITS_2
|
||||
ja .invalid
|
||||
shl eax, 11 ; stop bits offset
|
||||
or edx, eax
|
||||
mov word [ConfPacket], (FTDI_DEVICE_OUT_REQTYPE) \
|
||||
+ (SIO_SET_DATA shl 8)
|
||||
mov word [ConfPacket + 2], dx
|
||||
mov word [ConfPacket + 4], 0
|
||||
mov word [ConfPacket + 6], 0
|
||||
lea edx, [ConfPacket]
|
||||
stdcall ftdi_blocking_ctrl_tranfser, [dev], edx
|
||||
test eax, eax
|
||||
jnz .exit
|
||||
stdcall ftdi_set_baudrate, [dev], [esi + SP_CONF.baudrate]
|
||||
ret
|
||||
|
||||
.invalid:
|
||||
or eax, -1
|
||||
.exit:
|
||||
ret
|
||||
endp
|
||||
|
||||
@@ -1204,17 +1246,10 @@ proc uart_rx stdcall uses ebx esi, data:dword
|
||||
ret
|
||||
endp
|
||||
|
||||
proc ftdi_set_baudrate stdcall uses ebx esi edi, dev:dword, baud:dword
|
||||
proc ftdi_set_baudrate stdcall uses ebx, dev:dword, baud:dword
|
||||
locals
|
||||
ConfPacket rb 10
|
||||
EventData rd 3
|
||||
ConfPacket rb 8
|
||||
endl
|
||||
xor esi, esi
|
||||
xor ecx, ecx
|
||||
invoke CreateEvent
|
||||
mov [EventData], eax
|
||||
mov [EventData + 4], edx
|
||||
|
||||
mov ebx, [dev]
|
||||
cmp [ebx + ftdi_context.chipType], TYPE_2232H
|
||||
jl .c_clk
|
||||
@@ -1257,7 +1292,7 @@ endl
|
||||
jmp .calcend
|
||||
|
||||
.c_nextbaud2:
|
||||
cmp dword [edi + 8], C_CLK / (2 * 16)
|
||||
cmp dword [baud], C_CLK / (2 * 16)
|
||||
jl .c_nextbaud3
|
||||
mov edx, 2
|
||||
mov ecx, C_CLK / (2 * 16)
|
||||
@@ -1348,23 +1383,51 @@ endl
|
||||
mov word [ConfPacket + 4], cx
|
||||
mov word [ConfPacket + 6], 0
|
||||
|
||||
lea esi, [ConfPacket]
|
||||
lea ebx, [ConfPacket]
|
||||
stdcall ftdi_blocking_ctrl_tranfser, [dev], ebx
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
proc ftdi_blocking_ctrl_tranfser stdcall uses ebx esi edi, dev:dword, conf:dword
|
||||
; conf is a pointer to values: bmRequestType, bRequest, wValue, wIndex, wLength
|
||||
locals
|
||||
EventData rd 3
|
||||
endl
|
||||
xor esi, esi
|
||||
xor ecx, ecx
|
||||
invoke CreateEvent
|
||||
test eax, eax
|
||||
jz .exit
|
||||
mov [EventData], eax
|
||||
mov [EventData + 4], edx
|
||||
|
||||
mov eax, [dev]
|
||||
mov esi, [conf]
|
||||
lea edi, [EventData]
|
||||
invoke USBControlTransferAsync, [ebx + ftdi_context.nullP], esi, 0,\
|
||||
invoke USBControlTransferAsync, [eax + ftdi_context.nullP], esi, 0,\
|
||||
0, control_callback, edi, 0
|
||||
test eax, eax
|
||||
jz .error
|
||||
|
||||
mov eax, [EventData]
|
||||
mov ebx, [EventData + 4]
|
||||
invoke WaitEvent
|
||||
|
||||
cmp [EventData + 8], 0 ; USB_STATUS_OK
|
||||
jne .error
|
||||
|
||||
mov eax, [EventData]
|
||||
mov ebx, [EventData + 4]
|
||||
invoke DestroyEvent
|
||||
xor eax, eax
|
||||
ret
|
||||
|
||||
.error:
|
||||
.error:
|
||||
mov eax, [EventData]
|
||||
mov ebx, [EventData + 4]
|
||||
invoke DestroyEvent
|
||||
.exit:
|
||||
or eax, -1
|
||||
ret
|
||||
endp
|
||||
|
@@ -111,11 +111,11 @@ fasm develop\libraries\libs-dev\libio\libio.asm %BIN%\lib\libio.obj
|
||||
echo *
|
||||
echo Building fs
|
||||
echo *
|
||||
fasm fs\copy2\trunk\copy2.asm %BIN%\copy2
|
||||
fasm fs\copyr\trunk\copyr.asm %BIN%\copyr
|
||||
fasm fs\kfar\trunk\kfar.asm %BIN%\kfar
|
||||
rem fasm fs\copy2\trunk\copy2.asm %BIN%\copy2
|
||||
fasm fs\copyr\copyr.asm %BIN%\copyr
|
||||
fasm fs\kfar\kfar.asm %BIN%\kfar
|
||||
rem fasm fs\mfar\trunk\mfar.asm %BIN%\mfar
|
||||
fasm fs\sysxtree\trunk\sysxtree.asm %BIN%\sysxtree
|
||||
rem fasm fs\sysxtree\trunk\sysxtree.asm %BIN%\sysxtree
|
||||
|
||||
echo *
|
||||
echo Building network
|
||||
|
@@ -4,7 +4,7 @@ if not exist bin mkdir bin
|
||||
@copy objects.png bin\objects.png
|
||||
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
|
||||
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
|
||||
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex
|
||||
|
@@ -4,7 +4,7 @@ if not exist bin mkdir bin
|
||||
@copy objects.png bin\objects.png
|
||||
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
|
||||
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
|
||||
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
|
||||
@kpack bin\info3ds.kex
|
||||
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex
|
||||
|
@@ -8,8 +8,8 @@ if not exist bin\icon.bmp @copy icon.bmp bin\icon.bmp
|
||||
if not exist bin\base.bmp @copy base.bmp bin\base.bmp
|
||||
if not exist bin\left.bmp @copy left.bmp bin\left.bmp
|
||||
if not exist bin\oper.bmp @copy oper.bmp bin\oper.bmp
|
||||
if not exist bin\font6x9.bmp @copy ..\..\fs\kfar\trunk\font6x9.bmp bin\font6x9.bmp
|
||||
if not exist bin\font6x9.bmp @copy ..\..\fs\kfar\font6x9.bmp bin\font6x9.bmp
|
||||
if not exist bin\asm.syn @copy ..\..\other\t_edit\info\asm.syn bin\asm.syn
|
||||
|
||||
copy *.ced bin\*.ced
|
||||
pause
|
||||
pause
|
||||
|
@@ -1,6 +1,6 @@
|
||||
if not exist bin mkdir bin
|
||||
@copy *.png bin\*.png
|
||||
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
|
||||
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
|
||||
if not exist bin\tinygl.obj @fasm.exe -m 16384 ..\tinygl.asm bin\tinygl.obj
|
||||
|
||||
@fasm.exe -m 16384 test0.asm bin\test0.kex
|
||||
@@ -38,4 +38,4 @@ if not exist bin\tinygl.obj @fasm.exe -m 16384 ..\tinygl.asm bin\tinygl.obj
|
||||
@kpack bin\textures1.kex
|
||||
@kpack bin\textures2.kex
|
||||
|
||||
pause
|
||||
pause
|
||||
|
@@ -1,6 +1,6 @@
|
||||
if not exist bin mkdir bin
|
||||
|
||||
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
|
||||
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
|
||||
@copy foto.jpg bin\foto.jpg
|
||||
@copy img0.png bin\img0.png
|
||||
@copy img1.png bin\img1.png
|
||||
@@ -25,4 +25,4 @@ if not exist bin\vaz2106.vox @copy ..\..\..\..\..\media\voxel_editor\trunk\vaz21
|
||||
@kpack bin\e6_vox_1g.kex
|
||||
@kpack bin\e7_vox_3g.kex
|
||||
@kpack bin\e8_filters.kex
|
||||
pause
|
||||
pause
|
||||
|
@@ -2,7 +2,7 @@ if not exist bin mkdir bin
|
||||
@fasm.exe -m 16384 crypt_files.asm bin\crypt_files.kex
|
||||
@kpack bin\crypt_files.kex
|
||||
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
|
||||
if not exist bin\font8x9.bmp @copy ..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 ..\trunk\crypt_des.asm bin\crypt_des.obj
|
||||
@kpack bin\crypt_des.obj
|
||||
pause
|
||||
pause
|
||||
|
@@ -2,7 +2,7 @@ if not exist bin mkdir bin
|
||||
@fasm.exe -m 16384 viev_exif.asm bin\viev_exif.kex
|
||||
@kpack bin\viev_exif.kex
|
||||
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
|
||||
if not exist bin\font8x9.bmp @copy ..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
|
||||
@fasm.exe -m 16384 ..\trunk\exif.asm bin\exif.obj
|
||||
@kpack bin\exif.obj
|
||||
pause
|
||||
pause
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
; png.asm - location for general purpose libpng functions
|
||||
|
||||
; Last changed in libpng 1.6.25 [September 1, 2016]
|
||||
@@ -13,7 +12,7 @@
|
||||
DEBUG equ 0
|
||||
|
||||
include '../../../../../../KOSfuncs.inc'
|
||||
include '../../../../../../fs/kfar/trunk/zlib/deflate.inc'
|
||||
include '../../../../../../fs/kfar/zlib/deflate.inc'
|
||||
include 'pngtokos.inc' ;integrate png to kos
|
||||
|
||||
;files from libpng
|
||||
|
@@ -21,7 +21,7 @@
|
||||
; in this structure and is required for decompressing the LZ compressed
|
||||
; data in PNG files.
|
||||
|
||||
include '../../../../../../fs/kfar/trunk/zlib/zlib.inc'
|
||||
include '../../../../../../fs/kfar/zlib/zlib.inc'
|
||||
|
||||
; zlib.inc declares a magic type 'uInt' that limits the amount of data that zlib
|
||||
; can handle at once. This type need be no larger than 16 bits (so maximum of
|
||||
@@ -74,7 +74,7 @@ ends
|
||||
; from chromaticities the sum of the Y values is assumed to be 1.0
|
||||
|
||||
struct png_XYZ
|
||||
red_X dd ? ;png_fixed_point
|
||||
red_X dd ? ;png_fixed_point
|
||||
red_Y dd ?
|
||||
red_Z dd ?
|
||||
green_X dd ?
|
||||
|
@@ -1,5 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
@@ -1,3 +1,9 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; ;
|
||||
; FILE COPY - system module for copy ;
|
||||
@@ -24,7 +30,7 @@
|
||||
dd param_area , 0x0 ; I_Param , I_Icon
|
||||
|
||||
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
|
||||
include '..\..\..\macros.inc' ; very useful stuff for MeOS
|
||||
include '..\..\macros.inc' ; very useful stuff for MeOS
|
||||
include 'ascl.inc'
|
||||
|
||||
START: ; start of execution
|
@@ -1,5 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1,3 +1,9 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
|
||||
use32
|
||||
db 'MENUET01'
|
||||
dd 1
|
||||
@@ -15,8 +21,8 @@ max_width = 255
|
||||
min_height = 8
|
||||
max_height = 255
|
||||
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../macros.inc'
|
||||
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
|
||||
include 'font.inc'
|
||||
include 'sort.inc'
|
@@ -1,5 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
@@ -1,170 +1,171 @@
|
||||
|
||||
include '../../../../proc32.inc'
|
||||
include '../../../../macros.inc'
|
||||
include '../../../../KOSfuncs.inc'
|
||||
|
||||
FASTEST equ 0
|
||||
GEN_TREES_H equ 0
|
||||
DEBUG equ 0
|
||||
DYNAMIC_CRC_TABLE equ 1
|
||||
Z_SOLO equ 0
|
||||
|
||||
; define NO_GZIP when compiling if you want to disable gzip header and
|
||||
; trailer creation by deflate(). NO_GZIP would be used to avoid linking in
|
||||
; the crc code when it is not needed. For shared libraries, gzip encoding
|
||||
; should be left enabled.
|
||||
GZIP equ 1
|
||||
|
||||
macro zlib_debug fmt,p1
|
||||
{
|
||||
if DEBUG eq 1
|
||||
zlib_assert fmt,p1
|
||||
end if
|
||||
}
|
||||
|
||||
macro zlib_assert fmt,p1
|
||||
{
|
||||
local .end_t
|
||||
local .m_fmt
|
||||
pushf
|
||||
jmp .end_t
|
||||
.m_fmt db fmt,13,10,0
|
||||
align 4
|
||||
.end_t:
|
||||
if p1 eq
|
||||
stdcall dbg_print,0,.m_fmt
|
||||
else
|
||||
stdcall str_format_dbg, buf_param,.m_fmt,p1
|
||||
end if
|
||||
popf
|
||||
}
|
||||
|
||||
include 'zlib.inc'
|
||||
include 'deflate.inc'
|
||||
include 'zutil.asm'
|
||||
;include '../kfar_arc/crc.inc'
|
||||
include 'crc32.asm'
|
||||
include 'adler32.asm'
|
||||
include 'trees.asm'
|
||||
include 'deflate.asm'
|
||||
|
||||
align 4
|
||||
buf_param rb 80
|
||||
|
||||
align 4
|
||||
proc dbg_print, fun:dword, mes:dword
|
||||
pushad
|
||||
mov eax,SF_BOARD
|
||||
mov ebx,SSF_DEBUG_WRITE
|
||||
|
||||
mov esi,[fun]
|
||||
cmp esi,0
|
||||
je .end0
|
||||
@@:
|
||||
mov cl,byte[esi]
|
||||
int 0x40
|
||||
inc esi
|
||||
cmp byte[esi],0
|
||||
jne @b
|
||||
mov cl,':'
|
||||
int 0x40
|
||||
mov cl,' '
|
||||
int 0x40
|
||||
.end0:
|
||||
mov esi,[mes]
|
||||
cmp esi,0
|
||||
je .end_f
|
||||
@@:
|
||||
mov cl,byte[esi]
|
||||
cmp cl,0
|
||||
je .end_f
|
||||
int 0x40
|
||||
inc esi
|
||||
jmp @b
|
||||
.end_f:
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
proc str_format_dbg, buf:dword, fmt:dword, p1:dword
|
||||
pushad
|
||||
mov esi,[fmt]
|
||||
mov edi,[buf]
|
||||
mov ecx,80-1
|
||||
.cycle0:
|
||||
lodsb
|
||||
cmp al,'%'
|
||||
jne .no_param
|
||||
lodsb
|
||||
dec ecx
|
||||
cmp al,0
|
||||
je .cycle0end
|
||||
cmp al,'d'
|
||||
je @f
|
||||
cmp al,'u'
|
||||
je @f
|
||||
cmp al,'l'
|
||||
je .end1
|
||||
jmp .end0
|
||||
.end1: ;%lu %lx
|
||||
lodsb
|
||||
dec ecx
|
||||
cmp al,'u'
|
||||
jne .end0
|
||||
@@:
|
||||
mov eax,[p1]
|
||||
stdcall convert_int_to_str,ecx
|
||||
xor al,al
|
||||
repne scasb
|
||||
dec edi
|
||||
.end0:
|
||||
loop .cycle0
|
||||
.no_param:
|
||||
stosb
|
||||
cmp al,0
|
||||
je .cycle0end
|
||||
loop .cycle0
|
||||
.cycle0end:
|
||||
xor al,al
|
||||
stosb
|
||||
stdcall dbg_print,0,[buf]
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
;input:
|
||||
; eax - число
|
||||
; edi - буфер для строки
|
||||
; len - длинна буфера
|
||||
;output:
|
||||
align 4
|
||||
proc convert_int_to_str, len:dword
|
||||
pushad
|
||||
mov esi,[len]
|
||||
add esi,edi
|
||||
dec esi
|
||||
call .str
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
.str:
|
||||
mov ecx,0x0a
|
||||
cmp eax,ecx
|
||||
jb @f
|
||||
xor edx,edx
|
||||
div ecx
|
||||
push edx
|
||||
call .str
|
||||
pop eax
|
||||
@@:
|
||||
cmp edi,esi
|
||||
jge @f
|
||||
or al,0x30
|
||||
stosb
|
||||
mov byte[edi],0
|
||||
@@:
|
||||
ret
|
||||
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
include '../../../proc32.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../../KOSfuncs.inc'
|
||||
|
||||
FASTEST equ 0
|
||||
GEN_TREES_H equ 0
|
||||
DEBUG equ 0
|
||||
DYNAMIC_CRC_TABLE equ 1
|
||||
Z_SOLO equ 0
|
||||
|
||||
; define NO_GZIP when compiling if you want to disable gzip header and
|
||||
; trailer creation by deflate(). NO_GZIP would be used to avoid linking in
|
||||
; the crc code when it is not needed. For shared libraries, gzip encoding
|
||||
; should be left enabled.
|
||||
GZIP equ 1
|
||||
|
||||
macro zlib_debug fmt,p1
|
||||
{
|
||||
if DEBUG eq 1
|
||||
zlib_assert fmt,p1
|
||||
end if
|
||||
}
|
||||
|
||||
macro zlib_assert fmt,p1
|
||||
{
|
||||
local .end_t
|
||||
local .m_fmt
|
||||
pushf
|
||||
jmp .end_t
|
||||
.m_fmt db fmt,13,10,0
|
||||
align 4
|
||||
.end_t:
|
||||
if p1 eq
|
||||
stdcall dbg_print,0,.m_fmt
|
||||
else
|
||||
stdcall str_format_dbg, buf_param,.m_fmt,p1
|
||||
end if
|
||||
popf
|
||||
}
|
||||
|
||||
include 'zlib.inc'
|
||||
include 'deflate.inc'
|
||||
include 'zutil.asm'
|
||||
;include '../kfar_arc/crc.inc'
|
||||
include 'crc32.asm'
|
||||
include 'adler32.asm'
|
||||
include 'trees.asm'
|
||||
include 'deflate.asm'
|
||||
|
||||
align 4
|
||||
buf_param rb 80
|
||||
|
||||
align 4
|
||||
proc dbg_print, fun:dword, mes:dword
|
||||
pushad
|
||||
mov eax,SF_BOARD
|
||||
mov ebx,SSF_DEBUG_WRITE
|
||||
|
||||
mov esi,[fun]
|
||||
cmp esi,0
|
||||
je .end0
|
||||
@@:
|
||||
mov cl,byte[esi]
|
||||
int 0x40
|
||||
inc esi
|
||||
cmp byte[esi],0
|
||||
jne @b
|
||||
mov cl,':'
|
||||
int 0x40
|
||||
mov cl,' '
|
||||
int 0x40
|
||||
.end0:
|
||||
mov esi,[mes]
|
||||
cmp esi,0
|
||||
je .end_f
|
||||
@@:
|
||||
mov cl,byte[esi]
|
||||
cmp cl,0
|
||||
je .end_f
|
||||
int 0x40
|
||||
inc esi
|
||||
jmp @b
|
||||
.end_f:
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
proc str_format_dbg, buf:dword, fmt:dword, p1:dword
|
||||
pushad
|
||||
mov esi,[fmt]
|
||||
mov edi,[buf]
|
||||
mov ecx,80-1
|
||||
.cycle0:
|
||||
lodsb
|
||||
cmp al,'%'
|
||||
jne .no_param
|
||||
lodsb
|
||||
dec ecx
|
||||
cmp al,0
|
||||
je .cycle0end
|
||||
cmp al,'d'
|
||||
je @f
|
||||
cmp al,'u'
|
||||
je @f
|
||||
cmp al,'l'
|
||||
je .end1
|
||||
jmp .end0
|
||||
.end1: ;%lu %lx
|
||||
lodsb
|
||||
dec ecx
|
||||
cmp al,'u'
|
||||
jne .end0
|
||||
@@:
|
||||
mov eax,[p1]
|
||||
stdcall convert_int_to_str,ecx
|
||||
xor al,al
|
||||
repne scasb
|
||||
dec edi
|
||||
.end0:
|
||||
loop .cycle0
|
||||
.no_param:
|
||||
stosb
|
||||
cmp al,0
|
||||
je .cycle0end
|
||||
loop .cycle0
|
||||
.cycle0end:
|
||||
xor al,al
|
||||
stosb
|
||||
stdcall dbg_print,0,[buf]
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
;input:
|
||||
; eax - число
|
||||
; edi - буфер для строки
|
||||
; len - длинна буфера
|
||||
;output:
|
||||
align 4
|
||||
proc convert_int_to_str, len:dword
|
||||
pushad
|
||||
mov esi,[len]
|
||||
add esi,edi
|
||||
dec esi
|
||||
call .str
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
.str:
|
||||
mov ecx,0x0a
|
||||
cmp eax,ecx
|
||||
jb @f
|
||||
xor edx,edx
|
||||
div ecx
|
||||
push edx
|
||||
call .str
|
||||
pop eax
|
||||
@@:
|
||||
cmp edi,esi
|
||||
jge @f
|
||||
or al,0x30
|
||||
stosb
|
||||
mov byte[edi],0
|
||||
@@:
|
||||
ret
|
@@ -1,5 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |