merge upstream
Build system / Check kernel codestyle (pull_request) Successful in 1m41s
Build system / Build (pull_request) Successful in 39m37s

This commit is contained in:
Max
2026-04-10 08:40:58 +00:00
201 changed files with 10792 additions and 10589 deletions
+31 -31
View File
@@ -79,7 +79,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"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"},
@@ -89,7 +89,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"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"},
@@ -98,7 +98,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"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"},
@@ -106,7 +106,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"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, {
@@ -116,7 +116,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"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
@@ -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,10 +399,10 @@ 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"},
{"@RESHARE", VAR_PROGS .. "/system/reshare/reshare"},
@@ -414,30 +414,30 @@ tup.append_table(img_files, {
{"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"},
{"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"},
@@ -450,16 +450,16 @@ tup.append_table(img_files, {
{"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"},
{"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"},
@@ -470,7 +470,7 @@ tup.append_table(img_files, {
{"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"},
{"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"},
@@ -484,9 +484,9 @@ tup.append_table(img_files, {
{"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/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/CSLIDE", VAR_PROGS .. "/demos/cslide/cslide"},
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/trunk/thread"},
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
@@ -598,8 +598,8 @@ 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"},
@@ -760,7 +760,7 @@ tup.append_table(img_files, {
{"LIB/ICONV.OBJ", VAR_PROGS .. "/develop/libraries/iconv/iconv.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"},
+1 -1
View File
@@ -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")
+22 -22
View File
@@ -56,25 +56,25 @@ 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\calendar\calendar.asm %BIN%\calendar
fasm system\board\board.asm %BIN%\develop\board
fasm system\commouse\trunk\commouse.asm %BIN%\commouse
fasm system\cpu\trunk\cpu.asm %BIN%\cpu
fasm system\cpu\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\docpack\docpack.asm %BIN%\docpack
fasm system\end\trunk\end.asm %BIN%\end
fasm system\gmon\gmon.asm %BIN%\gmon
fasm system\icon\trunk\icon.asm %BIN%\icon
fasm system\icon\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\launcher\launcher.asm %BIN%\launcher
fasm system\menu\menu.asm %BIN%\@menu
fasm system\mgb\trunk\mgb.asm %BIN%\mgb
fasm system\mousemul\trunk\mousemul.asm %BIN%\mousemul
fasm system\mousemul\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\rdsave\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
@@ -201,22 +201,22 @@ 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
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
cd demos\aclock\trunk\
nasmw -t -f bin -o ..\..\..\%BIN%\demos\aclock aclock.asm
cd ..\..\..
fasm demos\bcdclk\trunk\bcdclk.asm %BIN%\demos\bcdclk
fasm demos\bcdclk\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\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\trunk\firework.asm %BIN%\demos\firework
fasm demos\free3d04\trunk\free3d04.asm %BIN%\3d\free3d04
fasm demos\free3d04\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
@@ -238,9 +238,9 @@ fasm media\midamp\trunk\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\hdd_info\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\rdsave\rdsave.asm %BIN%\nightbuild\rdsave
fasm other\kpack\trunk\kpack.asm %BIN%\nightbuild\kpack
fasm other\rtfread\rtfread.asm %BIN%\nightbuild\rtfread
;restore
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 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())

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

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())
@@ -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 ?
@@ -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:
@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,3 +1,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())
@@ -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 ?
@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,3 +1,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:

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,3 +1,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 ====
@@ -1,4 +1,10 @@
include '..\..\..\macros.inc'
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
include '..\..\macros.inc'
use32
org 0x0
@@ -199,7 +205,7 @@ put_big_point:
;DATA
align 4
count1 dd my_img
count2 dd 0
curtime dd 0
File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
@@ -1,3 +1,6 @@
; SPDX-License-Identifier: NOASSERTION
;
;
; Fisheye Raycasting Engine Etc. FREE3D for MENUETOS by Dieter Marfurt
; Version 0.4 (requires some texture-files to compile (see Data Section))
@@ -36,7 +39,7 @@ use32
dd APP_MEM;0x100000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc'
include '..\..\..\macros.inc'
include '..\..\macros.inc'
COLOR_ORDER equ OTHER
include 'gif_lite.inc'
@@ -296,7 +299,7 @@ m_right: ; turn right
draw_window:
mcall 12,1
mcall 48, 4 ;get skin width
lea ecx, [50*65536+484+eax] ;[y start] *65536 + [y size] + [skin_height]
mcall 0,<50,649>,,0x74ffffff,,title ;draw window

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

+1 -1
View File
@@ -1,4 +1,4 @@
CFLAGS=-O3
CFLAGS=-O3 -std=c99
all: kpack kerpack
kpack: kpack64.o LZMAEncoder-kpack.o MatchFinder.o RangeCoder.o
gcc -nostartfiles -no-pie -o kpack kpack64.o LZMAEncoder-kpack.o MatchFinder.o RangeCoder.o
@@ -1,163 +1,165 @@
include '../../../proc32.inc'
macro start_draw_window x,y,xsize,ysize,areacolor,caption,capsize
{
;pusha
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
int 0x40
; DRAW WINDOW
mov eax, 0 ; function 0 : define and draw window
mov ebx, x*65536+xsize ; [x start] *65536 + [x size]
mov ecx, y*65536+ysize ; [y start] *65536 + [y size]
mov edx, areacolor ; color of work area RRGGBB
mov esi, 0x00334455 ; color of grab bar RRGGBB
mov edi, 0x00ddeeff ; color of frames RRGGBB
int 0x40
; WINDOW LABEL
mov eax, 4 ; function 4 : write text to window
mov ebx, 8*65536+8 ; [x start] *65536 + [y start]
mov ecx, 0x0;0ffffff ; color of text RRGGBB
mov edx, caption ; pointer to text beginning
mov esi, capsize ; text length
int 0x40
;popa
}
macro end_draw_window
{
mov eax, 12 ; end of redraw
mov ebx, 2
int 0x40
}
macro change_window_place_size x,y,xsize,ysize
{
mov eax, 67 ; function 67 : replace and/or resize window
mov ebx, x
mov ecx, y
mov edx, xsize
mov esi, ysize
int 0x40
}
proc draw_button stdcall, x:dword, y:dword, xsize:dword, ysize:dword, \
id:dword, butcolor:dword, text:dword, textlen:byte, textcolor:dword
pusha
mov ebx, dword [x]
shl ebx, 16
add ebx, dword [xsize] ; [x start] *65536 + [x size]
mov ecx, dword [y]
shl ecx, 16
add ecx, dword [ysize] ; [y start] *65536 + [y size]
mov edx, dword [id] ; button id
mov esi, dword [butcolor] ; button color RRGGBB
mov eax, 8 ; function 8 : define and draw button
int 0x40
mov ebx, dword [x]
add ebx, 5
shl ebx, 16
mov eax, dword [ysize]
sub eax, 5
shr eax, 1
add ebx, eax
add ebx, dword [y] ;mov ebx, (x+5)*65536+y+(ysize-5)/2 ; Draw button text
mov ecx, dword [textcolor]
mov edx, dword [text]
xor eax, eax
mov al, byte [textlen]
mov esi, eax
mov eax, 4
int 0x40
popa
ret
endp
;macro outtextxy x,y,prompt,prompt_len,color
;{
proc outtextxy stdcall, x:dword, y:dword, prompt:dword, prompt_len:dword, color:dword
pusha
mov eax, 4
mov ebx, dword [x] ; draw info text with function 4
shl ebx, 16
or ebx, dword [y]
mov ecx, dword [color]
mov edx, dword [prompt]
mov esi, dword [prompt_len]
test esi, esi
jnz @f
or ecx, 0x80000000
@@:
int 0x40
popa
ret
endp
;}
;proc bar x:dword, y:dword, xsize:dword, ysize:dword, color:dword
macro bar x, y, xsize, ysize, color
{
pusha
mov eax, 13
;mov ebx, [x]
;shl ebx, 16
;add ebx, [xsize]
;mov ecx, [y]
;shl ecx, 16
;add ecx, [ysize]
;mov edx, [color]
mov ebx, x*65536+xsize
mov ecx, y*65536+ysize
mov edx, color
int 0x40
popa
;ret
;endp
}
macro line x1,y1,x2,y2,color
{
pusha
mov eax, 38
mov ebx, x1*65536+x2
mov ecx, y1*65536+y2
mov edx, color
int 0x40
popa
}
macro rectangle x,y,xsize,ysize,color
{
x2=x+xsize
y2=y+ysize
line x,y,x2,y,color
line x,y,x,y2,color
line x,y2,x2,y2,color
line x2,y,x2,y2,color
}
macro rectangle2 x,y,xsize,ysize,color1,color2
{
x2=x+xsize
y2=y+ysize
line x,y,x2,y,color1
line x,y,x,y2,color1
line x,y2,x2,y2,color2
line x2,y,x2,y2,color2
}
macro putpixel x,y,color
{
mov eax, 1
mov ebx, x
mov ecx, y
mov edx, color
int 0x40
}
; SPDX-License-Identifier: NOASSERTION
;
include '../../proc32.inc'
macro start_draw_window x,y,xsize,ysize,areacolor,caption,capsize
{
;pusha
mov eax, 12 ; function 12:tell os about windowdraw
mov ebx, 1 ; 1, start of draw
int 0x40
; DRAW WINDOW
mov eax, 0 ; function 0 : define and draw window
mov ebx, x*65536+xsize ; [x start] *65536 + [x size]
mov ecx, y*65536+ysize ; [y start] *65536 + [y size]
mov edx, areacolor ; color of work area RRGGBB
mov esi, 0x00334455 ; color of grab bar RRGGBB
mov edi, 0x00ddeeff ; color of frames RRGGBB
int 0x40
; WINDOW LABEL
mov eax, 4 ; function 4 : write text to window
mov ebx, 8*65536+8 ; [x start] *65536 + [y start]
mov ecx, 0x0;0ffffff ; color of text RRGGBB
mov edx, caption ; pointer to text beginning
mov esi, capsize ; text length
int 0x40
;popa
}
macro end_draw_window
{
mov eax, 12 ; end of redraw
mov ebx, 2
int 0x40
}
macro change_window_place_size x,y,xsize,ysize
{
mov eax, 67 ; function 67 : replace and/or resize window
mov ebx, x
mov ecx, y
mov edx, xsize
mov esi, ysize
int 0x40
}
proc draw_button stdcall, x:dword, y:dword, xsize:dword, ysize:dword, \
id:dword, butcolor:dword, text:dword, textlen:byte, textcolor:dword
pusha
mov ebx, dword [x]
shl ebx, 16
add ebx, dword [xsize] ; [x start] *65536 + [x size]
mov ecx, dword [y]
shl ecx, 16
add ecx, dword [ysize] ; [y start] *65536 + [y size]
mov edx, dword [id] ; button id
mov esi, dword [butcolor] ; button color RRGGBB
mov eax, 8 ; function 8 : define and draw button
int 0x40
mov ebx, dword [x]
add ebx, 5
shl ebx, 16
mov eax, dword [ysize]
sub eax, 5
shr eax, 1
add ebx, eax
add ebx, dword [y] ;mov ebx, (x+5)*65536+y+(ysize-5)/2 ; Draw button text
mov ecx, dword [textcolor]
mov edx, dword [text]
xor eax, eax
mov al, byte [textlen]
mov esi, eax
mov eax, 4
int 0x40
popa
ret
endp
;macro outtextxy x,y,prompt,prompt_len,color
;{
proc outtextxy stdcall, x:dword, y:dword, prompt:dword, prompt_len:dword, color:dword
pusha
mov eax, 4
mov ebx, dword [x] ; draw info text with function 4
shl ebx, 16
or ebx, dword [y]
mov ecx, dword [color]
mov edx, dword [prompt]
mov esi, dword [prompt_len]
test esi, esi
jnz @f
or ecx, 0x80000000
@@:
int 0x40
popa
ret
endp
;}
;proc bar x:dword, y:dword, xsize:dword, ysize:dword, color:dword
macro bar x, y, xsize, ysize, color
{
pusha
mov eax, 13
;mov ebx, [x]
;shl ebx, 16
;add ebx, [xsize]
;mov ecx, [y]
;shl ecx, 16
;add ecx, [ysize]
;mov edx, [color]
mov ebx, x*65536+xsize
mov ecx, y*65536+ysize
mov edx, color
int 0x40
popa
;ret
;endp
}
macro line x1,y1,x2,y2,color
{
pusha
mov eax, 38
mov ebx, x1*65536+x2
mov ecx, y1*65536+y2
mov edx, color
int 0x40
popa
}
macro rectangle x,y,xsize,ysize,color
{
x2=x+xsize
y2=y+ysize
line x,y,x2,y,color
line x,y,x,y2,color
line x,y2,x2,y2,color
line x2,y,x2,y2,color
}
macro rectangle2 x,y,xsize,ysize,color1,color2
{
x2=x+xsize
y2=y+ysize
line x,y,x2,y,color1
line x,y,x,y2,color1
line x,y2,x2,y2,color2
line x2,y,x2,y2,color2
}
macro putpixel x,y,color
{
mov eax, 1
mov ebx, x
mov ecx, y
mov edx, color
int 0x40
}
@@ -1,4 +1,6 @@
; SPDX-License-Identifier: NOASSERTION
;
; MyKey. Version 0.2.
;
; Author: Asper
@@ -23,13 +25,13 @@ include 'lang.inc' ; Language support for locales: it_IT, en_US.
include 'string.inc'
;include 'macros.inc'
include '../../../macros.inc'
include '../../macros.inc'
include 'ASPAPI.INC'
;include 'editbox_ex.mac'
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
;include 'load_lib.mac'
include '../../../develop/libraries/box_lib/load_lib.mac'
include '../../../dll.inc'
include '../../develop/libraries/box_lib/load_lib.mac'
include '../../dll.inc'
include 'debug.inc'
DEBUG equ 0;1

Some files were not shown because too many files have changed in this diff Show More