Compare commits
47 Commits
add-licens
...
PR-TidySVN
Author | SHA1 | Date | |
---|---|---|---|
1b8af624bc | |||
a5d87e488a | |||
9d0aee6c6d | |||
7fe66081fa | |||
2d39f8cb03 | |||
0a44e14838 | |||
e570d29f36 | |||
47981cdb1e | |||
6942542b67 | |||
30ab1f2ace | |||
d34359f7c4 | |||
85e65fb968 | |||
c304ba66ac | |||
88926e72b1 | |||
63c240976d | |||
d8d10137c0 | |||
18a96df908 | |||
f6c3faa9bc | |||
9f55f6aca0 | |||
9eca27ce58 | |||
0bdce8b4af | |||
786938de43 | |||
3900f7f29c | |||
257514f3cb | |||
71b8383a04 | |||
9da6be501a | |||
460dd985d3 | |||
86b1ee4c75 | |||
9a748b1dfe | |||
2dfb3ddff3
|
|||
7e63294b5e | |||
c148987224 | |||
4550e15838 | |||
cc867a0bb8 | |||
16a0ef9543 | |||
51b150c9aa | |||
c18da5afae | |||
cd1c2ce969 | |||
d7795a8961 | |||
b948491fb3 | |||
03cfdeb50f | |||
e4cd8a4d74 | |||
75b6663ce0 | |||
df0c5d8f48 | |||
fcb9f49785 | |||
d6c44c6570 | |||
b8a1487bab |
@@ -49,8 +49,6 @@ img_files = {
|
||||
{"MEDIA/IMGF/INVSOL.OBJ", "common/media/ImgF/invSol.obj"},
|
||||
{"MEDIA/PIXIESKN.PNG", SRC_PROGS .. "/cmm/pixie2/pixieskn.png"},
|
||||
{"NETWORK/FTPC.INI", SRC_PROGS .. "/network/ftpc/ftpc.ini"},
|
||||
{"NETWORK/FTPC_SYS.PNG", SRC_PROGS .. "/network/ftpc/ftpc_sys.png"},
|
||||
{"NETWORK/FTPC_NOD.PNG", SRC_PROGS .. "/network/ftpc/ftpc_nod.png"},
|
||||
{"NETWORK/FTPD.INI", "common/network/ftpd.ini"},
|
||||
{"NETWORK/KNMAP", "common/network/knmap"},
|
||||
{"NETWORK/USERS.INI", "common/network/users.ini"},
|
||||
@@ -197,8 +195,8 @@ extra_files = {
|
||||
{"kolibrios/develop/utils/SPEDump", SRC_PROGS .. "/develop/SPEDump/SPEDump.kex"},
|
||||
{"kolibrios/emul/", "common/emul/*"},
|
||||
{"kolibrios/emul/dosbox/", "common/emul/DosBox/*"},
|
||||
{"kolibrios/emul/e80/readme.txt", SRC_PROGS .. "/emulator/e80/trunk/readme.txt"},
|
||||
{"kolibrios/emul/e80/keyboard.png", SRC_PROGS .. "/emulator/e80/trunk/keyboard.png"},
|
||||
{"kolibrios/emul/e80/readme.txt", SRC_PROGS .. "/emulator/e80/readme.txt"},
|
||||
{"kolibrios/emul/e80/keyboard.png", SRC_PROGS .. "/emulator/e80/keyboard.png"},
|
||||
{"kolibrios/emul/fceu/fceu", SRC_PROGS .. "/emulator/fceu/fceu"},
|
||||
{"kolibrios/emul/fceu/FCEU ReadMe.txt", SRC_PROGS .. "/emulator/fceu/FCEU ReadMe.txt"},
|
||||
{"kolibrios/emul/chip8/chip8", VAR_PROGS .. "/emulator/chip8/chip8"},
|
||||
@@ -286,7 +284,7 @@ extra_files = {
|
||||
{"kolibrios/netsurf/res/", "common/network/netsurf/res/*"},
|
||||
{"kolibrios/res/skins/", "../skins/authors.txt"},
|
||||
{"kolibrios/res/templates/", "common/templates/*"},
|
||||
{"kolibrios/res/templates/", SRC_PROGS .. "/emulator/e80/trunk/games/*"},
|
||||
{"kolibrios/res/templates/", SRC_PROGS .. "/emulator/e80/games/*"},
|
||||
{"kolibrios/res/templates/NES/", "common/templates/NES/*"},
|
||||
{"kolibrios/res/wallpapers/", "common/wallpapers/*"},
|
||||
{"kolibrios/res/system/", build_type .. "/settings/kolibri.lbl"},
|
||||
@@ -411,7 +409,8 @@ tup.append_table(img_files, {
|
||||
{"HACONFIG", VAR_PROGS .. "/other/ha/HACONFIG"},
|
||||
{"ACLOCK", VAR_PROGS .. "/demos/aclock/aclock"},
|
||||
{"APM", VAR_PROGS .. "/system/apm/apm"},
|
||||
{"CALC", VAR_PROGS .. "/other/calc/trunk/calc"},
|
||||
{"CALC", VAR_PROGS .. "/other/calc/calc"},
|
||||
{"CALCPLUS", VAR_PROGS .. "/other/calcplus/calcplus"},
|
||||
{"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"},
|
||||
{"COLRDIAL", VAR_PROGS .. "/system/colrdial/color_dialog"},
|
||||
{"CROPFLAT", VAR_PROGS .. "/system/cropflat/cropflat"},
|
||||
@@ -429,14 +428,14 @@ tup.append_table(img_files, {
|
||||
{"KPACK", VAR_PROGS .. "/other/kpack/trunk/kpack"},
|
||||
{"LAUNCHER", VAR_PROGS .. "/system/launcher/trunk/launcher"},
|
||||
{"LOADDRV", VAR_PROGS .. "/system/loaddrv/loaddrv"},
|
||||
{"MAGNIFY", VAR_PROGS .. "/demos/magnify/trunk/magnify"},
|
||||
{"MAGNIFY", VAR_PROGS .. "/system/magnify/magnify"},
|
||||
{"MGB", VAR_PROGS .. "/testing/mgb/trunk/mgb"},
|
||||
{"MOUSEMUL", VAR_PROGS .. "/system/mousemul/trunk/mousemul"},
|
||||
{"MADMOUSE", VAR_PROGS .. "/other/madmouse/madmouse"},
|
||||
{"MYKEY", VAR_PROGS .. "/system/MyKey/trunk/MyKey"},
|
||||
{"PCIDEV", VAR_PROGS .. "/testing/pcidev/trunk/PCIDEV"},
|
||||
{"RDSAVE", VAR_PROGS .. "/system/rdsave/trunk/rdsave"},
|
||||
{"RTFREAD", VAR_PROGS .. "/other/rtfread/trunk/rtfread"},
|
||||
{"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"},
|
||||
@@ -448,26 +447,26 @@ 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"},
|
||||
{"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"},
|
||||
{"DEMOS/WEB", VAR_PROGS .. "/demos/web/web"},
|
||||
{"DEMOS/ZEROLINE", VAR_PROGS .. "/demos/zeroline/zeroline"},
|
||||
{"DEVELOP/BOARD", VAR_PROGS .. "/system/board/trunk/board"},
|
||||
{"DEVELOP/DBGBOARD", VAR_PROGS .. "/system/dbgboard/dbgboard"},
|
||||
{"DEVELOP/CEDIT", SRC_PROGS .. "/develop/cedit/CEDIT"},
|
||||
@@ -483,9 +482,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"},
|
||||
@@ -524,10 +523,10 @@ tup.append_table(img_files, {
|
||||
{"LIB/RASTERWORKS.OBJ", VAR_PROGS .. "/develop/libraries/fontRasterWorks_unicode/RasterWorks.obj"},
|
||||
{"LIB/SORT.OBJ", VAR_PROGS .. "/develop/libraries/sorter/sort.obj"},
|
||||
{"LIB/TINYGL.OBJ", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/tinygl.obj"},
|
||||
{"MEDIA/ANIMAGE", VAR_PROGS .. "/media/animage/trunk/animage"},
|
||||
{"MEDIA/ANIMAGE", VAR_PROGS .. "/media/animage/animage"},
|
||||
{"MEDIA/FILLSCR", VAR_PROGS .. "/media/FillScr/fillscr"},
|
||||
{"MEDIA/KIV", VAR_PROGS .. "/media/kiv/trunk/kiv"},
|
||||
{"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/trunk/listplay"},
|
||||
{"MEDIA/KIV", VAR_PROGS .. "/media/kiv/kiv"},
|
||||
{"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/listplay"},
|
||||
{"MEDIA/MIDAMP", VAR_PROGS .. "/media/midamp/trunk/midamp"},
|
||||
{"MEDIA/MP3INFO", VAR_PROGS .. "/media/mp3info/mp3info"},
|
||||
{"MEDIA/PALITRA", VAR_PROGS .. "/media/palitra/trunk/palitra"},
|
||||
@@ -595,8 +594,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"},
|
||||
@@ -605,8 +604,9 @@ tup.append_table(extra_files, {
|
||||
{"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"},
|
||||
@@ -628,7 +628,6 @@ tup.append_table(extra_files, {
|
||||
{"kolibrios/media/zsea/plugins/rotate.obj", VAR_PROGS .. "/media/zsea/plugins/rotate/rotate.obj"},
|
||||
{"kolibrios/media/zsea/plugins/scaling.obj", VAR_PROGS .. "/media/zsea/plugins/scaling/scaling.obj"},
|
||||
{"kolibrios/utils/AMDtemp", VAR_PROGS .. "/system/amd_temp_view/AMDtemp"},
|
||||
{"kolibrios/utils/calcplus", VAR_PROGS .. "/other/calcplus/calcplus"},
|
||||
{"kolibrios/utils/kfm/kfm", VAR_PROGS .. "/fs/kfm/trunk/kfm"},
|
||||
{"kolibrios/utils/tedit/t_edit", VAR_PROGS .. "/other/t_edit/t_edit"},
|
||||
{"kolibrios/3D/blocks/block.bin", VAR_PROGS .. "/bcc32/games/blocks/block.bin"}
|
||||
@@ -642,7 +641,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
|
||||
}) end
|
||||
|
||||
if build_type == "ru_RU" then tup.append_table(extra_files, {
|
||||
{"kolibrios/utils/period", VAR_PROGS .. "/other/period/trunk/period"},
|
||||
{"kolibrios/utils/period", VAR_PROGS .. "/other/period/period"},
|
||||
{"kolibrios/games/Dungeons/Dungeons", VAR_PROGS .. "/games/Dungeons/Dungeons"},
|
||||
}) end
|
||||
|
||||
@@ -726,7 +725,7 @@ 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/*"},
|
||||
@@ -751,9 +750,9 @@ tup.append_table(img_files, {
|
||||
-- {"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/trunk/e80"},
|
||||
{"kolibrios/emul/e80/e80", VAR_PROGS .. "/emulator/e80/e80"},
|
||||
{"kolibrios/emul/uarm/", VAR_CONTRIB .. "/other/uarm/uARM"},
|
||||
{"kolibrios/games/2048", VAR_PROGS .. "/games/2048/2048"},
|
||||
{"kolibrios/games/checkers", VAR_PROGS .. "/games/checkers/checkers"},
|
||||
|
@@ -29,7 +29,6 @@ Dicty=/k/utils/DICTY.KEX,79
|
||||
fNav=/k/utils/fNav/fNav,93
|
||||
CncEditor=/k/utils/cnc_editor/cnc_editor,15
|
||||
Life=/k/demos/life2,13
|
||||
Calc+=/k/utils/calcplus,4
|
||||
TinyBasic=/k/develop/TinyBasic/TinyBasic,91
|
||||
THashView=/k/utils/thashview,124
|
||||
Notes=/k/utils/notes,117
|
||||
|
@@ -235,8 +235,8 @@ ico=58
|
||||
x=68
|
||||
y=68
|
||||
[21]
|
||||
name=CALC
|
||||
path=CALC
|
||||
name=CALC+
|
||||
path=CALCPLUS
|
||||
param=
|
||||
ico=4
|
||||
x=204
|
||||
|
@@ -92,6 +92,7 @@
|
||||
59 Screen keyboard |zkey
|
||||
#10 **** DATA PROCESSING
|
||||
16 Calculator |calc
|
||||
16 Calculator+ |calcplus
|
||||
03 Tinypad |tinypad
|
||||
28 CodeEdit |develop/cedit
|
||||
21 Table processor |table
|
||||
|
@@ -235,8 +235,8 @@ ico=58
|
||||
x=68
|
||||
y=68
|
||||
[21]
|
||||
name=CALC
|
||||
path=CALC
|
||||
name=CALC+
|
||||
path=CALCPLUS
|
||||
param=
|
||||
ico=4
|
||||
x=204
|
||||
|
@@ -96,6 +96,7 @@
|
||||
24 NDN * |/kolibrios/utils/ndn/ndn
|
||||
#11 **** PROCESO DE DATOS
|
||||
16 Calculadora |calc
|
||||
16 Calculadora+ |calcplus
|
||||
16 Tinypad |tinypad
|
||||
16 CodeEdit |develop/cedit
|
||||
16 Procesador de tablas |table
|
||||
|
@@ -235,8 +235,8 @@ ico=58
|
||||
x=68
|
||||
y=68
|
||||
[21]
|
||||
name=CALC
|
||||
path=CALC
|
||||
name=CALC+
|
||||
path=CALCPLUS
|
||||
param=
|
||||
ico=4
|
||||
x=204
|
||||
|
@@ -80,6 +80,7 @@
|
||||
65 NDN * |/kolibrios/utils/ndn/ndn
|
||||
#11 **** DATA PROCESSING ****
|
||||
16 Kalkulaator |calc
|
||||
16 Kalkulaator+ |calcplus
|
||||
16 Teksti redaktor |tinypad
|
||||
16 CodeEdit |develop/cedit
|
||||
16 Tabelarvutus |table
|
||||
|
@@ -235,8 +235,8 @@ ico=58
|
||||
x=68
|
||||
y=68
|
||||
[21]
|
||||
name=CALC
|
||||
path=CALC
|
||||
name=CALC+
|
||||
path=CALCPLUS
|
||||
param=
|
||||
ico=4
|
||||
x=204
|
||||
|
@@ -79,6 +79,7 @@
|
||||
65 NDN * |/kolibrios/utils/ndn/ndn
|
||||
#11 **** DATA PROCESSING
|
||||
16 Calcolatrice |calc
|
||||
16 Calcolatrice+ |calcplus
|
||||
16 Tinypad |tinypad
|
||||
16 CodeEdit |develop/cedit
|
||||
16 Table Processor |table
|
||||
|
@@ -235,8 +235,8 @@ ico=58
|
||||
x=68
|
||||
y=68
|
||||
[21]
|
||||
name=CALC
|
||||
path=CALC
|
||||
name=CALC+
|
||||
path=CALCPLUS
|
||||
param=
|
||||
ico=4
|
||||
x=204
|
||||
|
@@ -90,6 +90,7 @@
|
||||
59 <20><>࠭<EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |zkey
|
||||
#10 **** <20><><EFBFBD><EFBFBD>
|
||||
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |calc
|
||||
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+ |calcplus
|
||||
03 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Tinypad |tinypad
|
||||
28 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CodeEdit |develop/cedit
|
||||
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |table
|
||||
@@ -119,7 +120,7 @@
|
||||
45 <20><><EFBFBD><EFBFBD>⮩ <20><>ਭ<EFBFBD><E0A8AD><EFBFBD><EFBFBD><EFBFBD> |easyshot
|
||||
29 FB2 <20><>⠫<EFBFBD><E2A0AB> |fb2read
|
||||
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |aclock
|
||||
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |period
|
||||
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |/kolibrios/utils/period
|
||||
59 <20>७<EFBFBD><E0A5AD><EFBFBD><EFBFBD> KJ|ABuIIIA |games/klavisha
|
||||
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |demos/bcdclk
|
||||
53 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |timer
|
||||
|
@@ -1,3 +1,5 @@
|
||||
SERIAL_COMPATIBLE_API_VER = 0 ; increments in case of breaking changes
|
||||
|
||||
SERIAL_API_GET_VERSION = 0
|
||||
SERIAL_API_SRV_ADD_PORT = 1
|
||||
SERIAL_API_SRV_REMOVE_PORT = 2
|
||||
@@ -21,14 +23,18 @@ SERIAL_CONF_PARITY_ODD = 2
|
||||
SERIAL_CONF_PARITY_MARK = 3
|
||||
SERIAL_CONF_PARITY_SPACE = 4
|
||||
|
||||
SERIAL_CONF_STOP_BITS_1 = 0
|
||||
SERIAL_CONF_STOP_BITS_1_5 = 1
|
||||
SERIAL_CONF_STOP_BITS_2 = 2
|
||||
|
||||
SERIAL_CONF_FLOW_CTRL_NONE = 0
|
||||
|
||||
struct SP_DRIVER
|
||||
size dd ? ; size of this struct
|
||||
startup dd ? ; void __stdcall (*startup)(void *drv_data, const struct serial_conf *conf);
|
||||
shutdown dd ? ; void __stdcall (*shutdown)(void *drv_data);
|
||||
reconf dd ? ; void __stdcall (*reconf)(void *drv_data, const struct serial_conf *conf);
|
||||
tx dd ? ; void __stdcall (*tx)(void *drv_data);
|
||||
startup dd ? ; int __stdcall (*startup)(void *drv_data, const struct serial_conf *conf);
|
||||
shutdown dd ? ; int __stdcall (*shutdown)(void *drv_data);
|
||||
reconf dd ? ; int __stdcall (*reconf)(void *drv_data, const struct serial_conf *conf);
|
||||
tx dd ? ; int __stdcall (*tx)(void *drv_data);
|
||||
ends
|
||||
|
||||
struct SP_CONF
|
||||
@@ -123,6 +129,30 @@ proc serial_port_init
|
||||
ret
|
||||
endp
|
||||
|
||||
proc serial_port_get_version stdcall, version:dword
|
||||
locals
|
||||
.handler dd ?
|
||||
.io_code dd ?
|
||||
.input dd ?
|
||||
.inp_size dd ?
|
||||
.output dd ?
|
||||
.out_size dd ?
|
||||
endl
|
||||
mov eax, [serial_drv_handle]
|
||||
mov [.handler], eax
|
||||
mov dword [.io_code], SERIAL_API_GET_VERSION
|
||||
mov [.input], 0
|
||||
mov dword [.inp_size], 0
|
||||
mov eax, [version]
|
||||
mov [.output], eax
|
||||
mov dword [.out_size], 4
|
||||
|
||||
lea ecx, [.handler]
|
||||
mcall SF_SYS_MISC, SSF_CONTROL_DRIVER
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
proc serial_port_open stdcall uses ebx, port_id:dword, conf:dword, handle:dword
|
||||
locals
|
||||
.handler dd ?
|
||||
|
@@ -9,8 +9,6 @@ __DEBUG_LEVEL__ = L_DBG
|
||||
|
||||
SERIAL_RING_BUF_SIZE = 32768
|
||||
|
||||
API_VERSION = 1
|
||||
|
||||
section '.flat' readable writable executable
|
||||
|
||||
include '../struct.inc'
|
||||
@@ -23,6 +21,9 @@ include 'common.inc'
|
||||
include 'ring_buf.inc'
|
||||
include 'uart16550.inc'
|
||||
|
||||
CURRENT_API = 0x0001
|
||||
API_VERSION = (SERIAL_COMPATIBLE_API_VER shl 16) + CURRENT_API
|
||||
|
||||
struct SERIAL_OBJ
|
||||
magic dd ?
|
||||
destroy dd ?
|
||||
@@ -45,7 +46,7 @@ struct SERIAL_PORT
|
||||
conf SP_CONF
|
||||
ends
|
||||
|
||||
proc START c, reason:dword
|
||||
proc START c, reason:dword, cmdline:dword
|
||||
cmp [reason], DRV_ENTRY
|
||||
jne .fail
|
||||
|
||||
@@ -347,15 +348,12 @@ proc sp_validate_conf
|
||||
mov eax, [ecx + SP_CONF.baudrate]
|
||||
test eax, eax
|
||||
jz .fail
|
||||
mov al, [ecx + SP_CONF.word_size]
|
||||
cmp al, 8
|
||||
jne .fail ; TODO implement different word size
|
||||
mov al, [ecx + SP_CONF.stop_bits]
|
||||
cmp al, 1
|
||||
jne .fail ; TODO implement different stop bits count
|
||||
cmp al, SERIAL_CONF_STOP_BITS_2
|
||||
ja .fail
|
||||
mov al, [ecx + SP_CONF.parity]
|
||||
cmp al, SERIAL_CONF_PARITY_NONE
|
||||
jne .fail ; TODO implement parity
|
||||
cmp al, SERIAL_CONF_PARITY_SPACE
|
||||
ja .fail
|
||||
mov al, [ecx + SP_CONF.flow_ctrl]
|
||||
cmp al, SERIAL_CONF_FLOW_CTRL_NONE
|
||||
jne .fail ; TODO implement flow control
|
||||
@@ -550,7 +548,6 @@ proc sp_setup
|
||||
mov eax, [edi + SERIAL_PORT.drv]
|
||||
mov ecx, [edi + SERIAL_PORT.drv_data]
|
||||
stdcall dword [eax + SP_DRIVER.reconf], ecx, esi
|
||||
xor eax, eax
|
||||
push eax
|
||||
test eax, eax
|
||||
jnz @f
|
||||
|
@@ -350,10 +350,10 @@ endl
|
||||
; calc stop bits
|
||||
mov bx, LCR_STOP_1
|
||||
mov al, [esi + SP_CONF.stop_bits]
|
||||
cmp al, 1
|
||||
cmp al, SERIAL_CONF_STOP_BITS_1
|
||||
je .stop_bits_ok
|
||||
or bx, LCR_STOP_2
|
||||
cmp al, 2
|
||||
cmp al, SERIAL_CONF_STOP_BITS_2
|
||||
jne .fail
|
||||
.stop_bits_ok:
|
||||
or [lcr], bx
|
||||
|
@@ -1123,11 +1123,53 @@ proc uart_shutdown stdcall uses ebx, data:dword
|
||||
ret
|
||||
endp
|
||||
|
||||
proc uart_reconf stdcall uses ebx esi, dev:dword, conf:dword
|
||||
mov ebx, [dev]
|
||||
proc uart_reconf stdcall uses esi, dev:dword, conf:dword
|
||||
locals
|
||||
ConfPacket rb 8
|
||||
endl
|
||||
mov esi, [conf]
|
||||
stdcall ftdi_set_baudrate, ebx, [esi + SP_CONF.baudrate]
|
||||
; TODO set word_size, parity, etc.
|
||||
xor edx, edx
|
||||
mov al, [esi + SP_CONF.word_size]
|
||||
cmp al, 7
|
||||
jb .invalid
|
||||
cmp al, 8
|
||||
ja .invalid
|
||||
mov dl, al
|
||||
; odd and even parities are different from serial api
|
||||
; serial api: even=1 odd=2
|
||||
; ft232x api: odd=1 even=2
|
||||
movzx eax, [esi + SP_CONF.parity]
|
||||
cmp al, SERIAL_CONF_PARITY_SPACE
|
||||
ja .invalid
|
||||
cmp al, SERIAL_CONF_PARITY_ODD
|
||||
ja .parity_ok
|
||||
cmp al, SERIAL_CONF_PARITY_EVEN
|
||||
jb .parity_ok
|
||||
; swap bits
|
||||
xor al, 0x3
|
||||
.parity_ok:
|
||||
shl eax, 8 ; parity offset
|
||||
or edx, eax
|
||||
movzx eax, [esi + SP_CONF.stop_bits]
|
||||
cmp al, SERIAL_CONF_STOP_BITS_2
|
||||
ja .invalid
|
||||
shl eax, 11 ; stop bits offset
|
||||
or edx, eax
|
||||
mov word [ConfPacket], (FTDI_DEVICE_OUT_REQTYPE) \
|
||||
+ (SIO_SET_DATA shl 8)
|
||||
mov word [ConfPacket + 2], dx
|
||||
mov word [ConfPacket + 4], 0
|
||||
mov word [ConfPacket + 6], 0
|
||||
lea edx, [ConfPacket]
|
||||
stdcall ftdi_blocking_ctrl_tranfser, [dev], edx
|
||||
test eax, eax
|
||||
jnz .exit
|
||||
stdcall ftdi_set_baudrate, [dev], [esi + SP_CONF.baudrate]
|
||||
ret
|
||||
|
||||
.invalid:
|
||||
or eax, -1
|
||||
.exit:
|
||||
ret
|
||||
endp
|
||||
|
||||
@@ -1204,17 +1246,10 @@ proc uart_rx stdcall uses ebx esi, data:dword
|
||||
ret
|
||||
endp
|
||||
|
||||
proc ftdi_set_baudrate stdcall uses ebx esi edi, dev:dword, baud:dword
|
||||
proc ftdi_set_baudrate stdcall uses ebx, dev:dword, baud:dword
|
||||
locals
|
||||
ConfPacket rb 10
|
||||
EventData rd 3
|
||||
ConfPacket rb 8
|
||||
endl
|
||||
xor esi, esi
|
||||
xor ecx, ecx
|
||||
invoke CreateEvent
|
||||
mov [EventData], eax
|
||||
mov [EventData + 4], edx
|
||||
|
||||
mov ebx, [dev]
|
||||
cmp [ebx + ftdi_context.chipType], TYPE_2232H
|
||||
jl .c_clk
|
||||
@@ -1257,7 +1292,7 @@ endl
|
||||
jmp .calcend
|
||||
|
||||
.c_nextbaud2:
|
||||
cmp dword [edi + 8], C_CLK / (2 * 16)
|
||||
cmp dword [baud], C_CLK / (2 * 16)
|
||||
jl .c_nextbaud3
|
||||
mov edx, 2
|
||||
mov ecx, C_CLK / (2 * 16)
|
||||
@@ -1348,23 +1383,51 @@ endl
|
||||
mov word [ConfPacket + 4], cx
|
||||
mov word [ConfPacket + 6], 0
|
||||
|
||||
lea esi, [ConfPacket]
|
||||
lea ebx, [ConfPacket]
|
||||
stdcall ftdi_blocking_ctrl_tranfser, [dev], ebx
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
proc ftdi_blocking_ctrl_tranfser stdcall uses ebx esi edi, dev:dword, conf:dword
|
||||
; conf is a pointer to values: bmRequestType, bRequest, wValue, wIndex, wLength
|
||||
locals
|
||||
EventData rd 3
|
||||
endl
|
||||
xor esi, esi
|
||||
xor ecx, ecx
|
||||
invoke CreateEvent
|
||||
test eax, eax
|
||||
jz .exit
|
||||
mov [EventData], eax
|
||||
mov [EventData + 4], edx
|
||||
|
||||
mov eax, [dev]
|
||||
mov esi, [conf]
|
||||
lea edi, [EventData]
|
||||
invoke USBControlTransferAsync, [ebx + ftdi_context.nullP], esi, 0,\
|
||||
invoke USBControlTransferAsync, [eax + ftdi_context.nullP], esi, 0,\
|
||||
0, control_callback, edi, 0
|
||||
test eax, eax
|
||||
jz .error
|
||||
|
||||
mov eax, [EventData]
|
||||
mov ebx, [EventData + 4]
|
||||
invoke WaitEvent
|
||||
|
||||
cmp [EventData + 8], 0 ; USB_STATUS_OK
|
||||
jne .error
|
||||
|
||||
mov eax, [EventData]
|
||||
mov ebx, [EventData + 4]
|
||||
invoke DestroyEvent
|
||||
xor eax, eax
|
||||
ret
|
||||
|
||||
.error:
|
||||
.error:
|
||||
mov eax, [EventData]
|
||||
mov ebx, [EventData + 4]
|
||||
invoke DestroyEvent
|
||||
.exit:
|
||||
or eax, -1
|
||||
ret
|
||||
endp
|
||||
|
@@ -668,6 +668,8 @@ socket_accept:
|
||||
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_accept: socknum=%u sockaddr=%x length=%u\n", ecx, edx, esi
|
||||
|
||||
push edx esi
|
||||
|
||||
call socket_num_to_ptr
|
||||
test eax, eax
|
||||
jz .invalid
|
||||
@@ -696,6 +698,24 @@ socket_accept:
|
||||
mov ebx, [ebx + APPDATA.tid]
|
||||
mov [eax + SOCKET.TID], ebx
|
||||
|
||||
pop esi edx
|
||||
|
||||
test edx, edx
|
||||
jz .skip_sockaddr
|
||||
|
||||
mov word[edx], 0 ; unknown domain
|
||||
cmp esi, 8 ; domain + port + ipv4
|
||||
jb .skip_sockaddr
|
||||
|
||||
mov word[edx], AF_INET4
|
||||
mov esi, edx
|
||||
mov edx, [eax + IP_SOCKET.RemoteIP]
|
||||
mov [esi + sockaddr.ip], edx
|
||||
|
||||
mov dx, [eax + TCP_SOCKET.RemotePort]
|
||||
mov [esi + sockaddr.port], dx
|
||||
|
||||
.skip_sockaddr:
|
||||
; Return socket number to caller
|
||||
mov eax, [eax + SOCKET.Number]
|
||||
mov [esp + SYSCALL_STACK.eax], eax
|
||||
@@ -711,16 +731,19 @@ socket_accept:
|
||||
.wouldblock:
|
||||
mov dword[esp + SYSCALL_STACK.ebx], EWOULDBLOCK
|
||||
mov dword[esp + SYSCALL_STACK.eax], -1
|
||||
pop esi edx
|
||||
ret
|
||||
|
||||
.invalid:
|
||||
mov dword[esp + SYSCALL_STACK.ebx], EINVAL
|
||||
mov dword[esp + SYSCALL_STACK.eax], -1
|
||||
pop esi edx
|
||||
ret
|
||||
|
||||
.notsupp:
|
||||
mov dword[esp + SYSCALL_STACK.ebx], EOPNOTSUPP
|
||||
mov dword[esp + SYSCALL_STACK.eax], -1
|
||||
pop esi edx
|
||||
ret
|
||||
|
||||
;-----------------------------------------------------------------;
|
||||
|
@@ -692,6 +692,15 @@ struct TinyGLContext
|
||||
long int dx, dy, x, y;
|
||||
};
|
||||
|
||||
struct GLUquadricObj
|
||||
{
|
||||
GLenum DrawStyle; // GLU_FILL, LINE, SILHOUETTE, or POINT
|
||||
GLenum Orientation; // GLU_INSIDE or GLU_OUTSIDE
|
||||
GLboolean TextureFlag; // Generate texture coords?
|
||||
GLenum Normals; // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
|
||||
void (__stdcall* ErrorFunc)(GLenum err); // Error handler callback function
|
||||
};
|
||||
|
||||
//
|
||||
// tinygl - import table
|
||||
//
|
||||
@@ -748,7 +757,7 @@ void (__stdcall* glEdgeFlag)(int flag) = (void (__stdcall*)(int))&"glEdgeFlag";
|
||||
void (__stdcall* glMatrixMode)(int mode) = (void (__stdcall*)(int))&"glMatrixMode";
|
||||
void (__stdcall* glLoadMatrixf)(const float* m) = (void (__stdcall*)(const float*))&"glLoadMatrixf";
|
||||
void (__stdcall* glLoadIdentity)() = (void (__stdcall*)())&"glLoadIdentity";
|
||||
//void (__stdcall* glMultMatrixf)(...) = (void (__stdcall*)(...))&"glMultMatrixf";
|
||||
void (__stdcall* glMultMatrixf)(const GLfloat *m) = (void (__stdcall*)(const GLfloat*))&"glMultMatrixf";
|
||||
void (__stdcall* glPushMatrix)() = (void (__stdcall*)())&"glPushMatrix";
|
||||
void (__stdcall* glPopMatrix)() = (void (__stdcall*)())&"glPopMatrix";
|
||||
void (__stdcall* glRotatef)(float angle, float x, float y, float z) = (void (__stdcall*)(float, float, float, float))&"glRotatef";
|
||||
@@ -763,7 +772,7 @@ void (__stdcall* glEndList)() = (void (__stdcall*)())&"glEndList";
|
||||
void (__stdcall* glCallList)(unsigned int list) = (void (__stdcall*)(unsigned int))&"glCallList";
|
||||
void (__stdcall* glClear)(int mask) = (void (__stdcall*)(int))&"glClear";
|
||||
void (__stdcall* glClearColor)(float r, float g, float b, float a) = (void (__stdcall*)(float, float, float, float))&"glClearColor";
|
||||
//void (__stdcall* glClearDepth)(...) = (void (__stdcall*)(...))&"glClearDepth";
|
||||
void (__stdcall* glClearDepth)(double depth) = (void (__stdcall*)(double))&"glClearDepth";
|
||||
void (__stdcall* glRenderMode)(int mode) = (void (__stdcall*)(int))&"glRenderMode";
|
||||
//void (__stdcall* glSelectBuffer)(...) = (void (__stdcall*)(...))&"glSelectBuffer";
|
||||
//void (__stdcall* glInitNames)(...) = (void (__stdcall*)(...))&"glInitNames";
|
||||
@@ -799,18 +808,22 @@ void (__stdcall* glColorPointer)(GLint size, GLenum type, GLsizei stride, const
|
||||
void (__stdcall* glNormalPointer)(GLenum type, GLsizei stride, const GLvoid* pointer) = (void (__stdcall*)(GLenum, GLsizei, const GLvoid*))&"glNormalPointer";
|
||||
void (__stdcall* glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) = (void (__stdcall*)(GLint, GLenum, GLsizei, const GLvoid*))&"glTexCoordPointer";
|
||||
//void (__stdcall* glPolygonOffset)(...) = (void (__stdcall*)(...))&"glPolygonOffset";
|
||||
//void (__stdcall* glOrtho)(...) = (void (__stdcall*)(...))&"glOrtho";
|
||||
void (__stdcall* glOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) = (void (__stdcall*)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble))&"glOrtho";
|
||||
//void (__stdcall* glDebug)(...) = (void (__stdcall*)(...))&"glDebug";
|
||||
//void (__stdcall* glInit)(...) = (void (__stdcall*)(...))&"glInit";
|
||||
//void (__stdcall* glClose)(...) = (void (__stdcall*)(...))&"glClose";
|
||||
//void (__stdcall* gluPerspective)(...) = (void (__stdcall*)(...))&"gluPerspective";
|
||||
//void (__stdcall* gluNewQuadric)(...) = (void (__stdcall*)(...))&"gluNewQuadric";
|
||||
//void (__stdcall* gluDeleteQuadric)(...) = (void (__stdcall*)(...))&"gluDeleteQuadric";
|
||||
//void (__stdcall* gluQuadricDrawStyle)(...) = (void (__stdcall*)(...))&"gluQuadricDrawStyle";
|
||||
//void (__stdcall* gluQuadricOrientation)(...) = (void (__stdcall*)(...))&"gluQuadricOrientation";
|
||||
//void (__stdcall* gluQuadricTexture)(...) = (void (__stdcall*)(...))&"gluQuadricTexture";
|
||||
//void (__stdcall* gluCylinder)(...) = (void (__stdcall*)(...))&"gluCylinder";
|
||||
//void (__stdcall* gluSphere)(...) = (void (__stdcall*)(...))&"gluSphere";
|
||||
void (__stdcall* gluPerspective)(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) = (void (__stdcall*)(GLdouble, GLdouble, GLdouble, GLdouble))&"gluPerspective";
|
||||
GLUquadricObj* (__stdcall* gluNewQuadric)() = (GLUquadricObj* (__stdcall*)())&"gluNewQuadric";
|
||||
void (__stdcall* gluDeleteQuadric)(GLUquadricObj *state) = (void (__stdcall*)(GLUquadricObj*))&"gluDeleteQuadric";
|
||||
void (__stdcall* gluQuadricDrawStyle)(GLUquadricObj *quadObject, GLenum drawStyle) = (void (__stdcall*)(GLUquadricObj*, GLenum))&"gluQuadricDrawStyle";
|
||||
void (__stdcall* gluQuadricOrientation)(GLUquadricObj *quadObject, GLenum orientation) = (void (__stdcall*)(GLUquadricObj*, GLenum))&"gluQuadricOrientation";
|
||||
void (__stdcall* gluQuadricTexture)(GLUquadricObj *quadObject, GLboolean textureCoords) = (void (__stdcall*)(GLUquadricObj*, GLboolean))&"gluQuadricTexture";
|
||||
void (__stdcall* gluCylinder)(GLUquadricObj *qobj,
|
||||
GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks) = (void (__stdcall*)(GLUquadricObj*, GLdouble, GLdouble, GLdouble, GLint, GLint))&"gluCylinder";
|
||||
void (__stdcall* gluDisk)(GLUquadricObj *qobj,
|
||||
GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops) = (void (__stdcall*)(GLUquadricObj*, GLdouble, GLdouble, GLint, GLint))&"gluDisk";
|
||||
void (__stdcall* gluSphere)(GLUquadricObj *qobj,
|
||||
GLdouble radius, GLint slices, GLint stacks) = (void (__stdcall*)(GLUquadricObj*, GLdouble, GLint, GLint))&"gluSphere";
|
||||
void (__stdcall* kosglMakeCurrent)(long l, long t, long w, long h, TinyGLContext*) = (void (__stdcall*)(long, long, long, long, TinyGLContext*))&"kosglMakeCurrent";
|
||||
void (__stdcall* kosglSwapBuffers)() = (void (__stdcall*)())&"kosglSwapBuffers";
|
||||
asm{
|
||||
|
@@ -13,12 +13,12 @@ rem
|
||||
set __value=
|
||||
set __res=
|
||||
shift
|
||||
|
||||
|
||||
:__allowed
|
||||
set __values=%1 %__values%
|
||||
shift
|
||||
if not "%1"=="" goto __allowed
|
||||
|
||||
|
||||
set /P __res=">
|
||||
:Check_Value
|
||||
for %%a in (%__values%) do if %%a==%__res% set __value=%__res%
|
||||
@@ -59,7 +59,7 @@ 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\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
|
||||
@@ -154,16 +154,16 @@ echo *
|
||||
echo Building other
|
||||
echo *
|
||||
rem fasm other\archer\trunk\@rcher.asm %BIN%\@rcher
|
||||
fasm other\calc\trunk\calc.asm %BIN%\calc
|
||||
fasm other\calc\calc.asm %BIN%\calc
|
||||
fasm other\mhc\trunk\mhc.asm %BIN%\mhc
|
||||
fasm other\period\trunk\period.asm %BIN%\period
|
||||
fasm other\rtfread\trunk\rtfread.asm %BIN%\rtfread
|
||||
fasm other\period\period.asm %BIN%\period
|
||||
fasm other\rtfread\rtfread.asm %BIN%\rtfread
|
||||
|
||||
echo *
|
||||
echo Building media
|
||||
echo *
|
||||
rem media\ac97snd\trunk\ac97snd.asm ac97snd
|
||||
fasm media\animage\trunk\animage.asm %BIN%\animage
|
||||
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
|
||||
@@ -201,39 +201,39 @@ 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\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
|
||||
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
|
||||
echo *
|
||||
echo __nightbuild fix yes >> config.inc
|
||||
fasm media\kiv\trunk\kiv.asm %BIN%\nightbuild\kiv
|
||||
fasm media\kiv\kiv.asm %BIN%\nightbuild\kiv
|
||||
fasm media\scrshoot\scrshoot.asm %BIN%\nightbuild\scrshoot
|
||||
fasm media\animage\trunk\animage.asm %BIN%\nightbuild\animage
|
||||
fasm media\animage\animage.asm %BIN%\nightbuild\animage
|
||||
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
|
||||
@@ -242,27 +242,27 @@ 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 other\kpack\trunk\kpack.asm %BIN%\nightbuild\kpack
|
||||
fasm other\rtfread\trunk\rtfread.asm %BIN%\nightbuild\rtfread
|
||||
fasm other\rtfread\rtfread.asm %BIN%\nightbuild\rtfread
|
||||
;restore
|
||||
echo __CPU_type fix %res% > config.inc
|
||||
erase lang.inc
|
||||
|
||||
echo *
|
||||
echo Finished building
|
||||
echo Finished building
|
||||
echo *
|
||||
|
||||
|
||||
kpack /nologo 2> nul
|
||||
if "%errorlevel%"=="9009" (
|
||||
echo *** NOTICE ***
|
||||
echo If you want to pack all applications you may
|
||||
echo If you want to pack all applications you may
|
||||
echo place "kpack" in accessible directory.
|
||||
echo You can download that tool from http://diamondz.land.ru/
|
||||
goto END
|
||||
)
|
||||
|
||||
echo Kpack KolibriOS apps?
|
||||
echo
|
||||
echo
|
||||
|
||||
set /P res=[y/n]?
|
||||
|
||||
@@ -273,7 +273,7 @@ echo Compressing system
|
||||
echo *
|
||||
kpack %BIN%\calendar
|
||||
kpack %BIN%\develop\board
|
||||
kpack %BIN%\cpu
|
||||
kpack %BIN%\cpu
|
||||
kpack %BIN%\cpuid
|
||||
kpack %BIN%\skincfg
|
||||
kpack %BIN%\docpack
|
||||
|
@@ -85,6 +85,7 @@ struct TWebBrowser {
|
||||
void tag_table();
|
||||
void tag_td();
|
||||
void tag_tr();
|
||||
void reset_font_style();
|
||||
};
|
||||
|
||||
#include "TWB\render.h"
|
||||
@@ -94,16 +95,16 @@ void TWebBrowser::SetPageDefaults()
|
||||
{
|
||||
t_html = t_body = link = false;
|
||||
style.reset();
|
||||
reset_font_style();
|
||||
link_color_default = 0x0000FF;
|
||||
link_color_active = 0xFF0000;
|
||||
style.cur_line_h = list.item_h;
|
||||
links.clear();
|
||||
anchors.clear();
|
||||
img_url.drop();
|
||||
text_colors.drop();
|
||||
text_colors.add(0);
|
||||
if (secondrun) {
|
||||
canvas.Init(list.x, list.y, list.w, math.max(list.visible, list.count));
|
||||
canvas.Init(list.x, list.y, list.w, math.max(list.visible, list.count)+200);
|
||||
canvas.Fill(0, bg_colors.get(0));
|
||||
}
|
||||
bg_colors.drop();
|
||||
@@ -114,7 +115,6 @@ void TWebBrowser::SetPageDefaults()
|
||||
draw_w = list.w - BODY_MARGIN - BODY_MARGIN;
|
||||
linebuf = 0;
|
||||
redirect = '\0';
|
||||
list.SetFont(8, 14, 10011000b);
|
||||
tag_table_reset();
|
||||
is_html = true;
|
||||
if (!strstri(bufpointer, "<body")) {
|
||||
|
@@ -49,14 +49,14 @@ void TWebBrowser::RenderLine(dword _line)
|
||||
pc = text_colors.get_last();
|
||||
if (link) && (pc == text_colors.get(0)) pc = link_color_default;
|
||||
|
||||
canvas.WriteText(draw_x, draw_y, list.font_type, pc, _line, NULL);
|
||||
if (style.b) canvas.WriteText(draw_x+1, draw_y, list.font_type, pc, _line, NULL);
|
||||
canvas.WriteText(draw_x, draw_y+1, list.font_type, pc, _line, NULL);
|
||||
if (style.b) canvas.WriteText(draw_x+1, draw_y+1, list.font_type, pc, _line, NULL);
|
||||
if (style.s) canvas.DrawBar(draw_x, list.item_h / 2 - zoom + draw_y, pw, zoom, pc);
|
||||
if (style.u) canvas.DrawBar(draw_x, list.item_h - zoom - zoom + draw_y, pw, zoom, pc);
|
||||
if (style.u) canvas.DrawBar(draw_x, draw_y + list.font_h, pw, zoom, pc);
|
||||
if (link) {
|
||||
if (ESBYTE[_line]==' ') && (ESBYTE[_line+1]==NULL) {} else {
|
||||
canvas.DrawBar(draw_x, draw_y + list.item_h - calc(zoom*2)-1, pw, zoom, link_color_default);
|
||||
links.add_text(draw_x, draw_y + list.y, pw, list.item_h - calc(zoom*2)-1, zoom);
|
||||
canvas.DrawBar(draw_x, draw_y + list.font_h, pw, zoom, link_color_default);
|
||||
links.add_text(draw_x, draw_y + list.y, pw, list.font_h, zoom);
|
||||
}
|
||||
}
|
||||
_SKIP_DRAW:
|
||||
|
@@ -208,9 +208,20 @@ void TWebBrowser::tag_li()
|
||||
void TWebBrowser::tag_hr()
|
||||
{
|
||||
dword hrcol = 0x00777777;
|
||||
if (tag.get_value_of("color")) hrcol = GetColor(tag.value);
|
||||
dword hr_width = draw_w-BODY_MARGIN-BODY_MARGIN;
|
||||
dword hr_size = 1;
|
||||
if (tag.get_value_of("color")) {
|
||||
hrcol = GetColor(tag.value);
|
||||
}
|
||||
if (tag.get_value_of("width")) && (!strchr(tag.value, '%')) {
|
||||
hr_width = math.min(hr_width, tag.get_number_of("width"));
|
||||
}
|
||||
if (tag.get_number_of("size")) {
|
||||
hr_size = math.min(500, tag.number);
|
||||
}
|
||||
if (draw_x != left_gap) NewLine();
|
||||
if (secondrun) canvas.DrawBar(5+left_gap, style.cur_line_h / 2 + draw_y - 1, draw_w-10, 1, hrcol);
|
||||
if (secondrun) canvas.DrawBar(left_gap, style.cur_line_h / 2 + draw_y - 1, hr_width, hr_size, hrcol);
|
||||
draw_y += hr_size - 3;
|
||||
draw_x++;
|
||||
NewLine();
|
||||
return;
|
||||
@@ -235,6 +246,12 @@ void TWebBrowser::tag_q()
|
||||
chrncat(#linebuf, '\"', sizeof(TWebBrowser.linebuf));
|
||||
}
|
||||
|
||||
void TWebBrowser::reset_font_style()
|
||||
{
|
||||
list.SetFont(BASIC_CHAR_W, 14, 10011000b);
|
||||
style.cur_line_h = list.item_h = list.font_h + 5;
|
||||
}
|
||||
|
||||
void TWebBrowser::tag_h1234_caption()
|
||||
{
|
||||
if (ESBYTE[#tag.name+1]=='4') {
|
||||
@@ -250,19 +267,18 @@ void TWebBrowser::tag_h1234_caption()
|
||||
NewLine();
|
||||
}
|
||||
if (tag.is("h1")) {
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+14, 10011001b);
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+13, 10011001b);
|
||||
style.b = true;
|
||||
} else if (tag.is("h2")) {
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+14, 10011001b);
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+13, 10011001b);
|
||||
} else {
|
||||
list.SetFont(6*2, 9+7, 10001001b);
|
||||
list.SetFont(6*2, 9+8, 10001001b);
|
||||
}
|
||||
style.cur_line_h = list.item_h = list.font_h + 2;
|
||||
style.cur_line_h = list.item_h = list.font_h + 3;
|
||||
} else {
|
||||
if (tag.is("h1")) style.b = false;
|
||||
NewLine();
|
||||
list.SetFont(BASIC_CHAR_W, 14, 10011000b);
|
||||
style.cur_line_h = list.item_h = BASIC_LINE_H;
|
||||
reset_font_style();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,11 +286,15 @@ void TWebBrowser::tag_h1234_caption()
|
||||
void TWebBrowser::tag_kosicon()
|
||||
{
|
||||
dword imgbuf[44];
|
||||
dword maxicon;
|
||||
dword shared_i18 = memopen("ICONS18", NULL, SHM_READ);
|
||||
maxicon = EDX / 18 / 18 / 4;
|
||||
if (shared_i18) && (tag.get_number_of("n")) {
|
||||
if (draw_x + 18 > canvas.bufw) NewLine();
|
||||
canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18);
|
||||
draw_x += 22;
|
||||
if (tag.number < maxicon) {
|
||||
if (draw_x + 18 > canvas.bufw) NewLine();
|
||||
canvas.DrawImage(draw_x, draw_y-1, 18, 18, 18*18*4*tag.number+shared_i18);
|
||||
draw_x += 22;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -571,10 +571,10 @@ void OpenPage(dword _open_URL)
|
||||
//INTERNAL PAGE
|
||||
history.add(#new_url);
|
||||
WB1.custom_encoding = -1;
|
||||
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home)-1);
|
||||
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test)-1);
|
||||
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home));
|
||||
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test));
|
||||
else if (streq(#new_url, URL_SERVICE_HISTORY)) ShowHistory();
|
||||
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
|
||||
} else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) {
|
||||
//WEB PAGE
|
||||
@@ -589,7 +589,7 @@ void OpenPage(dword _open_URL)
|
||||
|
||||
if (!http.transfer) {
|
||||
history.add(#new_url);
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
}
|
||||
} else {
|
||||
//LOCAL PAGE
|
||||
@@ -712,7 +712,7 @@ void EventSubmitOmnibox()
|
||||
|
||||
void LoadInternalPage(dword _bufdata, _in_bufsize){
|
||||
if (!_bufdata) || (!_in_bufsize) {
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
} else {
|
||||
WB1.list.first = 0; //scroll page to the top
|
||||
DrawOmnibox();
|
||||
|
@@ -112,4 +112,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.85";
|
||||
char version[]="WebView 3.91";
|
@@ -1,7 +1,7 @@
|
||||
#ifdef LANG_RUS
|
||||
#define HISTORY_HEADER "<html><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title><body><b><3E><><EFBFBD><EFBFBD>饭<EFBFBD><E9A5AD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD></b><br>"
|
||||
#define HISTORY_HEADER "<html><title><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title><body bgcolor=#fff><h3><3E><><EFBFBD><EFBFBD>饭<EFBFBD><E9A5AD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD></h3><br>"
|
||||
#else
|
||||
#define HISTORY_HEADER "<html><title>History</title><body><b>Visited pages</b><br>"
|
||||
#define HISTORY_HEADER "<html><title>History</title><body bgcolor=#fff><h3>Visited pages</h3><br>"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ ShowHistory()
|
||||
|
||||
for (i=0; i<history.items.count-1; i++) //if (cache.type.get(i) == PAGE)
|
||||
{
|
||||
strcat(history_pointer, "<a href='");
|
||||
strcat(history_pointer, "<kosicon n=3><a href='");
|
||||
strcat(history_pointer, history.items.get(i));
|
||||
strcat(history_pointer, "'>");
|
||||
strcat(history_pointer, history.items.get(i));
|
||||
|
@@ -1,17 +1,49 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Homepage</title>
|
||||
</head>
|
||||
<body><pre>Welcome to WebView a Text-Based Browser.
|
||||
<html><head><title>New tab</title></head>
|
||||
<body bgcolor=#fff>
|
||||
|
||||
KolibriOS Bookmarks:
|
||||
1. <a href=//kolibrios.org>Homepage</a>
|
||||
2. <a href="//builds.kolibrios.org">Night-builds</a>
|
||||
3. <a href="//ftp.kolibrios.org">FTP Server</a>
|
||||
<table><tr><td width=20><td width=220><pre>
|
||||
_____________________
|
||||
|# : : #|
|
||||
| : WebView : |
|
||||
| : for : |
|
||||
| : KolibriOS : |
|
||||
| : : |
|
||||
| :_______________: |
|
||||
| ____________ |
|
||||
| | __ | |
|
||||
| || | | |
|
||||
\_____||__|________|__|<font color=#DDD>lc</font>
|
||||
|
||||
<font bg=#F8F15B>By the way,</font>
|
||||
<font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatable
|
||||
<font bg=#3CE7FF> </font></font></font></font>
|
||||
<td>
|
||||
|
||||
</pre>
|
||||
<kosicon n=58><a href=//kolibrios.org>Homepage</a>
|
||||
<kosicon n=50><a href="//builds.kolibrios.org">Night-builds</a>
|
||||
<kosicon n=50><a href="//ftp.kolibrios.org">FTP Server</a>
|
||||
<pre>
|
||||
|
||||
By the way,
|
||||
<font color="#555555">• You can check for browser updates from the main menu.
|
||||
• To run a web search, type a text in the adress box and press Ctrl+Enter.
|
||||
• To run a web search, type a text in the adress box and press Ctrl+Enter.
|
||||
• Pressing F6 moves a text cursor to the omnibox.
|
||||
• Click on a label in the bottom right corner to change the encoding of a page.
|
||||
</font>
|
||||
• You can manually change the encoding of a page by clicking on a label in the bottom right corner.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~+
|
||||
|
||||
* +
|
||||
' |
|
||||
() .-.,="``"=. - o -
|
||||
'=/_ \ |
|
||||
* | '=._ |
|
||||
\ `=./`, '
|
||||
. '=.__.=' `=' *
|
||||
+ +
|
||||
O * ' .<font color=#DDD>jgs</font>
|
@@ -1,15 +1,49 @@
|
||||
<html><head><meta charset="cp-866">
|
||||
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD></title></head>
|
||||
<body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD>㧥<EFBFBD> WebView!
|
||||
<html><head><title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head>
|
||||
<body bgcolor=#fff>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS:<ol>
|
||||
<li><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᠩ<></a>
|
||||
<li><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
|
||||
<li><a href="//ftp.kolibrios.org">FTP <20><>ࢥ<EFBFBD></a></ol>
|
||||
<table><tr><td width=20><td width=220><pre>
|
||||
_____________________
|
||||
|# : : #|
|
||||
| : WebView : |
|
||||
| : for : |
|
||||
| : KolibriOS : |
|
||||
| : : |
|
||||
| :_______________: |
|
||||
| ____________ |
|
||||
| | __ | |
|
||||
| || | | |
|
||||
\_____||__|________|__|<font color=#DDD>lc</font>
|
||||
|
||||
<font bg=#F8F15B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,</font>
|
||||
<font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatable
|
||||
<font bg=#3CE7FF> </font></font></font></font>
|
||||
<td>
|
||||
|
||||
</pre>
|
||||
<kosicon n=58><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᠩ<></a>
|
||||
<kosicon n=50><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
|
||||
<kosicon n=50><a href="//ftp.kolibrios.org">FTP <20><>ࢥ<EFBFBD></a>
|
||||
<pre>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
<font color="#555555">• <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>稥 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
• <20><><EFBFBD> <20><><EFBFBD>᪠ <20> Google <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>᭮<EFBFBD> <20><>ப<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ctrl+Enter
|
||||
• <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> F6 <20><>६<EFBFBD>頥<EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
• <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><>࠭<EFBFBD><E0A0AD><EFBFBD>, <20><><EFBFBD> <20>⮣<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>ࠢ<EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㣫<> <20><><EFBFBD><EFBFBD>.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~+
|
||||
|
||||
* +
|
||||
' |
|
||||
() .-.,="``"=. - o -
|
||||
'=/_ \ |
|
||||
* | '=._ |
|
||||
\ `=./`, '
|
||||
. '=.__.=' `=' *
|
||||
+ +
|
||||
O * ' .<font color=#DDD>jgs</font>
|
@@ -5,12 +5,19 @@
|
||||
<title>Тест Acid 0.1</title>
|
||||
</head>
|
||||
<body bgcolor="#000000" link="#0066FF" text="#FFFFFF">
|
||||
<h1 align=center>Это тестовая страница для проверки WebViewer</h1>
|
||||
<br />
|
||||
<p>WebViewer является текстовым браузером и поддерживает все популярные кодировки (cp1251, koi-8, cp866, unicode)
|
||||
и некоторые теги. Поддержка таблииц (<table>), CSS, Javascript'a и Контактика пока не реализована :)
|
||||
<h1 align=center>Тест Acid 0.1</h1>
|
||||
<br>
|
||||
<b>Это тестовая страница для проверки текстового браузера <s>HTML Viewer</s> WebView</b>
|
||||
|
||||
<p>Из кодировок поддерживаются: CP866(DOS), CP1251(Windows), CP1252(Latin legacy), KOI8, и конечно UTF8. CSS и Javascript пока не реализованы (ахахаха). Поддержка тега <table> крайне базовая, поддержки вложенных таблиц нет.
|
||||
</p>
|
||||
<br />
|
||||
|
||||
<h3>История</h3>
|
||||
|
||||
Ранее программа называлась <b >HTMLv (HTML Viewer)</b> и изначально задумывалась как <q>Центр справки и поддержки</q>. Чтобы не изобретать велосипед и одновременно исполнить мечту многих, форматом просматриваемых страниц был выбран html.
|
||||
Первоначальный автор Veliant, затем разработка была подхвачена дизайнером Leency. Это была моя вторая программа после файлового менеджера Eolite.<br>
|
||||
|
||||
<span> <br />
|
||||
|
||||
<b>
|
||||
<font color="#FF0000">K</font>
|
||||
@@ -33,7 +40,8 @@
|
||||
</b>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
<table>
|
||||
<td>
|
||||
<bg bgcolor=#333>
|
||||
Небольшой список:<ol>
|
||||
<li><q>Этот текст в кавычках</q></li>
|
||||
@@ -46,17 +54,14 @@
|
||||
</p>
|
||||
<br>
|
||||
|
||||
<pre>
|
||||
"Осень уже пришла!"-
|
||||
Шепнул мне на ухо ветер,
|
||||
Подкравшись к подушке моей.
|
||||
|
||||
Басе
|
||||
</pre>
|
||||
<!-- комментарий: этого текста здесь <нет> -->
|
||||
|
||||
<br>
|
||||
|
||||
<img alt="нет картинки, просто alt">
|
||||
|
||||
<img src = http://wiby.org/about/wibyplex.gif>
|
||||
|
||||
<a href="http://kolibrios.org/i/logo.png"><img id="2.1.4" src="http://kolibrios.org/i/logo.png" alt="logo"><br>Открыть</a><br>
|
||||
|
||||
<br>
|
||||
@@ -65,10 +70,25 @@
|
||||
<a href='/sys/index.htm'>Незакрытый тег а - index.htm<br>
|
||||
<a href="/sys/calc">/sys/calc</a><br>
|
||||
<a href="#2.1.4">#2.1.4</a><br>
|
||||
<a href="http://bash.im">http://bash.im</a><br>
|
||||
<a href="http://kolibrios.org">http://kolibrios.org</a><br>
|
||||
<a href="mailto:leency@mail.ru">Mail to Leency</a><br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h1><a href=#>Link H1</a> <u>Underline H1</u></h1>
|
||||
<h2><a href=#>Link H2</a> <u>Underline H2</u></h2>
|
||||
<h3><a href=#>Link H3</a> <u>Underline H2</u></h3>
|
||||
<a href=#>Link</a> <u>Underline</u>
|
||||
|
||||
<td>
|
||||
|
||||
<pre>
|
||||
"Осень уже пришла!"-
|
||||
Шепнул мне на ухо ветер,
|
||||
Подкравшись к подушке моей.
|
||||
|
||||
Басе
|
||||
|
||||
</pre><br>
|
||||
|
||||
В этом тексте есть переход на следующую строку, но браузер
|
||||
его должен проигнорировать. Еще много пробелов. А тут есть
|
||||
@@ -80,8 +100,19 @@
|
||||
корпус на территории НТУ «ХПИ»
|
||||
</p>
|
||||
|
||||
<pre><font color="#000">
|
||||
<font bg=#FFED00 style="background-color:#FFED00"> Заметки </font>
|
||||
<font bg=#FFFBCE style="background-color:#FFFBCE"> </font>
|
||||
<font bg=#FFFBCE style="background-color:#FFFBCE"> Речка на Жукова </font>
|
||||
<font bg=#FFFBCE style="background-color:#FFFBCE"> Heroes 3 </font>
|
||||
<font bg=#FFFBCE style="background-color:#FFFBCE"> Рисостерон, куринабол </font>
|
||||
<font bg=#FFFBCE style="background-color:#FFFBCE"> </font>
|
||||
</font></pre>
|
||||
|
||||
</table>
|
||||
|
||||
<hr color="#758999">
|
||||
<center>Zhitomyr 2008-2015</center>
|
||||
<center>Zhytomyr 2008-2025</center>
|
||||
|
||||
|
||||
</body>
|
||||
|
@@ -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())
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 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,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())
|
||||
|