├── .gitignore ├── README.md ├── bim2bin ├── bim2hrb ├── bin2obj ├── bochs ├── .gitignore ├── Makefile └── bochsrc.txt ├── edimg ├── fdimg0at.tek ├── gas2nask ├── gocc1 ├── gocc1plus ├── gocpp0 ├── golib00 ├── haribote ├── .DS_Store ├── errno.h ├── float.h ├── golibc.lib ├── haribote.rul ├── harilibc.lib ├── limits.h ├── math.h ├── setjmp.h ├── stdarg.h ├── stddef.h ├── stdio.h ├── stdlib.h └── string.h ├── haritol ├── make ├── makefont ├── makeiso ├── .gitignore ├── Makefile ├── fdimg2iso └── fdimg2iso.dat ├── multicmd ├── nask ├── naskcnv0 ├── obj2bim ├── qemu ├── .gitignore └── Makefile ├── sjisconv └── t5lzma /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # z_tools_osx 2 | Mac OSX用のz_toolsバイナリです. 3 | `z_tools`にフォルダ名を変更してご利用ください. 4 | 5 | ## 依存しているパッケージ・ソフトウエア 6 | エミュレータに使うqemuもしくはbochsは別途インストールする必要があります。通常はqemuのみで十分です。 7 | 8 | - qemu 9 | - `brew install qemu`で入れることができます。 10 | - brewコマンドはmacOS向けのパッケージマネージャのようなものです。インストールは以下のURLから。 11 | - https://brew.sh/ 12 | 13 | - bochs 14 | - 導入手順は[こちら](https://github.com/HariboteOS/z_tools_osx/wiki/bochs_compile) 15 | - Homebrewで導入できるbochsは正しく動作しないため、ソースコードからコンパイルしてインストールする必要があります。 16 | 17 | ## 動作確認状況 18 | 下記の環境での動作が確認されています。 19 | - Mac OSX 10.11.6 20 | -------------------------------------------------------------------------------- /bim2bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/bim2bin -------------------------------------------------------------------------------- /bim2hrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/bim2hrb -------------------------------------------------------------------------------- /bin2obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/bin2obj -------------------------------------------------------------------------------- /bochs/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | fdimage0.bin 3 | -------------------------------------------------------------------------------- /bochs/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BOCHS = ~/opt/bochs/bin/bochs 3 | 4 | default: 5 | $(BOCHS) -q 6 | -------------------------------------------------------------------------------- /bochs/bochsrc.txt: -------------------------------------------------------------------------------- 1 | #romimage: file=bios.bin 2 | cpu: count=1, ips=1000000 3 | megs: 32 4 | #vgaromimage: file=vgabios.bin 5 | vga: extension=vbe, update_freq=50 # for fast emulation 6 | floppya: 1_44=fdimage0.bin, status=inserted 7 | boot: floppy 8 | clock: sync=realtime, time0=local 9 | floppy_bootsig_check: disabled=0 10 | #log: bochsout.txt 11 | panic: action=ask 12 | error: action=report 13 | info: action=report 14 | debug: action=ignore 15 | #debugger_log: debugger.out 16 | #parport1: enabled=1, file="parport.out" 17 | #vga_update_interval: 300000 18 | #keyboard_serial_delay: 250 19 | #keyboard_paste_delay: 100000 20 | #mouse: enabled=0 21 | #private_colormap: enabled=0 22 | #keyboard_mapping: enabled=0, map= 23 | #i440fxsupport: enabled=1 24 | #display_library: sdl, options="legacyF12" 25 | mouse: enabled=0, toggle=ctrl+alt 26 | -------------------------------------------------------------------------------- /edimg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/edimg -------------------------------------------------------------------------------- /fdimg0at.tek: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/fdimg0at.tek -------------------------------------------------------------------------------- /gas2nask: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/gas2nask -------------------------------------------------------------------------------- /gocc1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/gocc1 -------------------------------------------------------------------------------- /gocc1plus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/gocc1plus -------------------------------------------------------------------------------- /gocpp0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/gocpp0 -------------------------------------------------------------------------------- /golib00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/golib00 -------------------------------------------------------------------------------- /haribote/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/haribote/.DS_Store -------------------------------------------------------------------------------- /haribote/errno.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(ERRNO_H)) 4 | 5 | #define ERRNO_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | extern int errno; 12 | 13 | #define ENOENT 2 /* No such file or directory */ 14 | #define ERANGE 34 /* Result too large (or too small) */ 15 | 16 | #if (defined(__cplusplus)) 17 | } 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /haribote/float.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2002 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(FLOAT_H)) 4 | 5 | #define FLOAT_H 1 6 | 7 | #define FLT_RADIX 2 8 | #define FLT_ROUNDS 1 /* nearest */ 9 | #define FLT_DIG 6 10 | #define FLT_EPSILON 1.19209290e-07F 11 | #define FLT_MANT_DIG 24 12 | #define FLT_MAX 3.40282347e+38F 13 | #define FLT_MAX_EXP (+128) 14 | #define FLT_MIN 1.17549435e-38F 15 | #define FLT_MIN_EXP (-125) 16 | 17 | #define DBL_DIG 15 18 | #define DBL_EPSILON 2.2204460492503131e-16 19 | #define DBL_MANT_DIG 53 20 | #define DBL_MAX 1.7976931348623157e+308 21 | #define DBL_MAX_EXP 1024 22 | #define DBL_MIN 2.2250738585072014e-308 23 | #define DBL_MIN_EXP (-1021) 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /haribote/golibc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/haribote/golibc.lib -------------------------------------------------------------------------------- /haribote/haribote.rul: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/haribote/haribote.rul -------------------------------------------------------------------------------- /haribote/harilibc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/haribote/harilibc.lib -------------------------------------------------------------------------------- /haribote/limits.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2002 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(LIMITS_H)) 4 | 5 | #define LIMITS_H 1 6 | 7 | #define CHAR_BIT 8 8 | #define CHAR_MAX (+127) 9 | #define CHAR_MIN 0 10 | #define INT_MAX (+0x7fffffff) 11 | #define INT_MIN (-0x7fffffff) 12 | #define LONG_MAX INT_MAX 13 | #define LONG_MIN INT_MIN 14 | #define SCHAR_MAX (+127) 15 | #define SCHAR_MIN (-127) 16 | #define SHRT_MAX (+0x7fff) 17 | #define SHRT_MIN (-0x7fff) 18 | #define UCHAR_MAX (+0xff) 19 | #define UINT_MAX (+0xffffffff) 20 | #define ULONG_MAX UINT_MAX 21 | #define USHRT_MAX (+0xffff) 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /haribote/math.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(MATH_H)) 4 | 5 | #define MATH_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | double sin(double); 12 | double cos(double); 13 | double sqrt(double); 14 | double ldexp(double x, int n); 15 | double frexp(double x, int *exp); 16 | 17 | extern __inline__ double sin(double x) 18 | { 19 | double res; 20 | __asm__ ("fsin" : "=t" (res) : "0" (x)); 21 | return res; 22 | } 23 | 24 | extern __inline__ double cos(double x) 25 | { 26 | double res; 27 | __asm__ ("fcos" : "=t" (res) : "0" (x)); 28 | return res; 29 | } 30 | 31 | extern __inline__ double sqrt(double x) 32 | { 33 | double res; 34 | __asm__ ("fsqrt" : "=t" (res) : "0" (x)); 35 | return res; 36 | } 37 | 38 | #if (defined(__cplusplus)) 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /haribote/setjmp.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(SETJMP_H)) 4 | 5 | #define SETJMP_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | typedef int jmp_buf[3]; /* EBP, EIP, ESP */ 12 | 13 | #define setjmp(env) __builtin_setjmp(env) 14 | #define longjmp(env, val) __builtin_longjmp(env, val) 15 | 16 | #if (defined(__cplusplus)) 17 | } 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /haribote/stdarg.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(STDARG_H)) 4 | 5 | #define STDARG_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | #define va_start(v,l) __builtin_stdarg_start((v),l) 12 | #define va_end __builtin_va_end 13 | #define va_arg __builtin_va_arg 14 | #define va_copy(d,s) __builtin_va_copy((d),(s)) 15 | #define va_list __builtin_va_list 16 | 17 | #if (defined(__cplusplus)) 18 | } 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /haribote/stddef.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(STDDEF_H)) 4 | 5 | #define STDDEF_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | typedef unsigned int size_t; 12 | 13 | #if (defined(__cplusplus)) 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /haribote/stdio.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(STDIO_H)) 4 | 5 | #define STDIO_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | #if (!defined(NULL)) 12 | #define NULL ((void *) 0) 13 | #endif 14 | 15 | #include 16 | 17 | int sprintf(char *s, const char *format, ...); 18 | int vsprintf(char *s, const char *format, va_list arg); 19 | 20 | #if (defined(__cplusplus)) 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /haribote/stdlib.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(STDLIB_H)) 4 | 5 | #define STDLIB_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | #include /* size_t */ 12 | 13 | #define RAND_MAX 0x7fff 14 | #define srand(seed) (void) (rand_seed = (seed)) 15 | 16 | int abs(int n); 17 | double atof(const char *s); 18 | int atoi(const char *s); 19 | void qsort(void *base, size_t n, size_t size, 20 | int (*cmp)(const void *, const void *)); 21 | int rand(void); 22 | extern unsigned int rand_seed; 23 | double strtod(const char *s, const char **endp); 24 | long strtol(const char *s, const char **endp, int base); 25 | unsigned long strtoul(const char *s, const char **endp, int base); 26 | 27 | void *malloc(unsigned int nbytes); 28 | void free(void *ap); 29 | 30 | #if (defined(__cplusplus)) 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /haribote/string.h: -------------------------------------------------------------------------------- 1 | /* copyright(C) 2003 H.Kawai (under KL-01). */ 2 | 3 | #if (!defined(STRING_H)) 4 | 5 | #define STRING_H 1 6 | 7 | #if (defined(__cplusplus)) 8 | extern "C" { 9 | #endif 10 | 11 | #include /* size_t */ 12 | 13 | char *strcpy(char *s, const char *ct); 14 | char *strncpy(char *s, const char *ct, size_t n); 15 | char *strcat(char *s, const char *ct); 16 | char *strncat(char *s, const char *ct, size_t n); 17 | int strcmp(const char *cs, const char *ct); 18 | int strncmp(const char *cs, const char *ct, size_t n); 19 | char *strchr(const char *cs, int c); 20 | char *strrchr(const char *cs, int c); 21 | size_t strspn(const char *s, const char *accept); 22 | size_t strcspn(const char *s, const char *reject); 23 | char *strpbrk(const char *s, const char *accept); 24 | char *strstr(const char *cs, const char *ct); 25 | size_t strlen(const char *cs); 26 | 27 | void *memcpy(void *s, const void *ct, size_t n); 28 | void *memmove(void *s, const void *ct, size_t n); 29 | int memcmp(const void *cs, const void *ct, size_t n); 30 | void *memchr(const void *cs, int c, size_t n); 31 | void *memset(void *s, int c, size_t n); 32 | char *strdup(const char *s); 33 | 34 | #if (defined(__cplusplus)) 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /haritol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/haritol -------------------------------------------------------------------------------- /make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/make -------------------------------------------------------------------------------- /makefont: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/makefont -------------------------------------------------------------------------------- /makeiso/.gitignore: -------------------------------------------------------------------------------- 1 | *.iso 2 | *.bin 3 | -------------------------------------------------------------------------------- /makeiso/Makefile: -------------------------------------------------------------------------------- 1 | 2 | FDIMG2ISO = ./fdimg2iso 3 | FDIMAGE = fdimage0.bin 4 | ISONAME = haribote.iso 5 | ISOHEADER = fdimg2iso.dat 6 | 7 | default: 8 | $(FDIMG2ISO) $(ISOHEADER) $(FDIMAGE) $(ISONAME) 9 | -------------------------------------------------------------------------------- /makeiso/fdimg2iso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/makeiso/fdimg2iso -------------------------------------------------------------------------------- /makeiso/fdimg2iso.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/makeiso/fdimg2iso.dat -------------------------------------------------------------------------------- /multicmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/multicmd -------------------------------------------------------------------------------- /nask: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/nask -------------------------------------------------------------------------------- /naskcnv0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/naskcnv0 -------------------------------------------------------------------------------- /obj2bim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/obj2bim -------------------------------------------------------------------------------- /qemu/.gitignore: -------------------------------------------------------------------------------- 1 | fdimage0.bin 2 | -------------------------------------------------------------------------------- /qemu/Makefile: -------------------------------------------------------------------------------- 1 | 2 | QEMU = qemu-system-i386 3 | QEMU_ARGS = -fda fdimage0.bin 4 | 5 | default: 6 | $(QEMU) $(QEMU_ARGS) 7 | -------------------------------------------------------------------------------- /sjisconv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/sjisconv -------------------------------------------------------------------------------- /t5lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HariboteOS/z_tools_osx/cb891e8dd3ee5828eb4adc932f412e92425cbd62/t5lzma --------------------------------------------------------------------------------