Skip to content

Commit

Permalink
day15 - added tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Jane authored and Jane committed Dec 20, 2020
1 parent 17b8c30 commit 5745088
Show file tree
Hide file tree
Showing 107 changed files with 1,713 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ BX= 画面模式号码
- 兼容真机,先判断是否有支持此类画面模式的显卡,如果没有,禁用 VBE,写入在`asmhead.nas`
- 画面模式信息

| 大小 | 地址 | 解释 |
|-------|--------------|---------------------------------|
| WORD | [ES:DI+0x00] | 模式属性,第七位不是 1 就不好整 |
| 大小 | 地址 | 解释 |
|-------|--------------|----------------------------------|
| WORD | [ES:DI+0x00] | 模式属性,第七位不是 1 就不好整 |
| WORD | [ES:DI+0x12] | X 分辨率 |
| WORD | [ES:DI+0x14] | Y 分辨率 |
| BYTE | [ES:DI+0x19] | 颜色必须为 8bit |
Expand Down
10 changes: 5 additions & 5 deletions day15/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OBJS_BOOTPACK = bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj init.obj fifo.obj keyboard.obj mouse.obj memory.obj sheet.obj timer.obj

TOOLPATH = ../z_tools/
INCPATH = ../z_tools/haribote/
TOOLPATH = ../tolset/z_tools/
INCPATH = ../tolset/z_tools/haribote/

MAKE = $(TOOLPATH)make.exe -r
NASK = $(TOOLPATH)nask.exe
Expand Down Expand Up @@ -48,7 +48,7 @@ haribote.sys : asmhead.bin bootpack.hrb Makefile
copy /B asmhead.bin+bootpack.hrb haribote.sys

haribote.img : ipl10.bin haribote.sys Makefile
$(EDIMG) imgin:../z_tools/fdimg0at.tek \
$(EDIMG) imgin:../tolset/z_tools/fdimg0at.tek \
wbinimg src:ipl10.bin len:512 from:0 to:0 \
copy from:haribote.sys to:@: \
imgout:haribote.img
Expand All @@ -70,8 +70,8 @@ img :

