Compare commits
63
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14c79d9fbc | ||
|
|
87adc0a1df | ||
|
|
0cd3b0c5b1 | ||
|
|
33acd57c58 | ||
|
|
d6a1b56b7f | ||
|
|
7bcb400040 | ||
|
|
398dcbb13d | ||
|
|
9ca506ed15 | ||
|
|
31880f3ebe | ||
|
|
27a26b669f | ||
|
|
3c1e533f95 | ||
|
|
f7a3e34289 | ||
|
|
a591b2b25a | ||
|
|
c948b48eb2 | ||
|
|
0b4562bac4 | ||
|
|
de6724017d | ||
|
|
f305d3425d | ||
|
|
b5981a39dc | ||
|
|
e9e9ebb4c8 | ||
|
|
4c359e42ce | ||
|
|
3238f9f485 | ||
|
|
289eabf8a4 | ||
|
|
e818e2167f | ||
|
|
42c205be32 | ||
|
|
0253ec8753 | ||
|
|
91dc4d8cad | ||
|
|
6f2a947deb | ||
|
|
735b86c476 | ||
|
|
cc1034d849 | ||
|
|
06c1497624 | ||
|
|
b52da3e1c3 | ||
|
|
f9425f5bd0 | ||
|
|
864210679c | ||
|
|
7f8e028ffd | ||
|
|
e9b6cf3fc9 | ||
|
|
4658a928d4 | ||
|
|
b6a5171cd9 | ||
|
|
668fd4deeb | ||
|
|
dd9a7b92d8 | ||
|
|
1173ca7b26 | ||
|
|
ccd0c183ec | ||
|
|
f065cc6e69 | ||
|
|
f1b99bad84 | ||
|
|
c580d4ac5b | ||
|
|
17c33521c3 | ||
|
|
f6395c9501 | ||
|
|
000288ce8b | ||
|
|
10d9e9f36f | ||
|
|
f4c4a7e29a | ||
|
|
bc5b2f884a | ||
|
|
d0de275ab3 | ||
|
|
a83f6f7e4b | ||
|
|
d54c802297 | ||
|
|
29c42738b8 | ||
|
|
c17d1a57a3 | ||
|
|
7b0867a6cf | ||
|
|
c65da0d96f | ||
|
|
a0c01e204e | ||
|
|
d50642ce1f | ||
|
|
8d235ce49b | ||
|
|
e423bfb2d1 | ||
|
|
1483ec8462 | ||
|
|
e8121c66f8 |
No files matched your search
@@ -29,6 +29,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get describe
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "programs/develop/oberon07"]
|
||||
path = programs/develop/oberon07
|
||||
url = https://github.com/AntKrotov/oberon-07-compiler.git
|
||||
@@ -1,3 +1,6 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
format coff
|
||||
use32 ; Tell compiler to use 32 bit instructions
|
||||
|
||||
@@ -8,7 +11,7 @@ include '../../../programs/macros.inc'
|
||||
purge section,mov,add,sub
|
||||
|
||||
include '../../../programs/develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../../programs/system/run/trunk/txtbut.inc'
|
||||
include '../../../programs/system/run/txtbut.inc'
|
||||
include '../../../programs/dll.inc'
|
||||
|
||||
public init_boxlib as '_kolibri_boxlib_init'
|
||||
@@ -159,8 +162,8 @@ public path_show_draw as '_path_show_draw'
|
||||
|
||||
public fb_draw_panel as '_filebrowse_draw'
|
||||
public fb_mouse as '_filebrowse_mouse'
|
||||
public fb_key as '_filebrowse_key'
|
||||
|
||||
public fb_key as '_filebrowse_key'
|
||||
|
||||
public ted_but_sumb_upper as '_ted_but_sumb_upper'
|
||||
public ted_but_sumb_lover as '_ted_but_sumb_lover'
|
||||
public ted_but_convert_by_table as '_ted_but_convert_by_table'
|
||||
|
||||
@@ -31,8 +31,8 @@ import lib_libini, \
|
||||
LIBINI_enum_keys , 'ini_enum_keys' , \
|
||||
LIBINI_get_str , 'ini_get_str' , \
|
||||
LIBINI_get_int , 'ini_get_int' , \
|
||||
LIBINI_get_color , 'int_get_color' , \
|
||||
LIBINI_get_shortcut , 'int_get_shortcut' , \
|
||||
LIBINI_get_color , 'ini_get_color' , \
|
||||
LIBINI_get_shortcut , 'ini_get_shortcut' , \
|
||||
LIBINI_set_str , 'ini_set_str' , \
|
||||
LIBINI_set_int , 'ini_set_int' , \
|
||||
LIBINI_set_color , 'ini_set_color'
|
||||
|
||||
@@ -864,7 +864,7 @@ void ff_set_mpeg4_time(MpegEncContext * s){
|
||||
}
|
||||
|
||||
static void mpeg4_encode_gop_header(MpegEncContext * s){
|
||||
int hours, minutes, seconds;
|
||||
int64_t hours, minutes, seconds;
|
||||
int64_t time;
|
||||
|
||||
put_bits(&s->pb, 16, 0);
|
||||
|
||||
@@ -2035,8 +2035,13 @@ static int vp3_decode_frame(AVCodecContext *avctx,
|
||||
if (ff_thread_get_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF) < 0)
|
||||
goto error;
|
||||
|
||||
if (!s->edge_emu_buffer)
|
||||
if (!s->edge_emu_buffer) {
|
||||
s->edge_emu_buffer = av_malloc(9*FFABS(s->current_frame.f->linesize[0]));
|
||||
if (!s->edge_emu_buffer) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if (s->keyframe) {
|
||||
if (!s->theora)
|
||||
|
||||
@@ -2580,8 +2580,10 @@ static int http_receive_data(HTTPContext *c)
|
||||
} else if (c->buffer_ptr - c->buffer >= 2 &&
|
||||
!memcmp(c->buffer_ptr - 1, "\r\n", 2)) {
|
||||
c->chunk_size = strtol(c->buffer, 0, 16);
|
||||
if (c->chunk_size == 0) // end of stream
|
||||
if (c->chunk_size <= 0) { // end of stream or invalid chunk size
|
||||
c->chunk_size = 0;
|
||||
goto fail;
|
||||
}
|
||||
c->buffer_ptr = c->buffer;
|
||||
break;
|
||||
} else if (++loop_run > 10)
|
||||
@@ -2603,6 +2605,7 @@ static int http_receive_data(HTTPContext *c)
|
||||
/* end of connection : close it */
|
||||
goto fail;
|
||||
else {
|
||||
av_assert0(len <= c->chunk_size);
|
||||
c->chunk_size -= len;
|
||||
c->buffer_ptr += len;
|
||||
c->data_count += len;
|
||||
|
||||
@@ -267,8 +267,12 @@ static int cine_read_header(AVFormatContext *avctx)
|
||||
|
||||
/* parse image offsets */
|
||||
avio_seek(pb, offImageOffsets, SEEK_SET);
|
||||
for (i = 0; i < st->duration; i++)
|
||||
for (i = 0; i < st->duration; i++) {
|
||||
if (avio_feof(pb))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
av_add_index_entry(st, avio_rl64(pb), i, 0, 0, AVINDEX_KEYFRAME);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ diamond'ом. Она используется в проектах xonix и fara
|
||||
Kolibri-программу. Утилита всего лишь изменяет формат exe-шника, так что,
|
||||
чтобы действительно получилась работающая программа, нужно выполнение
|
||||
определённых условий. Понятно, что требуется, чтобы программа общалась
|
||||
с внешним миром средствами Колибри (т.е. int 0x40) и не использовала
|
||||
с внешним миром средствами КолибриОС (т.е. int 0x40) и не использовала
|
||||
никаких Windows-библиотек. Помимо этого, требуется также, чтобы программа
|
||||
размещалась по нулевому адресу (ключ линкера "/base:0"). Как писать такие
|
||||
программы - смотрите в уже упомянутых проектах xonix и fara.
|
||||
|
||||
+87
-75
@@ -25,11 +25,10 @@ img_files = {
|
||||
{"MACROS.INC", SRC_PROGS .. "/macros.inc"},
|
||||
-- {"CONFIG.INC", SRC_PROGS .. "/config.inc"},
|
||||
{"STRUCT.INC", SRC_PROGS .. "/struct.inc"},
|
||||
{"FB2READ", "common/fb2read"},
|
||||
{"ALLGAMES", "common/allgames"},
|
||||
{"HOME.PNG", "common/wallpapers/T_Home.png"},
|
||||
{"ICONS32.PNG", "common/icons32.png"},
|
||||
{"ICONS16.PNG", "common/icons16.png"},
|
||||
{"ICONS18.PNG", "common/icons18.png"},
|
||||
{"INDEX.HTM", "common/index_htm"},
|
||||
{"KUZKINA.MID", "common/kuzkina.mid"},
|
||||
{"SINE.MP3", "common/sine.mp3"},
|
||||
@@ -38,7 +37,6 @@ img_files = {
|
||||
{"UNIMG", SRC_PROGS .. "/fs/unimg/unimg"},
|
||||
{"3D/HOUSE.3DS", "common/3d/house.3ds"},
|
||||
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
|
||||
{"GAMES/FLPYBIRD", SRC_PROGS .. "/games/floppybird/Release/floppybird"},
|
||||
{"FONTS/TAHOMA.KF", "common/fonts/tahoma.kf"},
|
||||
-- {"LIB/ICONV.OBJ", "common/lib/iconv.obj"},
|
||||
{"LIB/KMENU.OBJ", "common/lib/kmenu.obj"},
|
||||
@@ -61,7 +59,7 @@ img_files = {
|
||||
{"SETTINGS/FB2READ.INI", "common/settings/fb2read.ini"},
|
||||
{"SETTINGS/HA.CFG", SRC_PROGS .. "/other/ha/SETTINGS/HA.CFG"},
|
||||
{"SETTINGS/ICON.INI", build_type .. "/settings/icon.ini"},
|
||||
{"SETTINGS/KEYMAP.KEY", SRC_PROGS .. "/system/taskbar/trunk/KEYMAP.KEY"},
|
||||
{"SETTINGS/KEYMAP.KEY", SRC_PROGS .. "/system/taskbar/KEYMAP.KEY"},
|
||||
{"SETTINGS/KOLIBRI.LBL", build_type .. "/settings/kolibri.lbl"},
|
||||
{"SETTINGS/LANG.INI", build_type .. "/settings/lang.ini"},
|
||||
{"SETTINGS/MENU.DAT", build_type .. "/settings/menu.dat"},
|
||||
@@ -69,55 +67,56 @@ img_files = {
|
||||
{"SETTINGS/SYSTEM.INI", "common/settings/system.ini"},
|
||||
{"SETTINGS/TASKBAR.INI", "common/settings/taskbar.ini"},
|
||||
{"SETTINGS/SYSTEM.ENV", "common/settings/system.env"},
|
||||
{"SETTINGS/USBDRV.DAT",VAR_DRVS .. "/usb/usbother/usbdrv.dat"},
|
||||
}
|
||||
|
||||
-- For russian build, add russian-only files.
|
||||
if build_type == "ru_RU" then tup.append_table(img_files, {
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/rus/example.asm"},
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/rus/example.asm"},
|
||||
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy_ru"},
|
||||
{"GAMES/BASEKURS.KLA", build_type .. "/games/basekurs.kla"},
|
||||
{"File Managers/KFAR.INI", build_type .. "/File Managers/kfar.ini"},
|
||||
{"GAMES/DESCENT", build_type .. "/games/descent"},
|
||||
{"SETTINGS/.shell", SRC_PROGS .. "/system/shell/bin/rus/.shell"},
|
||||
{"SETTINGS/GAMES.INI", "ru_RU/settings/games.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/trunk/mykey.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/mykey.ini"},
|
||||
{"SETTINGS/SYSPANEL.INI", "ru_RU/settings/syspanel.ini"},
|
||||
}) elseif build_type == "en_US" then tup.append_table(img_files, {
|
||||
{"WELCOME.HTM", VAR_DATA .. "/" .. build_type .. "/welcome.htm.kpack"},
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
|
||||
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
|
||||
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
|
||||
{"GAMES/DESCENT", "common/games/descent"},
|
||||
{"SETTINGS/.shell", SRC_PROGS .. "/system/shell/bin/eng/.shell"},
|
||||
{"SETTINGS/GAMES.INI", "common/settings/games.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/trunk/mykey.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/mykey.ini"},
|
||||
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
|
||||
}) elseif build_type == "es_ES" then tup.append_table(img_files, {
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
|
||||
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
|
||||
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
|
||||
{"GAMES/DESCENT", "common/games/descent"},
|
||||
{"SETTINGS/.shell", SRC_PROGS .. "/system/shell/bin/eng/.shell"},
|
||||
{"SETTINGS/GAMES.INI", "common/settings/games.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/trunk/mykey.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/mykey.ini"},
|
||||
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
|
||||
}) elseif build_type == "it_IT" then tup.append_table(img_files, {
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
|
||||
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
|
||||
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
|
||||
{"GAMES/DESCENT", "common/games/descent"},
|
||||
{"SETTINGS/.shell", SRC_PROGS .. "/system/shell/bin/eng/.shell"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/trunk/mykey_it.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/mykey_it.ini"},
|
||||
{"SETTINGS/GAMES.INI", "common/settings/games.ini"},
|
||||
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
|
||||
}) else tup.append_table(img_files, {
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/trunk/example.asm"},
|
||||
{"EXAMPLE.ASM", SRC_PROGS .. "/develop/examples/example/example.asm"},
|
||||
{"DEVELOP/BACKY", SRC_PROGS .. "/develop/backy/Backy"},
|
||||
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
|
||||
{"GAMES/DESCENT", "common/games/descent"},
|
||||
{"SETTINGS/.shell", SRC_PROGS .. "/system/shell/bin/eng/.shell"},
|
||||
{"SETTINGS/GAMES.INI", "common/settings/games.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/trunk/mykey.ini"},
|
||||
{"SETTINGS/MYKEY.INI", SRC_PROGS .. "/system/MyKey/mykey.ini"},
|
||||
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
|
||||
}) end
|
||||
|
||||
@@ -152,17 +151,14 @@ extra_files = {
|
||||
{"HD_Load/USB_boot_old/", SRC_PROGS .. "/hd_load/usb_boot_old/usb_boot_866.txt"},
|
||||
{"HD_Load/USB_boot_old/", SRC_PROGS .. "/hd_load/usb_boot_old/usb_boot_1251.txt"},
|
||||
{"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/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/*"},
|
||||
{"kolibrios/3D/md2view/md2_model/", "common/3d/md2view/md2_model/*"},
|
||||
{"kolibrios/3D/voxel_editor/VOX_EDITOR.INI", SRC_PROGS .. "/media/voxel_editor/trunk/vox_editor.ini"},
|
||||
{"kolibrios/3D/voxel_editor/HOUSE1.VOX", SRC_PROGS .. "/media/voxel_editor/trunk/house1.vox"},
|
||||
{"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_editor/VOX_EDITOR.INI", SRC_PROGS .. "/media/voxel_editor/vox_editor.ini"},
|
||||
{"kolibrios/3D/voxel_editor/HOUSE1.VOX", SRC_PROGS .. "/media/voxel_editor/house1.vox"},
|
||||
{"kolibrios/3D/voxel_editor/HOUSE2.VOX", SRC_PROGS .. "/media/voxel_editor/house2.vox"},
|
||||
{"kolibrios/3D/voxel_editor/SQUIRREL.VOX", SRC_PROGS .. "/media/voxel_editor/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/TOOLB_1.PNG", SRC_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/toolb_1.png"},
|
||||
@@ -179,10 +175,15 @@ extra_files = {
|
||||
{"kolibrios/develop/c--/manual_c--.htm", SRC_PROGS .. "/cmm/c--/manual_c--.htm"},
|
||||
{"kolibrios/develop/fpc/", "common/develop/fpc/*"},
|
||||
{"kolibrios/develop/fpc/examples/", "../programs/develop/fp/examples/src/*"},
|
||||
{"kolibrios/develop/oberon07/", "../programs/develop/oberon07/*"},
|
||||
{"kolibrios/develop/oberon07/doc/", "../programs/develop/oberon07/doc/*"},
|
||||
{"kolibrios/develop/oberon07/lib/KolibriOS/", "../programs/develop/oberon07/lib/KolibriOS/*"},
|
||||
{"kolibrios/develop/oberon07/samples/", SRC_PROGS .. "/develop/oberon07/samples/*"},
|
||||
{"kolibrios/develop/oberon07/compiler.kex", SRC_PROGS .. "/develop/oberon07/Compiler.kex"},
|
||||
{"kolibrios/develop/oberon07/LICENSE", SRC_PROGS .. "/develop/oberon07/LICENSE"},
|
||||
{"kolibrios/develop/oberon07/doc/CC.txt", SRC_PROGS .. "/develop/oberon07/doc/CC.txt"},
|
||||
{"kolibrios/develop/oberon07/doc/KOSLib.txt", SRC_PROGS .. "/develop/oberon07/doc/KOSLib.txt"},
|
||||
{"kolibrios/develop/oberon07/doc/x86.txt", SRC_PROGS .. "/develop/oberon07/doc/x86.txt"},
|
||||
{"kolibrios/develop/oberon07/doc/Oberon07.Report_2016_05_03.pdf", SRC_PROGS .. "/develop/oberon07/doc/Oberon07.Report_2016_05_03.pdf"},
|
||||
{"kolibrios/develop/oberon07/lib/KolibriOS/", SRC_PROGS .. "/develop/oberon07/lib/KolibriOS/*"},
|
||||
{"kolibrios/develop/oberon07/lib/Math/", SRC_PROGS .. "/develop/oberon07/lib/Math/*"},
|
||||
{"kolibrios/develop/oberon07/samples/", SRC_PROGS .. "/develop/oberon07/samples/KolibriOS/*"},
|
||||
{"kolibrios/develop/tcc/lib/", SRC_PROGS .. "/develop/ktcc/trunk/bin/lib/*"},
|
||||
{"kolibrios/develop/tcc/include/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/include/*"},
|
||||
{"kolibrios/develop/tcc/include/clayer/", SRC_PROGS .. "/develop/ktcc/trunk/libc.obj/include/clayer/*"},
|
||||
@@ -204,6 +205,7 @@ extra_files = {
|
||||
{"kolibrios/emul/chip8/roms/", SRC_PROGS .. "/emulator/chip8/roms/*"},
|
||||
{"kolibrios/emul/kwine/kwine", SRC_PROGS .. "/emulator/kwine/bin/kwine"},
|
||||
{"kolibrios/emul/kwine/lib/", SRC_PROGS .. "/emulator/kwine/bin/lib/*"},
|
||||
{"kolibrios/emul/uxn", SRC_PROGS .. "/emulator/uxn/uxn"},
|
||||
{"kolibrios/emul/uarm/", "common/emul/uarm/*"},
|
||||
{"kolibrios/emul/zsnes/", "common/emul/zsnes/*"},
|
||||
{"kolibrios/games/BabyPainter", "common/games/BabyPainter"},
|
||||
@@ -316,14 +318,14 @@ if build_type == "ru_RU" then tup.append_table(extra_files, {
|
||||
{"Docs/cp866/Hot_Keys.txt", build_type .. "/docs/Hot_Keys.txt"},
|
||||
{"Docs/cp866/Install.txt", build_type .. "/docs/Install.txt"},
|
||||
{"Docs/cp866/Credits.txt", build_type .. "/docs/Credits.txt"},
|
||||
{"Docs/cp866/SysFuncr.txt", VAR_PROGS .. "/system/docpack/trunk/SysFuncr.txt"},
|
||||
{"Docs/cp866/SysFuncr.txt", VAR_PROGS .. "/system/docpack/SysFuncr.txt"},
|
||||
{"Docs/cp1251/Config.txt", VAR_DATA .. "/" .. build_type .. "/docs/CONFIG.WIN.TXT", cp1251_from = build_type .. "/docs/Config.txt"},
|
||||
{"Docs/cp1251/Copying.txt", "$(VAR_DATA)/$(build_type)/docs/COPYING.WIN.TXT", cp1251_from = build_type .. "/docs/Copying.txt"},
|
||||
{"Docs/cp1251/History.txt", "$(VAR_DATA)/$(build_type)/docs/HISTORY.WIN.TXT", cp1251_from = build_type .. "/docs/History.txt"},
|
||||
{"Docs/cp1251/Hot_Keys.txt", "$(VAR_DATA)/$(build_type)/docs/HOT_KEYS.WIN.TXT", cp1251_from = build_type .. "/docs/Hot_Keys.txt"},
|
||||
{"Docs/cp1251/Install.txt", "$(VAR_DATA)/$(build_type)/docs/INSTALL.WIN.TXT", cp1251_from = build_type .. "/docs/Install.txt"},
|
||||
{"Docs/cp1251/credits.txt", "$(VAR_DATA)/$(build_type)/docs/CREDITS.WIN.TXT", cp1251_from = build_type .. "/docs/Credits.txt"},
|
||||
{"Docs/cp1251/SysFuncr.txt", "$(VAR_DATA)/$(build_type)/docs/SYSFUNCR.WIN.TXT", cp1251_from = SRC_PROGS .. "/system/docpack/trunk/SysFuncr.txt"},
|
||||
{"Docs/cp1251/SysFuncr.txt", "$(VAR_DATA)/$(build_type)/docs/SYSFUNCR.WIN.TXT", cp1251_from = SRC_PROGS .. "/system/docpack/SysFuncr.txt"},
|
||||
{"HD_Load/9x2klbr/", SRC_PROGS .. "/hd_load/9x2klbr/readme_dos.txt"},
|
||||
{"HD_Load/9x2klbr/", SRC_PROGS .. "/hd_load/9x2klbr/readme_win.txt"},
|
||||
{"HD_Load/mtldr/", SRC_PROGS .. "/hd_load/mtldr/install.txt"},
|
||||
@@ -346,7 +348,7 @@ if build_type == "ru_RU" then tup.append_table(extra_files, {
|
||||
{"Docs/Hot_Keys.txt", build_type .. "/docs/Hot_Keys.txt"},
|
||||
{"Docs/Install.txt", build_type .. "/docs/Install.txt"},
|
||||
{"Docs/Credits.txt", build_type .. "/docs/Credits.txt"},
|
||||
{"Docs/SysFuncs.txt", VAR_PROGS .. "/system/docpack/trunk/SysFuncs.txt"},
|
||||
{"Docs/SysFuncs.txt", VAR_PROGS .. "/system/docpack/SysFuncs.txt"},
|
||||
{"HD_Load/9x2klbr/", SRC_PROGS .. "/hd_load/9x2klbr/readme.txt"},
|
||||
{"HD_Load/mtldr/install.txt", SRC_PROGS .. "/hd_load/mtldr/install_eng.txt"},
|
||||
{"HD_Load/USB_Boot/readme.txt", SRC_PROGS .. "/hd_load/usb_boot/readme_eng.txt"},
|
||||
@@ -397,79 +399,79 @@ tup.append_table(iso_extra_files, {
|
||||
if tup.getconfig('NO_FASM') ~= 'full' then
|
||||
tup.append_table(img_files, {
|
||||
{"KERNEL.MNT", VAR_PROGS .. "/../kernel/trunk/kernel.mnt"},
|
||||
{"@DOCKY", VAR_PROGS .. "/system/docky/trunk/docky"},
|
||||
{"@DOCKY", VAR_PROGS .. "/system/docky/docky"},
|
||||
{"@HA", VAR_PROGS .. "/other/ha/HA"},
|
||||
{"@ICON", VAR_PROGS .. "/system/icon_new/icon"},
|
||||
{"@MENU", VAR_PROGS .. "/system/menu/trunk/menu"},
|
||||
{"@MENU", VAR_PROGS .. "/system/menu/menu"},
|
||||
{"@NOTIFY", VAR_PROGS .. "/system/notify3/notify"},
|
||||
{"@OPEN", VAR_PROGS .. "/system/open/open"},
|
||||
{"@TASKBAR", VAR_PROGS .. "/system/taskbar/trunk/TASKBAR"},
|
||||
{"@SS", VAR_PROGS .. "/system/scrsaver/scrsaver"},
|
||||
{"@RESHARE", VAR_PROGS .. "/system/reshare/reshare"},
|
||||
{"@SS", VAR_PROGS .. "/system/scrsaver/scrsaver"},
|
||||
{"@TASKBAR", VAR_PROGS .. "/system/taskbar/TASKBAR"},
|
||||
{"@VOLUME", VAR_PROGS .. "/media/volume/volume"},
|
||||
{"HACONFIG", VAR_PROGS .. "/other/ha/HACONFIG"},
|
||||
{"ACLOCK", VAR_PROGS .. "/demos/aclock/aclock"},
|
||||
{"APM", VAR_PROGS .. "/system/apm/apm"},
|
||||
{"CALC", VAR_PROGS .. "/other/calc/calc"},
|
||||
{"CALCPLUS", VAR_PROGS .. "/other/calcplus/calcplus"},
|
||||
{"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"},
|
||||
{"CALENDAR", VAR_PROGS .. "/system/calendar/calendar"},
|
||||
{"COLRDIAL", VAR_PROGS .. "/system/colrdial/color_dialog"},
|
||||
{"CROPFLAT", VAR_PROGS .. "/system/cropflat/cropflat"},
|
||||
{"CPU", VAR_PROGS .. "/system/cpu/trunk/cpu"},
|
||||
{"CPU", VAR_PROGS .. "/system/cpu/cpu"},
|
||||
{"CPUID", VAR_PROGS .. "/testing/cpuid/trunk/CPUID"},
|
||||
{"DOCPACK", VAR_PROGS .. "/system/docpack/trunk/docpack"},
|
||||
{"DOCPACK", VAR_PROGS .. "/system/docpack/docpack"},
|
||||
{"DEFAULT.SKN", VAR_SKINS .. "/../skins/Leency/Shkvorka/Shkvorka.skn"},
|
||||
{"DISPTEST", VAR_PROGS .. "/testing/disptest/trunk/disptest"},
|
||||
{"END", VAR_PROGS .. "/system/end/light/end"},
|
||||
{"ESKIN", VAR_PROGS .. "/system/eskin/trunk/eskin"},
|
||||
{"ESKIN", VAR_PROGS .. "/system/eskin/eskin"},
|
||||
{"FSPEED", VAR_PROGS .. "/testing/fspeed/fspeed"},
|
||||
{"GMON", VAR_PROGS .. "/system/gmon/gmon"},
|
||||
{"HDD_INFO", VAR_PROGS .. "/system/hdd_info/trunk/hdd_info"},
|
||||
{"HDD_INFO", VAR_PROGS .. "/system/hdd_info/hdd_info"},
|
||||
{"KBD", VAR_PROGS .. "/testing/kbd/trunk/kbd"},
|
||||
{"KPACK", VAR_PROGS .. "/other/kpack/trunk/kpack"},
|
||||
{"LAUNCHER", VAR_PROGS .. "/system/launcher/trunk/launcher"},
|
||||
{"LAUNCHER", VAR_PROGS .. "/system/launcher/launcher"},
|
||||
{"LOADDRV", VAR_PROGS .. "/system/loaddrv/loaddrv"},
|
||||
{"MAGNIFY", VAR_PROGS .. "/system/magnify/magnify"},
|
||||
{"MGB", VAR_PROGS .. "/testing/mgb/trunk/mgb"},
|
||||
{"MOUSEMUL", VAR_PROGS .. "/system/mousemul/trunk/mousemul"},
|
||||
{"MOUSEMUL", VAR_PROGS .. "/system/mousemul/mousemul"},
|
||||
{"MADMOUSE", VAR_PROGS .. "/other/madmouse/madmouse"},
|
||||
{"MYKEY", VAR_PROGS .. "/system/MyKey/trunk/MyKey"},
|
||||
{"MYKEY", VAR_PROGS .. "/system/MyKey/MyKey"},
|
||||
{"PCIDEV", VAR_PROGS .. "/testing/pcidev/trunk/PCIDEV"},
|
||||
{"RDSAVE", VAR_PROGS .. "/system/rdsave/trunk/rdsave"},
|
||||
{"RDSAVE", VAR_PROGS .. "/system/rdsave/rdsave"},
|
||||
{"RTFREAD", VAR_PROGS .. "/other/rtfread/rtfread"},
|
||||
{"SEARCHAP", VAR_PROGS .. "/system/searchap/searchap"},
|
||||
{"SCRSHOOT", VAR_PROGS .. "/media/scrshoot/scrshoot"},
|
||||
{"SETUP", VAR_PROGS .. "/system/setup/trunk/setup"},
|
||||
{"SKINCFG", VAR_PROGS .. "/system/skincfg/trunk/skincfg"},
|
||||
{"SETUP", VAR_PROGS .. "/system/setup/setup"},
|
||||
{"SKINCFG", VAR_PROGS .. "/system/skincfg/skincfg"},
|
||||
{"TERMINAL", VAR_PROGS .. "/system/terminal/terminal"},
|
||||
{"TEST", VAR_PROGS .. "/testing/protection/trunk/test"},
|
||||
{"TINYPAD", VAR_PROGS .. "/develop/tinypad/trunk/tinypad"},
|
||||
{"TINFO", VAR_PROGS .. "/system/tinfo/tinfo"},
|
||||
{"TIMER", VAR_PROGS .. "/other/Timer/Timer"},
|
||||
{"UNZ", VAR_PROGS .. "/fs/unz/unz"},
|
||||
{"ZKEY", VAR_PROGS .. "/system/zkey/trunk/ZKEY"},
|
||||
{"3D/3DWAV", VAR_PROGS .. "/demos/3dwav/trunk/3dwav"},
|
||||
{"3D/CROWNSCR", VAR_PROGS .. "/demos/crownscr/trunk/crownscr"},
|
||||
{"3D/3DCUBE2", VAR_PROGS .. "/demos/3dcube2/trunk/3DCUBE2"},
|
||||
{"3D/FREE3D04", VAR_PROGS .. "/demos/free3d04/trunk/free3d04"},
|
||||
{"ZKEY", VAR_PROGS .. "/system/zkey/ZKEY"},
|
||||
{"3D/3DWAV", VAR_PROGS .. "/demos/3dwav/3dwav"},
|
||||
{"3D/CROWNSCR", VAR_PROGS .. "/demos/crownscr/crownscr"},
|
||||
{"3D/3DCUBE2", VAR_PROGS .. "/demos/3dcube2/3DCUBE2"},
|
||||
{"3D/FREE3D04", VAR_PROGS .. "/demos/free3d04/free3d04"},
|
||||
{"3D/GEARS", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/gears"},
|
||||
{"3D/RAY", VAR_PROGS .. "/demos/ray/ray"},
|
||||
{"3D/VIEW3DS", VAR_PROGS .. "/demos/view3ds/view3ds"},
|
||||
{"DEMOS/BCDCLK", VAR_PROGS .. "/demos/bcdclk/trunk/bcdclk"},
|
||||
{"DEMOS/BUDHBROT", VAR_PROGS .. "/demos/buddhabrot/trunk/buddhabrot"},
|
||||
{"DEMOS/EYES", VAR_PROGS .. "/demos/eyes/trunk/eyes"},
|
||||
{"DEMOS/BCDCLK", VAR_PROGS .. "/demos/bcdclk/bcdclk"},
|
||||
{"DEMOS/BUDHBROT", VAR_PROGS .. "/demos/buddhabrot/buddhabrot"},
|
||||
{"DEMOS/EYES", VAR_PROGS .. "/demos/eyes/eyes"},
|
||||
{"DEMOS/FIREWORK", VAR_PROGS .. "/demos/firework/firework"},
|
||||
{"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/movback"},
|
||||
{"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/plasma"},
|
||||
{"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"},
|
||||
{"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/trunk/tinyfrac"},
|
||||
{"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"},
|
||||
{"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/tinyfrac"},
|
||||
{"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trantest"},
|
||||
{"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"},
|
||||
{"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/unvwater"},
|
||||
{"DEMOS/WEB", VAR_PROGS .. "/demos/web/trunk/web"},
|
||||
{"DEMOS/ZEROLINE", VAR_PROGS .. "/demos/zeroline/trunk/zeroline"},
|
||||
{"DEVELOP/BOARD", VAR_PROGS .. "/system/board/trunk/board"},
|
||||
{"DEMOS/WEB", VAR_PROGS .. "/demos/web/web"},
|
||||
{"DEMOS/ZEROLINE", VAR_PROGS .. "/demos/zeroline/zeroline"},
|
||||
{"DEVELOP/BOARD", VAR_PROGS .. "/system/board/board"},
|
||||
{"DEVELOP/DBGBOARD", VAR_PROGS .. "/system/dbgboard/dbgboard"},
|
||||
{"DEVELOP/CEDIT", SRC_PROGS .. "/develop/cedit/CEDIT"},
|
||||
{"DEVELOP/CHARSETS", VAR_PROGS .. "/develop/charsets/charsets"},
|
||||
{"DEVELOP/COBJ", VAR_PROGS .. "/develop/cObj/trunk/cObj"},
|
||||
{"DEVELOP/ENTROPYV", VAR_PROGS .. "/develop/entropyview/entropyview"},
|
||||
@@ -481,11 +483,11 @@ tup.append_table(img_files, {
|
||||
{"DEVELOP/MTDBG", VAR_PROGS .. "/develop/mtdbg/mtdbg"},
|
||||
{"DEVELOP/MSTATE", VAR_PROGS .. "/develop/mstate/mstate"},
|
||||
{"DEVELOP/SCANCODE", VAR_PROGS .. "/develop/scancode/trunk/scancode"},
|
||||
{"DEVELOP/EXAMPLES/CIRCLE", VAR_PROGS .. "/develop/examples/circle/trunk/circle"},
|
||||
{"DEVELOP/EXAMPLES/COLORREF", VAR_PROGS .. "/demos/colorref/trunk/colorref"},
|
||||
{"DEVELOP/EXAMPLES/CIRCLE", VAR_PROGS .. "/develop/examples/circle/circle"},
|
||||
{"DEVELOP/EXAMPLES/COLORREF", VAR_PROGS .. "/demos/colorref/colorref"},
|
||||
{"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"},
|
||||
{"DEVELOP/EXAMPLES/CSLIDE", VAR_PROGS .. "/demos/cslide/cslide"},
|
||||
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/thread"},
|
||||
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
|
||||
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
|
||||
{"LOD", VAR_PROGS .. "/fs/lod/lod"},
|
||||
@@ -527,11 +529,12 @@ tup.append_table(img_files, {
|
||||
{"MEDIA/FILLSCR", VAR_PROGS .. "/media/FillScr/fillscr"},
|
||||
{"MEDIA/KIV", VAR_PROGS .. "/media/kiv/kiv"},
|
||||
{"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/listplay"},
|
||||
{"MEDIA/MIDAMP", VAR_PROGS .. "/media/midamp/trunk/midamp"},
|
||||
{"MEDIA/MIDAMP", VAR_PROGS .. "/media/midamp/midamp"},
|
||||
{"MEDIA/MP3INFO", VAR_PROGS .. "/media/mp3info/mp3info"},
|
||||
{"MEDIA/PALITRA", VAR_PROGS .. "/media/palitra/trunk/palitra"},
|
||||
{"MEDIA/PALITRA", VAR_PROGS .. "/media/palitra/palitra"},
|
||||
{"MEDIA/PIANO", VAR_PROGS .. "/media/piano/piano"},
|
||||
{"MEDIA/STARTMUS", VAR_PROGS .. "/media/startmus/trunk/STARTMUS"},
|
||||
{"MEDIA/PIANO.MAP", VAR_PROGS .. "/media/piano/piano.map"},
|
||||
{"MEDIA/STARTMUS", VAR_PROGS .. "/media/startmus/STARTMUS"},
|
||||
{"NETWORK/PING", VAR_PROGS .. "/network/ping/ping"},
|
||||
{"NETWORK/NETCFG", VAR_PROGS .. "/network/netcfg/netcfg"},
|
||||
{"NETWORK/NETSTAT", VAR_PROGS .. "/network/netstat/netstat"},
|
||||
@@ -567,10 +570,11 @@ tup.append_table(img_files, {
|
||||
{"DRIVERS/OHCI.SYS", VAR_DRVS .. "/usb/ohci.sys"},
|
||||
{"DRIVERS/EHCI.SYS", VAR_DRVS .. "/usb/ehci.sys"},
|
||||
{"DRIVERS/USBHID.SYS", VAR_DRVS .. "/usb/usbhid/usbhid.sys"},
|
||||
{"DRIVERS/USBOTHER.SYS",VAR_DRVS .. "/usb/usbother/usbother.sys"},
|
||||
{"DRIVERS/USBSTOR.SYS", VAR_DRVS .. "/usb/usbstor.sys"},
|
||||
{"DRIVERS/RDC.SYS", VAR_DRVS .. "/video/rdc.sys"},
|
||||
{"DRIVERS/COMMOUSE.SYS", VAR_DRVS .. "/mouse/commouse.sys"},
|
||||
{"DRIVERS/PS2MOUSE.SYS", VAR_DRVS .. "/mouse/ps2mouse4d/trunk/ps2mouse.sys"},
|
||||
{"DRIVERS/PS2MOUSE.SYS", VAR_DRVS .. "/mouse/ps2mouse4d/ps2mouse.sys"},
|
||||
{"DRIVERS/TMPDISK.SYS", VAR_DRVS .. "/disk/tmpdisk.sys"},
|
||||
{"DRIVERS/HDAUDIO.SYS", VAR_DRVS .. "/audio/intel_hda/hdaudio.sys"},
|
||||
{"DRIVERS/SB16.SYS", VAR_DRVS .. "/audio/sb16/sb16.sys"},
|
||||
@@ -594,19 +598,19 @@ tup.append_table(extra_files, {
|
||||
{"HD_Load/USB_Boot/", VAR_PROGS .. "/hd_load/usb_boot/setmbr.exe"},
|
||||
{"HD_Load/USB_boot_old/", VAR_PROGS .. "/hd_load/usb_boot_old/MeOSload.com"},
|
||||
{"HD_Load/USB_boot_old/", VAR_PROGS .. "/hd_load/usb_boot_old/enable.exe"},
|
||||
{"kolibrios/3D/3dsheart", VAR_PROGS .. "/demos/3dsheart/trunk/3dsheart"},
|
||||
{"kolibrios/3D/flatwav", VAR_PROGS .. "/demos/flatwav/trunk/flatwav"},
|
||||
{"kolibrios/3D/3dsheart", VAR_PROGS .. "/demos/3dsheart/3dsheart"},
|
||||
{"kolibrios/3D/flatwav", VAR_PROGS .. "/demos/flatwav/flatwav"},
|
||||
{"kolibrios/3D/mos3de", VAR_PROGS .. "/demos/mos3de/mos3de"},
|
||||
{"kolibrios/3D/info3ds/INFO3DS", VAR_PROGS .. "/develop/info3ds/info3ds"},
|
||||
{"kolibrios/3D/textures1", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/textures1"},
|
||||
{"kolibrios/3D/info3ds/INFO3DS_U", VAR_PROGS .. "/develop/info3ds/info3ds_u"},
|
||||
{"kolibrios/3D/voxel_editor/VOXEL_EDITOR", VAR_PROGS .. "/media/voxel_editor/trunk/voxel_editor"},
|
||||
{"kolibrios/3D/voxel_editor/VOXEL_EDITOR", VAR_PROGS .. "/media/voxel_editor/voxel_editor"},
|
||||
{"kolibrios/3D/voxel_utilites/VOX_CREATOR" , VAR_PROGS .. "/media/voxel_editor/utilites/vox_creator"},
|
||||
{"kolibrios/3D/voxel_utilites/VOX_MOVER" , VAR_PROGS .. "/media/voxel_editor/utilites/vox_mover"},
|
||||
{"kolibrios/3D/voxel_utilites/VOX_TGL" , VAR_PROGS .. "/media/voxel_editor/utilites/vox_tgl"},
|
||||
{"kolibrios/demos/flag", VAR_PROGS .. "/demos/flag/flag"},
|
||||
{"kolibrios/demos/life3", VAR_PROGS .. "/games/life3/life3"},
|
||||
{"kolibrios/demos/qjulia", VAR_PROGS .. "/demos/qjulia/trunk/qjulia"},
|
||||
{"kolibrios/demos/qjulia", VAR_PROGS .. "/demos/qjulia/qjulia"},
|
||||
{"kolibrios/develop/koldbg", VAR_PROGS .. "/develop/koldbg/koldbg"},
|
||||
{"kolibrios/games/Almaz", VAR_PROGS .. "/games/almaz/almaz"},
|
||||
{"kolibrios/games/arcanii", VAR_PROGS .. "/games/arcanii/arcanii"},
|
||||
@@ -662,7 +666,6 @@ end -- tup.getconfig('NO_JWASM') ~= 'full'
|
||||
-- Programs that require C-- to compile.
|
||||
if tup.getconfig('NO_CMM') ~= 'full' then
|
||||
tup.append_table(img_files, {
|
||||
{"@RESHARE", VAR_PROGS .. "/cmm/misc/reshare.com"},
|
||||
{"APP_PLUS", VAR_PROGS .. "/cmm/app_plus/app_plus.com"},
|
||||
{"EASYSHOT", VAR_PROGS .. "/cmm/misc/easyshot.com"},
|
||||
{"MOUSECFG", VAR_PROGS .. "/cmm/mousecfg/mousecfg.com"},
|
||||
@@ -722,15 +725,16 @@ tup.append_table(img_files, {
|
||||
{"NETWORK/WHOIS", VAR_PROGS .. "/network/whois/whois"},
|
||||
{"SHELL", VAR_PROGS .. "/system/shell/shell"},
|
||||
{"GAMES/DINO", VAR_PROGS .. "/games/dino/dino"},
|
||||
{"GAMES/FLPYBIRD", VAR_PROGS .. "/games/flpybird/flpybird"},
|
||||
{"LIB/LIBC.OBJ", VAR_PROGS .. "/develop/ktcc/trunk/libc.obj/source/libc.obj"},
|
||||
})
|
||||
tup.append_table(extra_files, {
|
||||
{"kolibrios/utils/thashview", VAR_PROGS .. "/other/TinyHashView/thashview"},
|
||||
{"kolibrios/demos/kmatrix", VAR_PROGS .. "/demos/kmatrix/trunk/kmatrix"},
|
||||
{"kolibrios/demos/kmatrix", VAR_PROGS .. "/demos/kmatrix/kmatrix"},
|
||||
{"kolibrios/utils/graph", VAR_PROGS .. "/other/graph/branches/tcc_current/graph"},
|
||||
{"kolibrios/develop/TinyBasic/TinyBasic", VAR_PROGS .. "/develop/tinybasic-1.0.4/tinybasic"},
|
||||
{"kolibrios/develop/TinyBasic/bas/", SRC_PROGS .. "/develop/tinybasic-1.0.4/bas/*"},
|
||||
{"kolibrios/develop/TinyBasic/TinyBasic.man", SRC_PROGS .. "/develop/tinybasic-1.0.4/doc/tinybasic.man"},
|
||||
-- {"kolibrios/utils/teatool", VAR_PROGS .. "/other/TEAtool/teatool"},
|
||||
{"kolibrios/utils/passwordgen", VAR_PROGS .. "/other/PasswordGen/passwordgen"},
|
||||
{"kolibrios/utils/kruler", VAR_PROGS .. "/other/kruler/kruler"},
|
||||
{"kolibrios/media/qr_tool", SRC_PROGS .. "/media/qr_tool/qr_tool"},
|
||||
@@ -740,17 +744,23 @@ tup.append_table(extra_files, {
|
||||
})
|
||||
end -- tup.getconfig('NO_TCC') ~= 'full'
|
||||
|
||||
-- Programs that require oberon07 compiler.
|
||||
if tup.getconfig('NO_OB07') ~= 'full' then
|
||||
tup.append_table(img_files, {
|
||||
{"DEVELOP/CEDIT", VAR_PROGS .. "/develop/cedit/cedit"},
|
||||
{"FB2READ", VAR_PROGS .. "/other/fb2reader/fb2read"},
|
||||
})
|
||||
end -- tup.getconfig('NO_OB07') ~= 'full'
|
||||
|
||||
-- Programs that require GCC to compile.
|
||||
if tup.getconfig('NO_GCC') ~= 'full' then
|
||||
tup.append_table(img_files, {
|
||||
{"GAMES/REVERSI", VAR_PROGS .. "/games/reversi/reversi"},
|
||||
{"LIB/BASE64.OBJ", VAR_PROGS .. "/develop/libraries/base64/base64.obj"},
|
||||
{"LIB/LIBC.OBJ", VAR_PROGS .. "/develop/ktcc/trunk/libc.obj/source/libc.obj"},
|
||||
{"LIB/ICONV.OBJ", VAR_PROGS .. "/develop/libraries/iconv/iconv.obj"},
|
||||
-- {"LIB/MTAR.OBJ", VAR_PROGS .. "/develop/libraries/microtar/mtar.obj"},
|
||||
})
|
||||
tup.append_table(extra_files, {
|
||||
-- {"kolibrios/3D/cubeline", VAR_PROGS .. "/demos/cubeline/trunk/cubeline"},
|
||||
-- {"kolibrios/3D/cubeline", VAR_PROGS .. "/demos/cubeline/cubeline"},
|
||||
{"kolibrios/3D/gears", VAR_PROGS .. "/demos/gears/gears"},
|
||||
{"kolibrios/emul/e80/e80", VAR_PROGS .. "/emulator/e80/e80"},
|
||||
{"kolibrios/emul/uarm/", VAR_CONTRIB .. "/other/uarm/uARM"},
|
||||
@@ -761,6 +771,7 @@ tup.append_table(extra_files, {
|
||||
{"kolibrios/games/marblematch3", VAR_PROGS .. "/games/marblematch3/marblematch3"},
|
||||
{"kolibrios/games/nsider", VAR_PROGS .. "/games/nsider/nsider"},
|
||||
{"kolibrios/games/fridge/", VAR_PROGS .. "/games/fridge/fridge"},
|
||||
{"kolibrios/games/solitare", VAR_PROGS .. "/games/solitare/solitare"},
|
||||
{"kolibrios/develop/lua/lua", VAR_CONTRIB .. "/other/lua-5.2.0/lua"},
|
||||
{"kolibrios/develop/lua/calc.lua", "../contrib/other/lua-5.2.0/calc.lua"},
|
||||
{"kolibrios/develop/lua/console.lua", "../contrib/other/lua-5.2.0/console.lua"},
|
||||
@@ -790,6 +801,7 @@ if tup.getconfig('NO_NASM') ~= 'full' then
|
||||
{"kolibrios/games/wolf3d/", VAR_CONTRIB .. "/games/wolf3d/wolf3d"},
|
||||
{"kolibrios/games/wolf3d/", "common/games/wolf3d/*"},
|
||||
{"kolibrios/emul/dgen/dgen", VAR_PROGS .. "/emulator/dgen-sdl-1.33/dgen"},
|
||||
{"kolibrios/emul/dgen/dgen_open", VAR_PROGS .. "/fs/wrap_open/wrap_open"},
|
||||
{"kolibrios/emul/dgen/dgen.html", SRC_PROGS .. "/emulator/dgen-sdl-1.33/dgen.html"},
|
||||
{"kolibrios/emul/dgen/dgenrc.html", SRC_PROGS .. "/emulator/dgen-sdl-1.33/dgenrc.html"},
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[icons16]
|
||||
[icons18]
|
||||
<dir>=0
|
||||
<up>=1
|
||||
<lot>=20
|
||||
@@ -162,6 +162,7 @@ min=23
|
||||
nes=23
|
||||
sna=23
|
||||
snes=23
|
||||
rom=23
|
||||
bat=24
|
||||
sh=24
|
||||
sys=25
|
||||
|
||||
@@ -68,6 +68,7 @@ sna=/kolibrios/emul/e80/e80
|
||||
gb=/kolibrios/emul/gameboy
|
||||
gbc=/kolibrios/emul/gameboy
|
||||
min=/kolibrios/emul/pokemini
|
||||
rom=/kolibrios/emul/uxn
|
||||
nc=/kolibrios/utils/cnc_editor/cnc_editor
|
||||
kf=/sys/KF_VIEW
|
||||
csv=/sys/table
|
||||
|
||||
Binary file not shown.
File renamed without changes.
@@ -22,3 +22,11 @@ ToggleBar=Tab
|
||||
path=/usbhd0/1/kolibri.img
|
||||
autoclose=0
|
||||
|
||||
[WebView]
|
||||
proxy=http://proxy.kolibrios.org:82/?site=
|
||||
search_engine=http://bing.com/search?q=
|
||||
;Alternative search engines (uncomment to use):
|
||||
;search_engine=http://wiby.me/?q=
|
||||
;search_engine=https://html.duckduckgo.com/html/?q=
|
||||
;search_engine=http://4get.ca/web?s=
|
||||
|
||||
@@ -190,8 +190,9 @@ gbc=/kolibrios/emul/gameboy
|
||||
min=/kolibrios/emul/pokemini
|
||||
nc=/kolibrios/utils/cnc_editor/cnc_editor
|
||||
ch8=/kolibrios/emul/chip8/chip8
|
||||
md=/kolibrios/emul/dgen/dgen
|
||||
gen=/kolibrios/emul/dgen/dgen
|
||||
md=/kolibrios/emul/dgen/dgen_open
|
||||
gen=/kolibrios/emul/dgen/dgen_open
|
||||
rom=/kolibrios/emul/uxn
|
||||
|
||||
zip=$Unz
|
||||
7z=$Unz
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
pre {white-space: pre-wrap;}
|
||||
h2 {margin-bottom:0;}
|
||||
blockquote {
|
||||
margin-bottom:0;
|
||||
border-left: 5px solid #EFE8D5;
|
||||
margin-bottom:0;
|
||||
border-left: 5px solid #EFE8D5;
|
||||
padding-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#FDF6E3" link="#5551FF"><pre><h1>Решение проблем и часто задаваемые вопросы</h1>
|
||||
<a href="guide.htm" param="d">< Назад</a>
|
||||
|
||||
<b>Какие есть варианты загрузки Колибри?</b>
|
||||
<b>Какие есть варианты загрузки КолибриОС?</b>
|
||||
С флешки, жесткого диска, CD, дискеты. Смотрите папку /HD_Load в скачанном дистрибутиве.
|
||||
При загрузке с флешки иногда может требоваться использование setmbr.exe, иногда нет. Вначале попробуйте загрузится без него, если не получится, то с ним.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
2. Поменять настройки в BIOS: зайти в раздел с жесткими дисками и выставить режим совместимости с IDE или что-то похожее. (После всех эксперименов не забудьте поменять все обратно!)
|
||||
3. Воспользоваться драйвером ACHI. Для этого зайдите в SYSPANEL > <a href="/kolibrios/drivers/DRVINST.KEX">DriverInstall</a>.
|
||||
|
||||
<b>Как установить Колибри как основную ОС, скажем, на старенький ноутбук?</b>
|
||||
<b>Как установить КолибриОС как основную ОС, скажем, на старенький ноутбук?</b>
|
||||
Есть масса вариантов. Вот один из них.
|
||||
Если на ноутбуке нет ОС, то ставим на него Windows 98. Если на нем уже стоит Windows 95/98/2k/XP, то они тоже подойдут.
|
||||
Заходим в папку /HD_Load поставляемую в дистрибутиве. Там с помощью утилит устанавливаем Kolibri в дуалбут с Windows.
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
MTRRs (Memory type range registers — Диапазонные регистры типа памяти) — используются для назначения типа (политики кеширования) участкам памяти. Регистры MTRR предоставляют механизм, связывающий типы памяти с физическими адресными диапазонами системной памяти. Они позволяют процессору оптимизировать операции для разных типов памяти, таких как ПЗУ, ОЗУ, кадровый буфер и отображаемые в памяти устройства ввода-вывода. Они также упрощают разработку системного оборудования, уменьшая количество контактов управляющих памятью, которые использовались для этой цели в ранних процессорах и внешних логических устройствах.
|
||||
|
||||
<b>На каких ещё языках программирования, кроме ассемблера, можно разрабатывать приложения для Колибри?</b>
|
||||
<b>На каких ещё языках программирования, кроме ассемблера, можно разрабатывать приложения для КолибриОС?</b>
|
||||
|
||||
Портированы:
|
||||
• Компилятор Oberon-07
|
||||
@@ -68,7 +68,7 @@ MTRRs (Memory type range registers — Диапазонные регистры
|
||||
Подробная статья по поддерживаемым компиляторам и их настройке <a href="http://kolibri-n.org/inf/hll/hll">здесь</a>.
|
||||
|
||||
<b>Wi-Fi работает?</b>
|
||||
Нет ни драйверов ни подсистемы.
|
||||
Нет ни драйверов ни подсистемы.
|
||||
Если вы хотите разработать подсистему и драйвер(а) WiFi - напишите нам на форум или в группу ВК, есть возможность оплатить разработку. Для этого нужно весьма неплохо знать ассемблер.
|
||||
|
||||
<b>Не работает мышь, флешка, клавиатура</b>
|
||||
@@ -79,28 +79,28 @@ MTRRs (Memory type range registers — Диапазонные регистры
|
||||
• Использовать PS/2 мышь...
|
||||
• Купить PCI карту на несколько USB 2.0 портов, благо стоит она копейки, часто продается на барахолках
|
||||
|
||||
<b>Можно ли в Колибри запускать EXE (приложения Windows)?</b>
|
||||
<b>Можно ли в КолибриОС запускать EXE (приложения Windows)?</b>
|
||||
Нет, это невозможно.
|
||||
Есть эмулятор DOS и <a href="http://board.kolibrios.org/viewtopic.php?f=9&t=2318&p=48991">PELoad</a> эмулятор некоторых функций WIN32 (в зачаточном состоянии).
|
||||
|
||||
<b>Когда будет нормальный браузер?</b>
|
||||
Браузер штука очень сложная, как в написании, так и в портировании. Есть наработки по портированию Netsurf, но пока все заглохло.
|
||||
Что и когда будет не известно.
|
||||
Что и когда будет не известно.
|
||||
|
||||
<b>У меня есть идея, давайте я вам ее напишу, а вы реализуете!</b>
|
||||
Чаще всего эти идеи мало полезны. Дело в том, что у каждого человека уже вовлеченного в проект, тоже есть множество нереализованных идей, подчас более ценных, чем у новичков, за счет того, что участники лучше разбираются в системе, ее возможностях и ограничениях. Проблема, как всегда, или в мотивации, или в отсутствии времени. Пожалуйста, учитывайте это приходя в проект и не требуйте ничего от незнакомых вам людей. Участвуйте, как наблюдатель и комментатор; и со временем вы сможете генерировать хорошие идеи предметно.
|
||||
К сожалению даже клевая идея не гарантирует ее скорейшей реализации, потому самый надежный шанс воплотить идею в жизнь - реализовать самому.
|
||||
Чаще всего эти идеи мало полезны. Дело в том, что у каждого человека уже вовлеченного в проект, тоже есть множество нереализованных идей, подчас более ценных, чем у новичков, за счет того, что участники лучше разбираются в системе, ее возможностях и ограничениях. Проблема, как всегда, или в мотивации, или в отсутствии времени. Пожалуйста, учитывайте это приходя в проект и не требуйте ничего от незнакомых вам людей. Участвуйте, как наблюдатель и комментатор; и со временем вы сможете генерировать хорошие идеи предметно.
|
||||
К сожалению даже клевая идея не гарантирует ее скорейшей реализации, потому самый надежный шанс воплотить идею в жизнь - реализовать самому.
|
||||
|
||||
<b>Почему в Колибри все еще нет ХХХ? Это же так важно!</b>
|
||||
Потому что это ХХХ еще никто не сделал.
|
||||
<b>Почему в КолибриОС все еще нет ХХХ? Это же так важно!</b>
|
||||
Потому что это ХХХ еще никто не сделал.
|
||||
См. предыдущий ответ.
|
||||
|
||||
<b>Какие у вас дальнейшие планы развития?</b>
|
||||
Большинство путей развития упирается не в планы, а в свободные руки. Особенно в квалифицированные рабочие руки.
|
||||
|
||||
<b>Как насчет версии для ARM вместо Android?</b>
|
||||
Нативно это невозможно. Абсолютно и полностью.
|
||||
Дело в том, что Колибри ОС написана на ассемблере x86, тем самым овермаксимально оптимизирована под процессоры x86. На мобильных девайсах используется другой тип процессора и другая архитектура - arm, что делает портирование невозможным.
|
||||
Нативно это невозможно. Абсолютно и полностью.
|
||||
Дело в том, что КолибриОС написана на ассемблере x86, тем самым овермаксимально оптимизирована под процессоры x86. На мобильных девайсах используется другой тип процессора и другая архитектура - arm, что делает портирование невозможным.
|
||||
Колибри - десктопная ОС для Пека, любите ее такой, какая она есть.
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,3 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
ROOT = "../../../.."
|
||||
ROOT = "../../.."
|
||||
tup.rule("ps2mouse.asm", "fasm %f %o " .. tup.getconfig("PESTRIP_CMD") .. tup.getconfig("KPACK_CMD"), "%B.sys")
|
||||
File renamed without changes.
File renamed without changes.
+279
-276
@@ -1,276 +1,279 @@
|
||||
; standard driver stuff; version of driver model = 5
|
||||
format PE DLL native 0.05
|
||||
|
||||
DEBUG equ 1
|
||||
|
||||
MT_3B equ 0
|
||||
MT_3BScroll equ 3
|
||||
MT_5BScroll equ 4
|
||||
|
||||
PS2_DRV_VER equ 1
|
||||
|
||||
section '.flat' code readable writable executable
|
||||
data fixups
|
||||
end data
|
||||
include '../../../struct.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../../proc32.inc'
|
||||
include '../../../peimport.inc'
|
||||
|
||||
|
||||
entry START
|
||||
proc START c, state:dword, cmdline:dword
|
||||
|
||||
cmp [state], DRV_ENTRY
|
||||
je .init
|
||||
cmp [state], DRV_EXIT
|
||||
je .fini
|
||||
jmp .nothing
|
||||
.init:
|
||||
; disable keyboard and mouse interrupts
|
||||
; keyboard IRQ handler can interfere badly otherwise
|
||||
pushf
|
||||
cli
|
||||
mov bl, 0x20 ; read command byte
|
||||
call kbd_cmd
|
||||
test ah,ah
|
||||
jnz .fin
|
||||
call kbd_read
|
||||
test ah,ah
|
||||
jnz .fin
|
||||
popf
|
||||
and al, 0xFC ; disable interrupts
|
||||
or al, 0x10 ; disable keyboard
|
||||
push eax
|
||||
mov bl, 0x60 ; write command byte
|
||||
call kbd_cmd
|
||||
pop eax
|
||||
call kbd_write
|
||||
|
||||
call detect_mouse
|
||||
test eax,eax
|
||||
jnz .exit
|
||||
|
||||
mov [MouseType],MT_3B
|
||||
|
||||
call try_mode_ID3
|
||||
test eax,eax
|
||||
jnz .stop_try
|
||||
mov [MouseType],MT_3BScroll
|
||||
|
||||
call try_mode_ID4
|
||||
test eax,eax
|
||||
jnz .stop_try
|
||||
mov [MouseType],MT_5BScroll
|
||||
|
||||
.stop_try:
|
||||
|
||||
mov al, 0xF4 ; enable data reporting
|
||||
call mouse_cmd
|
||||
|
||||
; enable keyboard and mouse interrupts
|
||||
mov bl, 0x20 ; read command byte
|
||||
call kbd_cmd
|
||||
call kbd_read
|
||||
or al, 3 ; enable interrupts
|
||||
and al, not 0x10 ; enable keyboard
|
||||
push eax
|
||||
mov bl, 0x60 ; write command byte
|
||||
call kbd_cmd
|
||||
pop eax
|
||||
call kbd_write
|
||||
|
||||
invoke AttachIntHandler, 12, irq_handler, 0
|
||||
invoke RegService, my_service, service_proc
|
||||
ret
|
||||
|
||||
.fin:
|
||||
popf
|
||||
;invoke DetachIntHandler, 12, irq_handler
|
||||
mov bl, 0xA7 ; disable mouse interface
|
||||
call kbd_cmd
|
||||
.nothing:
|
||||
xor eax, eax
|
||||
ret
|
||||
.fini:
|
||||
mov al, 0xF5
|
||||
call mouse_cmd
|
||||
ret
|
||||
|
||||
.exit:
|
||||
mov bl, 0xA7 ; disable mouse interface
|
||||
call kbd_cmd
|
||||
|
||||
; enable keyboard interrupt, leave mouse interrupt disabled
|
||||
mov bl, 0x20 ; read command byte
|
||||
call kbd_cmd
|
||||
call kbd_read
|
||||
or al, 1 ; enable keyboard interrupt
|
||||
and al, not 0x10 ; enable keyboard
|
||||
push eax
|
||||
mov bl, 0x60 ; write command byte
|
||||
call kbd_cmd
|
||||
pop eax
|
||||
call kbd_write
|
||||
|
||||
xor eax, eax
|
||||
ret
|
||||
endp
|
||||
|
||||
proc service_proc stdcall, ioctl:dword
|
||||
mov edi, [ioctl]
|
||||
mov eax, [edi+IOCTL.io_code]
|
||||
test eax, eax
|
||||
jz .getversion
|
||||
cmp eax,1
|
||||
jz .gettype
|
||||
|
||||
.err:
|
||||
or eax, -1
|
||||
ret
|
||||
|
||||
.ok:
|
||||
xor eax, eax
|
||||
ret
|
||||
|
||||
.getversion:
|
||||
cmp [edi+IOCTL.out_size], 4
|
||||
jb .err
|
||||
mov edi, [edi+IOCTL.output]
|
||||
mov dword [edi], PS2_DRV_VER ; version of driver
|
||||
jmp .ok
|
||||
.gettype:
|
||||
cmp [edi+IOCTL.out_size], 4
|
||||
jb .err
|
||||
mov edi, [edi+IOCTL.output]
|
||||
mov eax,[MouseType]
|
||||
mov dword [edi], eax ; mouse type
|
||||
jmp .ok
|
||||
endp
|
||||
|
||||
detect_mouse:
|
||||
|
||||
mov bl, 0xA8 ; enable mouse interface
|
||||
call kbd_cmd
|
||||
cmp ah,1
|
||||
je .fail
|
||||
|
||||
mov al, 0xFF ; reset
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0xAA
|
||||
jne .fail ; dead mouse
|
||||
|
||||
; get device ID
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0x00
|
||||
jne .fail ; unknown device
|
||||
|
||||
xor eax,eax
|
||||
ret
|
||||
|
||||
.fail:
|
||||
or eax,-1
|
||||
ret
|
||||
|
||||
try_mode_ID3:
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xC8 ;200d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0x64 ;100d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0x50 ;80d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
mov al, 0xF2 ;Get device id
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0x03
|
||||
jne .fail
|
||||
|
||||
xor eax,eax
|
||||
ret
|
||||
.fail:
|
||||
or eax,-1
|
||||
ret
|
||||
|
||||
try_mode_ID4:
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xC8 ;200d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xC8 ;100d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0x50 ;80d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
mov al, 0xF2 ;Get device id
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0x04
|
||||
jne .fail
|
||||
|
||||
xor eax,eax
|
||||
ret
|
||||
|
||||
.fail:
|
||||
or eax,-1
|
||||
ret
|
||||
|
||||
include 'ps2m_iofuncs.inc'
|
||||
include 'ps2m_irqh.inc'
|
||||
|
||||
my_service db 'ps2mouse',0
|
||||
|
||||
;iofuncs data
|
||||
mouse_cmd_byte db 0
|
||||
mouse_nr_tries db 0
|
||||
mouse_nr_resends db 0
|
||||
|
||||
;hid data
|
||||
mouse_byte dd 0
|
||||
|
||||
first_byte db 0
|
||||
second_byte db 0
|
||||
third_byte db 0
|
||||
fourth_byte db 0
|
||||
|
||||
;main data
|
||||
MouseType dd 0
|
||||
|
||||
XMoving dd 0
|
||||
YMoving dd 0
|
||||
ZMoving dd 0
|
||||
ButtonState dd 0
|
||||
;timerTicks dd 0
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; standard driver stuff; version of driver model = 5
|
||||
format PE DLL native 0.05
|
||||
|
||||
DEBUG equ 1
|
||||
|
||||
MT_3B equ 0
|
||||
MT_3BScroll equ 3
|
||||
MT_5BScroll equ 4
|
||||
|
||||
PS2_DRV_VER equ 1
|
||||
|
||||
section '.flat' code readable writable executable
|
||||
data fixups
|
||||
end data
|
||||
include '../../struct.inc'
|
||||
include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../peimport.inc'
|
||||
|
||||
|
||||
entry START
|
||||
proc START c, state:dword, cmdline:dword
|
||||
|
||||
cmp [state], DRV_ENTRY
|
||||
je .init
|
||||
cmp [state], DRV_EXIT
|
||||
je .fini
|
||||
jmp .nothing
|
||||
.init:
|
||||
; disable keyboard and mouse interrupts
|
||||
; keyboard IRQ handler can interfere badly otherwise
|
||||
pushf
|
||||
cli
|
||||
mov bl, 0x20 ; read command byte
|
||||
call kbd_cmd
|
||||
test ah,ah
|
||||
jnz .fin
|
||||
call kbd_read
|
||||
test ah,ah
|
||||
jnz .fin
|
||||
popf
|
||||
and al, 0xFC ; disable interrupts
|
||||
or al, 0x10 ; disable keyboard
|
||||
push eax
|
||||
mov bl, 0x60 ; write command byte
|
||||
call kbd_cmd
|
||||
pop eax
|
||||
call kbd_write
|
||||
|
||||
call detect_mouse
|
||||
test eax,eax
|
||||
jnz .exit
|
||||
|
||||
mov [MouseType],MT_3B
|
||||
|
||||
call try_mode_ID3
|
||||
test eax,eax
|
||||
jnz .stop_try
|
||||
mov [MouseType],MT_3BScroll
|
||||
|
||||
call try_mode_ID4
|
||||
test eax,eax
|
||||
jnz .stop_try
|
||||
mov [MouseType],MT_5BScroll
|
||||
|
||||
.stop_try:
|
||||
|
||||
mov al, 0xF4 ; enable data reporting
|
||||
call mouse_cmd
|
||||
|
||||
; enable keyboard and mouse interrupts
|
||||
mov bl, 0x20 ; read command byte
|
||||
call kbd_cmd
|
||||
call kbd_read
|
||||
or al, 3 ; enable interrupts
|
||||
and al, not 0x10 ; enable keyboard
|
||||
push eax
|
||||
mov bl, 0x60 ; write command byte
|
||||
call kbd_cmd
|
||||
pop eax
|
||||
call kbd_write
|
||||
|
||||
invoke AttachIntHandler, 12, irq_handler, 0
|
||||
invoke RegService, my_service, service_proc
|
||||
ret
|
||||
|
||||
.fin:
|
||||
popf
|
||||
;invoke DetachIntHandler, 12, irq_handler
|
||||
mov bl, 0xA7 ; disable mouse interface
|
||||
call kbd_cmd
|
||||
.nothing:
|
||||
xor eax, eax
|
||||
ret
|
||||
.fini:
|
||||
mov al, 0xF5
|
||||
call mouse_cmd
|
||||
ret
|
||||
|
||||
.exit:
|
||||
mov bl, 0xA7 ; disable mouse interface
|
||||
call kbd_cmd
|
||||
|
||||
; enable keyboard interrupt, leave mouse interrupt disabled
|
||||
mov bl, 0x20 ; read command byte
|
||||
call kbd_cmd
|
||||
call kbd_read
|
||||
or al, 1 ; enable keyboard interrupt
|
||||
and al, not 0x10 ; enable keyboard
|
||||
push eax
|
||||
mov bl, 0x60 ; write command byte
|
||||
call kbd_cmd
|
||||
pop eax
|
||||
call kbd_write
|
||||
|
||||
xor eax, eax
|
||||
ret
|
||||
endp
|
||||
|
||||
proc service_proc stdcall, ioctl:dword
|
||||
mov edi, [ioctl]
|
||||
mov eax, [edi+IOCTL.io_code]
|
||||
test eax, eax
|
||||
jz .getversion
|
||||
cmp eax,1
|
||||
jz .gettype
|
||||
|
||||
.err:
|
||||
or eax, -1
|
||||
ret
|
||||
|
||||
.ok:
|
||||
xor eax, eax
|
||||
ret
|
||||
|
||||
.getversion:
|
||||
cmp [edi+IOCTL.out_size], 4
|
||||
jb .err
|
||||
mov edi, [edi+IOCTL.output]
|
||||
mov dword [edi], PS2_DRV_VER ; version of driver
|
||||
jmp .ok
|
||||
.gettype:
|
||||
cmp [edi+IOCTL.out_size], 4
|
||||
jb .err
|
||||
mov edi, [edi+IOCTL.output]
|
||||
mov eax,[MouseType]
|
||||
mov dword [edi], eax ; mouse type
|
||||
jmp .ok
|
||||
endp
|
||||
|
||||
detect_mouse:
|
||||
|
||||
mov bl, 0xA8 ; enable mouse interface
|
||||
call kbd_cmd
|
||||
cmp ah,1
|
||||
je .fail
|
||||
|
||||
mov al, 0xFF ; reset
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0xAA
|
||||
jne .fail ; dead mouse
|
||||
|
||||
; get device ID
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0x00
|
||||
jne .fail ; unknown device
|
||||
|
||||
xor eax,eax
|
||||
ret
|
||||
|
||||
.fail:
|
||||
or eax,-1
|
||||
ret
|
||||
|
||||
try_mode_ID3:
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xC8 ;200d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0x64 ;100d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0x50 ;80d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
mov al, 0xF2 ;Get device id
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0x03
|
||||
jne .fail
|
||||
|
||||
xor eax,eax
|
||||
ret
|
||||
.fail:
|
||||
or eax,-1
|
||||
ret
|
||||
|
||||
try_mode_ID4:
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xC8 ;200d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xC8 ;100d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0xF3 ;Set Sample Rate
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
mov al, 0x50 ;80d
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
mov al, 0xF2 ;Get device id
|
||||
call mouse_cmd
|
||||
jc .fail
|
||||
|
||||
call mouse_read
|
||||
jc .fail
|
||||
cmp al, 0x04
|
||||
jne .fail
|
||||
|
||||
xor eax,eax
|
||||
ret
|
||||
|
||||
.fail:
|
||||
or eax,-1
|
||||
ret
|
||||
|
||||
include 'ps2m_iofuncs.inc'
|
||||
include 'ps2m_irqh.inc'
|
||||
|
||||
my_service db 'ps2mouse',0
|
||||
|
||||
;iofuncs data
|
||||
mouse_cmd_byte db 0
|
||||
mouse_nr_tries db 0
|
||||
mouse_nr_resends db 0
|
||||
|
||||
;hid data
|
||||
mouse_byte dd 0
|
||||
|
||||
first_byte db 0
|
||||
second_byte db 0
|
||||
third_byte db 0
|
||||
fourth_byte db 0
|
||||
|
||||
;main data
|
||||
MouseType dd 0
|
||||
|
||||
XMoving dd 0
|
||||
YMoving dd 0
|
||||
ZMoving dd 0
|
||||
ButtonState dd 0
|
||||
;timerTicks dd 0
|
||||
@@ -0,0 +1,4 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
ROOT = "../../.."
|
||||
tup.rule("usbother.asm", "fasm %f %o " .. tup.getconfig("PESTRIP_CMD") .. tup.getconfig("KPACK_CMD"), "%B.sys")
|
||||
tup.rule("usbdrv.asm", "fasm %f %o ", "%B.dat")
|
||||
@@ -0,0 +1,214 @@
|
||||
;*****************************************************************************;
|
||||
; Copyright (C) 2025, Mikhail Frolov aka Doczom . All rights reserved. ;
|
||||
; Distributed under terms of the 3-Clause BSD License. ;
|
||||
;*****************************************************************************;
|
||||
; File of usb drivers
|
||||
; base = 0
|
||||
; offset | Size | Name | Description
|
||||
;=======================|=======|===============|=============================
|
||||
; base + 0 | 4 | ID_drv_table | offset to dev_ven drv array
|
||||
; base + 4 | 4 | Class_table | offset to class drv array
|
||||
;
|
||||
; n = 0 .. count driver with ID table
|
||||
; nt = count driver with ID table
|
||||
; ID_drv_table + 0*(n-1)| 4 | ID_TABLE | offset from base to table VID:PID
|
||||
; ID_drv_table + 4*(n-1)| 4 | DRV_NAME | offset from base to name of driver
|
||||
; ID_drv_table + 8*nt | 8 | __ZERO | terminaror of list
|
||||
|
||||
; k = 0 .. count driver on class code
|
||||
; kt = count driver on class code
|
||||
; Class_table + 0*(k-1) | 1 | LENGTH_CLASS | length of class code 1..3
|
||||
; Class_table + 1*(k-1) | 1 | USB_CLASS | main usb class code (M)
|
||||
; Class_table + 2*(k-1) | 1 | USB_SUBCLASS | USB subclass code or zero(V)
|
||||
; Class_table + 2*(k-1) | 1 | USB_PROTOCOL | USB protocol code or zero(V)
|
||||
; Class_table + 4*(k-1) | 4 | DRV_NAME | offset from base to name of driver
|
||||
; Class_table + 8*kt | 8 | __ZERO | terminaror of list
|
||||
|
||||
; i = 0 .. count VID:PID
|
||||
; it = count VID:PID
|
||||
; ID_TABLE + 0*(i-1) | 2 | VID | Vendor id
|
||||
; ID_TABLE + 2*(i-1) | 2 | PID | Product id
|
||||
; ID_TABLE + 4*it | 4 | __ZERO | terminaror of list
|
||||
|
||||
|
||||
macro INIT_USBDRV_FILE {
|
||||
local ..id_list, ..class_list
|
||||
|
||||
format binary as 'dat'
|
||||
use32
|
||||
org 0
|
||||
dd ..id_list
|
||||
dd ..class_list
|
||||
|
||||
|
||||
macro ID_DRV_TABLE \{
|
||||
dd 0, 0
|
||||
\}
|
||||
|
||||
macro CLASS_TABLE \{
|
||||
dd 0, 0
|
||||
\}
|
||||
macro ID_TABLE \{
|
||||
\}
|
||||
macro DRV_NAME_LIST \{
|
||||
\}
|
||||
postpone \{
|
||||
..id_list: ID_DRV_TABLE
|
||||
..class_list: CLASS_TABLE
|
||||
ID_TABLE
|
||||
DRV_NAME_LIST
|
||||
\}
|
||||
}
|
||||
|
||||
macro ADD_CLASS drv_name, class, subclass, protocol {
|
||||
|
||||
local ..length, ..class_code, ..drv_name
|
||||
|
||||
..length = 3
|
||||
|
||||
match =X, class \{
|
||||
err 'Class is mandatory argument'
|
||||
\}
|
||||
match =X, protocol \{
|
||||
..length = 2
|
||||
\}
|
||||
match =X, subclass \{
|
||||
..length = 1
|
||||
\}
|
||||
|
||||
..class_code = ..length or (class shl 8)
|
||||
|
||||
if ..length = 3
|
||||
..class_code = ..class_code or (protocol shl 24)
|
||||
end if
|
||||
if ..length = 2
|
||||
..class_code = ..class_code or (subclass shl 16)
|
||||
end if
|
||||
|
||||
|
||||
; add in list
|
||||
|
||||
macro DRV_NAME_LIST \{
|
||||
..drv_name: db drv_name, 0
|
||||
DRV_NAME_LIST
|
||||
\}
|
||||
|
||||
macro CLASS_TABLE \{
|
||||
dd ..class_code, ..drv_name
|
||||
CLASS_TABLE
|
||||
\}
|
||||
}
|
||||
|
||||
macro ADD_ID drv_name, [device_id] {
|
||||
common
|
||||
local ..drv_name, ..id_table
|
||||
|
||||
macro ID_TABLE \{
|
||||
ID_TABLE
|
||||
..id_table:
|
||||
\}
|
||||
|
||||
reverse
|
||||
local vid_pid
|
||||
match VID:PID, device_id \{
|
||||
vid_pid = (PID shl 16) + VID
|
||||
\}
|
||||
|
||||
|
||||
macro ID_TABLE \{
|
||||
ID_TABLE
|
||||
dd vid_pid
|
||||
\}
|
||||
|
||||
common
|
||||
macro ID_TABLE \{
|
||||
ID_TABLE
|
||||
dd 0
|
||||
\}
|
||||
macro DRV_NAME_LIST \{
|
||||
..drv_name: db drv_name, 0
|
||||
DRV_NAME_LIST
|
||||
\}
|
||||
macro ID_DRV_TABLE \{
|
||||
dd ..id_table, ..drv_name
|
||||
ID_DRV_TABLE
|
||||
\}
|
||||
}
|
||||
|
||||
; ADD ID driver Linux
|
||||
macro ADD_IDL drv_name, [vendor_id, device_id] {
|
||||
common
|
||||
local ..drv_name, ..id_table
|
||||
|
||||
macro ID_TABLE \{
|
||||
ID_TABLE
|
||||
..id_table:
|
||||
\}
|
||||
|
||||
reverse
|
||||
local vid_pid
|
||||
vid_pid = (device_id shl 16) + vendor_id
|
||||
|
||||
macro ID_TABLE \{
|
||||
ID_TABLE
|
||||
dd vid_pid
|
||||
\}
|
||||
|
||||
common
|
||||
macro ID_TABLE \{
|
||||
ID_TABLE
|
||||
dd 0
|
||||
\}
|
||||
macro DRV_NAME_LIST \{
|
||||
..drv_name: db drv_name, 0
|
||||
DRV_NAME_LIST
|
||||
\}
|
||||
macro ID_DRV_TABLE \{
|
||||
dd ..id_table, ..drv_name
|
||||
ID_DRV_TABLE
|
||||
\}
|
||||
}
|
||||
|
||||
|
||||
INIT_USBDRV_FILE
|
||||
|
||||
;ADD_CLASS 'usbcdc-ctrl' , 0x02, X , X
|
||||
;ADD_CLASS 'usbimage' , 0x06, 1 , 1
|
||||
;ADD_CLASS 'usbcdc-data' , 0x0A, X , X
|
||||
;ADD_CLASS 'ccid' , 0x0B, X , X
|
||||
;ADD_CLASS 'uvd' , 0x0E, X , X
|
||||
;ADD_CLASS 'uvd_2' , 0x0E, 0x02, X
|
||||
;ADD_CLASS 'usb_bluetooth' , 0xE0, 0x01, X
|
||||
;ADD_CLASS 'usb_wifi' , 0xE0, 0x02, X
|
||||
|
||||
|
||||
|
||||
ADD_ID 'usbftdi',\
|
||||
0x0403:0 ; Any FTDI device
|
||||
|
||||
;https://github.com/avrdudes/avrdude/blob/main/src/usbdevs.h#L51
|
||||
;ADD_ID 'usbasp',\
|
||||
; 0x16c0:0x05dc,\ ; VOTI Obdev's free shared PID
|
||||
; 0x03e8:0xc7b4,\ ; ATMEL (unofficial) USBasp
|
||||
; 0x16c0:0x092f ; VOTI NIBObee PID
|
||||
|
||||
;https://github.com/WCHSoftGroup/ch341par_linux/blob/main/driver/ch34x_pis.c
|
||||
;ADD_IDL 'ch341par',\
|
||||
; 0x1a86, 0x5512,\ ; ch341a default
|
||||
; 0x1a86, 0x55db,\ ; CH347T Mode1 SPI+IIC+UART
|
||||
; 0x1a86, 0x55dd,\ ; CH347T Mode3 JTAG+UART
|
||||
; 0x1a86, 0x55de,\ ; CH347F
|
||||
; 0x1a86, 0x55e7 ; CH339W
|
||||
|
||||
;https://github.com/openbsd/src/blob/master/sys/dev/usb/uchcom.c
|
||||
;https://github.com/WCHSoftGroup/ch341ser_linux/blob/main/driver/ch341.c
|
||||
;ADD_IDL 'ch341ser',\
|
||||
; 0x1a86, 0x7523,\ ; ch340 chip
|
||||
; 0x1a86, 0x7522,\ ; ch340k chip
|
||||
; 0x1a86, 0x5523,\ ; ch341 chip
|
||||
; 0x1a86, 0xe523,\ ; ch330 chip
|
||||
; 0x4348, 0x5523 ; ch340 custom chip
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,523 @@
|
||||
;*****************************************************************************;
|
||||
; Copyright (C) 2025, Mikhail Frolov aka Doczom . All rights reserved. ;
|
||||
; Distributed under terms of the 3-Clause BSD License. ;
|
||||
; ;
|
||||
; usbother is a driver for loading USB drivers of a certain class and vendor. ;
|
||||
; ;
|
||||
; Version 0.1.1, 24 May 2025 ;
|
||||
; ;
|
||||
;*****************************************************************************;
|
||||
format PE native 0.05
|
||||
entry START
|
||||
; const
|
||||
|
||||
DRV_VERSION = 0x0101 ; 0.1.1
|
||||
|
||||
|
||||
; struct
|
||||
include '../../struct.inc'
|
||||
|
||||
; USB device descriptor
|
||||
struct DEVICE_DESCR
|
||||
bLength db ?
|
||||
bDescriptorType db ?
|
||||
bcdUSB dw ?
|
||||
bDeviceClass db ?
|
||||
bDeviceSubClass db ?
|
||||
bDeviceProtocol db ?
|
||||
bMaxPacketSize0 db ?
|
||||
idVendor dw ?
|
||||
idProduct dw ?
|
||||
bcdDevice dw ?
|
||||
iManufacturer db ?
|
||||
iProduct db ?
|
||||
iSerialNumber db ?
|
||||
bNumConfigurations db ?
|
||||
ends
|
||||
|
||||
struct INTERFACE_DESCR
|
||||
bLength db ?
|
||||
bDescriptorType db ?
|
||||
bInterfaceNumber db ?
|
||||
bAlternateSetting db ?
|
||||
bNumEndpoints db ?
|
||||
bInterfaceClass db ?
|
||||
bInterfaceSubClass db ?
|
||||
bInterfaceProtocol db ?
|
||||
iInterface db ?
|
||||
ends
|
||||
|
||||
|
||||
struct SRV
|
||||
srv_name rb 16 ;ASCIIZ string
|
||||
magic dd ? ;+0x10 ;'SRV '
|
||||
size dd ? ;+0x14 ;size of structure SRV
|
||||
fd dd ? ;+0x18 ;next SRV descriptor
|
||||
bk dd ? ;+0x1C ;prev SRV descriptor
|
||||
base dd ? ;+0x20 ;service base address
|
||||
entry dd ? ;+0x24 ;service START function
|
||||
srv_proc dd ? ;+0x28 ;user mode service handler
|
||||
srv_proc_ex dd ? ;+0x2C ;kernel mode service handler
|
||||
ends
|
||||
|
||||
struct USBSRV
|
||||
srv SRV
|
||||
usb_func dd ?
|
||||
ends
|
||||
|
||||
struct USBFUNC
|
||||
strucsize dd ?
|
||||
add_device dd ?
|
||||
device_disconnect dd ?
|
||||
ends
|
||||
|
||||
USBDRV_TYPE_NOLOCK = 0 ; usb device not controlled (native driver
|
||||
; not found and IOCTL not opened device)
|
||||
USBDRV_TYPE_NATIVE = 1 ; native PE kernel driver for usb
|
||||
USBDRV_TYPE_IOCTL = 2 ; usb device is controlled by IOCTL service
|
||||
; (driver or userspace process/threads)
|
||||
USBDRV_IOCTL_BLOCKED = 4 ; blocked IOCTL interface, device disconnected
|
||||
|
||||
|
||||
|
||||
struct DRV_CONTEXT
|
||||
next dd ?
|
||||
prev dd ?
|
||||
drv_hand dd ?
|
||||
drv_pdata dd ?
|
||||
flags dd ?
|
||||
|
||||
config_descr dd ?
|
||||
interface_descr dd ?
|
||||
ep rd 64 ; 32 IN + 32 OUT endpoints' pipes
|
||||
ends
|
||||
DRV_CONTEXT.ep0 fix (DRV_CONTEXT.ep + 0)
|
||||
|
||||
|
||||
section '.flat' code readable writable executable
|
||||
|
||||
include '../../proc32.inc'
|
||||
include '../../peimport.inc'
|
||||
include '../../macros.inc'
|
||||
|
||||
|
||||
proc START c, state:dword, cmdline:dword
|
||||
|
||||
cmp [state], DRV_ENTRY
|
||||
jne .end
|
||||
; init
|
||||
|
||||
mov ecx, drv_list_lock
|
||||
invoke MutexInit
|
||||
|
||||
mov ecx, interface_list_lock
|
||||
invoke MutexInit
|
||||
|
||||
; load drv_list
|
||||
stdcall load_drv_list, default_list
|
||||
test eax, eax
|
||||
jnz .end
|
||||
|
||||
; reg driver
|
||||
invoke RegUSBDriver, drv_name, service_proc, usb_functions
|
||||
ret
|
||||
.end:
|
||||
xor eax, eax
|
||||
ret
|
||||
endp
|
||||
|
||||
proc load_drv_list stdcall, .path:dword
|
||||
|
||||
push ebx
|
||||
mov ecx, drv_list_lock
|
||||
invoke MutexLock
|
||||
; load file
|
||||
invoke LoadFile, [.path]
|
||||
test eax, eax
|
||||
push eax
|
||||
jnz @f
|
||||
mov dword[esp], -1
|
||||
jmp .exit
|
||||
@@:
|
||||
cmp [drv_list], 0
|
||||
jz @f
|
||||
|
||||
invoke KernelFree, [drv_list]
|
||||
@@:
|
||||
mov eax,[esp]
|
||||
mov [drv_list], eax
|
||||
mov dword[esp], 0
|
||||
.exit:
|
||||
mov ecx, drv_list_lock
|
||||
invoke MutexUnlock
|
||||
pop eax
|
||||
pop ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
proc service_proc stdcall, .ioctl:dword
|
||||
|
||||
push esi
|
||||
or eax, -1
|
||||
mov esi, [.ioctl]
|
||||
|
||||
mov ecx, [esi + IOCTL.io_code]
|
||||
cmp ecx, .count_ioctl_codes
|
||||
jae .fail
|
||||
|
||||
jmp dword[.table_subfunction + ecx*4]
|
||||
|
||||
.table_subfunction:
|
||||
dd .get_version
|
||||
dd .update_list
|
||||
dd .get_array_dev
|
||||
dd .get_full_dev_data
|
||||
dd .open_dev
|
||||
dd .close_dev
|
||||
dd .control_transfer
|
||||
dd .bulk_transfer
|
||||
dd .interrupt_transfer
|
||||
;dd .control_transfer_async
|
||||
;dd .bulk_transfer_async
|
||||
;dd .interrupt_transfer_async
|
||||
.count_ioctl_codes = ($ - .table_subfunction)/4
|
||||
|
||||
.get_version:
|
||||
mov eax, [esi + IOCTL.output]
|
||||
cmp [esi + IOCTL.out_size], 4
|
||||
jne .fail
|
||||
|
||||
mov dword[eax], DRV_VERSION
|
||||
xor eax, eax
|
||||
jmp .exit
|
||||
|
||||
.update_list:
|
||||
; update list
|
||||
mov ecx, [esi + IOCTL.input]
|
||||
cmp [esi + IOCTL.inp_size], 0
|
||||
jnz @f
|
||||
|
||||
mov ecx, default_list
|
||||
@@:
|
||||
stdcall load_drv_list, ecx
|
||||
|
||||
.exit:
|
||||
pop esi
|
||||
ret
|
||||
|
||||
.get_array_dev:
|
||||
.get_full_dev_data:
|
||||
.open_dev:
|
||||
.close_dev:
|
||||
;
|
||||
.control_transfer:
|
||||
.bulk_transfer:
|
||||
.interrupt_transfer:
|
||||
|
||||
.fail:
|
||||
or eax, -1
|
||||
jmp .exit
|
||||
endp
|
||||
|
||||
|
||||
proc AddDevice stdcall, .config_pipe:dword, \
|
||||
.config_descr:dword,\
|
||||
.interface:dword
|
||||
|
||||
push esi edi
|
||||
mov eax, sizeof.DRV_CONTEXT
|
||||
invoke Kmalloc
|
||||
test eax, eax
|
||||
jz .err_init
|
||||
|
||||
mov esi, eax
|
||||
|
||||
mov ecx, interface_list_lock
|
||||
invoke MutexLock
|
||||
|
||||
mov edx, [usb_interface_list] ; next
|
||||
mov [esi + DRV_CONTEXT.next], edx
|
||||
mov [esi + DRV_CONTEXT.prev], usb_interface_list
|
||||
mov [usb_interface_list], esi
|
||||
mov [edx + DRV_CONTEXT.prev], esi
|
||||
|
||||
mov ecx, interface_list_lock
|
||||
invoke MutexUnlock
|
||||
|
||||
and [esi + DRV_CONTEXT.drv_hand], 0
|
||||
mov [esi + DRV_CONTEXT.flags], USBDRV_TYPE_NOLOCK
|
||||
|
||||
; lock mutex
|
||||
mov ecx, drv_list_lock
|
||||
invoke MutexLock
|
||||
|
||||
; save device context data
|
||||
mov eax, [.config_pipe]
|
||||
mov [esi + DRV_CONTEXT.ep0], eax
|
||||
mov eax, [.config_descr]
|
||||
mov [esi + DRV_CONTEXT.config_descr], eax
|
||||
mov eax, [.interface]
|
||||
mov [esi + DRV_CONTEXT.interface_descr], eax
|
||||
|
||||
; get pointer to list
|
||||
mov edx, [drv_list]
|
||||
test edx, edx
|
||||
jz .err_exit
|
||||
|
||||
mov edi, edx
|
||||
add edi, [edx]
|
||||
|
||||
; get in ecx VID:PID code
|
||||
invoke USBGetParam, [.config_pipe], 0
|
||||
mov ecx, dword[eax + DEVICE_DESCR.idVendor]
|
||||
|
||||
.loop_id_drv:
|
||||
cmp dword[edi], 0
|
||||
jz .end_loop_id_drv
|
||||
|
||||
mov edx, [drv_list]
|
||||
add edx, [edi] ; ID_TABLE
|
||||
.loop_id:
|
||||
cmp dword[edx], 0
|
||||
jz .end_loop_id
|
||||
|
||||
; check id
|
||||
mov eax, ecx
|
||||
test word[edx + 2], 0xffff
|
||||
jne @f
|
||||
; driver for all devices of VID
|
||||
and eax, 0xffff
|
||||
@@:
|
||||
cmp [edx], eax ; check VID:PID
|
||||
je @f
|
||||
|
||||
add edx, 4
|
||||
jmp .loop_id
|
||||
@@: ; found
|
||||
call .load_drv
|
||||
jnz .exit
|
||||
|
||||
add edx, 4
|
||||
jmp .loop_id
|
||||
.end_loop_id:
|
||||
add edi, 8
|
||||
jmp .loop_id_drv
|
||||
|
||||
.end_loop_id_drv:
|
||||
|
||||
|
||||
push esi
|
||||
mov esi, str_1
|
||||
invoke SysMsgBoardStr
|
||||
pop esi
|
||||
|
||||
|
||||
; get in ecx class code
|
||||
mov eax, [.interface]
|
||||
mov ecx, dword[eax + INTERFACE_DESCR.bInterfaceClass] ; 24-31 bits
|
||||
|
||||
mov edi, [drv_list]
|
||||
add edi, [edi + 4]
|
||||
.loop_class:
|
||||
cmp dword[edi], 0
|
||||
jz .end_loop_class
|
||||
|
||||
; check class
|
||||
movzx eax, byte[edi] ; length
|
||||
and eax, 11b ; protect - max length = 3
|
||||
lea eax, [eax*8] ; 1 = 8; 2 = 16; 3 = 24
|
||||
xor edx, edx
|
||||
bts edx, eax
|
||||
dec edx ; bitmask
|
||||
|
||||
mov eax, [edi]
|
||||
shr eax, 8
|
||||
and eax, edx ; good class in list
|
||||
|
||||
and edx, ecx ; good class of device
|
||||
|
||||
cmp eax, edx
|
||||
je @f
|
||||
|
||||
add edi, 8
|
||||
jmp .loop_class
|
||||
@@: ; found
|
||||
call .load_drv
|
||||
jnz .exit
|
||||
|
||||
add edi, 8
|
||||
jmp .loop_class
|
||||
|
||||
; IN: edi - item list of driver
|
||||
; esi - DRV_CONTEXT
|
||||
; OUT: ZF - not found zF - found
|
||||
; function save drv handl in DRV_CONTEXT.drv_hand
|
||||
; and pdata in DRV_CONTEXT.drv_pdata
|
||||
.load_drv:
|
||||
push ecx edx
|
||||
; load driver
|
||||
push esi
|
||||
mov esi, str_2
|
||||
invoke SysMsgBoardStr
|
||||
pop esi
|
||||
|
||||
mov ecx, [drv_list]
|
||||
add ecx, [edi + 4]
|
||||
|
||||
pusha
|
||||
mov esi, ecx
|
||||
invoke SysMsgBoardStr
|
||||
mov esi, str_newline
|
||||
invoke SysMsgBoardStr
|
||||
popa
|
||||
|
||||
invoke GetService, ecx
|
||||
test eax, eax
|
||||
jz @f
|
||||
|
||||
mov [esi + DRV_CONTEXT.drv_hand], eax
|
||||
; get function list
|
||||
mov ecx, [eax + USBSRV.usb_func]
|
||||
|
||||
; call AddDevice of driver
|
||||
stdcall [ecx + USBFUNC.add_device], [.config_pipe], \
|
||||
[.config_descr],\
|
||||
[.interface]
|
||||
mov [esi + DRV_CONTEXT.drv_pdata], eax
|
||||
test eax, eax
|
||||
jnz .load_drv.good
|
||||
|
||||
push esi
|
||||
mov esi, str_4
|
||||
invoke SysMsgBoardStr
|
||||
pop esi
|
||||
|
||||
and [esi + DRV_CONTEXT.drv_hand], 0
|
||||
@@:
|
||||
pushf
|
||||
push esi
|
||||
mov esi, str_5
|
||||
invoke SysMsgBoardStr
|
||||
pop esi
|
||||
popf
|
||||
|
||||
pop edx ecx
|
||||
retn
|
||||
.load_drv.good:
|
||||
pushf
|
||||
push esi
|
||||
mov esi, str_3
|
||||
invoke SysMsgBoardStr
|
||||
pop esi
|
||||
popf
|
||||
|
||||
mov [esi + DRV_CONTEXT.flags], USBDRV_TYPE_NATIVE
|
||||
pop edx ecx
|
||||
retn
|
||||
|
||||
|
||||
.err_exit:
|
||||
mov eax, esi
|
||||
invoke Kfree
|
||||
xor esi, esi
|
||||
.end_loop_class:
|
||||
.exit:
|
||||
; driver not found - Added libusb driver
|
||||
|
||||
; unlock mutex
|
||||
mov ecx, drv_list_lock
|
||||
invoke MutexUnlock
|
||||
|
||||
mov eax, esi
|
||||
pop edi esi
|
||||
ret
|
||||
.err_init:
|
||||
xor eax, eax
|
||||
pop edi esi
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
proc DeviceDisconnected stdcall, .pdata:dword
|
||||
|
||||
mov eax, [.pdata]
|
||||
|
||||
test [eax + DRV_CONTEXT.flags], USBDRV_TYPE_NATIVE
|
||||
jz .no_native
|
||||
|
||||
cmp [eax + DRV_CONTEXT.drv_hand], 0
|
||||
jz .free
|
||||
|
||||
; call device disconnected
|
||||
mov ecx, [eax + DRV_CONTEXT.drv_hand]
|
||||
|
||||
mov edx, [ecx + USBSRV.usb_func]
|
||||
cmp dword[edx], USBFUNC.device_disconnect
|
||||
jbe .free ; TODO: check
|
||||
|
||||
stdcall [edx + USBFUNC.device_disconnect], [eax + DRV_CONTEXT.drv_pdata]
|
||||
.free:
|
||||
; clear list of DRV_CONTENT
|
||||
mov ecx, interface_list_lock
|
||||
invoke MutexLock
|
||||
|
||||
mov eax, [.pdata]
|
||||
mov edx, [eax + DRV_CONTEXT.prev]
|
||||
mov ecx, [eax + DRV_CONTEXT.next]
|
||||
mov [edx + DRV_CONTEXT.next], ecx
|
||||
mov [ecx + DRV_CONTEXT.prev], edx
|
||||
|
||||
mov ecx, interface_list_lock
|
||||
invoke MutexUnlock
|
||||
|
||||
; free context
|
||||
mov eax, [.pdata]
|
||||
invoke Kfree
|
||||
ret
|
||||
.no_native:
|
||||
test [eax + DRV_CONTEXT.flags], USBDRV_TYPE_IOCTL
|
||||
jz .free
|
||||
|
||||
; set state for block user api and clear struct
|
||||
or [eax + DRV_CONTEXT.flags], USBDRV_IOCTL_BLOCKED
|
||||
xor ecx, ecx
|
||||
;mov [eax + DRV_CONTEXT.drv_hand], ecx
|
||||
;mov [eax + DRV_CONTEXT.drv_pdata], ecx
|
||||
mov [eax + DRV_CONTEXT.config_descr], ecx
|
||||
mov [eax + DRV_CONTEXT.interface_descr], ecx
|
||||
mov [eax + DRV_CONTEXT.ep0], ecx
|
||||
; TODO
|
||||
jmp .free
|
||||
endp
|
||||
|
||||
; data
|
||||
drv_list_lock MUTEX
|
||||
|
||||
drv_list dd ?
|
||||
|
||||
interface_list_lock MUTEX
|
||||
usb_interface_list:
|
||||
dd usb_interface_list
|
||||
dd usb_interface_list
|
||||
|
||||
|
||||
usb_functions:
|
||||
dd .end - usb_functions
|
||||
dd AddDevice
|
||||
dd DeviceDisconnected
|
||||
.end:
|
||||
|
||||
drv_name db 'usbother', 0
|
||||
|
||||
default_list: db '/sys/settings/usbdrv.dat', 0
|
||||
|
||||
str_1: db 'USBOTHER: Driver for this ID not found', 13, 10, 0
|
||||
str_2: db 'USBOTHER: Check found driver: ', 0, 13, 10, 0
|
||||
str_3: db 'USBOTHER: Device driver is good', 13, 10, 0
|
||||
str_4: db 'USBOTHER: Device driver fail prob', 13, 10, 0
|
||||
str_5: db 'USBOTHER: Device driver load error', 13, 10, 0
|
||||
str_newline: db 13,10,0
|
||||
|
||||
data fixups
|
||||
end data
|
||||
@@ -5,7 +5,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
Загрузочный сектор для ОС Колибри (FAT12, дискета)
|
||||
Загрузочный сектор для КолибриОС (FAT12, дискета)
|
||||
|
||||
- Описание
|
||||
Позволяет загружать KERNEL.MNT с дискет/образов
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
Загрузочный сектор для ОС Колибри (FAT12, дискета)
|
||||
Загрузочный сектор для КолибриОС (FAT12, дискета)
|
||||
|
||||
- Описание
|
||||
Позволяет загружать KERNEL.MNT с дискет/образов
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
Загрузочный сектор для ОС Колибри (FAT12, дискета)
|
||||
Загрузочный сектор для КолибриОС (FAT12, дискета)
|
||||
|
||||
- Описание
|
||||
Позволяет загружать KERNEL.MNT с дискет/образов
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
Загрузочный сектор для ОС Колибри (FAT12, дискета)
|
||||
Загрузочный сектор для КолибриОС (FAT12, дискета)
|
||||
|
||||
- Описание
|
||||
Позволяет загружать KERNEL.MNT с дискет/образов
|
||||
|
||||
+133
-54
@@ -1985,7 +1985,7 @@ path db 'HD0/1',0
|
||||
подфункция 2 функции 15.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_BACKGROUND_GET_RECT (39)
|
||||
eax - SF_BACKGROUND_GET (39)
|
||||
======================================================================
|
||||
== Функция 39, подфункция 3 - получить прямоугольную область фона =
|
||||
======================================================================
|
||||
@@ -2169,7 +2169,7 @@ path db 'HD0/1',0
|
||||
* ebx = 2 - номер подфункции
|
||||
* ecx = указатель на таблицу цветов
|
||||
* edx = размер таблицы цветов
|
||||
(должен быть 40 байт для будущей совместимости)
|
||||
(до 192 байт; 40 байт для базовой структуры)
|
||||
Формат таблицы цветов указан в описании подфункции 3.
|
||||
Возвращаемое значение:
|
||||
* функция не возвращает значения
|
||||
@@ -2196,32 +2196,33 @@ path db 'HD0/1',0
|
||||
* ecx = указатель на буфер размером edx байт,
|
||||
куда будет записана таблица
|
||||
* edx = размер таблицы цветов
|
||||
(должен быть 40 байт для будущей совместимости)
|
||||
(до 192 байт; 40 байт для базовой структуры)
|
||||
Возвращаемое значение:
|
||||
* функция не возвращает значения
|
||||
Формат таблицы цветов: каждый элемент -
|
||||
dword-значение цвета 0x00RRGGBB
|
||||
* +0: dword: none - зарезервировано
|
||||
* +4: dword: none - зарезервировано
|
||||
* +0: dword: frame
|
||||
* +4: dword: grab
|
||||
* +8: dword: work_dark - темный цвет рабочей области для придания
|
||||
объемна элементам интерфейса
|
||||
* +12 = +0xC: dword: work_light - светлый цвет рабочей области для
|
||||
придания объемна элементам интерфейса
|
||||
* +16 = +0x10: dword: grab_text - цвет текста на заголовке
|
||||
* +20 = +0x14: dword: work - цвет рабочей области
|
||||
* +24 = +0x18: dword: button - цвет кнопки в рабочей области
|
||||
* +28 = +0x1C: dword: button_text - цвет текста на кнопке
|
||||
* +24 = +0x18: dword: work_button - цвет кнопки в рабочей области
|
||||
* +28 = +0x1C: dword: work_button_text - цвет текста на кнопке
|
||||
в рабочей области
|
||||
* +32 = +0x20: dword: work_text - цвет текста в рабочей области
|
||||
* +36 = +0x24: dword: graph - цвет графики в рабочей области
|
||||
Замечания:
|
||||
* Структура таблицы цветов описана в стандартном включаемом файле
|
||||
macros.inc под названием system_colors; например, можно писать:
|
||||
sc system_colors ; объявление переменной
|
||||
... ; где-то надо вызвать
|
||||
; описываемую функцию с ecx=sc
|
||||
mov ecx, [sc.button_text] ; читаем цвет текста
|
||||
; на кнопке в рабочей области
|
||||
sc system_colors ; объявление переменной
|
||||
... ; вызов описываемой функции с ecx = sc
|
||||
mov ecx, [sc.work_button_text] ; устанавливаем цвет текста
|
||||
; на кнопке в рабочей области
|
||||
* Таблица может быть больше (до 192 байт); дополнительные поля
|
||||
копируются как есть и интерпретируются скинами.
|
||||
* Использование/неиспользование этих цветов - дело исключительно
|
||||
самой программы. Для использования нужно просто при вызове функций
|
||||
рисования указывать цвет, взятый из этой таблицы.
|
||||
@@ -2491,6 +2492,7 @@ dword-значение цвета 0x00RRGGBB
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_SET_WINDOW_SHAPE (50)
|
||||
|
||||
======================================================================
|
||||
===================== Функция 51, подфункция 1 =======================
|
||||
========================== Создать поток =============================
|
||||
@@ -2505,16 +2507,19 @@ dword-значение цвета 0x00RRGGBB
|
||||
* иначе eax = TID - идентификатор потока
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_CREATE_THREAD (51)
|
||||
eax - SF_CREATE_THREAD (51) /
|
||||
ebx - SSF_CREATE_THREAD (1), SSF_GET_CURR_THREAD_SLOT (2),
|
||||
SSF_GET_THREAD_PRIORITY (3), SSF_SET_THREAD_PRIORITY (4)
|
||||
|
||||
======================================================================
|
||||
===================== Функция 51, подфункция 2 =======================
|
||||
=================== Получить номер слота потока ======================
|
||||
============= Получить номер слота текущего потока ===================
|
||||
======================================================================
|
||||
Параметры:
|
||||
* eax = 51 - номер функции
|
||||
* ebx = 2 - номер подфункции
|
||||
Возвращаемое значение:
|
||||
* eax = номер слота потока
|
||||
* eax = номер слота текущего потока
|
||||
|
||||
======================================================================
|
||||
===================== Функция 51, подфункция 3 =======================
|
||||
@@ -2755,10 +2760,10 @@ IPC применяется для посылок сообщений от одн
|
||||
Программе доступны данные графического экрана (область памяти, которая
|
||||
собственно и отображает содержимое экрана) напрямую без вызовов
|
||||
системных функций через селектор gs:
|
||||
mov eax, [gs:0]
|
||||
mov eax, [gs:0]
|
||||
поместит в eax первый dword буфера, содержащий информацию о цвете
|
||||
левой верхней точки (и, возможно, цвета нескольких следующих).
|
||||
mov [gs:0], eax
|
||||
mov [gs:0], eax
|
||||
при работе в режимах VESA c LFB
|
||||
установит цвет левой верхней точки
|
||||
(и возможно, цвета нескольких следующих).
|
||||
@@ -3356,6 +3361,7 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_MEM_FREE (13)
|
||||
|
||||
======================================================================
|
||||
====================== Функция 68, подфункция 14 =====================
|
||||
====== Ожидать получения сигнала от других приложений/драйверов. =====
|
||||
@@ -3368,12 +3374,16 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
||||
* eax разрушается
|
||||
* буфер, на который указывает ecx, содержит следующую информацию:
|
||||
* +0: dword: идентификатор последующих данных сигнала
|
||||
* +4: данные принятого сигнала (20 байт), формат которых
|
||||
* +4: 5 dword: данные принятого сигнала, формат которых
|
||||
определяется первым dword-ом
|
||||
Замечания:
|
||||
* Бесконечно ожидает любое событие в очереди событий текущего потока.
|
||||
* Сбрасывает байт приоритета в буфере.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_WAIT_SIGNAL (14)
|
||||
|
||||
======================================================================
|
||||
=========== Функция 68, подфункция 16 - загрузить драйвер. ===========
|
||||
======================================================================
|
||||
@@ -3382,19 +3392,20 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
||||
* ebx = 16 - номер подфункции
|
||||
* ecx = указатель на ASCIIZ-строку с именем драйвера
|
||||
Возвращаемое значение:
|
||||
* eax = 0 - неудача
|
||||
* иначе eax = хэндл драйвера
|
||||
* eax = хэндл драйвера
|
||||
0 при ошибке
|
||||
Замечания:
|
||||
* Если драйвер ещё не загружен, он загружается;
|
||||
если драйвер уже загружен, ничего не меняется.
|
||||
* Имя драйвера чувствительно к регистру символов.
|
||||
Максимальная длина имени - 16 символов, включая завершающий
|
||||
нулевой символ, остальные символы игнорируются.
|
||||
* Драйвер с именем ABC загружается из файла /sys/drivers/ABC.sys.
|
||||
* Драйвер с именем "ABC" загружается из файла /sys/drivers/ABC.sys.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_LOAD_DRIVER (16)
|
||||
|
||||
======================================================================
|
||||
========== Функция 68, подфункция 17 - управление драйвером. =========
|
||||
======================================================================
|
||||
@@ -3405,19 +3416,21 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
||||
* +0: dword: хэндл драйвера
|
||||
* +4: dword: код функции драйвера
|
||||
* +8: dword: указатель на входные данные
|
||||
* +12 = +0xC: dword: размер входных данных
|
||||
* +12 = +0x0C: dword: размер входных данных
|
||||
* +16 = +0x10: dword: указатель на выходные данные
|
||||
* +20 = +0x14: dword: размер выходных данных
|
||||
Возвращаемое значение:
|
||||
* eax = определяется драйвером
|
||||
-1 при ошибке
|
||||
Замечания:
|
||||
* Коды функций и структура входных/выходных данных
|
||||
определяются драйвером.
|
||||
* Предварительно должен быть получен хэндл драйвера подфункцией 16.
|
||||
* Хэндл драйвера необходимо предварительно получить подфункцией 16.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_CONTROL_DRIVER (17)
|
||||
|
||||
======================================================================
|
||||
== Функция 68, подфункция 18 - загрузить DLL с указанием кодировки. ==
|
||||
======================================================================
|
||||
@@ -3482,7 +3495,7 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
||||
Параметры:
|
||||
* eax = 68 - номер функции
|
||||
* ebx = 21 - номер подфункции
|
||||
* ecx = указатель на ASCIIZ-строку с именем драйвера
|
||||
* ecx = указатель на ASCIIZ-строку с путем к файлу драйвера
|
||||
* edx = указатель на командную строку
|
||||
Возвращаемое значение:
|
||||
* eax = 0 - неудача
|
||||
@@ -3674,22 +3687,40 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
||||
* функция загружает и, при необходимости, распаковывает файл (kunpack)
|
||||
|
||||
======================================================================
|
||||
======== Функция 68, подфункция 29 - allocate ring memory. =========
|
||||
======= Функция 68, подфункция 29 - выделить кольцевую память. =======
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 68 - function number
|
||||
* ebx = 29 - subfunction number
|
||||
* ecx = required size in bytes
|
||||
Returned value:
|
||||
* eax = 0 - failed
|
||||
* eax = pointer to the allocated ring
|
||||
Remarks:
|
||||
* The requested size must be an exact multiple of pagesize (4 Kb)
|
||||
* The function allocates memory in such a way that you can read and
|
||||
write beyond the size of the allocated memory and will reach the
|
||||
beginning of the buffer again.
|
||||
Параметры:
|
||||
* eax = 68 - номер функции
|
||||
* ebx = 29 - номер подфункции
|
||||
* ecx = требуемый размер в байтах
|
||||
Возвращаемое значение:
|
||||
* eax = 0 - неудача
|
||||
* eax = указатель на выделенную кольцевую память
|
||||
Замечания:
|
||||
* Запрошенный размер должен быть кратен размеру страницы (4 Кб).
|
||||
* Память выделяется так, что доступ за пределами буфера приводит
|
||||
к чтению/записи в его начало.
|
||||
|
||||
|
||||
======================================================================
|
||||
=========== Функция 68, подфункция 30 - выгрузить драйвер. ===========
|
||||
======================================================================
|
||||
Параметры:
|
||||
* eax = 68 - номер функции
|
||||
* ebx = 30 - номер подфункции
|
||||
* ecx = указатель на структуру SRV (хэндл драйвера)
|
||||
* edx = указатель на командную строку (может быть 0)
|
||||
Возвращаемое значение:
|
||||
* eax = -1 - неверные параметры
|
||||
* eax = -2 - ошибка при освобождении памяти драйвера
|
||||
* иначе eax = указатель на следующую структуру SRV (бывший SRV.fd)
|
||||
Замечания:
|
||||
* Перед выгрузкой вызывается точка входа драйвера с DRV_EXIT.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_UNLOAD_DRIVER (30)
|
||||
|
||||
======================================================================
|
||||
======== Функция 68, подфункция 31 - получить данные драйвера. =======
|
||||
======================================================================
|
||||
@@ -3788,7 +3819,7 @@ Remarks:
|
||||
и при поступлении нового сообщения система будет ждать.
|
||||
Для синхронизации обрамляйте всю работу с буфером операциями
|
||||
блокировки/разблокировки
|
||||
neg [bufsize]
|
||||
neg [bufsize]
|
||||
* Данные в буфере трактуются как массив элементов переменной длины -
|
||||
сообщений. Формат сообщения указан в общем описании.
|
||||
|
||||
@@ -4527,7 +4558,7 @@ Remarks:
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_NETWORK_GET (74)
|
||||
bl - SSF_DEVICE_COUNT (255)
|
||||
bl - SSF_DEVICE_COUNT (-1)
|
||||
======================================================================
|
||||
==== Функция 74, подфункция 0, Получить тип сетевого устройства. =====
|
||||
======================================================================
|
||||
@@ -4723,10 +4754,11 @@ Remarks:
|
||||
Возвращаемое значение:
|
||||
* eax = число пакетов, полученных с ошибкой с момента запуска
|
||||
устройства, -1 при ошибке
|
||||
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_NETWORK_GET (74)
|
||||
bl - SSF_RX_PACKET_ERROR_COUNT (14)
|
||||
|
||||
======================================================================
|
||||
== Функция 74.15, Получить число пакетов отброшенных при получении. ==
|
||||
======================================================================
|
||||
@@ -4740,7 +4772,7 @@ Remarks:
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_NETWORK_GET (74)
|
||||
bl - SSF_RX_PACKET_DROP_COUNT (12)
|
||||
bl - SSF_RX_PACKET_DROP_COUNT (15)
|
||||
======================================================================
|
||||
=== Функция 74.16, Получить число пакетов утерянных при получении. ===
|
||||
======================================================================
|
||||
@@ -4990,13 +5022,39 @@ Remarks:
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_NETWORK_PROTOCOL (76)
|
||||
ebx - SSF_ETHERNET_READ_MAC (0x0000)
|
||||
ebx - SSF_IP4_PACKETS_SENT (0x10000)
|
||||
ebx - SSF_IP4_PACKETS_RECEIVED (0x10001)
|
||||
ebx - SSF_IP4_READ_IP (0x10002)
|
||||
ebx - SSF_IP4_WRITE_IP (0x10003)
|
||||
ebx - SSF_IP4_READ_DNS (0x10004)
|
||||
ebx - SSF_IP4_WRITE_DNS (0x10005)
|
||||
ebx - SSF_IP4_READ_SUBNET (0x10006)
|
||||
ebx - SSF_IP4_WRITE_SUBNET (0x10007)
|
||||
ebx - SSF_IP4_READ_GATEWAY (0x10008)
|
||||
ebx - SSF_IP4_WRITE_GATEWAY (0x10009)
|
||||
ebx - SSF_ICMP_PACKETS_SENT (0x20000)
|
||||
ebx - SSF_ICMP_PACKETS_RECEIVED (0x20001)
|
||||
ebx - SSF_ICMP_ECHO_REPLY (0x20003)
|
||||
ebx - SSF_UDP_PACKETS_SENT (0x30000)
|
||||
ebx - SSF_UDP_PACKETS_RECEIVED (0x30001)
|
||||
ebx - SSF_TCP_PACKETS_SENT (0x40000)
|
||||
ebx - SSF_TCP_PACKETS_RECEIVED (0x40001)
|
||||
ebx - SSF_ARP_PACKETS_SENT (0x50000)
|
||||
ebx - SSF_ARP_PACKETS_RECEIVED (0x50001)
|
||||
ebx - SSF_ARP_GET_ENTRY_COUNT (0x50002)
|
||||
ebx - SSF_ARP_READ_ENTRY (0x50003)
|
||||
ebx - SSF_ARP_ADD_STATIC_ENTRY (0x50004)
|
||||
ebx - SSF_ARP_DEL_ENTRY (0x50005)
|
||||
ebx - SSF_ARP_SEND_ANNOUNCE (0x50006)
|
||||
ebx - SSF_ARP_CONFLICTS_COUNT (0x50007)
|
||||
======================================================================
|
||||
============= Функция 77, подфункция 0, Создать фьютекс. =============
|
||||
======================================================================
|
||||
Параметры:
|
||||
* eax = 77 - номер функции
|
||||
* ebx = 0 - номер подфункции
|
||||
* ecx = указатель на контрольное значение фьютекса (dword)
|
||||
* ecx = контрольное значение фьютекса (dword)
|
||||
Возвращаемое значение:
|
||||
* eax = дескриптор фьютекса, 0 при ошибке
|
||||
|
||||
@@ -5025,11 +5083,12 @@ Remarks:
|
||||
* eax = 77 - номер функции
|
||||
* ebx = 2 - номер подфункции
|
||||
* ecx = дескриптор фьютекса
|
||||
* edx = контрольное значение
|
||||
* edx = контрольное значение фьютекса (dword)
|
||||
* esi = таймаут в сотых секунды, 0 - ждать бесконечно
|
||||
Возвращаемое значение:
|
||||
* eax = 0 - успешно, -1 - таймаут,
|
||||
-2 - контрольное значение не соответствует
|
||||
* eax = 0 - успешно,
|
||||
-1 - таймаут,
|
||||
-2 - контрольное значение фьютекса не соответствует
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
@@ -5049,7 +5108,11 @@ Remarks:
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - SSF_WAKE (3)
|
||||
======================================================================
|
||||
======= Функция 77, подфункция 10, Прочитать из файла в буфер. =======
|
||||
Замечания:
|
||||
* Подфункции 4-7 зарезервированы и сейчас возвращают -1.
|
||||
* Подфункции 8, 9 и 12 не реализованы и возвращают -EBADF (-9).
|
||||
======================================================================
|
||||
=========== Функция 77, подфункция 10, Прочитать из файла. ===========
|
||||
======================================================================
|
||||
Параметры:
|
||||
* eax = 77 - номер функции
|
||||
@@ -5059,10 +5122,15 @@ Remarks:
|
||||
* esi = сколько байт прочитать
|
||||
Возвращаемое значение:
|
||||
* eax = количество прочитанных байт
|
||||
0 при EOF
|
||||
-EBADF (-9) при ошибке
|
||||
Замечания:
|
||||
* Поддерживаются только pipe-дескрипторы.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - ...
|
||||
ebx - SSF_FILE_READ (10)
|
||||
|
||||
======================================================================
|
||||
======== Функция 77, подфункция 11, Записать из буфера в файл. =======
|
||||
======================================================================
|
||||
@@ -5070,14 +5138,19 @@ Remarks:
|
||||
* eax = 77 - номер функции
|
||||
* ebx = 11 - номер подфункции
|
||||
* ecx = дескриптор файла
|
||||
* edx = указатель на буфер, откуда брать данные для записи
|
||||
* edx = указатель на буфер, откуда брать данные для записи
|
||||
* esi = сколько байт записать
|
||||
Возвращаемое значение:
|
||||
* eax = количество записанных байт
|
||||
-EBADF (-9) при ошибке
|
||||
-EPIPE (-32) если нет читателей
|
||||
Замечания:
|
||||
* Поддерживаются только pipe-дескрипторы.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - ...
|
||||
ebx - SSF_FILE_WRITE (11)
|
||||
|
||||
======================================================================
|
||||
=========== Функция 77, подфункция 13, Создать новый pipe. ===========
|
||||
======================================================================
|
||||
@@ -5089,15 +5162,20 @@ Remarks:
|
||||
* eax = 77 - номер функции
|
||||
* ebx = 13 - номер подфункции
|
||||
* ecx = адрес pipefd
|
||||
* edx = флаги. На данный момент если поднят O_CLOEXEC (0x40000), то
|
||||
сисфункция завершится с ошибкой. Поэтому в качестве флагов можно
|
||||
передать просто 0.
|
||||
* edx = флаги. Разрешен только O_CLOEXEC (0x40000).
|
||||
Любые другие биты приводят к -EINVAL (-11).
|
||||
Возвращаемое значение:
|
||||
* eax = 0 если успех, иначе ошибка.
|
||||
* eax = 0 если успех,
|
||||
иначе отрицательный код ошибки:
|
||||
-EINVAL (-11), -EFAULT (-14), -ENFILE (-23), -EMFILE (-24)
|
||||
Примечания:
|
||||
* В случае успеха pipefd[0] является дескриптором чтения, а pipefd[1]
|
||||
- дескриптором записи.
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - ...
|
||||
ebx - SSF_PIPE_CREATE (13)
|
||||
|
||||
======================================================================
|
||||
========== Функция -1 - завершить выполнение потока/процесса =========
|
||||
======================================================================
|
||||
@@ -5115,6 +5193,7 @@ Remarks:
|
||||
|
||||
---------------------- Константы для регистров: ----------------------
|
||||
eax - SF_TERMINATE_PROCESS (-1)
|
||||
|
||||
======================================================================
|
||||
=== Функция 80 - работа с файловой системой с указанием кодировки. ===
|
||||
======================================================================
|
||||
|
||||
+194
-58
@@ -1972,7 +1972,7 @@ Remarks:
|
||||
subfunction 2 of function 15.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_BACKGROUND_GET_RECT (39)
|
||||
eax - SF_BACKGROUND_GET (39)
|
||||
======================================================================
|
||||
== Function 39, subfunction 3 - get rect from the background image. =
|
||||
======================================================================
|
||||
@@ -2152,7 +2152,7 @@ Parameters:
|
||||
* ebx = 2 - subfunction number
|
||||
* ecx = pointer to the color table
|
||||
* edx = size of the color table
|
||||
(must be 40 bytes for future compatibility)
|
||||
(up to 192 bytes; 40 bytes for the base structure)
|
||||
Format of the color table is shown in description of subfunction 3.
|
||||
Returned value:
|
||||
* function does not return value
|
||||
@@ -2179,21 +2179,21 @@ Parameters:
|
||||
* ecx = pointer to the buffer with size edx bytes,
|
||||
where table will be written
|
||||
* edx = size of color table
|
||||
(must be 40 bytes for future compatibility)
|
||||
(up to 192 bytes; 40 bytes for the base structure)
|
||||
Returned value:
|
||||
* function does not return value
|
||||
Format of the color table:
|
||||
each item is dword-value for color 0x00RRGGBB
|
||||
* +0: dword: none - reserved
|
||||
* +4: dword: none - reserved
|
||||
* +0: dword: frame
|
||||
* +4: dword: grab
|
||||
* +8: dword: work_dark - dark color of working area
|
||||
used to give a user 3D-like feelings about interface elements
|
||||
* +12 = +0xC: dword: work_light - light color of working area
|
||||
used to give a user 3D-like feelings about interface elements
|
||||
* +16 = +0x10: dword: grab_text - color of text on header
|
||||
* +20 = +0x14: dword: work - color of working area
|
||||
* +24 = +0x18: dword: button - color of button in working area
|
||||
* +28 = +0x1C: dword: button_text - color of text on button
|
||||
* +24 = +0x18: dword: work_button - color of button in working area
|
||||
* +28 = +0x1C: dword: work_button_text - color of text on button
|
||||
in working area
|
||||
* +32 = +0x20: dword: work_text - color of text in working area
|
||||
* +36 = +0x24: dword: graph - color of graphics in working area
|
||||
@@ -2206,6 +2206,8 @@ Remarks:
|
||||
; this function with ecx=sc
|
||||
mov ecx, [sc.work_button_text] ; read text color on
|
||||
; button in working area
|
||||
* The table may be longer (up to 192 bytes); extra fields are copied
|
||||
as-is and are interpreted by skins.
|
||||
* A program itself decides to use or not to use color table.
|
||||
For usage program must simply at calls to drawing functions select
|
||||
color taken from the table.
|
||||
@@ -2478,11 +2480,11 @@ Remarks:
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_SET_WINDOW_SHAPE (50)
|
||||
======================================================================
|
||||
==================== Function 51 - create thread. ====================
|
||||
============= Function 51, subfunction 1 - create thread. ============
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 51 - function number
|
||||
* ebx = 1 - unique subfunction
|
||||
* ebx = 1 - subfunction number
|
||||
* ecx = address of thread entry point (starting eip)
|
||||
* edx = pointer to thread stack (starting esp)
|
||||
Returned value:
|
||||
@@ -2491,6 +2493,49 @@ Returned value:
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_CREATE_THREAD (51)
|
||||
ebx - SSF_CREATE_THREAD (1), SSF_GET_CURR_THREAD_SLOT (2),
|
||||
SSF_GET_THREAD_PRIORITY (3), SSF_SET_THREAD_PRIORITY (4)
|
||||
======================================================================
|
||||
================== Function 51, subfunction 2 ========================
|
||||
================== Get current thread slot number ====================
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 51 - function number
|
||||
* ebx = 2 - subfunction number
|
||||
Returned value:
|
||||
* eax = slot number of the current thread
|
||||
|
||||
======================================================================
|
||||
================== Function 51, subfunction 3 ========================
|
||||
===================== Get thread priority ============================
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 51 - function number
|
||||
* ebx = 3 - subfunction number
|
||||
* ecx = slot number of the thread or -1 (current thread)
|
||||
Returned value:
|
||||
* eax = -1 - error (invalid slot number or thread terminated)
|
||||
* otherwise eax = thread priority
|
||||
Remarks:
|
||||
* Priority range is 0..255.
|
||||
0 is the highest priority and is set by default at creation.
|
||||
|
||||
======================================================================
|
||||
================== Function 51, subfunction 4 ========================
|
||||
===================== Set thread priority ============================
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 51 - function number
|
||||
* ebx = 4 - subfunction number
|
||||
* ecx = slot number of the thread or -1 (current thread)
|
||||
* edx = new thread priority
|
||||
Returned value:
|
||||
* eax = -1 - error (invalid slot number or thread terminated)
|
||||
* otherwise eax = previous thread priority
|
||||
Remarks:
|
||||
* Priority range is 0..255.
|
||||
0 is the highest priority and is set by default at creation.
|
||||
|
||||
======================================================================
|
||||
==================== Function 54, subfunction 0 ======================
|
||||
============== Get the number of slots in the clipboard. =============
|
||||
@@ -3289,61 +3334,63 @@ Remarks:
|
||||
ebx - SSF_MEM_FREE (13)
|
||||
======================================================================
|
||||
===================== Function 68, subfunction 14 ====================
|
||||
============ Wait for signal from another program/driver. ============
|
||||
======= Wait for a signal from other applications/drivers. ===========
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 68 - function number
|
||||
* ebx = 14 - subfunction number
|
||||
* ecx = pointer to the buffer for information (24 bytes)
|
||||
* ecx = pointer to data buffer (6 dword = 24 bytes)
|
||||
Returned value:
|
||||
* eax is destroyed
|
||||
* buffer pointed to by ecx contains the following information:
|
||||
* +0: dword: identifier for following data of signal
|
||||
* +4: dword: data of signal (20 bytes), format of which is defined
|
||||
by the first dword
|
||||
* +0: dword: EVENT.code (identifier of following data)
|
||||
* +4: 5 dword: EVENT.data, format depends on EVENT.code
|
||||
Remarks:
|
||||
* Waits indefinitely for any event in the current thread event queue.
|
||||
* The priority byte in the buffer is cleared by the kernel.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_WAIT_SIGNAL (14)
|
||||
======================================================================
|
||||
============= Function 68, subfunction 16 - load driver. =============
|
||||
=========== Function 68, subfunction 16 - load driver. ===============
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 68 - function number
|
||||
* ebx = 16 - subfunction number
|
||||
* ecx = pointer to ASCIIZ-string with driver name
|
||||
Returned value:
|
||||
* eax = 0 - failed
|
||||
* otherwise eax = driver handle
|
||||
* eax = driver handle, 0 on error
|
||||
Remarks:
|
||||
* If the driver was not loaded yet, it is loaded;
|
||||
if the driver was loaded yet, nothing happens.
|
||||
* If the driver is not loaded yet, it is loaded;
|
||||
if the driver is already loaded, nothing changes.
|
||||
* Driver name is case-sensitive.
|
||||
Maximum length of the name is 16 characters, including
|
||||
terminating null character, the rest is ignored.
|
||||
* Driver ABC is loaded from file /sys/drivers/ABC.sys.
|
||||
* Driver with name "ABC" is loaded from /sys/drivers/ABC.sys.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_LOAD_DRIVER (16)
|
||||
======================================================================
|
||||
============ Function 68, subfunction 17 - driver control. ===========
|
||||
========== Function 68, subfunction 17 - control driver. =============
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 68 - function number
|
||||
* ebx = 17 - subfunction number
|
||||
* ecx = pointer to the control structure:
|
||||
* +0: dword: handle of driver
|
||||
* +4: dword: code of driver function
|
||||
* +8: dword: pointer to input data
|
||||
* +12 = +0xC: dword: size of input data
|
||||
* +16 = +0x10: dword: pointer to output data
|
||||
* +20 = +0x14: dword: size of output data
|
||||
* +0: dword: driver handle
|
||||
* +4: dword: driver function code
|
||||
* +8: dword: pointer to input data
|
||||
* +12: dword: size of input data
|
||||
* +16: dword: pointer to output data
|
||||
* +20: dword: size of output data
|
||||
Returned value:
|
||||
* eax = determined by driver
|
||||
* eax = determined by driver, -1 on error
|
||||
Remarks:
|
||||
* Function codes and the structure of input/output data
|
||||
are defined by driver.
|
||||
* Previously one must obtain driver handle by subfunction 16.
|
||||
are defined by the driver.
|
||||
* Driver handle can be obtained by subfunction 16.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
@@ -3411,7 +3458,7 @@ Remarks:
|
||||
Parameters:
|
||||
* eax = 68 - function number
|
||||
* ebx = 21 - subfunction number
|
||||
* ecx = pointer to ASCIIZ-string with driver name
|
||||
* ecx = pointer to ASCIIZ-string with path to driver file
|
||||
* edx = pointer to command line
|
||||
Returned value:
|
||||
* eax = 0 - failed
|
||||
@@ -3616,9 +3663,24 @@ Remarks:
|
||||
write beyond the size of the allocated memory and will reach the
|
||||
beginning of the buffer again.
|
||||
|
||||
======================================================================
|
||||
=========== Function 68, subfunction 30 - unload driver. ============
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 68 - function number
|
||||
* ebx = 30 - subfunction number
|
||||
* ecx = pointer to SRV structure (driver handle)
|
||||
* edx = pointer to command line (may be 0)
|
||||
Returned value:
|
||||
* eax = -1 - invalid parameters
|
||||
* eax = -2 - error while freeing driver memory
|
||||
* otherwise eax = pointer to the next SRV structure (former SRV.fd)
|
||||
Remarks:
|
||||
* The driver entry is called with DRV_EXIT before unloading.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_SYS_MISC (68)
|
||||
ebx - SSF_MEM_ALLOC_RING (29)
|
||||
ebx - SSF_UNLOAD_DRIVER (30)
|
||||
|
||||
======================================================================
|
||||
=========== Function 68, subfunction 31 - get driver data. ===========
|
||||
@@ -3833,7 +3895,7 @@ Remarks:
|
||||
eax - SF_DEBUG (69)
|
||||
ebx - SSF_RESUME (5)
|
||||
======================================================================
|
||||
= Fucntion 69, subfunction 6 - read from memory of debugged process. =
|
||||
= Function 69, subfunction 6 - read from memory of debugged process. =
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 69 - function number
|
||||
@@ -4442,17 +4504,17 @@ Returned value:
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_BLITTER (73)
|
||||
======================================================================
|
||||
= Function 74, Subfunction 255, Get number of active network devices. =
|
||||
= Function 74, Subfunction -1, Get number of active network devices. =
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 74 - function number
|
||||
* bl = 255 - subfunction number
|
||||
* bl = -1 - subfunction number
|
||||
Returned value:
|
||||
* eax = number of active network devices
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_NETWORK_GET (74)
|
||||
bl - SSF_DEVICE_COUNT (255)
|
||||
bl - SSF_DEVICE_COUNT (-1)
|
||||
======================================================================
|
||||
======== Function 74, Subfunction 0, Get network device type. ========
|
||||
======================================================================
|
||||
@@ -4605,7 +4667,7 @@ Parameters:
|
||||
* bl = 11 - subfunction number
|
||||
* bh = device number
|
||||
Returned value:
|
||||
* eax = Number of erroneous packets received since device start, -1 on error
|
||||
* eax = Number of erroneous packets transmitted since device start, -1 on error
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_NETWORK_GET (74)
|
||||
@@ -4661,7 +4723,7 @@ Returned value:
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_NETWORK_GET (74)
|
||||
bl - SSF_RX_PACKET_DROP_COUNT (12)
|
||||
bl - SSF_RX_PACKET_DROP_COUNT (15)
|
||||
======================================================================
|
||||
==== Function 74, Subfunction 16, Get RX missed packets counter. =====
|
||||
======================================================================
|
||||
@@ -5174,19 +5236,41 @@ Returned value:
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_NETWORK_PROTOCOL (76)
|
||||
ebx - SSF_ETHERNET_READ_MAC (0x0000)
|
||||
ebx - SSF_IP4_PACKETS_SENT (0x10000)
|
||||
ebx - SSF_IP4_PACKETS_RECEIVED (0x10001)
|
||||
ebx - SSF_IP4_READ_IP (0x10002)
|
||||
ebx - SSF_IP4_WRITE_IP (0x10003)
|
||||
ebx - SSF_IP4_READ_DNS (0x10004)
|
||||
ebx - SSF_IP4_WRITE_DNS (0x10005)
|
||||
ebx - SSF_IP4_READ_SUBNET (0x10006)
|
||||
ebx - SSF_IP4_WRITE_SUBNET (0x10007)
|
||||
ebx - SSF_IP4_READ_GATEWAY (0x10008)
|
||||
ebx - SSF_IP4_WRITE_GATEWAY (0x10009)
|
||||
ebx - SSF_ICMP_PACKETS_SENT (0x20000)
|
||||
ebx - SSF_ICMP_PACKETS_RECEIVED (0x20001)
|
||||
ebx - SSF_ICMP_ECHO_REPLY (0x20003)
|
||||
ebx - SSF_UDP_PACKETS_SENT (0x30000)
|
||||
ebx - SSF_UDP_PACKETS_RECEIVED (0x30001)
|
||||
ebx - SSF_TCP_PACKETS_SENT (0x40000)
|
||||
ebx - SSF_TCP_PACKETS_RECEIVED (0x40001)
|
||||
ebx - SSF_ARP_PACKETS_SENT (0x50000)
|
||||
ebx - SSF_ARP_PACKETS_RECEIVED (0x50001)
|
||||
ebx - SSF_ARP_GET_ENTRY_COUNT (0x50002)
|
||||
ebx - SSF_ARP_READ_ENTRY (0x50003)
|
||||
ebx - SSF_ARP_ADD_STATIC_ENTRY (0x50004)
|
||||
ebx - SSF_ARP_DEL_ENTRY (0x50005)
|
||||
ebx - SSF_ARP_SEND_ANNOUNCE (0x50006)
|
||||
ebx - SSF_ARP_CONFLICTS_COUNT (0x50007)
|
||||
======================================================================
|
||||
========== Function 77, Subfunction 0, Create futex object ===========
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 77 - function number
|
||||
* ebx = 0 - subfunction number
|
||||
* ecx = pointer to futex dword
|
||||
* ecx = futex control value (dword)
|
||||
Returned value:
|
||||
* eax = futex handle, 0 on error
|
||||
Remarks:
|
||||
* Use subfunction 1 to destroy the futex.
|
||||
The kernel destroys the futexes automatically when the process
|
||||
terminates.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
@@ -5201,7 +5285,8 @@ Parameters:
|
||||
Returned value:
|
||||
* eax = 0 - successfull, -1 on error
|
||||
Remarks:
|
||||
* The futex handle must have been created by subfunction 0
|
||||
* The kernel destroys the futexes automatically when the process
|
||||
terminates.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
@@ -5213,17 +5298,12 @@ Parameters:
|
||||
* eax = 77 - function number
|
||||
* ebx = 2 - subfunction number
|
||||
* ecx = futex handle
|
||||
* edx = control value
|
||||
* esi = timeout in system ticks or 0 for infinity
|
||||
* edx = futex control value (dword)
|
||||
* esi = timeout in hundredths of a second, 0 - wait forever
|
||||
Returned value:
|
||||
* eax = 0 - successfull
|
||||
-1 - timeout
|
||||
-2 - futex dword does not have the same value as edx
|
||||
Remarks:
|
||||
* This functionn tests that the value at the futex dword still
|
||||
contains the expected control value, and if so, then sleeps
|
||||
waiting for a wake operation on the futex.
|
||||
* The futex handle must have been created by subfunction 0
|
||||
-1 - timeout
|
||||
-2 - futex control value doesn't match
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
@@ -5239,15 +5319,71 @@ Parameters:
|
||||
Returned value:
|
||||
* eax = number of waiters that were woken up
|
||||
|
||||
Remarks:
|
||||
* This function wakes at most edx of the waiters that are
|
||||
waiting (e.g., inside futex wait) on the futex dword
|
||||
* The futex handle must have been created by subfunction 0
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - SSF_WAKE (3)
|
||||
======================================================================
|
||||
Remarks:
|
||||
* Subfunctions 4-7 are reserved and currently return -1.
|
||||
* Subfunctions 8-9 and 12 are not implemented and return -EBADF (-9).
|
||||
======================================================================
|
||||
============ Function 77, Subfunction 10, Read from file. ============
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 77 - function number
|
||||
* ebx = 10 - subfunction number
|
||||
* ecx = file handle
|
||||
* edx = pointer to destination buffer
|
||||
* esi = number of bytes to read
|
||||
Returned value:
|
||||
* eax = number of bytes read,
|
||||
0 on EOF,
|
||||
-EBADF (-9) on error
|
||||
Remarks:
|
||||
* Only pipe descriptors are supported.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - SSF_FILE_READ (10)
|
||||
======================================================================
|
||||
=========== Function 77, Subfunction 11, Write to file. =============
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 77 - function number
|
||||
* ebx = 11 - subfunction number
|
||||
* ecx = file handle
|
||||
* edx = pointer to source buffer
|
||||
* esi = number of bytes to write
|
||||
Returned value:
|
||||
* eax = number of bytes written,
|
||||
-EBADF (-9) on error,
|
||||
-EPIPE (-32) if no readers
|
||||
Remarks:
|
||||
* Only pipe descriptors are supported.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - SSF_FILE_WRITE (11)
|
||||
======================================================================
|
||||
========== Function 77, Subfunction 13, Create pipe. ================
|
||||
======================================================================
|
||||
Parameters:
|
||||
* eax = 77 - function number
|
||||
* ebx = 13 - subfunction number
|
||||
* ecx = pointer to pipefd[2] array (two dword handles)
|
||||
* edx = flags (only O_CLOEXEC is allowed)
|
||||
Returned value:
|
||||
* eax = 0 on success,
|
||||
negative errno value on error:
|
||||
-EINVAL (-11), -EFAULT (-14), -ENFILE (-23), -EMFILE (-24)
|
||||
Remarks:
|
||||
* On success, pipefd[0] is a read handle and pipefd[1] is a
|
||||
write handle.
|
||||
|
||||
---------------------- Constants for registers: ----------------------
|
||||
eax - SF_FUTEX (77)
|
||||
ebx - SSF_PIPE_CREATE (13)
|
||||
======================================================================
|
||||
=== Function 80 - file system interface with parameter of encoding ===
|
||||
======================================================================
|
||||
Parameters:
|
||||
|
||||
@@ -1058,10 +1058,11 @@ ipv4_connect:
|
||||
|
||||
; Fill in local IP
|
||||
cmp [eax + IP_SOCKET.LocalIP], 0
|
||||
jne @f
|
||||
jne .local_ip_ready
|
||||
push [IPv4_address + 4] ; FIXME: use correct local IP
|
||||
pop [eax + IP_SOCKET.LocalIP]
|
||||
|
||||
.local_ip_ready:
|
||||
; Fill in remote IP
|
||||
pushd [edx + 4]
|
||||
pop [eax + IP_SOCKET.RemoteIP]
|
||||
|
||||
+18
-8
@@ -70,11 +70,11 @@ SF_SYSTEM=18
|
||||
SSF_WINDOW_BEHAVIOR=25 ; window focus relation with other windows
|
||||
SSSF_GET_WB=1
|
||||
SSSF_SET_WB=2
|
||||
SF_MIDI=20
|
||||
SSF_RESET=1
|
||||
SSF_OUTPUT=2
|
||||
SF_MIDI=20 ; deprecated/undefined in current kernel
|
||||
SSF_RESET=1 ; deprecated
|
||||
SSF_OUTPUT=2 ; deprecated
|
||||
SF_SYSTEM_SET=21
|
||||
SSF_MPU_MIDI_BASE=1
|
||||
SSF_MPU_MIDI_BASE=1 ; not used (reserved)
|
||||
SSF_KEYBOARD_LAYOUT=2
|
||||
SSF_SYS_LANG=5
|
||||
SSF_ACCESS_HD_LBA=11 ; setting of low-level access to HD
|
||||
@@ -112,7 +112,7 @@ SF_BACKGROUND_GET=39
|
||||
;SSF_PIXEL_BG=2
|
||||
;SSF_MODE_BG=4
|
||||
SF_SET_EVENTS_MASK=40 ; turn on/off desired events
|
||||
SF_PORT_IN_OUT=43 ; input/output to a port
|
||||
SF_PORT_IN_OUT=43 ; deprecated/undefined in current kernel
|
||||
SF_SET_PORTS=46 ; reserve/free a group of input/output ports
|
||||
SF_DRAW_NUMBER=47 ; draw number to the window
|
||||
SF_STYLE_SETTINGS=48
|
||||
@@ -132,6 +132,10 @@ SF_STYLE_SETTINGS=48
|
||||
SF_APM=49
|
||||
SF_SET_WINDOW_SHAPE=50
|
||||
SF_CREATE_THREAD=51
|
||||
SSF_CREATE_THREAD=1
|
||||
SSF_GET_CURR_THREAD_SLOT=2
|
||||
SSF_GET_THREAD_PRIORITY=3
|
||||
SSF_SET_THREAD_PRIORITY=4
|
||||
SF_CLIPBOARD=54
|
||||
SSF_GET_SLOT_COUNT=0 ; get the number of slots in the clipboard
|
||||
SSF_READ_CB=1
|
||||
@@ -184,7 +188,7 @@ SF_SYS_MISC=68
|
||||
SSF_HEAP_INIT=11
|
||||
SSF_MEM_ALLOC=12
|
||||
SSF_MEM_FREE=13
|
||||
SSF_WAIT_SIGNAL=14 ; wait for signal from another program/driver
|
||||
SSF_WAIT_SIGNAL=14 ; wait for a signal from other process
|
||||
SSF_LOAD_DRIVER=16
|
||||
SSF_CONTROL_DRIVER=17
|
||||
SSF_LOAD_DLL=19
|
||||
@@ -196,6 +200,9 @@ SF_SYS_MISC=68
|
||||
SSF_SET_EXCEPTION_STATE=25
|
||||
SSF_MEM_FREE_EXT=26
|
||||
SSF_LOAD_FILE=27
|
||||
SSF_MEM_ALLOC_RING=29
|
||||
SSF_UNLOAD_DRIVER=30
|
||||
SSF_GET_DRIVER_DATA=31
|
||||
SF_DEBUG=69
|
||||
SSF_SET_MESSAGE_AREA=0
|
||||
SSF_GET_REGISTERS=1
|
||||
@@ -221,7 +228,7 @@ SF_FILE=70
|
||||
SF_SET_CAPTION=71
|
||||
SF_SEND_MESSAGE=72
|
||||
SF_BLITTER=73
|
||||
SF_NETWORK_DEVICE=74
|
||||
SF_NETWORK_GET=74
|
||||
SSF_DEVICE_COUNT=255 ; get number of active network devices
|
||||
SSF_DEVICE_TYPE=0
|
||||
SSF_DEVICE_NAME=1
|
||||
@@ -250,7 +257,7 @@ SF_NETWORK_SOCKET=75
|
||||
SSF_RECEIVE=7
|
||||
SSF_SET_OPTIONS=8
|
||||
SSF_GET_OPTIONS=9
|
||||
SSF_SOCKET_PAIR=10
|
||||
SSF_GET_PAIR=10
|
||||
SF_NETWORK_PROTOCOL=76
|
||||
SSF_ETHERNET_READ_MAC=0
|
||||
SSF_IP4_PACKETS_SENT=10000h
|
||||
@@ -283,6 +290,9 @@ SF_FUTEX=77
|
||||
SSF_DESTROY=1
|
||||
SSF_WAIT=2
|
||||
SSF_WAKE=3
|
||||
SSF_FILE_READ=10
|
||||
SSF_FILE_WRITE=11
|
||||
SSF_PIPE_CREATE=13
|
||||
|
||||
; File system errors:
|
||||
FSERR_SUCCESS=0
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@@unpack$qqspvt1 equ unpack
|
||||
|
||||
include "..\..\system\skincfg\trunk\kglobals.inc"
|
||||
include "..\..\system\skincfg\trunk\unpacker.inc"
|
||||
|
||||
IncludeIGlobals
|
||||
IncludeUGlobals
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
@@unpack$qqspvt1 equ unpack
|
||||
|
||||
include "..\..\system\skincfg\kglobals.inc"
|
||||
include "..\..\system\skincfg\unpacker.inc"
|
||||
|
||||
IncludeIGlobals
|
||||
IncludeUGlobals
|
||||
+66
-67
@@ -56,32 +56,32 @@ for %%i in (%BIN% %BIN%\demos %BIN%\develop %BIN%\lib %BIN%\games %BIN%\network
|
||||
echo *
|
||||
echo Building system
|
||||
echo *
|
||||
fasm system\calendar\trunk\calendar.asm %BIN%\calendar
|
||||
fasm system\board\trunk\board.asm %BIN%\develop\board
|
||||
fasm system\commouse\trunk\commouse.asm %BIN%\commouse
|
||||
fasm system\cpu\trunk\cpu.asm %BIN%\cpu
|
||||
fasm system\cpuid\trunk\cpuid.asm %BIN%\cpuid
|
||||
fasm system\skincfg\trunk\skincfg.asm %BIN%\skincfg
|
||||
fasm system\docpack\trunk\docpack.asm %BIN%\docpack
|
||||
fasm system\end\trunk\end.asm %BIN%\end
|
||||
fasm system\calendar\calendar.asm %BIN%\calendar
|
||||
fasm system\board\board.asm %BIN%\develop\board
|
||||
rem fasm system\commouse\trunk\commouse.asm %BIN%\commouse
|
||||
fasm system\cpu\cpu.asm %BIN%\cpu
|
||||
rem fasm system\cpuid\trunk\cpuid.asm %BIN%\cpuid
|
||||
fasm system\skincfg\skincfg.asm %BIN%\skincfg
|
||||
fasm system\docpack\docpack.asm %BIN%\docpack
|
||||
fasm system\end\end.asm %BIN%\end
|
||||
fasm system\gmon\gmon.asm %BIN%\gmon
|
||||
fasm system\icon\trunk\icon.asm %BIN%\icon
|
||||
fasm system\kbd\trunk\kbd.ASM %BIN%\kbd
|
||||
fasm system\launcher\trunk\launcher.asm %BIN%\launcher
|
||||
fasm system\menu\trunk\menu.asm %BIN%\@menu
|
||||
fasm system\mgb\trunk\mgb.asm %BIN%\mgb
|
||||
fasm system\mousemul\trunk\mousemul.asm %BIN%\mousemul
|
||||
fasm system\PANEL\trunk\@TASKBAR.ASM %BIN%\@TASKBAR
|
||||
fasm system\pcidev\trunk\pcidev.asm %BIN%\pcidev
|
||||
fasm system\RB\trunk\@RB.ASM %BIN%\@RB
|
||||
fasm system\rdsave\trunk\rdsave.asm %BIN%\rdsave
|
||||
fasm system\run\trunk\run.asm %BIN%\run
|
||||
fasm system\setup\trunk\setup.asm %BIN%\setup
|
||||
fasm system\skinsel\skinsel.asm %BIN%\skinsel
|
||||
fasm system\ss\trunk\@ss.asm %BIN%\@ss
|
||||
fasm system\vrr\trunk\vrr.asm %BIN%\vrr
|
||||
fasm system\vrr_m\trunk\vrr_m.asm %BIN%\vrr_m
|
||||
fasm system\zkey\trunk\zkey.asm %BIN%\zkey
|
||||
fasm system\icon\icon.asm %BIN%\icon
|
||||
rem fasm system\kbd\trunk\kbd.ASM %BIN%\kbd
|
||||
fasm system\launcher\launcher.asm %BIN%\launcher
|
||||
fasm system\menu\menu.asm %BIN%\@menu
|
||||
rem fasm system\mgb\trunk\mgb.asm %BIN%\mgb
|
||||
fasm system\mousemul\mousemul.asm %BIN%\mousemul
|
||||
fasm system\taskbar\TASKBAR.ASM %BIN%\@TASKBAR
|
||||
rem fasm system\pcidev\trunk\pcidev.asm %BIN%\pcidev
|
||||
rem fasm system\RB\trunk\@RB.ASM %BIN%\@RB
|
||||
fasm system\rdsave\rdsave.asm %BIN%\rdsave
|
||||
fasm system\run\run.asm %BIN%\run
|
||||
fasm system\setup\setup.asm %BIN%\setup
|
||||
rem fasm system\skinsel\skinsel.asm %BIN%\skinsel
|
||||
rem fasm system\ss\trunk\@ss.asm %BIN%\@ss
|
||||
rem fasm system\vrr\trunk\vrr.asm %BIN%\vrr
|
||||
rem fasm system\vrr_m\trunk\vrr_m.asm %BIN%\vrr_m
|
||||
fasm system\zkey\zkey.asm %BIN%\zkey
|
||||
|
||||
echo *
|
||||
echo Building develop
|
||||
@@ -164,17 +164,16 @@ echo Building media
|
||||
echo *
|
||||
rem media\ac97snd\trunk\ac97snd.asm ac97snd
|
||||
fasm media\animage\animage.asm %BIN%\animage
|
||||
fasm media\cdp\trunk\cdp.asm %BIN%\cdp
|
||||
fasm media\gifview\trunk\gifview.asm %BIN%\gifview
|
||||
fasm media\iconedit\trunk\iconedit.asm %BIN%\iconedit
|
||||
fasm media\jpegview\trunk\jpegview.asm %BIN%\jpegview
|
||||
fasm media\midamp\trunk\midamp.asm %BIN%\midamp
|
||||
fasm media\midiplay\trunk\midiplay.asm %BIN%\midiplay
|
||||
fasm media\mixer\trunk\mixer.asm %BIN%\mixer
|
||||
|
||||
fasm media\mv\trunk\mv.asm %BIN%\mv
|
||||
fasm media\pic4\trunk\pic4.asm %BIN%\pic4
|
||||
fasm media\sb\trunk\sb.asm %BIN%\sb
|
||||
rem fasm media\cdp\trunk\cdp.asm %BIN%\cdp
|
||||
rem fasm media\gifview\trunk\gifview.asm %BIN%\gifview
|
||||
rem fasm media\iconedit\trunk\iconedit.asm %BIN%\iconedit
|
||||
rem fasm media\jpegview\trunk\jpegview.asm %BIN%\jpegview
|
||||
fasm media\midamp\midamp.asm %BIN%\midamp
|
||||
fasm media\midiplay\midiplay.asm %BIN%\midiplay
|
||||
rem fasm media\mixer\trunk\mixer.asm %BIN%\mixer
|
||||
rem fasm media\mv\trunk\mv.asm %BIN%\mv
|
||||
fasm media\pic4\pic4.asm %BIN%\pic4
|
||||
rem fasm media\sb\trunk\sb.asm %BIN%\sb
|
||||
fasm media\scrshoot\scrshoot.asm %BIN%\scrshoot
|
||||
|
||||
echo *
|
||||
@@ -183,9 +182,9 @@ echo *
|
||||
fasm games\15\trunk\15.asm %BIN%\games\15
|
||||
fasm games\arcanii\trunk\arcanii.asm %BIN%\games\arcanii
|
||||
fasm games\arcanoid\trunk\arcanoid.asm %BIN%\games\arcanoid
|
||||
cd games\c4\trunk\
|
||||
pushd games\c4\trunk\
|
||||
nasmw -f bin -o ..\..\..\%BIN%\games\c4 c4.asm
|
||||
cd ..\..\..
|
||||
popd
|
||||
fasm games\freecell\freecell.asm %BIN%\games\freecell
|
||||
fasm games\mblocks\trunk\mblocks.asm %BIN%\games\mblocks
|
||||
fasm games\phenix\trunk\phenix.asm %BIN%\games\phenix
|
||||
@@ -201,31 +200,31 @@ rem fasm games\hunter\trunk\hunter.asm %BIN%\games\hunter
|
||||
echo *
|
||||
echo Building demos
|
||||
echo *
|
||||
fasm demos\3dcube2\trunk\3dcube2.asm %BIN%\3d\3dcube2
|
||||
rem fasm demos\3detx60b\trunk\3detx60b.asm %BIN%\3d\3detx60b
|
||||
fasm demos\3dtcub10\trunk\3dtcub10.asm %BIN%\3d\3dtcub10
|
||||
cd demos\aclock\trunk\
|
||||
fasm demos\3dcube2\3dcube2.asm %BIN%\3d\3dcube2
|
||||
rem fasm demos\3detx60b\3detx60b.asm %BIN%\3d\3detx60b
|
||||
fasm demos\3dtcub10\3dtcub10.asm %BIN%\3d\3dtcub10
|
||||
pushd demos\aclock\
|
||||
nasmw -t -f bin -o ..\..\..\%BIN%\demos\aclock aclock.asm
|
||||
cd ..\..\..
|
||||
fasm demos\bcdclk\trunk\bcdclk.asm %BIN%\demos\bcdclk
|
||||
fasm demos\bgitest\trunk\bgitest.asm %BIN%\fonts\bgitest
|
||||
fasm demos\colorref\trunk\colorref.asm %BIN%\demos\colorref
|
||||
fasm demos\crownscr\trunk\crownscr.asm %BIN%\3d\crownscr
|
||||
fasm demos\cslide\trunk\cslide.asm %BIN%\demos\cslide
|
||||
fasm demos\eyes\trunk\eyes.asm %BIN%\demos\eyes
|
||||
fasm demos\fire\trunk\fire.asm %BIN%\demos\fire
|
||||
fasm demos\fire2\trunk\fire2.asm %BIN%\demos\fire2
|
||||
fasm demos\firework\trunk\firework.asm %BIN%\demos\firework
|
||||
fasm demos\free3d04\trunk\free3d04.asm %BIN%\3d\free3d04
|
||||
fasm demos\magnify\trunk\magnify.asm %BIN%\magnify
|
||||
fasm demos\movback\trunk\movback.asm %BIN%\demos\movback
|
||||
fasm demos\plasma\trunk\plasma.asm %BIN%\demos\plasma
|
||||
fasm demos\timer\trunk\timer.asm %BIN%\demos\timer
|
||||
fasm demos\tinyfrac\trunk\tinyfrac.asm %BIN%\demos\tinyfrac
|
||||
fasm demos\transp\trunk\transp.asm %BIN%\demos\transp
|
||||
fasm demos\trantest\trunk\trantest.asm %BIN%\demos\trantest
|
||||
fasm demos\tube\trunk\tube.asm %BIN%\demos\tube
|
||||
fasm demos\unvwater\trunk\unvwater.asm %BIN%\demos\unvwater
|
||||
popd
|
||||
fasm demos\bcdclk\bcdclk.asm %BIN%\demos\bcdclk
|
||||
rem fasm demos\bgitest\trunk\bgitest.asm %BIN%\fonts\bgitest
|
||||
fasm demos\colorref\colorref.asm %BIN%\demos\colorref
|
||||
fasm demos\crownscr\crownscr.asm %BIN%\3d\crownscr
|
||||
fasm demos\cslide\cslide.asm %BIN%\demos\cslide
|
||||
fasm demos\eyes\eyes.asm %BIN%\demos\eyes
|
||||
fasm demos\fire\fire.asm %BIN%\demos\fire
|
||||
fasm demos\fire2\fire2.asm %BIN%\demos\fire2
|
||||
fasm demos\firework\firework.asm %BIN%\demos\firework
|
||||
fasm demos\free3d04\free3d04.asm %BIN%\3d\free3d04
|
||||
rem fasm demos\magnify\trunk\magnify.asm %BIN%\magnify
|
||||
fasm demos\movback\movback.asm %BIN%\demos\movback
|
||||
fasm demos\plasma\plasma.asm %BIN%\demos\plasma
|
||||
fasm demos\timer\timer.asm %BIN%\demos\timer
|
||||
fasm demos\tinyfrac\tinyfrac.asm %BIN%\demos\tinyfrac
|
||||
fasm demos\transp\transp.asm %BIN%\demos\transp
|
||||
fasm demos\trantest\trantest.asm %BIN%\demos\trantest
|
||||
fasm demos\tube\tube.asm %BIN%\demos\tube
|
||||
fasm demos\unvwater\unvwater.asm %BIN%\demos\unvwater
|
||||
|
||||
echo *
|
||||
echo Building depend application for fdd's nightbuild
|
||||
@@ -234,13 +233,13 @@ echo __nightbuild fix yes >> config.inc
|
||||
fasm media\kiv\kiv.asm %BIN%\nightbuild\kiv
|
||||
fasm media\scrshoot\scrshoot.asm %BIN%\nightbuild\scrshoot
|
||||
fasm media\animage\animage.asm %BIN%\nightbuild\animage
|
||||
fasm media\midamp\trunk\midamp.asm %BIN%\nightbuild\midamp
|
||||
fasm media\midamp\midamp.asm %BIN%\nightbuild\midamp
|
||||
fasm develop\heed\trunk\heed.asm %BIN%\nightbuild\heed
|
||||
fasm develop\tinypad\trunk\tinypad.asm %BIN%\nightbuild\tinypad
|
||||
fasm system\skincfg\trunk\skincfg.asm %BIN%\nightbuild\skincfg
|
||||
fasm system\hdd_info\trunk\hdd_info.asm %BIN%\nightbuild\hdd_info
|
||||
fasm system\mgb\trunk\mgb.asm %BIN%\nightbuild\mgb
|
||||
fasm system\rdsave\trunk\rdsave.asm %BIN%\nightbuild\rdsave
|
||||
fasm system\skincfg\skincfg.asm %BIN%\nightbuild\skincfg
|
||||
fasm system\hdd_info\hdd_info.asm %BIN%\nightbuild\hdd_info
|
||||
rem fasm system\mgb\trunk\mgb.asm %BIN%\nightbuild\mgb
|
||||
fasm system\rdsave\rdsave.asm %BIN%\nightbuild\rdsave
|
||||
fasm other\kpack\trunk\kpack.asm %BIN%\nightbuild\kpack
|
||||
fasm other\rtfread\rtfread.asm %BIN%\nightbuild\rtfread
|
||||
;restore
|
||||
|
||||
@@ -84,7 +84,7 @@ void TWebBrowser::RenderTextbuf()
|
||||
|
||||
//Is a new line fits in the maximum line width?
|
||||
if (br * list.font_w + draw_x - left_gap >= draw_w) {
|
||||
br = draw_w - draw_x + left_gap /list.font_w;
|
||||
br = draw_w - draw_x / list.font_w;
|
||||
if (br < 0) br = 0;
|
||||
while(br) {
|
||||
if (ESBYTE[lbp + br]==' ') {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
//Copyright 2007-2025 by Veliant & Leency
|
||||
//Asper, lev, Lrz, Barsuk, Nable, hidnplayr...
|
||||
//Asper, lev, Lrz, Barsuk, Nable, hidnplayr, Burer...
|
||||
|
||||
//BUGS
|
||||
//if maximize a window on image load => crash
|
||||
//issues with a long line
|
||||
//add proxy settings
|
||||
|
||||
//===================================================//
|
||||
// //
|
||||
@@ -13,6 +12,7 @@
|
||||
//===================================================//
|
||||
|
||||
#define MEMSIZE 1024 * 160
|
||||
|
||||
#include "..\lib\gui.h"
|
||||
#include "..\lib\draw_buf.h"
|
||||
#include "..\lib\list_box.h"
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "..\lib\random.h"
|
||||
#include "..\lib\clipboard.h"
|
||||
|
||||
#include "..\lib\obj\libini.h"
|
||||
#include "..\lib\obj\box_lib.h"
|
||||
#include "..\lib\obj\libimg.h"
|
||||
#include "..\lib\obj\http.h"
|
||||
@@ -56,17 +57,25 @@ TWebBrowser WB1;
|
||||
|
||||
#include "history.h"
|
||||
|
||||
dword PADDING = 9;
|
||||
dword TSZE = 25;
|
||||
dword STATUSBAR_H = 15;
|
||||
dword TAB_H = 20;
|
||||
dword TOOLBAR_H = 0;
|
||||
#define PADDING 9
|
||||
#define TSZE 25
|
||||
#define STATUSBAR_H 15
|
||||
#define TAB_H 20
|
||||
#define BUTTON_W 30
|
||||
#define SEARCH_GO_GAP 5
|
||||
|
||||
dword TOOLBAR_H = PADDING+TSZE+PADDING+2;
|
||||
|
||||
_http http = 0;
|
||||
|
||||
progress_bar prbar;
|
||||
proc_info Form;
|
||||
|
||||
char settings_file[256];
|
||||
char proxy_address[768];
|
||||
char search_engine[768];
|
||||
|
||||
#include "settings.h"
|
||||
#include "tabs.h"
|
||||
|
||||
dword cur_img_url;
|
||||
@@ -90,6 +99,7 @@ edit_box omnibox_edit = {250, 0, 0, 0xffffff,
|
||||
|
||||
void LoadLibraries()
|
||||
{
|
||||
load_dll(libini, #lib_init,1);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libimg, #libimg_init,1);
|
||||
load_dll(libHTTP, #http_lib_init,1);
|
||||
@@ -127,9 +137,8 @@ void main()
|
||||
{
|
||||
int redirect_count=0;
|
||||
|
||||
TOOLBAR_H = PADDING+TSZE+PADDING+2;
|
||||
|
||||
LoadLibraries();
|
||||
LoadIniConfig();
|
||||
HandleParam();
|
||||
|
||||
omnibox_edit.left = PADDING+TSZE*2+PADDING+6;
|
||||
@@ -290,8 +299,10 @@ void ProcessButtonClick(dword id__)
|
||||
case SCAN_CODE_BS:
|
||||
case BACK_BUTTON: if (history.back()) OpenPage(history.current()); return;
|
||||
case FORWARD_BUTTON: if (history.forward()) OpenPage(history.current()); return;
|
||||
case GOTOURL_BUTTON: EventSubmitOmnibox(); return;
|
||||
case GOTOURL_BUTTON: EventSubmitOmnibox(false); return;
|
||||
case REFRESH_BUTTON: EventRefreshPage(); return;
|
||||
case GO_BUTTON: EventSubmitOmnibox(true); return;
|
||||
case SEARCH_BUTTON: EventSearchWeb(); return;
|
||||
case CHANGE_ENCODING: EventShowEncodingsList(); return;
|
||||
case SANDWICH_BUTTON: EventShowMainMenu(); return;
|
||||
case VIEW_SOURCE: EventViewSource(); return;
|
||||
@@ -325,7 +336,7 @@ void ProcessKeyEvent()
|
||||
case SCAN_CODE_KEY_N: RunProgram(#program_path, NULL); return;
|
||||
case SCAN_CODE_KEY_J: ProcessButtonClick(DOWNLOAD_MANAGER); return;
|
||||
case SCAN_CODE_KEY_R: ProcessButtonClick(REFRESH_BUTTON); return;
|
||||
case SCAN_CODE_ENTER: EventSeachWeb(); return;
|
||||
case SCAN_CODE_ENTER: EventSearchWeb(); return;
|
||||
case SCAN_CODE_LEFT: ProcessButtonClick(BACK_BUTTON); return;
|
||||
case SCAN_CODE_RIGHT: ProcessButtonClick(FORWARD_BUTTON); return;
|
||||
case SCAN_CODE_KEY_W: EventCloseActiveTab(); return;
|
||||
@@ -341,7 +352,7 @@ void ProcessKeyEvent()
|
||||
case SCAN_CODE_F2: EventEditSource(); return;
|
||||
case SCAN_CODE_F6: {omnibox_edit.flags=ed_focus; DrawOmnibox();} return;
|
||||
case SCAN_CODE_F5: EventRefreshPage(); return;
|
||||
case SCAN_CODE_ENTER: if (omnibox_edit.flags & ed_focus) EventSubmitOmnibox(); return;
|
||||
case SCAN_CODE_ENTER: if (omnibox_edit.flags & ed_focus) EventSubmitOmnibox(false); return;
|
||||
case SCAN_CODE_F12: EventToggleDebugMode(); return;
|
||||
case SCAN_CODE_F11: show_images^=1; EventClearCache(); return;
|
||||
default: if (WB1.list.ProcessKey(key_scancode)) WB1.DrawPage(); return;
|
||||
@@ -350,14 +361,14 @@ void ProcessKeyEvent()
|
||||
|
||||
void SetElementSizes()
|
||||
{
|
||||
omnibox_edit.width = Form.cwidth - omnibox_edit.left - 52 - 16;
|
||||
omnibox_edit.width = Form.cwidth - BUTTON_W - SEARCH_GO_GAP - BUTTON_W - omnibox_edit.left - 52 - 16;
|
||||
if (Form.cwidth - scroll_wv.size_x != WB1.list.w) {
|
||||
//temporary fix for crash
|
||||
//related to 'cur_img_url' var read
|
||||
//http://board.kolibrios.org/viewtopic.php?f=1&t=1712&start=60#p77523
|
||||
StopLoading();
|
||||
}
|
||||
WB1.list.SetSizes(0, TOOLBAR_H+TAB_H, Form.cwidth - scroll_wv.size_x,
|
||||
WB1.list.SetSizes(0, TOOLBAR_H+TAB_H, Form.cwidth - scroll_wv.size_x ,
|
||||
Form.cheight - TOOLBAR_H - STATUSBAR_H - TAB_H, BASIC_LINE_H);
|
||||
WB1.list.wheel_size = 7 * BASIC_LINE_H;
|
||||
WB1.list.column_max = WB1.list.w - scroll_wv.size_x / WB1.list.font_w + 1;
|
||||
@@ -365,6 +376,7 @@ void SetElementSizes()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void draw_window()
|
||||
{
|
||||
bool burger_active = false;
|
||||
@@ -381,7 +393,10 @@ void draw_window()
|
||||
|
||||
DrawTopPanelButton(BACK_BUTTON, PADDING-1, PADDING, 30, false);
|
||||
DrawTopPanelButton(FORWARD_BUTTON, PADDING+TSZE+PADDING-2, PADDING, 31, false);
|
||||
DrawTopPanelButton(SANDWICH_BUTTON, Form.cwidth-PADDING-TSZE-3, PADDING, -1, burger_active); //burger menu
|
||||
DrawTopPanelButton(SANDWICH_BUTTON, Form.cwidth-PADDING-TSZE + 2 , PADDING, -1, burger_active); //burger menu
|
||||
|
||||
DrawTopPanelButton(SEARCH_BUTTON, Form.cwidth - PADDING - TSZE - 3 - BUTTON_W, PADDING, 49, false); // Search web button
|
||||
DrawTopPanelButton(GO_BUTTON, Form.cwidth - PADDING - TSZE - 3 - BUTTON_W - SEARCH_GO_GAP - BUTTON_W, PADDING, 12, false); // go to address button
|
||||
|
||||
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, sc.line);
|
||||
|
||||
@@ -517,14 +532,17 @@ bool GetLocalFileData(dword _path)
|
||||
bool GetUrl(dword _http_url)
|
||||
{
|
||||
char new_url_full[URL_SIZE+1];
|
||||
if (!strncmp(_http_url,"http:",5)) {
|
||||
if (!strncmp(_http_url,"http://",7)) {
|
||||
http.get(_http_url);
|
||||
return true;
|
||||
} else if (!strncmp(_http_url,"https://",8)) {
|
||||
strcpy(#new_url_full, "http://gate.aspero.pro/?site=");
|
||||
strncat(#new_url_full, _http_url, URL_SIZE);
|
||||
http.get(#new_url_full);
|
||||
return true;
|
||||
if (#proxy_address) {
|
||||
strcpy(#new_url_full, #proxy_address);
|
||||
strncat(#new_url_full, _http_url, URL_SIZE);
|
||||
http.get(#new_url_full);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -696,19 +714,25 @@ void EventClickLink(dword _target)
|
||||
OpenPage(#new_url);
|
||||
}
|
||||
|
||||
void EventSubmitOmnibox()
|
||||
{
|
||||
char new_url[URL_SIZE+1];
|
||||
if (!editURL[0]) return;
|
||||
if (!strncmp(#editURL,"http:",5)) || (editURL[0]=='/')
|
||||
|| (!strncmp(#editURL,"https:",6)) || (!strncmp(#editURL,"WebView:",8)) {
|
||||
OpenPage(#editURL);
|
||||
} else {
|
||||
strcpy(#new_url, "http://");
|
||||
strncat(#new_url, #editURL, URL_SIZE-1);
|
||||
OpenPage(#new_url);
|
||||
}
|
||||
}
|
||||
|
||||
void EventSubmitOmnibox(bool force_url)
|
||||
{
|
||||
char new_url[URL_SIZE+1];
|
||||
if (!editURL[0]) return;
|
||||
if (!strncmp(#editURL,"http:",5)) || (editURL[0]=='/')
|
||||
|| (!strncmp(#editURL,"https:",6)) || (!strncmp(#editURL,"WebView:",8)) {
|
||||
OpenPage(#editURL);
|
||||
return;
|
||||
}
|
||||
if (!force_url) && (!IsAddress()) {
|
||||
EventSearchWeb();
|
||||
return ;
|
||||
}
|
||||
strcpy(#new_url, "http://");
|
||||
strncat(#new_url, #editURL, URL_SIZE-1);
|
||||
OpenPage(#new_url);
|
||||
}
|
||||
|
||||
|
||||
void LoadInternalPage(dword _bufdata, _in_bufsize){
|
||||
if (!_bufdata) || (!_in_bufsize) {
|
||||
@@ -749,6 +773,15 @@ void LoadInternalPage(dword _bufdata, _in_bufsize){
|
||||
}
|
||||
}
|
||||
|
||||
// check whether the entered text in the omnibox looks like an address or a search query
|
||||
bool IsAddress()
|
||||
{
|
||||
if (!editURL[0]) return false ;
|
||||
if (strchr(#editURL, ' ')) return false;
|
||||
if (strchr(#editURL, '.')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool UrlExtIs(dword base, ext)
|
||||
{
|
||||
if (!strcmpi(base + strlen(base) - strlen(ext), ext)) return true;
|
||||
@@ -803,12 +836,12 @@ void ProcessMenuClick()
|
||||
}
|
||||
}
|
||||
|
||||
void EventSeachWeb()
|
||||
void EventSearchWeb()
|
||||
{
|
||||
char new_url[URL_SIZE+1];
|
||||
// replace the spaces with '+' for the search query
|
||||
replace_char(#editURL, ' ', '+', URL_SIZE);
|
||||
//strcpy(#new_url, "https://html.duckduckgo.com/html/?q=");
|
||||
strcpy(#new_url, "http://bing.com/search?q=");
|
||||
strcpy(#new_url, #search_engine);
|
||||
strncat(#new_url, #editURL, URL_SIZE);
|
||||
OpenPage(#new_url);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ Copy link
|
||||
Download link contents";
|
||||
char loading_text[] = "Loading...";
|
||||
char update_param[] = "-e http://builds.kolibrios.org/en_US/data/programs/cmm/browser/WebView.com";
|
||||
char update_download_error[] = "'WebView\nError receiving an up to date information!' -tE";
|
||||
char update_download_error[] = "'WebView\nError receiving update information!' -tE";
|
||||
char update_ok[] = "'WebView\nThe browser has been updated!' -tO";
|
||||
char update_is_current[] = "'WebView\nThe browser is up to date.' -tI";
|
||||
char update_can_not_copy[] = "'WebView\nError copying a new version from Downloads folder!\nProbably too litle space on Ramdisk.' -tE";
|
||||
@@ -96,12 +96,13 @@ char webview_shared[] = "WEBVIEW";
|
||||
enum {
|
||||
NEW_TAB=600,
|
||||
ENCODINGS=700,
|
||||
BACK_BUTTON=800, FORWARD_BUTTON, VIEW_SOURCE, EDIT_SOURCE,
|
||||
REFRESH_BUTTON, GOTOURL_BUTTON, CHANGE_ENCODING,
|
||||
SANDWICH_BUTTON,
|
||||
OPEN_FILE, NEW_WINDOW, VIEW_HISTORY, DOWNLOAD_MANAGER,
|
||||
CLEAR_CACHE, UPDATE_BROWSER, IN_NEW_TAB, IN_NEW_WINDOW,
|
||||
COPY_LINK_URL, DOWNLOAD_LINK_CT, TAB_ID,
|
||||
BACK_BUTTON=800,
|
||||
FORWARD_BUTTON, VIEW_SOURCE, EDIT_SOURCE,
|
||||
REFRESH_BUTTON, GOTOURL_BUTTON, CHANGE_ENCODING,
|
||||
GO_BUTTON, SEARCH_BUTTON, SANDWICH_BUTTON,
|
||||
OPEN_FILE, NEW_WINDOW, VIEW_HISTORY, DOWNLOAD_MANAGER,
|
||||
CLEAR_CACHE, UPDATE_BROWSER, IN_NEW_TAB, IN_NEW_WINDOW,
|
||||
COPY_LINK_URL, DOWNLOAD_LINK_CT, TAB_ID,
|
||||
TAB_CLOSE_ID = 900
|
||||
};
|
||||
|
||||
@@ -112,4 +113,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.91";
|
||||
char version[]="WebView 3.94";
|
||||
@@ -14,7 +14,7 @@
|
||||
| || | | |
|
||||
\_____||__|________|__|<font color=#DDD>lc</font>
|
||||
|
||||
<font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatable
|
||||
<font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatible
|
||||
<font bg=#3CE7FF> </font></font></font></font>
|
||||
<td>
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
|
||||
By the way,
|
||||
<font color="#555555">• You can check for browser updates from the main menu.
|
||||
• To run a web search, type a text in the adress box and press Ctrl+Enter.
|
||||
• Pressing F6 moves a text cursor to the omnibox.
|
||||
• You can manually change the encoding of a page by clicking on a label in the bottom right corner.
|
||||
• To run a web search, type text in the address box and press Ctrl+Enter.
|
||||
• Pressing F6 moves the text cursor to the omnibox.
|
||||
• You can manually change the encoding of a page by clicking on the label in the bottom right corner.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<h1> Webpage Not Available</h1>
|
||||
<h2> What could be done:</h2>
|
||||
<ul>
|
||||
<li>Make sure that evetything fine with Internet connection.<br>
|
||||
<li>Make sure that you have a working Internet connection.<br>
|
||||
Open <a href="/sys/network/netcfg">Netcfg</a> network diagnostic tool.<br>
|
||||
<li>Check page address, there may have been made a typo.<br>
|
||||
<li>Check the page address for any typos.<br>
|
||||
<li>Server is temporarily unavailable.<br>
|
||||
Refresh the page.<br>
|
||||
<li>Browser doesn't handled properly server's response.<br>
|
||||
<li>Browser didn't properly handle the server's response.<br>
|
||||
Please, report an error.<br>
|
||||
</ul>
|
||||
@@ -0,0 +1,10 @@
|
||||
_ini ini;
|
||||
|
||||
void LoadIniConfig()
|
||||
{
|
||||
ini.path = GetIni(#settings_file, "app.ini");
|
||||
ini.section = "WebView";
|
||||
|
||||
ini.GetString("proxy", #proxy_address, sizeof(proxy_address), NULL);
|
||||
ini.GetString("search_engine", #search_engine, sizeof(search_engine), "http://bing.com/search?q=");
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
//Copyright 2020 - 2025 by Leency
|
||||
//Burer...
|
||||
|
||||
#define MEMSIZE 1024 * 40
|
||||
//Copyright 2020 - 2021 by Leency
|
||||
|
||||
#include "../lib/gui.h"
|
||||
#include "../lib/random.h"
|
||||
|
||||
#include "../lib/obj/libini.h"
|
||||
#include "../lib/obj/box_lib.h"
|
||||
#include "../lib/obj/http.h"
|
||||
|
||||
@@ -21,6 +26,11 @@ char uEdit[URL_SIZE];
|
||||
char filepath[4096];
|
||||
char save_dir[4096];
|
||||
|
||||
char settings_file[256];
|
||||
char proxy_address[768];
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
char* active_status;
|
||||
|
||||
edit_box ed = {WIN_W-GAPX-GAPX,GAPX,20,0xffffff,0x94AECE,0xffffff,0xffffff,
|
||||
@@ -32,9 +42,13 @@ progress_bar pb = {0, GAPX, 52, WIN_W - GAPX - GAPX, 17, 0, NULL, NULL,
|
||||
void main()
|
||||
{
|
||||
dword shared_url;
|
||||
|
||||
load_dll(libini, #lib_init,1);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
load_dll(libHTTP, #http_lib_init,1);
|
||||
|
||||
LoadIniConfig();
|
||||
|
||||
strcpy(#save_dir, DEFAULT_SAVE_DIR);
|
||||
if (!dir_exists(#save_dir)) CreateDir(#save_dir);
|
||||
SetCurDir(#save_dir);
|
||||
@@ -167,10 +181,8 @@ void StartDownloading()
|
||||
if (http.transfer > 0) return;
|
||||
ResetDownloadSpeed();
|
||||
pb.back_color = 0xFFFfff;
|
||||
if (!strncmp(#uEdit,"https:",6)) {
|
||||
//miniprintf(#get_url, "http://gate.aspero.pro/?site=%s", #uEdit);
|
||||
notify("'HTTPS for download temporary is not supported,\ntrying to download the file via HTTP' -W");
|
||||
miniprintf(#uEdit, "http://%s", #uEdit+8);
|
||||
if (!strncmp(#uEdit,"https://",8)) {
|
||||
miniprintf(#get_url, "%s%s", #proxy_address, #uEdit);
|
||||
}
|
||||
strcpy(#get_url, #uEdit);
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
_ini ini;
|
||||
|
||||
void LoadIniConfig()
|
||||
{
|
||||
ini.path = GetIni(#settings_file, "app.ini");
|
||||
ini.section = "WebView";
|
||||
|
||||
ini.GetString("proxy", #proxy_address, sizeof(proxy_address), NULL);
|
||||
}
|
||||
@@ -101,8 +101,8 @@ dword waves_pal[256];
|
||||
collection_int selected0, selected1;
|
||||
dword selected_count[PANES_COUNT]=0;
|
||||
|
||||
libimg_image icons16_default;
|
||||
libimg_image icons16_selected;
|
||||
libimg_image icons18_default;
|
||||
libimg_image icons18_selected;
|
||||
libimg_image icons32_default;
|
||||
libimg_image icons32_selected;
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ void CopyFilesListToClipboard(bool _cut_active)
|
||||
|
||||
if (cut_active) {
|
||||
if (i>=files.first) && (i<files.first+files.visible)
|
||||
PutShadow(files.x+4,i-files.first*files.item_h+files.y,icons16_default.w,files.item_h,1,-3);
|
||||
PutShadow(files.x+4,i-files.first*files.item_h+files.y,icons18_default.w,files.item_h,1,-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ int ICONS_INI::get(dword _file_path, _ext, int size)
|
||||
else if (size == 32) return i32.get(ext_pos);
|
||||
} else {
|
||||
exts.add(#ext);
|
||||
icons_ini.section = "icons16";
|
||||
icons_ini.section = "icons18";
|
||||
i18.set(exts.count-1, icons_ini.GetInt(#ext, 2));
|
||||
|
||||
icons_ini.section = "icons32";
|
||||
@@ -60,8 +60,8 @@ void DrawIconByExtension(dword file_path, extension, xx, yy, fairing_color)
|
||||
selected_image = icons32_selected.image;
|
||||
default_image = icons32_default.image;
|
||||
} else {
|
||||
selected_image = icons16_selected.image;
|
||||
default_image = icons16_default.image;
|
||||
selected_image = icons18_selected.image;
|
||||
default_image = icons18_default.image;
|
||||
}
|
||||
|
||||
if (fairing_color==col.selec) {
|
||||
|
||||
@@ -184,11 +184,11 @@ void LoadIcons()
|
||||
icons32_default.replace_color(0x00000000, col.list_bg);
|
||||
icons32_selected.replace_color(0x00000000, col.selec);
|
||||
} else {
|
||||
icons16_default.load("/sys/icons16.png");
|
||||
icons16_selected.load("/sys/icons16.png");
|
||||
icons16_selected.replace_2colors(0xffFFFfff, col.selec, 0xffCACBD6, selected_shadow);
|
||||
icons18_default.load("/sys/icons18.png");
|
||||
icons18_selected.load("/sys/icons18.png");
|
||||
icons18_selected.replace_2colors(0xffFFFfff, col.selec, 0xffCACBD6, selected_shadow);
|
||||
if (col.list_bg!=0xFFFfff) {
|
||||
icons16_default.replace_2colors(0xffFFFfff, col.list_bg, 0xffCACBD6, non_white_shadow);
|
||||
icons18_default.replace_2colors(0xffFFFfff, col.list_bg, 0xffCACBD6, non_white_shadow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ void BigIconsSwitch()
|
||||
icon_size = 32;
|
||||
LoadIcons();
|
||||
} else {
|
||||
icon_size = icons16_default.w;
|
||||
icon_size = icons18_default.w;
|
||||
}
|
||||
BigFontsChange();
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void SelectList_DrawLine(dword i)
|
||||
} else {
|
||||
strcpy(#tname, results.name.get(select_list.first + i));
|
||||
strlwr(#tname);
|
||||
icons_ini.section = "icons16";
|
||||
icons_ini.section = "icons18";
|
||||
icon = icons_ini.GetInt(#tname + strrchr(#tname, '.'), 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ _ActionsHistory actionsHistory;
|
||||
// //
|
||||
//===================================================//
|
||||
|
||||
libimg_image icons16;
|
||||
libimg_image icons18;
|
||||
|
||||
void main()
|
||||
{
|
||||
@@ -170,18 +170,18 @@ void main()
|
||||
load_dll(libimg, #libimg_init, 1);
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
|
||||
icons16.load("/sys/icons16.png");
|
||||
leftbar_w = icons16.w + 16;
|
||||
icons18.load("/sys/icons18.png");
|
||||
leftbar_w = icons18.w + 16;
|
||||
|
||||
sc.get();
|
||||
bg_dark = skin_is_dark();
|
||||
|
||||
semi_white = MixColors(sc.work, 0xFFFfff, bg_dark*90 + 96);
|
||||
icons16.replace_color(0xffFFFfff, sc.work);
|
||||
icons16.replace_color(0xffCACBD6, MixColors(sc.work, 0, 200));
|
||||
icons18.replace_color(0xffFFFfff, sc.work);
|
||||
icons18.replace_color(0xffCACBD6, MixColors(sc.work, 0, 200));
|
||||
|
||||
//fix line and rectandle color for dark skins
|
||||
if (bg_dark) icons16.replace_color(0xff545454, 0xffD3D3D4);
|
||||
if (bg_dark) icons18.replace_color(0xff545454, 0xffD3D3D4);
|
||||
|
||||
EventSetActiveColor(1, color1);
|
||||
|
||||
@@ -301,7 +301,7 @@ void DrawTopPanelButton1(dword _event, _hotkey, _x, _icon_n)
|
||||
#define ISIZE 18
|
||||
#define YPOS 6
|
||||
DefineHiddenButton(_x-4, YPOS-4, ISIZE+7, ISIZE+7, button.add(_event));
|
||||
img_draw stdcall(icons16.image, _x, YPOS, ISIZE, ISIZE, 0, _icon_n*ISIZE);
|
||||
img_draw stdcall(icons18.image, _x, YPOS, ISIZE, ISIZE, 0, _icon_n*ISIZE);
|
||||
if (_hotkey) key.add_n(_hotkey, _event);
|
||||
}
|
||||
|
||||
@@ -323,10 +323,10 @@ int DrawFlatPanelButton(dword _id, _x, _y, _text)
|
||||
void DrawLeftPanelButton(dword _event, _hotkey, _y, _icon_n)
|
||||
{
|
||||
int x = 5;
|
||||
DrawRectangle(x, _y, icons16.w + 5, icons16.w + 5, sc.work);
|
||||
DefineHiddenButton(x, _y, icons16.w + 5, icons16.w + 5, button.add(_event));
|
||||
img_draw stdcall(icons16.image, x+3, _y+3, icons16.w,
|
||||
icons16.w, 0, _icon_n*icons16.w);
|
||||
DrawRectangle(x, _y, icons18.w + 5, icons18.w + 5, sc.work);
|
||||
DefineHiddenButton(x, _y, icons18.w + 5, icons18.w + 5, button.add(_event));
|
||||
img_draw stdcall(icons18.image, x+3, _y+3, icons18.w,
|
||||
icons18.w, 0, _icon_n*icons18.w);
|
||||
key.add_n(_hotkey, _event);
|
||||
}
|
||||
void DrawStatusBar()
|
||||
@@ -419,8 +419,8 @@ void DrawWindow()
|
||||
|
||||
void DrawLeftPanelSelection()
|
||||
{
|
||||
if (previousTool!=-1) DrawRectangle3D(5, previousTool*GAPV+right_bar.y-2, icons16.w+5, icons16.w+5, sc.work, sc.work);
|
||||
DrawRectangle3D(5, currentTool*GAPV+right_bar.y-2, icons16.w+5, icons16.w+5, 0x333333, 0x777777);
|
||||
if (previousTool!=-1) DrawRectangle3D(5, previousTool*GAPV+right_bar.y-2, icons18.w+5, icons18.w+5, sc.work, sc.work);
|
||||
DrawRectangle3D(5, currentTool*GAPV+right_bar.y-2, icons18.w+5, icons18.w+5, 0x333333, 0x777777);
|
||||
}
|
||||
|
||||
void DrawEditArea()
|
||||
@@ -429,7 +429,7 @@ void DrawEditArea()
|
||||
int top_side;
|
||||
int left_side;
|
||||
|
||||
wrapper.x = icons16.w + 16;
|
||||
wrapper.x = icons18.w + 16;
|
||||
wrapper.w = Form.cwidth - right_bar.w - 10 - wrapper.x;
|
||||
wrapper.h = Form.cheight - TOPBAR_H - 35;
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ void main()
|
||||
OpenDialog_init stdcall (#o_dialog);
|
||||
|
||||
/* Init UI */
|
||||
icons18.load("/sys/icons16.png");
|
||||
icons18.load("/sys/icons18.png");
|
||||
icons18.replace_2colors(0xffFFFfff, COL_LIGHT, 0xffCACBD6, COL_LIGHT-0x080808);
|
||||
icons18a.load("/sys/icons16.png");
|
||||
icons18a.load("/sys/icons18.png");
|
||||
icons18a.replace_2colors(0xffFFFfff, COL_BUTTON, 0xffCACBD6, 0);
|
||||
pixie_skin.load("/sys/media/pixieskn.png");
|
||||
Form.width = screen.w/6*5;
|
||||
|
||||
@@ -112,7 +112,6 @@ struct _http
|
||||
dword _http::get(dword _url)
|
||||
{
|
||||
cur_url = _url;
|
||||
if (streqrp(cur_url, "http://gate.aspero.pro/?site=")) cur_url += 29;
|
||||
http_get stdcall (_url, 0, 0, #accept_language);
|
||||
transfer = EAX;
|
||||
return EAX;
|
||||
@@ -138,7 +137,7 @@ bool _http::stop()
|
||||
transfer=0;
|
||||
*/
|
||||
hfree();
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ dword ChangeCharset(dword from_chs, to_chs, conv_buf)
|
||||
{
|
||||
dword cd, in_len, out_len, new_buf;
|
||||
|
||||
iconv_open stdcall (from_chs*10+#charsets, to_chs*10+#charsets);
|
||||
iconv_open cdecl (to_chs*10+#charsets, from_chs*10+#charsets);
|
||||
if (EAX==-1) {
|
||||
debugln("iconv: unsupported charset");
|
||||
return 0;
|
||||
@@ -37,7 +37,7 @@ dword ChangeCharset(dword from_chs, to_chs, conv_buf)
|
||||
in_len = strlen(conv_buf)+1;
|
||||
out_len = in_len * 2;
|
||||
new_buf = mem_Alloc(out_len);
|
||||
iconv stdcall (cd, #conv_buf, #in_len, #new_buf, #out_len);
|
||||
iconv cdecl (cd, #conv_buf, #in_len, #new_buf, #out_len);
|
||||
if (EAX!=0)
|
||||
{
|
||||
cd = EAX;
|
||||
|
||||
+14
-14
@@ -21,8 +21,8 @@
|
||||
//===================================================//
|
||||
|
||||
libimg_image icons32;
|
||||
libimg_image icons16;
|
||||
libimg_image icons16w;
|
||||
libimg_image icons18;
|
||||
libimg_image icons18w;
|
||||
unsigned int size32;
|
||||
unsigned int size16;
|
||||
|
||||
@@ -73,7 +73,7 @@ void main()
|
||||
load_dll(libimg, #libimg_init, 1);
|
||||
|
||||
icons32.load("/SYS/ICONS32.PNG"); size32 = icons32.h * 32 * 4;
|
||||
icons16.load("/SYS/ICONS16.PNG"); size16 = icons16.h * 18 * 4;
|
||||
icons18.load("/SYS/ICONS18.PNG"); size16 = icons18.h * 18 * 4;
|
||||
|
||||
if (GetProcessesCount("@RESHARE")>1) {
|
||||
start_ui();
|
||||
@@ -103,8 +103,8 @@ void start_daemon()
|
||||
img_destroy stdcall(icons32.image);
|
||||
|
||||
shared_i16 = memopen("ICONS18", size16, SHM_CREATE + SHM_WRITE);
|
||||
memmov(shared_i16, icons16.imgsrc, size16);
|
||||
//img_destroy stdcall(icons16.image);
|
||||
memmov(shared_i16, icons18.imgsrc, size16);
|
||||
//img_destroy stdcall(icons18.image);
|
||||
|
||||
shared_i16w = memopen("ICONS18W", size16, SHM_CREATE + SHM_WRITE);
|
||||
|
||||
@@ -114,7 +114,7 @@ void start_daemon()
|
||||
sc.get();
|
||||
$pop eax
|
||||
if (sc.work != EAX) {
|
||||
memmov(shared_i16w, icons16.imgsrc, size16);
|
||||
memmov(shared_i16w, icons18.imgsrc, size16);
|
||||
replace_2cols(shared_i16w, size16, 0xffFFFfff, sc.work, 0xffCACBD6, sc.dark);
|
||||
}
|
||||
} while(WaitEvent()==evDesktop);
|
||||
@@ -133,7 +133,7 @@ void start_daemon()
|
||||
#define BTNH 24
|
||||
#define RESY PAD+30+BTNH+BTNH
|
||||
|
||||
enum { ACTIVE_ICONS32=1, ACTIVE_ICONS16=2, ACTIVE_ICONS16W=4, ACTIVE_CHECKBOX=8 };
|
||||
enum { ACTIVE_ICONS32=1, ACTIVE_ICONS18=2, ACTIVE_ICONS18W=4, ACTIVE_CHECKBOX=8 };
|
||||
int active_tab = ACTIVE_ICONS32;
|
||||
|
||||
void start_ui()
|
||||
@@ -190,8 +190,8 @@ void draw_tabs()
|
||||
{
|
||||
#define TABX WINW-BTNW-PAD-BTNW-PAD-BTNW-PAD-BTNW/2
|
||||
DrawFlatButton( TABX, PAD+30, "ICONS32", 10+ACTIVE_ICONS32, active_tab & ACTIVE_ICONS32);
|
||||
DrawFlatButton(PAD+BTNW*1+TABX, PAD+30, "ICONS16", 10+ACTIVE_ICONS16, active_tab & ACTIVE_ICONS16);
|
||||
DrawFlatButton(PAD+BTNW*2+TABX, PAD+30, "ICONS16W", 10+ACTIVE_ICONS16W, active_tab & ACTIVE_ICONS16W);
|
||||
DrawFlatButton(PAD+BTNW*1+TABX, PAD+30, "ICONS18", 10+ACTIVE_ICONS18, active_tab & ACTIVE_ICONS18);
|
||||
DrawFlatButton(PAD+BTNW*2+TABX, PAD+30, "ICONS18W", 10+ACTIVE_ICONS18W, active_tab & ACTIVE_ICONS18W);
|
||||
DrawFlatButton(PAD+BTNW*3+TABX, PAD+30, "CHECKBOX", 10+ACTIVE_CHECKBOX, active_tab & ACTIVE_CHECKBOX);
|
||||
draw_tab_icons32();
|
||||
}
|
||||
@@ -209,14 +209,14 @@ void draw_tab_icons32()
|
||||
iconimg = icons32.imgsrc;
|
||||
iconw = 32;
|
||||
iconh = icons32.h;
|
||||
} else if (active_tab & ACTIVE_ICONS16) {
|
||||
iconimg = icons16.imgsrc;
|
||||
} else if (active_tab & ACTIVE_ICONS18) {
|
||||
iconimg = icons18.imgsrc;
|
||||
iconw = 18;
|
||||
iconh = icons16.h;
|
||||
} else if (active_tab & ACTIVE_ICONS16W) {
|
||||
iconh = icons18.h;
|
||||
} else if (active_tab & ACTIVE_ICONS18W) {
|
||||
iconimg = memopen("ICONS18W", NULL, SHM_READ);
|
||||
iconw = 18;
|
||||
iconh = icons16.h;
|
||||
iconh = icons18.h;
|
||||
} else {
|
||||
PutImage(WINW-13/2, WINH-RESY-13/2+RESY, 13, 13, #checkbox_flag);
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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())
|
||||
|
||||
File renamed without changes.
+2545
-2540
File diff suppressed because it is too large.
Load diff
@@ -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())
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+942
-939
File diff suppressed because it is too large.
Load diff
@@ -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())
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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,150 +1,153 @@
|
||||
;
|
||||
; BCD CLOCK
|
||||
;
|
||||
; Compile with FASM for Menuet
|
||||
;
|
||||
;
|
||||
|
||||
use32
|
||||
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd I_END
|
||||
dd 0x1000
|
||||
dd 0x1000
|
||||
dd 0x0 , 0x0
|
||||
|
||||
include 'lang.inc'
|
||||
include '../../../macros.inc'
|
||||
|
||||
|
||||
START:
|
||||
red:
|
||||
call drawwindow
|
||||
|
||||
still:
|
||||
|
||||
|
||||
mov eax,23 ; wait for timeout
|
||||
mov ebx,50
|
||||
mcall
|
||||
|
||||
cmp eax,1 ; redraw ?
|
||||
je red
|
||||
|
||||
cmp eax, 2 ; key
|
||||
je key
|
||||
|
||||
cmp eax,3 ; button in buffer ?
|
||||
je button
|
||||
|
||||
call drawclock
|
||||
|
||||
jmp still
|
||||
|
||||
key:
|
||||
mov eax, 2
|
||||
int 0x40
|
||||
jmp still
|
||||
|
||||
button:
|
||||
mov al,17 ; get id
|
||||
mcall
|
||||
|
||||
cmp ah,1 ; button id=1 ?
|
||||
jne noclose
|
||||
or eax,-1 ; close this program
|
||||
mcall
|
||||
noclose:
|
||||
|
||||
jmp still
|
||||
|
||||
drawclock:
|
||||
|
||||
mov eax,3 ; get time
|
||||
mcall
|
||||
bswap eax
|
||||
shr eax,8
|
||||
mov edi,dg1
|
||||
mov ecx,6
|
||||
dgtomem:
|
||||
push eax
|
||||
and al,0x0f
|
||||
mov [edi],al
|
||||
inc edi
|
||||
pop eax
|
||||
shr eax,4
|
||||
loop dgtomem
|
||||
mov ebx,79*65536+11
|
||||
mov edi,dg1
|
||||
digitlp:
|
||||
mov ecx,10*65536+11
|
||||
xor esi,esi
|
||||
plotlp:
|
||||
xor edx,edx
|
||||
test byte[edi],8
|
||||
je nobit
|
||||
mov edx,0x00ff0000
|
||||
nobit:
|
||||
mov eax,13 ; plot 8,4,2,1
|
||||
mcall
|
||||
add ecx,13*65536
|
||||
shl byte[edi],1
|
||||
inc esi
|
||||
cmp esi,4
|
||||
jne plotlp
|
||||
shr byte[edi],4
|
||||
mov edx,0x00880040
|
||||
mov eax,13 ; draw digit box
|
||||
mcall
|
||||
pusha
|
||||
mov edx,ebx
|
||||
and edx,0xffff0000
|
||||
shr ecx,16
|
||||
or edx,ecx
|
||||
add edx,3*65536+2
|
||||
mov ebx,0x00010100
|
||||
mov ecx,[edi]
|
||||
mov esi,0x00ffffff
|
||||
mov eax,47 ; display decimal
|
||||
mcall
|
||||
popa
|
||||
sub ebx,13*65536
|
||||
inc edi
|
||||
cmp edi,dg1+6
|
||||
jne digitlp
|
||||
ret
|
||||
|
||||
|
||||
drawwindow:
|
||||
|
||||
|
||||
mov eax,12
|
||||
mov ebx,1 ; start redraw
|
||||
mcall
|
||||
|
||||
mov eax, 48
|
||||
mov ebx, 4
|
||||
mcall
|
||||
mov ecx, eax
|
||||
xor eax,eax ; window
|
||||
mov ebx,100*65536+113
|
||||
add ecx,100*65536+87
|
||||
mov edx,0x34400088
|
||||
mov edi,title
|
||||
mcall
|
||||
|
||||
call drawclock
|
||||
|
||||
mov eax,12
|
||||
mov ebx,2 ; end redraw
|
||||
mcall
|
||||
|
||||
ret
|
||||
|
||||
title db 'BCD Clock',0
|
||||
I_END:
|
||||
dg1: db ?
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
;
|
||||
; BCD CLOCK
|
||||
;
|
||||
; Compile with FASM for Menuet
|
||||
;
|
||||
;
|
||||
|
||||
use32
|
||||
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd I_END
|
||||
dd 0x1000
|
||||
dd 0x1000
|
||||
dd 0x0 , 0x0
|
||||
|
||||
include 'lang.inc'
|
||||
include '../../macros.inc'
|
||||
|
||||
|
||||
START:
|
||||
red:
|
||||
call drawwindow
|
||||
|
||||
still:
|
||||
|
||||
|
||||
mov eax,23 ; wait for timeout
|
||||
mov ebx,50
|
||||
mcall
|
||||
|
||||
cmp eax,1 ; redraw ?
|
||||
je red
|
||||
|
||||
cmp eax, 2 ; key
|
||||
je key
|
||||
|
||||
cmp eax,3 ; button in buffer ?
|
||||
je button
|
||||
|
||||
call drawclock
|
||||
|
||||
jmp still
|
||||
|
||||
key:
|
||||
mov eax, 2
|
||||
int 0x40
|
||||
jmp still
|
||||
|
||||
button:
|
||||
mov al,17 ; get id
|
||||
mcall
|
||||
|
||||
cmp ah,1 ; button id=1 ?
|
||||
jne noclose
|
||||
or eax,-1 ; close this program
|
||||
mcall
|
||||
noclose:
|
||||
|
||||
jmp still
|
||||
|
||||
drawclock:
|
||||
|
||||
mov eax,3 ; get time
|
||||
mcall
|
||||
bswap eax
|
||||
shr eax,8
|
||||
mov edi,dg1
|
||||
mov ecx,6
|
||||
dgtomem:
|
||||
push eax
|
||||
and al,0x0f
|
||||
mov [edi],al
|
||||
inc edi
|
||||
pop eax
|
||||
shr eax,4
|
||||
loop dgtomem
|
||||
mov ebx,79*65536+11
|
||||
mov edi,dg1
|
||||
digitlp:
|
||||
mov ecx,10*65536+11
|
||||
xor esi,esi
|
||||
plotlp:
|
||||
xor edx,edx
|
||||
test byte[edi],8
|
||||
je nobit
|
||||
mov edx,0x00ff0000
|
||||
nobit:
|
||||
mov eax,13 ; plot 8,4,2,1
|
||||
mcall
|
||||
add ecx,13*65536
|
||||
shl byte[edi],1
|
||||
inc esi
|
||||
cmp esi,4
|
||||
jne plotlp
|
||||
shr byte[edi],4
|
||||
mov edx,0x00880040
|
||||
mov eax,13 ; draw digit box
|
||||
mcall
|
||||
pusha
|
||||
mov edx,ebx
|
||||
and edx,0xffff0000
|
||||
shr ecx,16
|
||||
or edx,ecx
|
||||
add edx,3*65536+2
|
||||
mov ebx,0x00010100
|
||||
mov ecx,[edi]
|
||||
mov esi,0x00ffffff
|
||||
mov eax,47 ; display decimal
|
||||
mcall
|
||||
popa
|
||||
sub ebx,13*65536
|
||||
inc edi
|
||||
cmp edi,dg1+6
|
||||
jne digitlp
|
||||
ret
|
||||
|
||||
|
||||
drawwindow:
|
||||
|
||||
|
||||
mov eax,12
|
||||
mov ebx,1 ; start redraw
|
||||
mcall
|
||||
|
||||
mov eax, 48
|
||||
mov ebx, 4
|
||||
mcall
|
||||
mov ecx, eax
|
||||
xor eax,eax ; window
|
||||
mov ebx,100*65536+113
|
||||
add ecx,100*65536+87
|
||||
mov edx,0x34400088
|
||||
mov edi,title
|
||||
mcall
|
||||
|
||||
call drawclock
|
||||
|
||||
mov eax,12
|
||||
mov ebx,2 ; end redraw
|
||||
mcall
|
||||
|
||||
ret
|
||||
|
||||
title db 'BCD Clock',0
|
||||
I_END:
|
||||
dg1: db ?
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+360
-357
@@ -1,357 +1,360 @@
|
||||
; App written by randall ported to Kolibri and MenuetOS64 by macgub (www.macgub.hekko.pl).
|
||||
; Now it use static memory, it is mixed 32bit code and SSE instructions.
|
||||
|
||||
include '../../../macros.inc'
|
||||
include '../../../KOSfuncs.inc'
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01' ; 8 byte id
|
||||
dd 0x01 ; header version
|
||||
dd START ; start of code
|
||||
dd IMG_END ; size of image
|
||||
dd I_END ;0x100000 ; memory for app
|
||||
dd I_END ;0xbffff ; esp
|
||||
dd 0x0 , 0x0 ; I_Param , I_Icon
|
||||
|
||||
; start of execution
|
||||
START:
|
||||
|
||||
call draw_window
|
||||
call draw_from_buffer
|
||||
call Main
|
||||
call draw_from_buffer
|
||||
|
||||
mcall SF_SET_CAPTION,1,wintitle2
|
||||
|
||||
still:
|
||||
|
||||
mcall SF_WAIT_EVENT
|
||||
|
||||
cmp eax,EV_REDRAW
|
||||
je .redraw
|
||||
cmp eax,EV_KEY
|
||||
je .key
|
||||
cmp eax,EV_BUTTON
|
||||
je .button
|
||||
jmp still
|
||||
|
||||
.redraw:
|
||||
call draw_window
|
||||
call draw_from_buffer
|
||||
jmp still
|
||||
|
||||
.key:
|
||||
mcall SF_GET_KEY
|
||||
shr eax,16 ; get scancode in 'al'
|
||||
cmp al,1
|
||||
je .exit
|
||||
cmp al,66
|
||||
je set_as_wallpaper
|
||||
jmp still
|
||||
|
||||
.button:
|
||||
mcall SF_GET_BUTTON
|
||||
cmp ah,1 ; button id=1 ?
|
||||
jne still
|
||||
|
||||
.exit:
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
|
||||
|
||||
set_as_wallpaper:
|
||||
mcall SF_BACKGROUND_SET,SSF_MODE_BG,2
|
||||
mcall SF_BACKGROUND_SET,SSF_SIZE_BG,IMG_SIZE,IMG_SIZE
|
||||
mcall SF_BACKGROUND_SET,SSF_IMAGE_BG,screen,0,3*IMG_SIZE*IMG_SIZE
|
||||
mcall SF_BACKGROUND_SET,SSF_REDRAW_BG
|
||||
jmp still
|
||||
|
||||
draw_from_buffer:
|
||||
pusha
|
||||
mcall SF_PUT_IMAGE,screen,IMG_SIZE*65536+IMG_SIZE,0
|
||||
popa
|
||||
ret
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: XORWOW
|
||||
; DESC: Pseudo random number generator.
|
||||
; OUT: eax [0;2^32-1]
|
||||
;-------------------------------------------------------------------------------
|
||||
macro XORWOW {
|
||||
mov edx,[g_xorwow_x] ; edx = x
|
||||
shr edx,2 ; edx = x >> 2
|
||||
xor edx,[g_xorwow_x] ; t = x ^ (x >> 2)
|
||||
mov eax,[g_xorwow_y] ; eax = y
|
||||
mov [g_xorwow_x],eax ; x = y
|
||||
mov eax,[g_xorwow_z] ; eax = z
|
||||
mov [g_xorwow_y],eax ; y = z
|
||||
mov eax,[g_xorwow_w] ; eax = w
|
||||
mov [g_xorwow_z],eax ; z = w
|
||||
mov eax,[g_xorwow_v] ; eax = v
|
||||
mov [g_xorwow_w],eax ; w = v
|
||||
mov edi,eax ; edi = v
|
||||
shl edi,4 ; edi = v << 4
|
||||
xor edi,eax ; edi = (v ^ (v << 4))
|
||||
mov eax,edx ; eax = t
|
||||
shl eax,1 ; eax = t << 1
|
||||
xor eax,edx ; eax = (t ^ (t << 1))
|
||||
xor eax,edi ; eax = (v ^ (v << 4)) ^ (t ^ (t << 1))
|
||||
mov [g_xorwow_v],eax ; v = eax
|
||||
add [g_xorwow_d],362437 ; d += 362437
|
||||
mov eax,[g_xorwow_d] ; eax = d
|
||||
add eax,[g_xorwow_v] ; eax = d + v
|
||||
}
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: RANDOM
|
||||
; DESC: Returns pseudo random number in the range [-0.5;0.5).
|
||||
; OUT: xmm0.x [-0.5;0.5)
|
||||
;-------------------------------------------------------------------------------
|
||||
macro RANDOM {
|
||||
XORWOW
|
||||
cvtsi2ss xmm0,eax
|
||||
mulss xmm0,[g_rand_scale]
|
||||
}
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: GenerateSequence
|
||||
; IN: xmm0.x re (c0.x)
|
||||
; IN: xmm1.x im (c0.y)
|
||||
; IN: edi array size
|
||||
; IN/OUT: esi pointer to the allocated array
|
||||
; OUT: eax generated sequence size
|
||||
;-------------------------------------------------------------------------------
|
||||
align 16
|
||||
GenerateSequence:
|
||||
xor eax,eax ; eax is index loop
|
||||
xorps xmm4,xmm4 ; xmm4 is c.x
|
||||
xorps xmm5,xmm5 ; xmm5 is c.y
|
||||
.Loop:
|
||||
; cn.x = c.x * c.x - c.y * c.y + c0.x
|
||||
movaps xmm2,xmm4
|
||||
movaps xmm3,xmm5
|
||||
mulss xmm2,xmm4
|
||||
mulss xmm3,xmm5
|
||||
subss xmm2,xmm3
|
||||
addss xmm2,xmm0
|
||||
movaps xmm6,xmm2 ; xmm6 is cn.x
|
||||
; cn.y = 2.0 * c.x * c.y + c0.y
|
||||
movaps xmm7,xmm4
|
||||
mulss xmm7,xmm5
|
||||
addss xmm7,xmm7
|
||||
addss xmm7,xmm1 ; xmm7 is cn.y
|
||||
; store cn
|
||||
movd dword [esi+eax*8],xmm6
|
||||
movd dword [esi+eax*8+4],xmm7
|
||||
; if (cn.x * cn.x + cn.y * cn.y > 10.0) return eax;
|
||||
movaps xmm2,xmm6
|
||||
movaps xmm3,xmm7
|
||||
mulss xmm2,xmm6
|
||||
mulss xmm3,xmm7
|
||||
addss xmm2,xmm3
|
||||
ucomiss xmm2,[g_max_dist]
|
||||
ja .EndLoop
|
||||
movaps xmm4,xmm6 ; c.x = cn.x
|
||||
movaps xmm5,xmm7 ; c.y = cn.y
|
||||
; continue loop
|
||||
inc eax
|
||||
cmp eax,edi
|
||||
jb .Loop
|
||||
; return 0
|
||||
xor eax,eax
|
||||
.EndLoop:
|
||||
ret
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: main
|
||||
; DESC: Program main function.
|
||||
;-------------------------------------------------------------------------------
|
||||
align 16
|
||||
Main:
|
||||
img_ptr equ ebp-8
|
||||
seq_ptr equ ebp-16
|
||||
pixel equ ebp-24
|
||||
r13dd equ ebp-64
|
||||
r12dd equ ebp-68
|
||||
r15dd equ ebp-72
|
||||
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,128
|
||||
; mem for the sequence
|
||||
lea eax,[sequence]
|
||||
mov [seq_ptr],eax
|
||||
; mem for the image
|
||||
lea eax,[screen]
|
||||
mov [img_ptr],eax
|
||||
; begin loops
|
||||
mov dword[r13dd],0 ; .LoopIterations counter
|
||||
.LoopIterations:
|
||||
mov dword[r12dd],0 ; .LoopOneMillion counter
|
||||
.LoopOneMillion:
|
||||
RANDOM
|
||||
mulss xmm0,[g_range]
|
||||
movaps xmm1,xmm0
|
||||
RANDOM
|
||||
mulss xmm0,[g_range]
|
||||
mov edi,SEQ_SIZE
|
||||
mov esi,[seq_ptr]
|
||||
call GenerateSequence ; eax = n sequence size
|
||||
test eax,eax
|
||||
jz .LoopSequenceEnd
|
||||
xor ecx,ecx ; ecx = i = 0 loop counter
|
||||
; mov r9dd,[seq_ptr] ; r9 = sequence base address
|
||||
; mov r8dd,[img_ptr] ; r8 = image base address
|
||||
movss xmm2,[g_img_size]
|
||||
movaps xmm3,xmm2
|
||||
mulss xmm3,[g_0_5] ; xmm3 = (g_img_size)/2
|
||||
movss xmm4,[g_zoom]
|
||||
mulss xmm4,xmm2 ; xmm4 = g_zoom * g_img_size
|
||||
movss xmm5,[g_offsetx] ; xmm5 = g_offsetx
|
||||
movss xmm6,[g_offsety] ; xmm6 = g_offsety
|
||||
.LoopSequence:
|
||||
cmp ecx,eax ; i < n
|
||||
je .LoopSequenceEnd
|
||||
movd xmm0,[sequence+ecx*8] ; load re
|
||||
movd xmm1,[sequence+ecx*8+4] ; load im
|
||||
addss xmm0,xmm5 ; xmm0 = re+g_offsetx
|
||||
addss xmm1,xmm6 ; xmm1 = im+g_offsety
|
||||
mulss xmm0,xmm4 ; xmm0 = (re+g_offsetx)*g_img_size*g_zoom
|
||||
mulss xmm1,xmm4 ; xmm1 = (im+g_offsety)*g_img_size*g_zoom
|
||||
addss xmm0,xmm3 ; xmm0 = (re+g_offsetx)*g_img_size*g_zoom+g_img_size/2
|
||||
addss xmm1,xmm3 ; xmm1 = (im+g_offsety)*g_img_size*g_zoom+g_img_size/2
|
||||
cvtss2si edi,xmm0 ; edi = x = int(xmm0.x)
|
||||
cvtss2si esi,xmm1 ; esi = y = int(xmm1.x)
|
||||
cmp edi,0
|
||||
jl @f
|
||||
cmp edi,IMG_SIZE
|
||||
jge @f
|
||||
cmp esi,0
|
||||
jl @f
|
||||
cmp esi,IMG_SIZE
|
||||
jge @f
|
||||
imul esi,esi,IMG_SIZE
|
||||
add esi,edi
|
||||
add dword [screen+esi*4],1
|
||||
@@:
|
||||
inc ecx
|
||||
jmp .LoopSequence
|
||||
.LoopSequenceEnd:
|
||||
; continue .LoopOneMillion
|
||||
add dword[r12dd],1
|
||||
cmp dword[r12dd],1000000
|
||||
jb .LoopOneMillion
|
||||
; continue .LoopIterations
|
||||
add dword[r13dd],1
|
||||
cmp dword[r13dd],ITERATIONS
|
||||
jb .LoopIterations
|
||||
; find max value
|
||||
mov dword[r12dd],0
|
||||
xor eax,eax ; eax = i = loop counter
|
||||
.LoopMax:
|
||||
push ecx
|
||||
mov ecx,[r12dd]
|
||||
cmp dword [screen+eax*4],ecx
|
||||
cmova ecx,dword [screen+eax*4]
|
||||
mov [r12dd],ecx
|
||||
pop ecx
|
||||
inc eax
|
||||
cmp eax,IMG_SIZE*IMG_SIZE
|
||||
jb .LoopMax
|
||||
; find min value
|
||||
; mov r13d,r12d ; r13d = min_val = max_val
|
||||
push dword[r12dd]
|
||||
pop dword[r13dd]
|
||||
xor eax,eax ; eax = i = loop counter
|
||||
.LoopMin:
|
||||
push ecx
|
||||
mov ecx,[r13dd]
|
||||
cmp dword [screen+eax*4],ecx
|
||||
|
||||
cmovb ecx,dword [screen+eax*4]
|
||||
mov [r13dd],ecx
|
||||
pop ecx
|
||||
inc eax
|
||||
cmp eax,IMG_SIZE*IMG_SIZE
|
||||
jb .LoopMin
|
||||
; write image pixels
|
||||
mov byte [pixel+3],255
|
||||
; mov r14,[img_ptr] ; r14 = image base address
|
||||
; xor r15d,r15d ; r15d = i = loop counter
|
||||
mov dword[r15dd],0
|
||||
cvtsi2ss xmm0,[r12dd] ; load max_value
|
||||
cvtsi2ss xmm1,[r13dd] ; load min_value
|
||||
movaps xmm2,xmm0
|
||||
subss xmm2,xmm1 ; xmm2 = r = max_value - min_value
|
||||
xor ecx,ecx
|
||||
.LoopWrite:
|
||||
mov eax,[screen+ecx*4] ; eax = image_value
|
||||
sub eax,[r13dd] ; eax = image_value - min_value
|
||||
cvtsi2ss xmm0,eax ; xmm0 = float(image_value - min_value)
|
||||
addss xmm0,xmm0 ; xmm0 = 2.0f * float(image_value - min_value)
|
||||
divss xmm0,xmm2 ; xmm0 = 2.0f * float(image_value - min_value) / r
|
||||
minss xmm0,[g_1_0] ; clamp to 1.0
|
||||
maxss xmm0,[g_0_0] ; clamp to 0.0
|
||||
mulss xmm0,[g_255_0] ; convert to 0 - 255
|
||||
cvtss2si eax,xmm0
|
||||
; write pixel data
|
||||
mov [screen+ecx*3],eax
|
||||
inc ecx
|
||||
cmp ecx,IMG_SIZE*IMG_SIZE
|
||||
jb .LoopWrite
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
; restore img_ptr,seq_ptr,pixel
|
||||
;-------------------------------------------------------------------------------
|
||||
; *********************************************
|
||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||
; *********************************************
|
||||
draw_window:
|
||||
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
|
||||
lea ecx, [50*65536+IMG_SIZE+4+eax] ; [y start] *65536 + [y size] + [skin_height]
|
||||
mcall SF_CREATE_WINDOW,<50,IMG_SIZE+9>,,0x74000000,,wintitle1
|
||||
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
align 1
|
||||
wintitle1 db 'Buddhabrot - Calculating, please wait...',0
|
||||
wintitle2 db 'Buddhabrot - Press F8 to set image as wallpaper',0
|
||||
|
||||
align 4
|
||||
g_xorwow_x dd 123456789
|
||||
g_xorwow_y dd 362436069
|
||||
g_xorwow_z dd 521288629
|
||||
g_xorwow_w dd 88675123
|
||||
g_xorwow_v dd 5783321
|
||||
g_xorwow_d dd 6615241
|
||||
g_rand_scale dd 2.3283064e-10 ; 1.0 / 2^32
|
||||
|
||||
IMG_SIZE = 600
|
||||
SEQ_SIZE = 50
|
||||
ITERATIONS = 100
|
||||
|
||||
g_img_size dd 600.0
|
||||
g_offsetx dd 0.5
|
||||
g_offsety dd 0.0
|
||||
g_zoom dd 0.4
|
||||
|
||||
g_max_dist dd 10.0
|
||||
g_range dd 4.2
|
||||
g_0_5 dd 0.5
|
||||
g_0_0 dd 0.0
|
||||
g_1_0 dd 1.0
|
||||
g_255_0 dd 255.0
|
||||
|
||||
IMG_END:
|
||||
;--------------------
|
||||
sequence: rb SEQ_SIZE*8
|
||||
screen: rb IMG_SIZE*IMG_SIZE*4
|
||||
memStack: rd 1024
|
||||
I_END:
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; App written by randall ported to Kolibri and MenuetOS64 by macgub (www.macgub.hekko.pl).
|
||||
; Now it use static memory, it is mixed 32bit code and SSE instructions.
|
||||
|
||||
include '../../macros.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01' ; 8 byte id
|
||||
dd 0x01 ; header version
|
||||
dd START ; start of code
|
||||
dd IMG_END ; size of image
|
||||
dd I_END ;0x100000 ; memory for app
|
||||
dd I_END ;0xbffff ; esp
|
||||
dd 0x0 , 0x0 ; I_Param , I_Icon
|
||||
|
||||
; start of execution
|
||||
START:
|
||||
|
||||
call draw_window
|
||||
call draw_from_buffer
|
||||
call Main
|
||||
call draw_from_buffer
|
||||
|
||||
mcall SF_SET_CAPTION,1,wintitle2
|
||||
|
||||
still:
|
||||
|
||||
mcall SF_WAIT_EVENT
|
||||
|
||||
cmp eax,EV_REDRAW
|
||||
je .redraw
|
||||
cmp eax,EV_KEY
|
||||
je .key
|
||||
cmp eax,EV_BUTTON
|
||||
je .button
|
||||
jmp still
|
||||
|
||||
.redraw:
|
||||
call draw_window
|
||||
call draw_from_buffer
|
||||
jmp still
|
||||
|
||||
.key:
|
||||
mcall SF_GET_KEY
|
||||
shr eax,16 ; get scancode in 'al'
|
||||
cmp al,1
|
||||
je .exit
|
||||
cmp al,66
|
||||
je set_as_wallpaper
|
||||
jmp still
|
||||
|
||||
.button:
|
||||
mcall SF_GET_BUTTON
|
||||
cmp ah,1 ; button id=1 ?
|
||||
jne still
|
||||
|
||||
.exit:
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
|
||||
|
||||
set_as_wallpaper:
|
||||
mcall SF_BACKGROUND_SET,SSF_MODE_BG,2
|
||||
mcall SF_BACKGROUND_SET,SSF_SIZE_BG,IMG_SIZE,IMG_SIZE
|
||||
mcall SF_BACKGROUND_SET,SSF_IMAGE_BG,screen,0,3*IMG_SIZE*IMG_SIZE
|
||||
mcall SF_BACKGROUND_SET,SSF_REDRAW_BG
|
||||
jmp still
|
||||
|
||||
draw_from_buffer:
|
||||
pusha
|
||||
mcall SF_PUT_IMAGE,screen,IMG_SIZE*65536+IMG_SIZE,0
|
||||
popa
|
||||
ret
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: XORWOW
|
||||
; DESC: Pseudo random number generator.
|
||||
; OUT: eax [0;2^32-1]
|
||||
;-------------------------------------------------------------------------------
|
||||
macro XORWOW {
|
||||
mov edx,[g_xorwow_x] ; edx = x
|
||||
shr edx,2 ; edx = x >> 2
|
||||
xor edx,[g_xorwow_x] ; t = x ^ (x >> 2)
|
||||
mov eax,[g_xorwow_y] ; eax = y
|
||||
mov [g_xorwow_x],eax ; x = y
|
||||
mov eax,[g_xorwow_z] ; eax = z
|
||||
mov [g_xorwow_y],eax ; y = z
|
||||
mov eax,[g_xorwow_w] ; eax = w
|
||||
mov [g_xorwow_z],eax ; z = w
|
||||
mov eax,[g_xorwow_v] ; eax = v
|
||||
mov [g_xorwow_w],eax ; w = v
|
||||
mov edi,eax ; edi = v
|
||||
shl edi,4 ; edi = v << 4
|
||||
xor edi,eax ; edi = (v ^ (v << 4))
|
||||
mov eax,edx ; eax = t
|
||||
shl eax,1 ; eax = t << 1
|
||||
xor eax,edx ; eax = (t ^ (t << 1))
|
||||
xor eax,edi ; eax = (v ^ (v << 4)) ^ (t ^ (t << 1))
|
||||
mov [g_xorwow_v],eax ; v = eax
|
||||
add [g_xorwow_d],362437 ; d += 362437
|
||||
mov eax,[g_xorwow_d] ; eax = d
|
||||
add eax,[g_xorwow_v] ; eax = d + v
|
||||
}
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: RANDOM
|
||||
; DESC: Returns pseudo random number in the range [-0.5;0.5).
|
||||
; OUT: xmm0.x [-0.5;0.5)
|
||||
;-------------------------------------------------------------------------------
|
||||
macro RANDOM {
|
||||
XORWOW
|
||||
cvtsi2ss xmm0,eax
|
||||
mulss xmm0,[g_rand_scale]
|
||||
}
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: GenerateSequence
|
||||
; IN: xmm0.x re (c0.x)
|
||||
; IN: xmm1.x im (c0.y)
|
||||
; IN: edi array size
|
||||
; IN/OUT: esi pointer to the allocated array
|
||||
; OUT: eax generated sequence size
|
||||
;-------------------------------------------------------------------------------
|
||||
align 16
|
||||
GenerateSequence:
|
||||
xor eax,eax ; eax is index loop
|
||||
xorps xmm4,xmm4 ; xmm4 is c.x
|
||||
xorps xmm5,xmm5 ; xmm5 is c.y
|
||||
.Loop:
|
||||
; cn.x = c.x * c.x - c.y * c.y + c0.x
|
||||
movaps xmm2,xmm4
|
||||
movaps xmm3,xmm5
|
||||
mulss xmm2,xmm4
|
||||
mulss xmm3,xmm5
|
||||
subss xmm2,xmm3
|
||||
addss xmm2,xmm0
|
||||
movaps xmm6,xmm2 ; xmm6 is cn.x
|
||||
; cn.y = 2.0 * c.x * c.y + c0.y
|
||||
movaps xmm7,xmm4
|
||||
mulss xmm7,xmm5
|
||||
addss xmm7,xmm7
|
||||
addss xmm7,xmm1 ; xmm7 is cn.y
|
||||
; store cn
|
||||
movd dword [esi+eax*8],xmm6
|
||||
movd dword [esi+eax*8+4],xmm7
|
||||
; if (cn.x * cn.x + cn.y * cn.y > 10.0) return eax;
|
||||
movaps xmm2,xmm6
|
||||
movaps xmm3,xmm7
|
||||
mulss xmm2,xmm6
|
||||
mulss xmm3,xmm7
|
||||
addss xmm2,xmm3
|
||||
ucomiss xmm2,[g_max_dist]
|
||||
ja .EndLoop
|
||||
movaps xmm4,xmm6 ; c.x = cn.x
|
||||
movaps xmm5,xmm7 ; c.y = cn.y
|
||||
; continue loop
|
||||
inc eax
|
||||
cmp eax,edi
|
||||
jb .Loop
|
||||
; return 0
|
||||
xor eax,eax
|
||||
.EndLoop:
|
||||
ret
|
||||
;-------------------------------------------------------------------------------
|
||||
; NAME: main
|
||||
; DESC: Program main function.
|
||||
;-------------------------------------------------------------------------------
|
||||
align 16
|
||||
Main:
|
||||
img_ptr equ ebp-8
|
||||
seq_ptr equ ebp-16
|
||||
pixel equ ebp-24
|
||||
r13dd equ ebp-64
|
||||
r12dd equ ebp-68
|
||||
r15dd equ ebp-72
|
||||
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
sub esp,128
|
||||
; mem for the sequence
|
||||
lea eax,[sequence]
|
||||
mov [seq_ptr],eax
|
||||
; mem for the image
|
||||
lea eax,[screen]
|
||||
mov [img_ptr],eax
|
||||
; begin loops
|
||||
mov dword[r13dd],0 ; .LoopIterations counter
|
||||
.LoopIterations:
|
||||
mov dword[r12dd],0 ; .LoopOneMillion counter
|
||||
.LoopOneMillion:
|
||||
RANDOM
|
||||
mulss xmm0,[g_range]
|
||||
movaps xmm1,xmm0
|
||||
RANDOM
|
||||
mulss xmm0,[g_range]
|
||||
mov edi,SEQ_SIZE
|
||||
mov esi,[seq_ptr]
|
||||
call GenerateSequence ; eax = n sequence size
|
||||
test eax,eax
|
||||
jz .LoopSequenceEnd
|
||||
xor ecx,ecx ; ecx = i = 0 loop counter
|
||||
; mov r9dd,[seq_ptr] ; r9 = sequence base address
|
||||
; mov r8dd,[img_ptr] ; r8 = image base address
|
||||
movss xmm2,[g_img_size]
|
||||
movaps xmm3,xmm2
|
||||
mulss xmm3,[g_0_5] ; xmm3 = (g_img_size)/2
|
||||
movss xmm4,[g_zoom]
|
||||
mulss xmm4,xmm2 ; xmm4 = g_zoom * g_img_size
|
||||
movss xmm5,[g_offsetx] ; xmm5 = g_offsetx
|
||||
movss xmm6,[g_offsety] ; xmm6 = g_offsety
|
||||
.LoopSequence:
|
||||
cmp ecx,eax ; i < n
|
||||
je .LoopSequenceEnd
|
||||
movd xmm0,[sequence+ecx*8] ; load re
|
||||
movd xmm1,[sequence+ecx*8+4] ; load im
|
||||
addss xmm0,xmm5 ; xmm0 = re+g_offsetx
|
||||
addss xmm1,xmm6 ; xmm1 = im+g_offsety
|
||||
mulss xmm0,xmm4 ; xmm0 = (re+g_offsetx)*g_img_size*g_zoom
|
||||
mulss xmm1,xmm4 ; xmm1 = (im+g_offsety)*g_img_size*g_zoom
|
||||
addss xmm0,xmm3 ; xmm0 = (re+g_offsetx)*g_img_size*g_zoom+g_img_size/2
|
||||
addss xmm1,xmm3 ; xmm1 = (im+g_offsety)*g_img_size*g_zoom+g_img_size/2
|
||||
cvtss2si edi,xmm0 ; edi = x = int(xmm0.x)
|
||||
cvtss2si esi,xmm1 ; esi = y = int(xmm1.x)
|
||||
cmp edi,0
|
||||
jl @f
|
||||
cmp edi,IMG_SIZE
|
||||
jge @f
|
||||
cmp esi,0
|
||||
jl @f
|
||||
cmp esi,IMG_SIZE
|
||||
jge @f
|
||||
imul esi,esi,IMG_SIZE
|
||||
add esi,edi
|
||||
add dword [screen+esi*4],1
|
||||
@@:
|
||||
inc ecx
|
||||
jmp .LoopSequence
|
||||
.LoopSequenceEnd:
|
||||
; continue .LoopOneMillion
|
||||
add dword[r12dd],1
|
||||
cmp dword[r12dd],1000000
|
||||
jb .LoopOneMillion
|
||||
; continue .LoopIterations
|
||||
add dword[r13dd],1
|
||||
cmp dword[r13dd],ITERATIONS
|
||||
jb .LoopIterations
|
||||
; find max value
|
||||
mov dword[r12dd],0
|
||||
xor eax,eax ; eax = i = loop counter
|
||||
.LoopMax:
|
||||
push ecx
|
||||
mov ecx,[r12dd]
|
||||
cmp dword [screen+eax*4],ecx
|
||||
cmova ecx,dword [screen+eax*4]
|
||||
mov [r12dd],ecx
|
||||
pop ecx
|
||||
inc eax
|
||||
cmp eax,IMG_SIZE*IMG_SIZE
|
||||
jb .LoopMax
|
||||
; find min value
|
||||
; mov r13d,r12d ; r13d = min_val = max_val
|
||||
push dword[r12dd]
|
||||
pop dword[r13dd]
|
||||
xor eax,eax ; eax = i = loop counter
|
||||
.LoopMin:
|
||||
push ecx
|
||||
mov ecx,[r13dd]
|
||||
cmp dword [screen+eax*4],ecx
|
||||
|
||||
cmovb ecx,dword [screen+eax*4]
|
||||
mov [r13dd],ecx
|
||||
pop ecx
|
||||
inc eax
|
||||
cmp eax,IMG_SIZE*IMG_SIZE
|
||||
jb .LoopMin
|
||||
; write image pixels
|
||||
mov byte [pixel+3],255
|
||||
; mov r14,[img_ptr] ; r14 = image base address
|
||||
; xor r15d,r15d ; r15d = i = loop counter
|
||||
mov dword[r15dd],0
|
||||
cvtsi2ss xmm0,[r12dd] ; load max_value
|
||||
cvtsi2ss xmm1,[r13dd] ; load min_value
|
||||
movaps xmm2,xmm0
|
||||
subss xmm2,xmm1 ; xmm2 = r = max_value - min_value
|
||||
xor ecx,ecx
|
||||
.LoopWrite:
|
||||
mov eax,[screen+ecx*4] ; eax = image_value
|
||||
sub eax,[r13dd] ; eax = image_value - min_value
|
||||
cvtsi2ss xmm0,eax ; xmm0 = float(image_value - min_value)
|
||||
addss xmm0,xmm0 ; xmm0 = 2.0f * float(image_value - min_value)
|
||||
divss xmm0,xmm2 ; xmm0 = 2.0f * float(image_value - min_value) / r
|
||||
minss xmm0,[g_1_0] ; clamp to 1.0
|
||||
maxss xmm0,[g_0_0] ; clamp to 0.0
|
||||
mulss xmm0,[g_255_0] ; convert to 0 - 255
|
||||
cvtss2si eax,xmm0
|
||||
; write pixel data
|
||||
mov [screen+ecx*3],eax
|
||||
inc ecx
|
||||
cmp ecx,IMG_SIZE*IMG_SIZE
|
||||
jb .LoopWrite
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
ret
|
||||
; restore img_ptr,seq_ptr,pixel
|
||||
;-------------------------------------------------------------------------------
|
||||
; *********************************************
|
||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||
; *********************************************
|
||||
draw_window:
|
||||
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
|
||||
lea ecx, [50*65536+IMG_SIZE+4+eax] ; [y start] *65536 + [y size] + [skin_height]
|
||||
mcall SF_CREATE_WINDOW,<50,IMG_SIZE+9>,,0x74000000,,wintitle1
|
||||
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
align 1
|
||||
wintitle1 db 'Buddhabrot - Calculating, please wait...',0
|
||||
wintitle2 db 'Buddhabrot - Press F8 to set image as wallpaper',0
|
||||
|
||||
align 4
|
||||
g_xorwow_x dd 123456789
|
||||
g_xorwow_y dd 362436069
|
||||
g_xorwow_z dd 521288629
|
||||
g_xorwow_w dd 88675123
|
||||
g_xorwow_v dd 5783321
|
||||
g_xorwow_d dd 6615241
|
||||
g_rand_scale dd 2.3283064e-10 ; 1.0 / 2^32
|
||||
|
||||
IMG_SIZE = 600
|
||||
SEQ_SIZE = 50
|
||||
ITERATIONS = 100
|
||||
|
||||
g_img_size dd 600.0
|
||||
g_offsetx dd 0.5
|
||||
g_offsety dd 0.0
|
||||
g_zoom dd 0.4
|
||||
|
||||
g_max_dist dd 10.0
|
||||
g_range dd 4.2
|
||||
g_0_5 dd 0.5
|
||||
g_0_0 dd 0.0
|
||||
g_1_0 dd 1.0
|
||||
g_255_0 dd 255.0
|
||||
|
||||
IMG_END:
|
||||
;--------------------
|
||||
sequence: rb SEQ_SIZE*8
|
||||
screen: rb IMG_SIZE*IMG_SIZE*4
|
||||
memStack: rd 1024
|
||||
I_END:
|
||||
File renamed without changes.
@@ -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())
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,6 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; COLORREF.ASM - COLOR REFERENCE
|
||||
;
|
||||
; Compile with FASM for Menuet
|
||||
@@ -15,7 +18,7 @@ use32
|
||||
dd 0x0,0x0 ; I_Param , I_Icon
|
||||
|
||||
include 'lang.inc'
|
||||
include '..\..\..\macros.inc'
|
||||
include '..\..\macros.inc'
|
||||
wide: dd 0 ; screen pixels width
|
||||
mouse: dd 0 ; 1=right,2=left [mouse click]
|
||||
|
||||
@@ -148,7 +151,7 @@ draw_window:
|
||||
mov edx,0x14000000 ; work area color (type II)
|
||||
mov edi,title ; frame color
|
||||
mcall
|
||||
|
||||
|
||||
call palette ; display color palette
|
||||
|
||||
mcall 12, 2
|
||||
@@ -267,7 +270,7 @@ help:
|
||||
add ecx, 236
|
||||
sub ecx, eax
|
||||
|
||||
|
||||
|
||||
mov ebx,5*65536+190 ; x and width
|
||||
mov edx,0x465e8f ; dark denim color
|
||||
mov eax,13 ; write text funx
|
||||
@@ -294,7 +297,7 @@ h1: push ecx
|
||||
jne h2 ; nope
|
||||
mov eax,2 ; yep, burn it
|
||||
mcall
|
||||
h2:
|
||||
h2:
|
||||
call draw_window
|
||||
|
||||
ret
|
||||
Loaded 100 of 718 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user