Compare commits
27
Commits
rewrite-piano
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
No files matched your search
@@ -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'
|
||||
|
||||
+65
-64
@@ -28,7 +28,7 @@ img_files = {
|
||||
{"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"},
|
||||
@@ -59,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"},
|
||||
@@ -72,51 +72,51 @@ img_files = {
|
||||
|
||||
-- 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
|
||||
|
||||
@@ -155,10 +155,10 @@ extra_files = {
|
||||
{"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"},
|
||||
@@ -318,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"},
|
||||
@@ -348,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"},
|
||||
@@ -399,77 +399,78 @@ 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/CHARSETS", VAR_PROGS .. "/develop/charsets/charsets"},
|
||||
{"DEVELOP/COBJ", VAR_PROGS .. "/develop/cObj/trunk/cObj"},
|
||||
@@ -482,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"},
|
||||
@@ -528,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"},
|
||||
@@ -572,7 +574,7 @@ tup.append_table(img_files, {
|
||||
{"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"},
|
||||
@@ -596,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"},
|
||||
@@ -664,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"},
|
||||
@@ -729,12 +730,11 @@ tup.append_table(img_files, {
|
||||
})
|
||||
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"},
|
||||
@@ -758,10 +758,9 @@ tup.append_table(img_files, {
|
||||
{"GAMES/REVERSI", VAR_PROGS .. "/games/reversi/reversi"},
|
||||
{"LIB/BASE64.OBJ", VAR_PROGS .. "/develop/libraries/base64/base64.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"},
|
||||
@@ -772,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"},
|
||||
@@ -801,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
|
||||
|
||||
File renamed without changes.
@@ -190,8 +190,8 @@ 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
|
||||
|
||||
@@ -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
|
||||
@@ -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]
|
||||
|
||||
@@ -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]==' ') {
|
||||
|
||||
@@ -57,11 +57,14 @@ 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;
|
||||
|
||||
@@ -133,8 +136,6 @@ void main()
|
||||
{
|
||||
int redirect_count=0;
|
||||
|
||||
TOOLBAR_H = PADDING+TSZE+PADDING+2;
|
||||
|
||||
LoadLibraries();
|
||||
LoadIniConfig();
|
||||
HandleParam();
|
||||
@@ -297,8 +298,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;
|
||||
@@ -332,7 +335,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;
|
||||
@@ -348,7 +351,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;
|
||||
@@ -357,7 +360,7 @@ 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
|
||||
@@ -372,6 +375,7 @@ void SetElementSizes()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void draw_window()
|
||||
{
|
||||
bool burger_active = false;
|
||||
@@ -388,7 +392,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);
|
||||
|
||||
@@ -706,19 +713,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) {
|
||||
@@ -759,6 +772,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;
|
||||
@@ -813,9 +835,10 @@ 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=");
|
||||
|
||||
@@ -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.92";
|
||||
char version[]="WebView 3.94";
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
;
|
||||
|
||||
;
|
||||
; Crown_s Soft Screensaver v1.13m
|
||||
; WWW: http://www.crown-s-soft.com
|
||||
@@ -34,8 +37,8 @@ copyrightlen:
|
||||
|
||||
include "lang.inc"
|
||||
include "figuresi.inc"
|
||||
include "..\..\..\macros.inc"
|
||||
include "..\..\..\KOSfuncs.inc"
|
||||
include "..\..\macros.inc"
|
||||
include "..\..\KOSfuncs.inc"
|
||||
start:
|
||||
cmp dword[params], '@ss'
|
||||
setz [screensaver]
|
||||
@@ -96,7 +99,7 @@ red:
|
||||
|
||||
still:
|
||||
mcall SF_WAIT_EVENT_TIMEOUT, delay ; wait here for event
|
||||
|
||||
|
||||
cmp eax,1 ; redraw request ?
|
||||
je red
|
||||
cmp eax,2 ; key in buffer ?
|
||||
@@ -117,7 +120,7 @@ jmp still
|
||||
key:
|
||||
cmp [screensaver], 0
|
||||
jnz close
|
||||
|
||||
|
||||
mcall SF_GET_KEY
|
||||
|
||||
cmp al,1 ; is key in buffer ?
|
||||
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
|
||||
;
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; ;
|
||||
; Color Slider Control Demonstration ;
|
||||
@@ -20,8 +23,8 @@ use32
|
||||
dd 0x0 , 0x0 ; I_Param , I_Icon
|
||||
|
||||
include 'lang.inc'
|
||||
include '..\..\..\macros.inc'
|
||||
include '..\..\..\KOSfuncs.inc'
|
||||
include '..\..\macros.inc'
|
||||
include '..\..\KOSfuncs.inc'
|
||||
START: ; start of execution
|
||||
|
||||
call draw_window ; at first, draw the window
|
||||
@@ -50,7 +53,7 @@ still:
|
||||
|
||||
button: ; button
|
||||
mcall SF_GET_BUTTON ; get id
|
||||
|
||||
|
||||
shr eax,8
|
||||
|
||||
cmp eax,1 ; button id=1 ?
|
||||
@@ -72,7 +75,7 @@ draw_window:
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
mcall SF_CREATE_WINDOW, <100,200>, <100,200>, 0x14ffffff, , title
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
|
||||
|
||||
call draw_slider_info
|
||||
|
||||
xor ecx,ecx
|
||||
@@ -151,7 +154,7 @@ ret
|
||||
|
||||
draw_slider_info:
|
||||
;Repaint value background
|
||||
mcall SF_DRAW_RECT, 144*65536+36, 72*65536+9, 0x00ffffff
|
||||
mcall SF_DRAW_RECT, 144*65536+36, 72*65536+9, 0x00ffffff
|
||||
;Draw Color Box
|
||||
xor edx, edx
|
||||
movzx ecx,word [slider_1+12]
|
||||
@@ -164,7 +167,7 @@ draw_slider_info:
|
||||
mov ebx, 0x00860035
|
||||
mov ecx, 0x00590040
|
||||
mov eax, SF_DRAW_RECT
|
||||
mcall
|
||||
mcall
|
||||
;draw current value of slider
|
||||
mov ecx, edx
|
||||
mov eax, SF_DRAW_NUMBER
|
||||
@@ -340,4 +343,4 @@ ret
|
||||
|
||||
; DATA AREA
|
||||
title db 'Color Slider',0
|
||||
I_END:
|
||||
I_END:
|
||||
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.
@@ -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
|
||||
;
|
||||
|
||||
;
|
||||
; EYES FOR MENUET
|
||||
;
|
||||
@@ -22,7 +25,7 @@ use32
|
||||
dd 0x0
|
||||
dd 0x0
|
||||
|
||||
include '..\..\..\macros.inc'
|
||||
include '..\..\macros.inc'
|
||||
ENTRANCE: ; start of code
|
||||
|
||||
; ==== main ====
|
||||
File renamed without changes.
Loaded 100 of 527 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user