/data/eng/graph |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/eng/drivers/atikms.dll |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/eng/table |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/eng/shell |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/eng/File Managers/eolite |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/eng/Makefile |
---|
190,6 → 190,15 |
fonts/tscr.chr:FONTS/TSCR.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/TSCR.CHR \ |
games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini |
# The list of all C-- programs with one main C-- file. |
# Format of an item is exactly the same as in the previous list. |
CMM_PROGRAMS:=\ |
File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ |
games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c-- \ |
# end if list |
# mine is not compilable |
# games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c-- |
# List of other files to be included in the image file. |
# Some of them are auto-built with special rules, some just exist before build. |
# Each item is of the form <local name>:<name inside image>. |
212,7 → 221,6 |
demos/use_mb:DEMOS/USE_MB demos/web:DEMOS/WEB \ |
drivers/atikms.dll:DRIVERS/ATIKMS.DLL \ |
File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP \ |
File|Managers/eolite:File|Managers/EOLITE \ |
File|Managers/eolite.ini:File|Managers/EOLITE.INI \ |
File|Managers/icons.bmp:File|Managers/ICONS.BMP \ |
File|Managers/icons.ini:File|Managers/ICONS.INI \ |
223,7 → 231,7 |
fonts/bold.chr:FONTS/BOLD.CHR fonts/char2.mt:FONTS/CHAR2.MT \ |
fonts/char.mt:FONTS/CHAR.MT \ |
games/bnc:GAMES/BNC \ |
games/checkers:GAMES/CHECKERS games/clicks:GAMES/CLICKS \ |
games/checkers:GAMES/CHECKERS \ |
games/FindNumbers:GAMES/FindNumbers games/gomoku:GAMES/GOMOKU \ |
games/klavisha:GAMES/KLAVISHA games/kosilka:GAMES/KOSILKA \ |
games/kosskin.gfx:GAMES/KOSSKIN.GFX games/kox:GAMES/KOX \ |
257,7 → 265,7 |
# Define targets for image file. |
# Join all the lists above. |
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) |
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) |
# For each item in the united list call fbinary. |
targets:=$(foreach f,$(targets_full),$(fbinary)) |
332,3 → 340,119 |
docpak: $(DOCDIR)SYSFUNCS.TXT $(wildcard $(DOCDIR)*) |
$(DOCDIR)SYSFUNCS.TXT: $(KERNEL)/docs/sysfuncs.txt |
cp $(KERNEL)/docs/sysfuncs.txt $(DOCDIR)SYSFUNCS.TXT |
# Similar for C--. |
include Makefile.cmm |
# Sorry, even black magic seems to be insufficient for |
# auto-handling all subtle effects. So we just define |
# command lines for compiling and linking, and |
# maintain the list of sources and objects by hand. |
include Makefile.msvc |
# Rules for table |
table: .obj.table/table.exe |
$(msvc_final) |
TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ |
.obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ |
.obj.table/mcsmemm.obj .obj.table/parser.obj |
TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) |
.obj.table/table.exe: $(TABLE_OBJECTS) |
$(msvc_link) |
$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table |
$(msvc_compile) |
.obj.table: |
mkdir -p .obj.table |
# Rules for graph |
graph: .obj.graph/graph.exe |
$(msvc_final) |
GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ |
.obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ |
.obj.graph/mcsmemm.obj .obj.graph/parser.obj |
GRAPH_C_OBJECTS:=.obj.graph/string.obj |
GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) |
GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj |
.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) |
$(msvc_link) |
$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph |
$(msvc_compile) |
$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph |
$(msvc_compile) |
$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph |
fasm $< $@ |
.obj.graph: |
mkdir -p .obj.graph |
# Rules for kosilka |
games/kosilka: .obj.kosilka/kosilka.exe |
$(msvc_final) |
KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj |
KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h |
.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) |
$(msvc_link) |
$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka |
$(msvc_compile) |
.obj.kosilka: |
mkdir -p .obj.kosilka |
include Makefile.gcc |
# Rules for shell |
shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o \ |
$(PROGS)/system/shell/kolibri.ld |
$(call gcc_link,$(PROGS)/system/shell/kolibri.ld) |
.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ |
$(PROGS)/system/shell/all.h \ |
$(PROGS)/system/shell/system/*.h \ |
$(PROGS)/system/shell/cmd/*.c \ |
$(PROGS)/system/shell/modules/*.c \ |
$(PROGS)/system/shell/locale/rus/globals.h \ |
Makefile.gcc | .obj.shell |
$(gcc_compile) |
.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o: .obj.shell/%.o: \ |
$(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ |
Makefile.gcc | .obj.shell |
$(gcc_compile) |
win32-gcc -c -Os -o $@ $< |
.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell |
fasm $< $@ |
.obj.shell: |
mkdir -p .obj.shell |
# Rules for media/ac97snd |
# Not compilable from svn sources, using preloaded binary |
# Rules for atikms.dll |
# Use Makefile from $(REPOSITORY)/drivers/ddk and $(REPOSITORY)/drivers/video/drm/radeon |
# However, dependencies must be duplicated - I don't know how to avoid this |
# without need to rebuild kolibri.img at every iteration... |
# Note that we are going to write in the directory shared |
# between all Makefiles, so we need locked operations. |
drivers/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll drivers/.dir |
kpack --nologo $< $@ |
$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: |
flock $(REPOSITORY)/drivers/video/drm/radeon/.lock \ |
$(MAKE) CC=win32-gcc AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/video/drm/radeon |
$(REPOSITORY)/drivers/ddk/libddk.a: |
flock $(REPOSITORY)/drivers/ddk/.lock \ |
$(MAKE) CC=win32-gcc AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk |
# dependencies |
$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: \ |
$(REPOSITORY)/drivers/video/drm/radeon/atikms.lds \ |
$(REPOSITORY)/drivers/ddk/libddk.a \ |
$(REPOSITORY)/drivers/video/drm/radeon/*.[Sch] \ |
$(REPOSITORY)/drivers/video/drm/radeon/*.asm \ |
$(REPOSITORY)/drivers/video/drm/radeon/Makefile \ |
$(REPOSITORY)/drivers/video/drm/radeon/firmware/*.bin \ |
$(REPOSITORY)/drivers/include/*.h \ |
$(REPOSITORY)/drivers/include/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*/*.h |
$(REPOSITORY)/drivers/ddk/libddk.a: \ |
$(REPOSITORY)/drivers/ddk/Makefile \ |
$(REPOSITORY)/drivers/ddk/*/* \ |
$(REPOSITORY)/drivers/include/*.h \ |
$(REPOSITORY)/drivers/include/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*/*.h |
/data/eng/Makefile.cmm |
---|
0,0 → 1,15 |
# This is similar to Makefile.fasm, look there for comments. |
# No dependency tracking, so force dependencies on all files |
# in dir/* and dir/*/* |
# Also, we cannot set output file name and need to guess |
# whether c-- has created .com file or no-extension file. |
define cmm_meta_rule |
$(1): $(2) Makefile.cmm $$(call respace,$$(addsuffix .dir,$(3))) \ |
$$(wildcard $$(dir $(2))*) $$(wildcard $$(dir $(2))*/*) |
flock $$(dir $(2)).lock \ |
win32-c-- /IP=Z:$$(dir $(2)) Z:$$< >&2 && \ |
if [ -e $$(basename $$<) ]; then f=$$(basename $$<); else f=$$(basename $$<).com; fi && \ |
kpack --nologo $$$$f "$$@" && rm $$$$f |
endef |
$(foreach f,$(CMM_PROGRAMS),$(eval $(call cmm_meta_rule,$(fbinary),$(fsource),$(binarydir),$(progname)))) |
/data/eng/Makefile.gcc |
---|
0,0 → 1,8 |
define gcc_compile |
win32-gcc -c -Os -DAUTOBUILD -DLANG_ENG=1 -o $@ $< |
endef |
define gcc_link |
win32-ld -nostdlib -T $(1) -o "$@" $^ |
win32-objcopy "$@" -O binary |
kpack --nologo "$@" |
endef |
/data/eng/Makefile.msvc |
---|
0,0 → 1,13 |
define msvc_compile |
win32-cl /c /O2 /Os /Oy /GF /GS- /GR- /EHs-c- /fp:fast /GL /QIfist /Gr /DAUTOBUILD /Fo$@ Z:$< >&2 |
endef |
define msvc_link |
win32-link /section:.bss,E /fixed:no /subsystem:native \ |
/merge:.data=.text /merge:.rdata=.text /merge:.1seg=.text \ |
/entry:crtStartUp /out:$@ /ltcg /nodefaultlib \ |
$(addprefix Z:,$^) >&2 |
endef |
define msvc_final |
EXENAME=$< fasm doexe2.asm "$@" |
kpack --nologo "$@" |
endef |
/data/eng/games/clicks |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/eng/games/kosilka |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/rus/graph |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/rus/drivers/atikms.dll |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/rus/table |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/rus/shell |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/rus/File Managers/eolite |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/rus/Makefile |
---|
190,6 → 190,15 |
fonts/tscr.chr:FONTS/TSCR.CHR:$(PROGS)/demos/bgitest/trunk/FONTS/TSCR.CHR \ |
games/snake.ini:GAMES/SNAKE.INI:$(PROGS)/games/snake/trunk/snake.ini |
# The list of all C-- programs with one main C-- file. |
# Format of an item is exactly the same as in the previous list. |
CMM_PROGRAMS:=\ |
File|Managers/eolite:File|Managers/EOLITE:$(PROGS)/fs/Eolite/trunk/Eolite.c-- \ |
games/clicks:GAMES/CLICKS:$(PROGS)/games/clicks/trunk/clicks.c-- \ |
# end if list |
# mine is not compilable |
# games/mine:GAMES/MINE:$(PROGS)/games/mine/trunk/mine.c-- |
# List of other files to be included in the image file. |
# Some of them are auto-built with special rules, some just exist before build. |
# Each item is of the form <local name>:<name inside image>. |
212,7 → 221,6 |
demos/use_mb:DEMOS/USE_MB demos/web:DEMOS/WEB \ |
drivers/atikms.dll:DRIVERS/ATIKMS.DLL \ |
File|Managers/buttons.bmp:File|Managers/BUTTONS.BMP \ |
File|Managers/eolite:File|Managers/EOLITE \ |
File|Managers/eolite.ini:File|Managers/EOLITE.INI \ |
File|Managers/icons.bmp:File|Managers/ICONS.BMP \ |
File|Managers/icons.ini:File|Managers/ICONS.INI \ |
224,7 → 232,7 |
fonts/char.mt:FONTS/CHAR.MT \ |
games/appdata.dat:GAMES/APPDATA.DAT games/ataka:GAMES/ATAKA \ |
games/basekurs.kla:GAMES/BASEKURS.KLA games/bnc:GAMES/BNC \ |
games/checkers:GAMES/CHECKERS games/clicks:GAMES/CLICKS \ |
games/checkers:GAMES/CHECKERS \ |
games/FindNumbers:GAMES/FindNumbers games/gomoku:GAMES/GOMOKU \ |
games/klavisha:GAMES/KLAVISHA games/kosilka:GAMES/KOSILKA \ |
games/kosskin.gfx:GAMES/KOSSKIN.GFX games/kox:GAMES/KOX \ |
258,7 → 266,7 |
# Define targets for image file. |
# Join all the lists above. |
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) |
targets_full:=$(COPY_FILES) $(FASM_PROGRAMS) $(NASM_PROGRAMS) $(OTHER_FILES) $(CMM_PROGRAMS) |
# For each item in the united list call fbinary. |
targets:=$(foreach f,$(targets_full),$(fbinary)) |
333,3 → 341,118 |
docpak: $(DOCDIR)SYSFUNCR.TXT $(wildcard $(DOCDIR)*) |
$(DOCDIR)SYSFUNCR.TXT: $(KERNEL)/docs/sysfuncr.txt |
cp $(KERNEL)/docs/sysfuncr.txt $(DOCDIR)SYSFUNCR.TXT |
# Similar for C--. |
include Makefile.cmm |
# Sorry, even black magic seems to be insufficient for |
# auto-handling all subtle effects. So we just define |
# command lines for compiling and linking, and |
# maintain the list of sources and objects by hand. |
include Makefile.msvc |
# Rules for table |
table: .obj.table/table.exe |
$(msvc_final) |
TABLE_OBJECTS:=.obj.table/calc.obj .obj.table/func.obj .obj.table/hello.obj \ |
.obj.table/KosFile.obj .obj.table/kosSyst.obj .obj.table/math2.obj \ |
.obj.table/mcsmemm.obj .obj.table/parser.obj |
TABLE_H_FILES:=$(wildcard $(PROGS)/other/table/*.h) |
.obj.table/table.exe: $(TABLE_OBJECTS) |
$(msvc_link) |
$(TABLE_OBJECTS): .obj.table/%.obj: $(PROGS)/other/table/%.cpp $(TABLE_H_FILES) Makefile.msvc | .obj.table |
$(msvc_compile) |
.obj.table: |
mkdir -p .obj.table |
# Rules for graph |
graph: .obj.graph/graph.exe |
$(msvc_final) |
GRAPH_CPP_OBJECTS:=.obj.graph/func.obj .obj.graph/hello.obj .obj.graph/kolibri.obj \ |
.obj.graph/KosFile.obj .obj.graph/kosSyst.obj .obj.graph/math2.obj \ |
.obj.graph/mcsmemm.obj .obj.graph/parser.obj |
GRAPH_C_OBJECTS:=.obj.graph/string.obj |
GRAPH_H_FILES:=$(wildcard $(PROGS)/other/graph/*.h) |
GRAPH_FASM_OBJECTS:=.obj.graph/memcpy.obj .obj.graph/memset.obj |
.obj.graph/graph.exe: $(GRAPH_CPP_OBJECTS) $(GRAPH_C_OBJECTS) $(GRAPH_FASM_OBJECTS) |
$(msvc_link) |
$(GRAPH_CPP_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.cpp $(GRAPH_H_FILES) Makefile.msvc | .obj.graph |
$(msvc_compile) |
$(GRAPH_C_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.c $(GRAPH_H_FILES) Makefile.msvc | .obj.graph |
$(msvc_compile) |
$(GRAPH_FASM_OBJECTS): .obj.graph/%.obj: $(PROGS)/other/graph/%.asm Makefile.msvc | .obj.graph |
fasm $< $@ |
.obj.graph: |
mkdir -p .obj.graph |
# Rules for kosilka |
games/kosilka: .obj.kosilka/kosilka.exe |
$(msvc_final) |
KOSILKA_OBJECTS:=.obj.kosilka/kosilka.obj .obj.kosilka/KosFile.obj .obj.kosilka/kosSyst.obj .obj.kosilka/mcsmemm.obj |
KOSILKA_H_FILES:=$(PROGS)/games/kosilka/*.h |
.obj.kosilka/kosilka.exe: $(KOSILKA_OBJECTS) |
$(msvc_link) |
$(KOSILKA_OBJECTS): .obj.kosilka/%.obj: $(PROGS)/games/kosilka/%.cpp $(KOSILKA_H_FILES) Makefile.msvc | .obj.kosilka |
$(msvc_compile) |
.obj.kosilka: |
mkdir -p .obj.kosilka |
include Makefile.gcc |
# Rules for shell |
shell: .obj.shell/start.o .obj.shell/shell.o .obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o \ |
$(PROGS)/system/shell/kolibri.ld |
$(call gcc_link,$(PROGS)/system/shell/kolibri.ld) |
.obj.shell/shell.o: $(PROGS)/system/shell/shell.c \ |
$(PROGS)/system/shell/all.h \ |
$(PROGS)/system/shell/system/*.h \ |
$(PROGS)/system/shell/cmd/*.c \ |
$(PROGS)/system/shell/modules/*.c \ |
$(PROGS)/system/shell/locale/rus/globals.h \ |
Makefile.gcc | .obj.shell |
$(gcc_compile) |
.obj.shell/kolibri.o .obj.shell/stdlib.o .obj.shell/string.o: .obj.shell/%.o: \ |
$(PROGS)/system/shell/system/%.c $(PROGS)/system/shell/system/*.h \ |
Makefile.gcc | .obj.shell |
$(gcc_compile) |
.obj.shell/start.o: $(PROGS)/system/shell/start.asm | .obj.shell |
fasm $< $@ |
.obj.shell: |
mkdir -p .obj.shell |
# Rules for media/ac97snd |
# Not compilable from svn sources, using preloaded binary |
# Rules for atikms.dll |
# Use Makefile from $(REPOSITORY)/drivers/ddk and $(REPOSITORY)/drivers/video/drm/radeon |
# However, dependencies must be duplicated - I don't know how to avoid this |
# without need to rebuild kolibri.img at every iteration... |
# Note that we are going to write in the directory shared |
# between all Makefiles, so we need locked operations. |
drivers/atikms.dll: $(REPOSITORY)/drivers/video/drm/radeon/atikms.dll drivers/.dir |
kpack --nologo $< $@ |
$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: |
flock $(REPOSITORY)/drivers/video/drm/radeon/.lock \ |
$(MAKE) CC=win32-gcc AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/video/drm/radeon |
$(REPOSITORY)/drivers/ddk/libddk.a: |
flock $(REPOSITORY)/drivers/ddk/.lock \ |
$(MAKE) CC=win32-gcc AS=win32-as LD=win32-ld AR=win32-ar FASM=fasm -C $(REPOSITORY)/drivers/ddk |
# dependencies |
$(REPOSITORY)/drivers/video/drm/radeon/atikms.dll: \ |
$(REPOSITORY)/drivers/video/drm/radeon/atikms.lds \ |
$(REPOSITORY)/drivers/ddk/libddk.a \ |
$(REPOSITORY)/drivers/video/drm/radeon/*.[Sch] \ |
$(REPOSITORY)/drivers/video/drm/radeon/*.asm \ |
$(REPOSITORY)/drivers/video/drm/radeon/Makefile \ |
$(REPOSITORY)/drivers/video/drm/radeon/firmware/*.bin \ |
$(REPOSITORY)/drivers/include/*.h \ |
$(REPOSITORY)/drivers/include/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*/*.h |
$(REPOSITORY)/drivers/ddk/libddk.a: \ |
$(REPOSITORY)/drivers/ddk/Makefile \ |
$(REPOSITORY)/drivers/ddk/*/* \ |
$(REPOSITORY)/drivers/include/*.h \ |
$(REPOSITORY)/drivers/include/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*.h \ |
$(REPOSITORY)/drivers/include/*/*/*/*.h |
/data/rus/Makefile.cmm |
---|
0,0 → 1,15 |
# This is similar to Makefile.fasm, look there for comments. |
# No dependency tracking, so force dependencies on all files |
# in dir/* and dir/*/* |
# Also, we cannot set output file name and need to guess |
# whether c-- has created .com file or no-extension file. |
define cmm_meta_rule |
$(1): $(2) Makefile.cmm $$(call respace,$$(addsuffix .dir,$(3))) \ |
$$(wildcard $$(dir $(2))*) $$(wildcard $$(dir $(2))*/*) |
flock $$(dir $(2)).lock \ |
win32-c-- /IP=Z:$$(dir $(2)) Z:$$< >&2 && \ |
if [ -e $$(basename $$<) ]; then f=$$(basename $$<); else f=$$(basename $$<).com; fi && \ |
kpack --nologo $$$$f "$$@" && rm $$$$f |
endef |
$(foreach f,$(CMM_PROGRAMS),$(eval $(call cmm_meta_rule,$(fbinary),$(fsource),$(binarydir),$(progname)))) |
/data/rus/Makefile.gcc |
---|
0,0 → 1,8 |
define gcc_compile |
win32-gcc -c -Os -DAUTOBUILD -DLANG_RUS=1 -o $@ $< |
endef |
define gcc_link |
win32-ld -nostdlib -T $(1) -o "$@" $^ |
win32-objcopy "$@" -O binary |
kpack --nologo "$@" |
endef |
/data/rus/Makefile.msvc |
---|
0,0 → 1,13 |
define msvc_compile |
win32-cl /c /O2 /Os /Oy /GF /GS- /GR- /EHs-c- /fp:fast /GL /QIfist /Gr /DAUTOBUILD /Fo$@ Z:$< >&2 |
endef |
define msvc_link |
win32-link /section:.bss,E /fixed:no /subsystem:native \ |
/merge:.data=.text /merge:.rdata=.text /merge:.1seg=.text \ |
/entry:crtStartUp /out:$@ /ltcg /nodefaultlib \ |
$(addprefix Z:,$^) >&2 |
endef |
define msvc_final |
EXENAME=$< fasm doexe2.asm "$@" |
kpack --nologo "$@" |
endef |
/data/rus/games/clicks |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/data/rus/games/kosilka |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/drivers/ddk/Makefile |
---|
7,7 → 7,7 |
INCLUDES = -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/linux -I$(DRV_INCLUDES)/linux/asm |
DEFINES = -DKOLIBRI -D__KERNEL__ -DCONFIG_X86_32 |
CFLAGS = -c -O2 $(INCLUDES) $(DEFINES) -fomit-frame-pointer -fno-builtin-printf |
CFLAGS = -c -Os $(INCLUDES) $(DEFINES) -march=i486 -fomit-frame-pointer -fno-builtin-printf |
NAME:= libddk |
/drivers/video/drm/radeon/makefile |
---|
File deleted |
/drivers/video/drm/radeon/Makefile |
---|
0,0 → 1,152 |
CC = gcc |
LD = ld |
AS = as |
FASM = e:/fasm/fasm.exe |
DEFINES = -D__KERNEL__ -DCONFIG_X86_32 |
DRV_TOPDIR = $(CURDIR)/../../.. |
DRM_TOPDIR = $(CURDIR)/.. |
DRV_INCLUDES = $(DRV_TOPDIR)/include |
INCLUDES = -I$(DRV_INCLUDES) -I$(DRV_INCLUDES)/drm \ |
-I$(DRV_INCLUDES)/linux |
CFLAGS = -c -Os $(INCLUDES) $(DEFINES) -march=i486 -fomit-frame-pointer -fno-builtin-printf |
LIBPATH:= $(DRV_TOPDIR)/ddk |
LIBS:= -lddk -lcore |
LDFLAGS = -nostdlib -shared -s -Map atikms.map --image-base 0\ |
--file-alignment 512 --section-alignment 4096 |
NAME:= atikms |
HFILES:= $(DRV_INCLUDES)/linux/types.h \ |
$(DRV_INCLUDES)/linux/list.h \ |
$(DRV_INCLUDES)/linux/pci.h \ |
$(DRV_INCLUDES)/drm/drm.h \ |
$(DRV_INCLUDES)/drm/drmP.h \ |
$(DRV_INCLUDES)/drm/drm_edid.h \ |
$(DRV_INCLUDES)/drm/drm_crtc.h \ |
$(DRV_INCLUDES)/drm/drm_mode.h \ |
$(DRV_INCLUDES)/drm/drm_mm.h \ |
atom.h \ |
radeon.h \ |
radeon_asic.h |
NAME_SRC= \ |
pci.c \ |
$(DRM_TOPDIR)/drm_mm.c \ |
$(DRM_TOPDIR)/drm_edid.c \ |
$(DRM_TOPDIR)/drm_modes.c \ |
$(DRM_TOPDIR)/drm_crtc.c \ |
$(DRM_TOPDIR)/drm_crtc_helper.c \ |
$(DRM_TOPDIR)/drm_fb_helper.c \ |
$(DRM_TOPDIR)/drm_dp_i2c_helper.c \ |
$(DRM_TOPDIR)/i2c/i2c-core.c \ |
$(DRM_TOPDIR)/i2c/i2c-algo-bit.c \ |
evergreen.c \ |
radeon_device.c \ |
radeon_clocks.c \ |
radeon_i2c.c \ |
atom.c \ |
radeon_atombios.c \ |
radeon_agp.c \ |
atombios_crtc.c \ |
atombios_dp.c \ |
radeon_encoders.c \ |
radeon_connectors.c \ |
radeon_bios.c \ |
radeon_combios.c \ |
radeon_legacy_crtc.c \ |
radeon_legacy_encoders.c \ |
radeon_legacy_tv.c \ |
radeon_display.c \ |
radeon_gart.c \ |
radeon_ring.c \ |
radeon_object_kos.c \ |
radeon_gem.c \ |
r100.c \ |
r200.c \ |
r300.c \ |
r420.c \ |
rv515.c \ |
r520.c \ |
r600.c \ |
r600_audio.c \ |
r600_hdmi.c \ |
rs400.c \ |
rs600.c \ |
rs690.c \ |
rv770.c \ |
radeon_fb.c \ |
rdisplay.c \ |
rdisplay_kms.c \ |
radeon_pm.c \ |
cmdline.c \ |
cursor.S \ |
fwblob.asm |
FW_BINS= \ |
firmware/R100_cp.bin \ |
firmware/R200_cp.bin \ |
firmware/R300_cp.bin \ |
firmware/R420_cp.bin \ |
firmware/R520_cp.bin \ |
\ |
firmware/RS690_cp.bin \ |
firmware/RS600_cp.bin \ |
firmware/RS780_me.bin \ |
firmware/RS780_pfp.bin \ |
\ |
firmware/RV610_me.bin \ |
firmware/RV620_me.bin \ |
firmware/RV630_me.bin \ |
firmware/RV635_me.bin \ |
firmware/RV670_me.bin \ |
firmware/RV710_me.bin \ |
firmware/RV730_me.bin \ |
firmware/RV770_me.bin \ |
\ |
firmware/RV610_pfp.bin \ |
firmware/RV620_pfp.bin \ |
firmware/RV630_pfp.bin \ |
firmware/RV635_pfp.bin \ |
firmware/RV670_pfp.bin \ |
firmware/RV710_pfp.bin \ |
firmware/RV730_pfp.bin \ |
firmware/RV770_pfp.bin \ |
\ |
firmware/R600_rlc.bin \ |
firmware/R700_rlc.bin |
SRC_DEP:= |
NAME_OBJS = $(patsubst %.S, %.o, $(patsubst %.asm, %.o,\ |
$(patsubst %.c, %.o, $(NAME_SRC)))) |
all: $(NAME).dll |
$(NAME).dll: $(NAME_OBJS) $(FW_BINS) $(SRC_DEP) $(HFILES) $(LIBPATH)/libcore.a $(LIBPATH)/libddk.a atikms.lds Makefile |
$(LD) -L$(LIBPATH) $(LDFLAGS) -T atikms.lds -o $@ $(NAME_OBJS) $(LIBS) |
%.o : %.c $(HFILES) Makefile |
$(CC) $(CFLAGS) $(DEFINES) -o $@ $< |
%.o : %.S $(HFILES) Makefile |
$(AS) -o $@ $< |
fwblob.o: fwblob.asm $(FW_BINS) Makefile |
$(FASM) $< $@ |
/drivers/video/drm/radeon/fwblob.asm |
---|
172,146 → 172,146 |
align 16 |
R100CP_START: |
file 'firmware/r100_cp.bin' |
file 'firmware/R100_cp.bin' |
R100CP_END: |
align 16 |
R200CP_START: |
file 'firmware/r200_cp.bin' |
file 'firmware/R200_cp.bin' |
R200CP_END: |
align 16 |
R300CP_START: |
file 'firmware/r300_cp.bin' |
file 'firmware/R300_cp.bin' |
R300CP_END: |
align 16 |
R420CP_START: |
file 'firmware/r420_cp.bin' |
file 'firmware/R420_cp.bin' |
R420CP_END: |
align 16 |
R520CP_START: |
file 'firmware/r520_cp.bin' |
file 'firmware/R520_cp.bin' |
R520CP_END: |
align 16 |
RS600CP_START: |
file 'firmware/rs600_cp.bin' |
file 'firmware/RS600_cp.bin' |
RS600CP_END: |
align 16 |
RS690CP_START: |
file 'firmware/rs690_cp.bin' |
file 'firmware/RS690_cp.bin' |
RS690CP_END: |
align 16 |
RS780ME_START: |
file 'firmware/rs780_me.bin' |
file 'firmware/RS780_me.bin' |
RS780ME_END: |
align 16 |
RS780PFP_START: |
file 'firmware/rs780_pfp.bin' |
file 'firmware/RS780_pfp.bin' |
RS780PFP_END: |
align 16 |
R600ME_START: |
file 'firmware/r600_me.bin' |
file 'firmware/R600_me.bin' |
R600ME_END: |
align 16 |
RV610ME_START: |
file 'firmware/rv610_me.bin' |
file 'firmware/RV610_me.bin' |
RV610ME_END: |
align 16 |
RV620ME_START: |
file 'firmware/rv620_me.bin' |
file 'firmware/RV620_me.bin' |
RV620ME_END: |
align 16 |
RV630ME_START: |
file 'firmware/rv630_me.bin' |
file 'firmware/RV630_me.bin' |
RV630ME_END: |
align 16 |
RV635ME_START: |
file 'firmware/rv635_me.bin' |
file 'firmware/RV635_me.bin' |
RV635ME_END: |
align 16 |
RV670ME_START: |
file 'firmware/rv670_me.bin' |
file 'firmware/RV670_me.bin' |
RV670ME_END: |
align 16 |
RV710ME_START: |
file 'firmware/rv710_me.bin' |
file 'firmware/RV710_me.bin' |
RV710ME_END: |
align 16 |
RV730ME_START: |
file 'firmware/rv730_me.bin' |
file 'firmware/RV730_me.bin' |
RV730ME_END: |
align 16 |
RV770ME_START: |
file 'firmware/rv770_me.bin' |
file 'firmware/RV770_me.bin' |
RV770ME_END: |
align 16 |
RV610PFP_START: |
file 'firmware/rv610_pfp.bin' |
file 'firmware/RV610_pfp.bin' |
RV610PFP_END: |
align 16 |
RV620PFP_START: |
file 'firmware/rv620_pfp.bin' |
file 'firmware/RV620_pfp.bin' |
RV620PFP_END: |
align 16 |
RV630PFP_START: |
file 'firmware/rv630_pfp.bin' |
file 'firmware/RV630_pfp.bin' |
RV630PFP_END: |
align 16 |
RV635PFP_START: |
file 'firmware/rv635_pfp.bin' |
file 'firmware/RV635_pfp.bin' |
RV635PFP_END: |
align 16 |
RV670PFP_START: |
file 'firmware/rv670_pfp.bin' |
file 'firmware/RV670_pfp.bin' |
RV670PFP_END: |
align 16 |
RV710PFP_START: |
file 'firmware/rv710_pfp.bin' |
file 'firmware/RV710_pfp.bin' |
RV710PFP_END: |
align 16 |
RV730PFP_START: |
file 'firmware/rv730_pfp.bin' |
file 'firmware/RV730_pfp.bin' |
RV730PFP_END: |
align 16 |
RV770PFP_START: |
file 'firmware/rv770_pfp.bin' |
file 'firmware/RV770_pfp.bin' |
RV770PFP_END: |
align 16 |
R600RLC_START: |
file 'firmware/r600_rlc.bin' |
file 'firmware/R600_rlc.bin' |
R600RLC_END: |
align 16 |
R700RLC_START: |
file 'firmware/r700_rlc.bin' |
file 'firmware/R700_rlc.bin' |
R700RLC_END: |
/programs/games/kosilka/kosSyst.h |
---|
130,7 → 130,7 |
// ôóíêöèÿ -1 çàâåðøåíèÿ ïðîöåññà |
void __declspec(noreturn) kos_ExitApp(); |
// ôóíêöèÿ 0 |
void kos_DefineAndDrawWindow( |
void __declspec(noinline) kos_DefineAndDrawWindow( |
Word x, Word y, |
Word sizeX, Word sizeY, |
Byte mainAreaType, Dword mainAreaColour, |
158,11 → 158,11 |
kos_WriteTextToWindow_internal(((x)<<16)|(y), ((fontType)<<24)|(textColour), textPtr, textLen) |
#endif |
// ôóíêöèÿ 7 íàðèñîâàòü èçîáðàæåíèå |
void kos_PutImage( RGB * imagePtr, Word sizeX, Word sizeY, Word x, Word y ); |
void __declspec(noinline) kos_PutImage( RGB * imagePtr, Word sizeX, Word sizeY, Word x, Word y ); |
// ôóíêöèÿ 8 îïðåäåëèòü êíîïêó |
void kos_DefineButton( Word x, Word y, Word sizeX, Word sizeY, Dword buttonID, Dword colour ); |
// ôóíêöèÿ 5 ïàóçà, â ñîòûõ äîëÿõ ñåêóíäû |
void __cdecl kos_Pause( Dword value ); |
void __declspec(noinline) __cdecl kos_Pause( Dword value ); |
// ôóíêöèÿ 9 - èíôîðìàöèÿ î ïðîöåññå |
Dword kos_ProcessInfo( sProcessInfo *targetPtr, Dword processID = PROCESS_ID_SELF ); |
// ôóíêöèÿ 10 |
172,7 → 172,7 |
// ôóíêöèÿ 12 |
void __cdecl kos_WindowRedrawStatus( Dword status ); |
// ôóíêöèÿ 13 íàðèñîâàòü ïîëîñó |
void kos_DrawBar( Word x, Word y, Word sizeX, Word sizeY, Dword colour ); |
void __declspec(noinline) kos_DrawBar( Word x, Word y, Word sizeX, Word sizeY, Dword colour ); |
// ôóíêöèÿ 17 |
bool kos_GetButtonID( Dword &buttonID ); |
// ôóíêöèÿ 23 |
189,7 → 189,7 |
// ôóíêöèÿ 40 óñòàíîâèòü ìàñêó ñîáûòèé |
void kos_SetMaskForEvents( Dword mask ); |
// ôóíêöèÿ 47 âûâåñòè â îêíî ïðèëîæåíèÿ ÷èñëî |
void kos_DisplayNumberToWindow( |
void __declspec(noinline) kos_DisplayNumberToWindow( |
Dword value, |
Dword digitsNum, |
Word x, |
/programs/other/graph/func.cpp |
---|
59,18 → 59,18 |
double fabs(double x) |
double __cdecl fabs(double x) |
{ |
__asm fld x |
__asm fabs |
} |
#define M_PI 3.14159265358979323846 |
double cos(double x) |
double __cdecl cos(double x) |
{ |
__asm fld x |
__asm fcos |
} |
double sin(double x) |
double __cdecl sin(double x) |
{ |
__asm fld x |
__asm fsin |
242,6 → 242,7 |
Str[j] = 0; |
} |
#ifndef AUTOBUILD |
void *memcpy(void *dst, const void *src, unsigned size) |
{ |
while (size--) |
248,6 → 249,7 |
*((char*)dst+size) = *((char*)src+size); |
return dst; |
} |
#endif |
int strcmp(const char *s1, const char *s2) |
{ |
/programs/other/graph/func.h |
---|
31,9 → 31,9 |
void DrawRegion(Dword x,Dword y,Dword width,Dword height,Dword color1); |
int atoi(const char* string); |
double fabs(double x); |
double cos(double x); |
double sin(double x); |
double __cdecl fabs(double x); |
double __cdecl cos(double x); |
double __cdecl sin(double x); |
int di(double x); |
double id(int x); |
/programs/other/graph/hello.cpp |
---|
55,7 → 55,12 |
//char fuck[64] = "$this is a fucking marker$"; |
// ïàðàìåòðû êîìàíäíîé ñòðîêè |
#ifdef AUTOBUILD |
extern char params[1024]; |
char params[1024]; |
#else |
char params[1024] = "_FIND_ME_"; |
#endif |
/* |
/programs/other/graph/kosSyst.cpp |
---|
1,13 → 1,44 |
#include "kosSyst.h" |
#include "func.h" |
#include <stdarg.h> |
#define atexitBufferSize 32 |
// Autobuild uses FASM method for exe->kos, |
// MENUET01 header should be present in EXE. |
#ifdef AUTOBUILD |
char kosExePath[1024]; |
char exeStack[16384]; |
extern char params[1024]; |
// must be alphabetically first in the image |
#pragma data_seg(".1seg") |
extern "C" struct |
{ |
char header[8]; |
int headerver; |
void* entry; |
void* i_end; |
void* memsize; |
void* stack; |
void* params; |
void* icon; |
} header = { |
{'M', 'E', 'N', 'U', 'E', 'T', '0', '1'}, |
1, |
&crtStartUp, |
0, // filled by doexe2.asm |
0, // filled by doexe2.asm |
exeStack + sizeof(exeStack), |
params, |
kosExePath |
}; |
#pragma data_seg() |
#else |
char *kosExePath = NULL; |
#endif |
char pureCallMessage[] = "PURE function call!"; |
char *kosExePath = NULL; |
// |
void (__cdecl *atExitList[atexitBufferSize])(); |
int atExitFnNum = 0; |
64,13 → 95,13 |
return RandomSeed; |
} |
#if _MSC_VER >= 1400 |
// |
void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount ) |
#ifdef AUTOBUILD |
// Well, not really related to auto-build, but some compilation issue |
void memcpy( void *dst, const void *src, size_t bytesCount ) |
{ |
__asm{ |
mov edi, dst |
mov eax, dst |
// mov eax, dst |
mov esi, src |
mov ecx, bytesCount |
rep movsb |
90,6 → 121,7 |
} |
#endif |
// |
Dword rtlInterlockedExchange( Dword *target, Dword value ) |
{ |
817,24 → 849,30 |
#pragma data_seg(".CRT$XCA") |
#pragma data_seg(".CRT$XCZ") |
typedef void (__cdecl *_PVFV)(void); |
__declspec(allocate(".CRT$XCA")) _PVFV __xc_a[1] = { NULL }; |
__declspec(allocate(".CRT$XCZ")) _PVFV __xc_z[1] = { NULL }; |
//__declspec(allocate(".CRT$XCA")) _PVFV __xc_a[1] = { NULL }; |
//__declspec(allocate(".CRT$XCZ")) _PVFV __xc_z[1] = { NULL }; |
// |
#pragma comment(linker, "/merge:.CRT=.rdata") |
// |
void crtStartUp() |
{ |
#ifdef AUTOBUILD |
// linker will try to remove unused variables; force header to be included |
header.header; |
#endif |
// âûçûâàåì èíèöèàëèçàòîðû ïî ñïèñêó, NULL'û èãíîðèðóåì |
for ( _PVFV *pbegin = __xc_a; pbegin < __xc_z; pbegin++ ) |
/*for ( _PVFV *pbegin = __xc_a; pbegin < __xc_z; pbegin++ ) |
{ |
// |
if ( *pbegin != NULL ) |
(**pbegin)(); |
} |
}*/ |
// èíèöèàëèçèðóåì ãåíåðàòîð ñëó÷àéíûõ ÷èñåë |
rtlSrand( kos_GetSystemClock() ); |
#ifndef AUTOBUILD |
// ïóòü ê ôàéëó ïðîöåññà |
kosExePath = *((char **)0x20); |
#endif |
// âûçîâ ãëàâíîé ôóíêöèè ïðèëîæåíèÿ |
kos_Main(); |
// âûõîä |
/programs/other/graph/kosSyst.h |
---|
32,10 → 32,10 |
#define abs(a) (a<0?0-a:a) |
extern "C" double acos(double x); |
extern "C" double asin(double x); |
extern "C" double floor(double x); |
extern "C" double round(double x); |
extern "C" double __cdecl acos(double x); |
extern "C" double __cdecl asin(double x); |
extern "C" double __cdecl floor(double x); |
extern "C" double __cdecl round(double x); |
#pragma function(acos,asin) |
#if _MSC_VER > 1200 |
#pragma function(floor) |
101,8 → 101,10 |
} processInfo; |
}; |
#ifndef AUTOBUILD |
// |
extern char *kosExePath; |
#endif |
// |
void crtStartUp(); |
119,9 → 121,12 |
char * __cdecl strrchr( const char * string, int c ); |
#if _MSC_VER < 1400 |
//extern "C" void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount ); |
//extern "C" void memset( Byte *dst, Byte filler, Dword count ); |
extern "C" void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount ); |
extern "C" void memset( Byte *dst, Byte filler, Dword count ); |
//#pragma intrinsic(memcpy,memset) |
#elif defined AUTOBUILD |
void memcpy( void *dst, const void *src, size_t bytesCount ); |
void memset( Byte *dst, Byte filler, Dword count ); |
#else |
void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount ); |
void memset( Byte *dst, Byte filler, Dword count ); |
147,7 → 152,7 |
// ôóíêöèÿ 3 ïîëó÷èòü âðåìÿ |
Dword kos_GetSystemClock(); |
// ôóíêöèÿ 4 |
void kos_WriteTextToWindow( |
void __declspec(noinline) kos_WriteTextToWindow( |
Word x, Word y, |
Byte fontType, |
Dword textColour, |
157,7 → 162,7 |
// ôóíêöèÿ 7 íàðèñîâàòü èçîáðàæåíèå |
void kos_PutImage( RGB * imagePtr, Word sizeX, Word sizeY, Word x, Word y ); |
// ôóíêöèÿ 8 îïðåäåëèòü êíîïêó |
void kos_DefineButton( Word x, Word y, Word sizeX, Word sizeY, Dword buttonID, Dword colour ); |
void __declspec(noinline) kos_DefineButton( Word x, Word y, Word sizeX, Word sizeY, Dword buttonID, Dword colour ); |
// ôóíêöèÿ 5 ïàóçà, â ñîòûõ äîëÿõ ñåêóíäû |
void kos_Pause( Dword value ); |
// ôóíêöèÿ 9 - èíôîðìàöèÿ î ïðîöåññå |
169,7 → 174,7 |
// ôóíêöèÿ 12 |
void kos_WindowRedrawStatus( Dword status ); |
// ôóíêöèÿ 13 íàðèñîâàòü ïîëîñó |
void kos_DrawBar( Word x, Word y, Word sizeX, Word sizeY, Dword colour ); |
void __declspec(noinline) kos_DrawBar( Word x, Word y, Word sizeX, Word sizeY, Dword colour ); |
// ôóíêöèÿ 17 |
bool kos_GetButtonID( Dword &buttonID ); |
// ôóíêöèÿ 23 |
/programs/other/graph/math2.cpp |
---|
1,7 → 1,7 |
#include <math.h> |
#include "kosSyst.h" |
extern "C" int _fltused = 0; |
double acos(double x) |
double __cdecl acos(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
15,7 → 15,7 |
fpatan |
} |
} |
double asin(double x) |
double __cdecl asin(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
43,7 → 43,7 |
} |
} |
#endif |
double ceil(double x) |
double __cdecl ceil(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
56,7 → 56,7 |
} |
} |
double floor(double x) |
double __cdecl floor(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
69,7 → 69,7 |
} |
} |
double round(double x) |
double __cdecl round(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
/programs/other/graph/parser.cpp |
---|
18,17 → 18,17 |
#define ERR_BADVARIABLE -5 |
#define ERR_OVERFLOW -6 |
double tg(double d) |
double __cdecl tg(double d) |
{ |
return sin(d) / cos(d); |
} |
double ctg(double d) |
double __cdecl ctg(double d) |
{ |
return cos(d) / sin(d); |
} |
double exp(double x) |
double __cdecl exp(double x) |
{ |
__asm { |
fld x |
49,7 → 49,7 |
} |
double log(double x) |
double __cdecl log(double x) |
{ |
//return 0.0; |
__asm { |
61,7 → 61,7 |
} |
} |
double sqrt(double x) |
double __cdecl sqrt(double x) |
{ |
__asm { |
fld x |
69,7 → 69,7 |
} |
} |
double atan(double x) |
double __cdecl atan(double x) |
{ |
return 0.0; // â ëîì |
} |
81,7 → 81,7 |
// represents general mathematical function |
typedef double(*matfunc)(double); |
typedef double(__cdecl*matfunc)(double); |
// used to link function name to the function |
typedef struct |
/programs/other/graph/string.c |
---|
1,6 → 1,7 |
#include "string.h" |
#ifndef AUTOBUILD |
void* memset(void *mem, int c, unsigned size) |
{ |
unsigned i; |
109,3 → 110,4 |
return (char*)0; |
} |
#endif |
/programs/other/graph/string.h |
---|
1,12 → 1,14 |
#ifndef AUTOBUILD |
#define NULL ((void*)0) |
void* memset(void *mem, int c, unsigned size); |
void* memcpy(void *dst, const void *src, unsigned size); |
int strlen(const char* string); |
#endif |
void strcat(char strDest[], char strSource[]); |
int strcmp(const char* string1, const char* string2); |
//void strcpy(char strDest[], const char strSource[]); |
char* strncpy(char *strDest, const char *strSource, unsigned n); |
int strlen(const char* string); |
char *strchr(const char* string, int c); |
/programs/other/table/kosSyst.cpp |
---|
4,11 → 4,40 |
#define atexitBufferSize 32 |
// Autobuild uses FASM method for exe->kos, |
// MENUET01 header should be present in EXE. |
#ifdef AUTOBUILD |
char kosExePath[1024]; |
char exeStack[16384]; |
// must be alphabetically first in the image |
#pragma data_seg(".1seg") |
extern "C" struct |
{ |
char header[8]; |
int headerver; |
void* entry; |
void* i_end; |
void* memsize; |
void* stack; |
void* params; |
void* icon; |
} header = { |
{'M', 'E', 'N', 'U', 'E', 'T', '0', '1'}, |
1, |
&crtStartUp, |
0, // filled by doexe2.asm |
0, // filled by doexe2.asm |
exeStack + sizeof(exeStack), |
NULL, |
kosExePath |
}; |
#pragma data_seg() |
#else |
char *kosExePath = NULL; |
#endif |
char pureCallMessage[] = "PURE function call!"; |
char *kosExePath = NULL; |
// |
void (__cdecl *atExitList[atexitBufferSize])(); |
int atExitFnNum = 0; |
65,12 → 94,13 |
return RandomSeed; |
} |
/*void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount ) |
#ifdef AUTOBUILD |
// Well, not really related to auto-build, but some compilation issue |
void memcpy( void *dst, const void *src, size_t bytesCount ) |
{ |
__asm{ |
mov edi, dst |
mov eax, dst |
// mov eax, dst |
mov esi, src |
mov ecx, bytesCount |
rep movsb |
87,7 → 117,8 |
mov ecx, count |
rep stosb |
} |
}*/ |
} |
#endif |
// |
867,24 → 898,32 |
#pragma data_seg(".CRT$XCA") |
#pragma data_seg(".CRT$XCZ") |
typedef void (__cdecl *_PVFV)(void); |
__declspec(allocate(".CRT$XCA")) _PVFV __xc_a[1] = { NULL }; |
__declspec(allocate(".CRT$XCZ")) _PVFV __xc_z[1] = { NULL }; |
//__declspec(allocate(".CRT$XCA")) _PVFV __xc_a[1] = { NULL }; |
//__declspec(allocate(".CRT$XCZ")) _PVFV __xc_z[1] = { NULL }; |
// |
extern void ALMOST_HALF_init(); |
#pragma comment(linker, "/merge:.CRT=.rdata") |
// |
void crtStartUp() |
{ |
#ifdef AUTOBUILD |
// linker will try to remove unused variables; force header to be included |
header.header; |
#endif |
// âûçûâàåì èíèöèàëèçàòîðû ïî ñïèñêó, NULL'û èãíîðèðóåì |
for ( _PVFV *pbegin = __xc_a; pbegin < __xc_z; pbegin++ ) |
/*for ( _PVFV *pbegin = __xc_a; pbegin < __xc_z; pbegin++ ) |
{ |
// |
if ( *pbegin != NULL ) |
(**pbegin)(); |
} |
}*/ |
ALMOST_HALF_init(); |
// èíèöèàëèçèðóåì ãåíåðàòîð ñëó÷àéíûõ ÷èñåë |
rtlSrand( kos_GetSystemClock() ); |
#ifndef AUTOBUILD |
// ïóòü ê ôàéëó ïðîöåññà |
kosExePath = *((char **)0x20); |
#endif |
// âûçîâ ãëàâíîé ôóíêöèè ïðèëîæåíèÿ |
kos_Main(); |
// âûõîä |
/programs/other/table/kosSyst.h |
---|
32,10 → 32,10 |
#define abs(a) (a<0?0-a:a) |
extern "C" double acos(double x); |
extern "C" double asin(double x); |
extern "C" double floor(double x); |
extern "C" double round(double x); |
extern "C" double __cdecl acos(double x); |
extern "C" double __cdecl asin(double x); |
extern "C" double __cdecl floor(double x); |
extern "C" double __cdecl round(double x); |
#pragma function(acos,asin) |
#if _MSC_VER > 1200 |
#pragma function(floor) |
101,8 → 101,10 |
} processInfo; |
}; |
#ifndef AUTOBUILD |
// |
extern char *kosExePath; |
#endif |
// |
void crtStartUp(); |
122,6 → 124,9 |
extern "C" void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount ); |
extern "C" void memset( Byte *dst, Byte filler, Dword count ); |
//#pragma intrinsic(memcpy,memset) |
#elif defined AUTOBUILD |
void memcpy( void *dst, const void *src, size_t bytesCount ); |
void memset( Byte *dst, Byte filler, Dword count ); |
#else |
void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount ); |
void memset( Byte *dst, Byte filler, Dword count ); |
147,7 → 152,7 |
// ôóíêöèÿ 3 ïîëó÷èòü âðåìÿ |
Dword kos_GetSystemClock(); |
// ôóíêöèÿ 4 |
void kos_WriteTextToWindow( |
void __declspec(noinline) kos_WriteTextToWindow( |
Word x, Word y, |
Byte fontType, |
Dword textColour, |
157,7 → 162,7 |
// ôóíêöèÿ 7 íàðèñîâàòü èçîáðàæåíèå |
void kos_PutImage( RGB * imagePtr, Word sizeX, Word sizeY, Word x, Word y ); |
// ôóíêöèÿ 8 îïðåäåëèòü êíîïêó |
void kos_DefineButton( Word x, Word y, Word sizeX, Word sizeY, Dword buttonID, Dword colour ); |
void __declspec(noinline) kos_DefineButton( Word x, Word y, Word sizeX, Word sizeY, Dword buttonID, Dword colour ); |
// ôóíêöèÿ 5 ïàóçà, â ñîòûõ äîëÿõ ñåêóíäû |
void kos_Pause( Dword value ); |
// ôóíêöèÿ 9 - èíôîðìàöèÿ î ïðîöåññå |
169,7 → 174,7 |
// ôóíêöèÿ 12 |
void kos_WindowRedrawStatus( Dword status ); |
// ôóíêöèÿ 13 íàðèñîâàòü ïîëîñó |
void kos_DrawBar( Word x, Word y, Word sizeX, Word sizeY, Dword colour ); |
void __declspec(noinline) kos_DrawBar( Word x, Word y, Word sizeX, Word sizeY, Dword colour ); |
// ôóíêöèÿ 17 |
bool kos_GetButtonID( Dword &buttonID ); |
// ôóíêöèÿ 23 |
/programs/other/table/math2.cpp |
---|
1,7 → 1,7 |
#include <math.h> |
#include "kosSyst.h" |
extern "C" int _fltused = 0; |
double acos(double x) |
double __cdecl acos(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
15,7 → 15,7 |
fpatan |
} |
} |
double asin(double x) |
double __cdecl asin(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
43,7 → 43,7 |
} |
} |
#endif |
double ceil(double x) |
double __cdecl ceil(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
56,7 → 56,7 |
} |
} |
double floor(double x) |
double __cdecl floor(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
69,7 → 69,7 |
} |
} |
double round(double x) |
double __cdecl round(double x) |
{ |
__asm { |
fld qword ptr [esp+4] |
/programs/other/table/parser.cpp |
---|
260,7 → 260,10 |
__asm fild x |
} |
const double ALMOST_HALF = 0.5 - epsilon; |
//const double ALMOST_HALF = 0.5 - epsilon; |
double ALMOST_HALF; |
extern void ALMOST_HALF_init(void) |
{ ALMOST_HALF = 0.5 - epsilon; } |
double func_floor(double val) |
{ |
int x; |
/programs/system/shell/all.h |
---|
1,7 → 1,10 |
/// =========================================================== |
#ifndef AUTOBUILD |
// autobuild does not create lang.h, but defines LANG_{RUS,ENG} directly |
#include "lang.h" |
#endif |
#include "system/boolean.h" |
#include "system/kolibri.h" |