run :
$(MAKE) img
$(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin
$(MAKE) -C ../z_tools/qemu
$(COPY) haribote.img ..\tolset\z_tools\qemu\fdimage0.bin
$(MAKE) -C ../tolset/z_tools/qemu

install :
$(MAKE) img
Expand Down
2 changes: 1 addition & 1 deletion day15/make.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
..\tolset\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
1 change: 1 addition & 0 deletions tolset/z_new_o/!cons_9x.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
command
1 change: 1 addition & 0 deletions tolset/z_new_o/!cons_nt.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd.exe
22 changes: 22 additions & 0 deletions tolset/z_new_o/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
TARGET =
MODE = bin
STACKSIZE = 64k
MALLOCSIZE = 256k
MMAREA = 0
OBJS = $(TARGET).obj

INCPATH = ../z_tools/guigui00/
CC1OPT =
BIMOPT0 = -v48a
BIMOPT1 = -tek5 clv:5 eopt: eprm:

ARCFLIES =
ARCORG =
ARCTEK =
BIMOPT2 =

include ../z_tools/com_mak.txt

# OBJSを書き換えると分割コンパイル対応

# tolset08対応Makefile
1 change: 1 addition & 0 deletions tolset/z_new_o/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
1 change: 1 addition & 0 deletions tolset/z_new_w/!cons_9x.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
command
1 change: 1 addition & 0 deletions tolset/z_new_w/!cons_nt.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd.exe
10 changes: 10 additions & 0 deletions tolset/z_new_w/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TARGET =
MODE = exe
OBJS = $(TARGET).obj
STACKSIZE = 0x1000000 # 16MB (default)

INCPATH = ../z_tools/win32/
CC1OPT = -Dmain=main0
include ../z_tools/com_mak.txt

# tolset08‘ΉžMakefile
1 change: 1 addition & 0 deletions tolset/z_new_w/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
1 change: 1 addition & 0 deletions tolset/z_osabin/!cons_9x.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
command
1 change: 1 addition & 0 deletions tolset/z_osabin/!cons_nt.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmd.exe
8 changes: 8 additions & 0 deletions tolset/z_osabin/!run_opt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
opt imgin:../z_tools/osa_qemu/osaimgqe.bin

/*
copy from:../z_tools/OSASK0.PSF to:@:
copy from:helloc4.bin to:@:
*/

opt imgout:../z_tools/qemu/fdimage0.bin
17 changes: 17 additions & 0 deletions tolset/z_osabin/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@echo off
..\z_tools\make.exe -r -C ../z_tools/osa_qemu
if %1.==. goto def_opt
if %1.==.. goto no_opt
copy %1.bin ..\z_tools\!built.bin
..\z_tools\edimg.exe @../z_tools/edimgopt.txt
if errorlevel 1 goto end
goto qemu
:def_opt
..\z_tools\edimg.exe @!run_opt.txt
if errorlevel 1 goto end
goto qemu
:no_opt
copy ..\z_tools\osa_qemu\osaimgqe.bin ..\z_tools\qemu\fdimage0.bin
:qemu
..\z_tools\make.exe -r -C ../z_tools/qemu
:end
2 changes: 2 additions & 0 deletions tolset/z_tools/OSASK0.PSF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
setvesa 3 0x114
mouseaccel 1 1
Binary file added tolset/z_tools/aksa.exe
Binary file not shown.
Binary file added tolset/z_tools/aska.exe
Binary file not shown.
Binary file added tolset/z_tools/bim2bin.exe
Binary file not shown.
Binary file added tolset/z_tools/bim2hrb.exe
Binary file not shown.
Binary file added tolset/z_tools/bin2obj.exe
Binary file not shown.
Binary file added tolset/z_tools/cc1.exe
Binary file not shown.
89 changes: 89 additions & 0 deletions tolset/z_tools/com_mak.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
TOOLPATH = ../z_tools/
RULEFILE = ../z_tools/guigui00/guigui00.rul
MAKE = $(TOOLPATH)make.exe -r
SJISCONV = $(TOOLPATH)sjisconv.exe -s
CC1 = $(TOOLPATH)cc1.exe -I$(INCPATH) $(CC1OPT) -Os -Wall -quiet
GAS2NASK = $(TOOLPATH)gas2nask.exe -a
NASK = $(TOOLPATH)nask.exe
OBJ2BIM = $(TOOLPATH)obj2bim.exe
BIM2BIN = $(TOOLPATH)bim2bin.exe
CPP0 = $(TOOLPATH)cpp0.exe -P -I$(INCPATH)
ASKA = $(TOOLPATH)aska.exe
NASKCNV = $(TOOLPATH)naskcnv0.exe -l -s -w
GOLIB = $(TOOLPATH)golib00.exe
LINK = $(TOOLPATH)ld.exe -s -Bdynamic --stack $(STACKSIZE)
EDIMG = $(TOOLPATH)edimg.exe
SARTOL = $(TOOLPATH)sartol.exe
DELE = del
COPY = copy

LIBPATH = $(INCPATH)
LIBS = $(LIBPATH)w32clibc.lib $(LIBPATH)golibc.lib $(LIBPATH)libmingw.lib

# �ȏ�̍��ڂ͂��Ȃ��̃f�B���N�g���\���ɂ��킹�ď���������

ALL:
$(MAKE) $(TARGET).$(MODE)

%.ca : %.c Makefile
$(SJISCONV) $*.c $*.ca

%.gas : %.ca Makefile
$(CC1) -o $*.gas $*.ca

%.nas : %.gas Makefile
$(GAS2NASK) $*.gas $*.nas

%.obj : %.nas Makefile
$(NASK) $*.nas $*.obj

%.ias : %.ask Makefile
$(CPP0) -o $*.ias $*.ask

%.3as : %.ias Makefile
$(ASKA) $*.ias $*.3as

%.nas : %.3as Makefile
$(NASKCNV) $*.3as $*.nas

%.lst : %.nas Makefile
$(NASK) $*.nas $*.obj $*.lst

$(TARGET).bim : $(OBJS) Makefile
$(OBJ2BIM) @$(RULEFILE) out:$(TARGET).bim stack:$(STACKSIZE) map:$(TARGET).map $(OBJS)

%.bin : %.bim Makefile
$(BIM2BIN) in:$*.bim out:$*.org malloc:$(MALLOCSIZE) mmarea:$(MMAREA) $(BIMOPT0)
$(BIM2BIN) -osacmp in:$*.org out:$*.bin $(BIMOPT1)

$(TARGET).lib : $(OBJS) Makefile
$(GOLIB) out:$@ $(OBJS)

$(TARGET).dll : $(TARGET).bim Makefile
$(OBJ2BIM) @$(RULEFILE) out:$(TARGET).bim map:$(TARGET).map $(OBJS)
$(BIM2BIN) -osacmp -tek1 in:$(TARGET).bim out:$(TARGET).dll

$(TARGET).exe : $(OBJS) Makefile
$(LINK) -o $(TARGET).exe -Map $(TARGET).map $(OBJS) $(LIBS)

clean :
-$(DELE) *.obj
-$(DELE) $(TARGET).bim
-$(DELE) $(TARGET).map
-$(DELE) $(TARGET).org

run :
$(MAKE) $(TARGET).$(MODE)
$(COPY) $(TARGET).$(MODE) ..\z_tools\!built.bin
$(MAKE) -C $(TOOLPATH)osa_qemu
$(EDIMG) @$(TOOLPATH)edimgopt.txt $(EDIMGOPT) imgout:../z_tools/qemu/fdimage0.bin
$(MAKE) -C $(TOOLPATH)qemu

arc :
$(MAKE) $(TARGET).$(MODE)
$(SARTOL) e $(ARCORG) . @-4k ARCINFO0.TXT $(ARCFLIES)
$(BIM2BIN) -osacmp in:$(ARCORG) out:$(ARCTEK) $(BIMOPT2)

src_only :
$(MAKE) clean
-$(DELE) $(TARGET).$(MODE)
Binary file added tolset/z_tools/comcom.exe
Binary file not shown.
Binary file added tolset/z_tools/cpp0.exe
Binary file not shown.
Binary file added tolset/z_tools/doscmd.exe
Binary file not shown.
23 changes: 23 additions & 0 deletions tolset/z_tools/dsar.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off

set dsar_sartol=sartol.exe
set dsar_bpath="%USERPROFILE%/デスクトップ/"
set dsar_autorun="%SystemRoot%\explorer.exe"

rem -例-
rem set dsar_bpath="%USERPROFILE%/デスクトップ/"
rem set dsar_bpath="%USERPROFILE%/デスクトップ"
rem set dsar_bpath=..@arcpath/
rem set dsar_bpath=..@arcpath

rem -例-
rem set dsar_autorun="%SystemRoot%\explorer.exe"
rem set dsar_autorun=
rem 注意!dsar_bpathではパスの区切りに\を使うこと

:loop
if %1.==. goto end
%dsar_sartol% d %1 %dsar_bpath% %dsar_autorun%
shift
goto loop
:end
Binary file added tolset/z_tools/edimg.exe
Binary file not shown.
5 changes: 5 additions & 0 deletions tolset/z_tools/edimgopt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
opt imgin:../z_tools/osa_qemu/osaimgqe.bin
copy from:../z_tools/OSASK0.PSF to:@:
copy from:../z_tools/!built.bin to:@:

opt imgout:../z_tools/qemu/fdimage0.bin
19 changes: 19 additions & 0 deletions tolset/z_tools/esart5.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo off

set esar_sartol=sartol.exe
set esar_bim2bin=bim2bin.exe
set esar_wce=wce.exe

if exist %1.sar goto end

if %2.==. goto all
%esar_wce% %esar_sartol% e %1.sar %1 !1 #b=%1 %2 %3 %4 %5 %6 %7 %8 %9
goto tek5

:all
%esar_wce% %esar_sartol% e %1.sar %1 !1 #b=%1 *

:tek5
%esar_wce% %esar_bim2bin% -osacmp -tek5 in:%1.sar out:%1.sar

:end
Binary file added tolset/z_tools/fdimg0at.tek
Binary file not shown.
Binary file added tolset/z_tools/fdimg0tw.tek
Binary file not shown.
Binary file added tolset/z_tools/gas2nask.exe
Binary file not shown.
Binary file added tolset/z_tools/golib00.exe
Binary file not shown.
20 changes: 20 additions & 0 deletions tolset/z_tools/guigui00/errno.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* copyright(C) 2003 H.Kawai (under KL-01). */

#if (!defined(ERRNO_H))

#define ERRNO_H 1

#if (defined(__cplusplus))
extern "C" {
#endif

extern int errno;

#define ENOENT 2 /* No such file or directory */
#define ERANGE 34 /* Result too large (or too small) */

#if (defined(__cplusplus))
}
#endif

#endif
26 changes: 26 additions & 0 deletions tolset/z_tools/guigui00/float.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* copyright(C) 2002 H.Kawai (under KL-01). */

#if (!defined(FLOAT_H))

#define FLOAT_H 1

#define FLT_RADIX 2
#define FLT_ROUNDS 1 /* nearest */
#define FLT_DIG 6
#define FLT_EPSILON 1.19209290e-07F
#define FLT_MANT_DIG 24
#define FLT_MAX 3.40282347e+38F
#define FLT_MAX_EXP (+128)
#define FLT_MIN 1.17549435e-38F
#define FLT_MIN_EXP (-125)

#define DBL_DIG 15
#define DBL_EPSILON 2.2204460492503131e-16
#define DBL_MANT_DIG 53
#define DBL_MAX 1.7976931348623157e+308
#define DBL_MAX_EXP 1024
#define DBL_MIN 2.2250738585072014e-308
#define DBL_MIN_EXP (-1021)

#endif

Binary file added tolset/z_tools/guigui00/gg00libc.lib
Binary file not shown.
20 changes: 20 additions & 0 deletions tolset/z_tools/guigui00/gg00old0.rul
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
format:
/* ���̃Z�N�V�����Ń����N�̕��j���L�q */
code(align:1, logic:0x48, file:0x48);
data(align:4, logic:stack_end, file:code_end);

file:
/* ���̃Z�N�V�����ŃR�}���h���C���ɏ�������Ȃ�����
.obj�t�@�C���A.lib�t�@�C�����L�� */
/* �Ȃ��A���̃Z�N�V�����̓t���p�X�ŏ����Ă��悢�B */
/* ��F c:/osask/gg00libc.lib; */
../z_tools/guigui00/gg00libc.lib;
../z_tools/guigui00/golibc.lib;

label:
/* �K�������N���Ȃ���΂����Ȃ����x�����w�� */
/* �G���g���|�C���g���w�肷��΂����Ǝv���Ă������� */
_main;


/* ��L3�Z�N�V�����̏����͓���ւ��Ă͂����܂���! */
Binary file added tolset/z_tools/guigui00/golibc.lib
Binary file not shown.
Loading

0 comments on commit 5745088

Please sign in to comment.