Skip to content

Instantly share code, notes, and snippets.

View ao-kenji's full-sized avatar

Kenji Aoyama ao-kenji

View GitHub Profile
@ao-kenji
ao-kenji / obsd-Fuzix-05.diff
Created June 30, 2024 11:44
Experimental diff for building Fuzix 0.5 on z80pack onOpenBSD/amd64
diff --git a/Kernel/platform/platform-z80pack/Makefile b/Kernel/platform/platform-z80pack/Makefile
index 5616e636a..f53c23bc5 100644
--- a/Kernel/platform/platform-z80pack/Makefile
+++ b/Kernel/platform/platform-z80pack/Makefile
@@ -30,6 +30,7 @@ clean:
image:
$(CROSS_LD) -b -C 0x0088 -S 0xF400 -X 0xE900 -f CLDBbXSs -o fuzix.bin \
+ -m fuzix.tmpmap \
crt0.o commonmem.o z80pack.o main.o \
@ao-kenji
ao-kenji / obsd-Fuzix-Compiler-Kit.diff
Last active July 1, 2024 12:55
Experimental diff for building Fuzix-Compiler-Kit on OpenBSD/amd64
diff --git a/Makefile b/Makefile
index 2b2c860..15d3111 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+CC=cc
+
all: cc cc0 \
cc1.8080 cc1.z80 cc1.thread cc1.byte cc1.6502 \
cc1.65c816 cc1.z8 cc1.1802 cc1.6800 cc1.6809 \
@ao-kenji
ao-kenji / obsd-luna88k-uvm-percpu-cache.diff
Last active June 14, 2024 22:21
Experimental diff to enable uvm per-CPU cache on luna88k
Index: sys/arch/m88k/include/cpu.h
===================================================================
RCS file: /cvs/src/sys/arch/m88k/include/cpu.h,v
diff -u -r1.79 cpu.h
--- sys/arch/m88k/include/cpu.h 9 Jun 2024 21:15:29 -0000 1.79
+++ sys/arch/m88k/include/cpu.h 14 Jun 2024 22:17:58 -0000
@@ -64,6 +64,7 @@
#include <sys/queue.h>
#include <sys/sched.h>
#include <sys/srp.h>
diff --git a/Makefile b/Makefile
index 1f9f4e9..5ce482c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@ OBJS = nanotodon.o sbuf.o squeue.o utils.o config.o messages.o
# Use $XDG_CONFIG_HOME or ~/.config dir to save config files
CFLAGS += -g -DSUPPORT_XDG_BASE_DIR -D_GNU_SOURCE -D_BSD_SOURCE -D_NETBSD_SOURCE
+CFLAGS += -I/usr/local/include -Wno-format-security
+LDFLAGS += -L/usr/local/lib
diff --git a/Makefile b/Makefile
index 01f02a31a..038038abc 100644
--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,7 @@
# zx+3: ZX Spectrum +3
# zxdiv: ZX Spectrum 128K with DivIDE/DivMMC interface
-TARGET=rc2014
+TARGET=z80pack
@ao-kenji
ao-kenji / obsd-luna88k-rsa983-try-20240527.diff
Last active May 27, 2024 13:08
Experimental code to use RSA-98III/S serial board on LUNA-88K2
Index: luna88k/cbus/cbus.c
===================================================================
RCS file: /cvs/src/sys/arch/luna88k/cbus/cbus.c,v
diff -u -r1.9 cbus.c
--- luna88k/cbus/cbus.c 11 Mar 2021 11:16:58 -0000 1.9
+++ luna88k/cbus/cbus.c 27 May 2024 12:43:51 -0000
@@ -36,11 +36,16 @@
#define CBUS_DEBUG
#endif
@ao-kenji
ao-kenji / obsd-luna88k-rsa98-try-20240504.diff
Created May 4, 2024 07:53
Experimental code to use RSA-98 serial board on LUNA-88K2
Index: luna88k/cbus/cbus.c
===================================================================
RCS file: /cvs/src/sys/arch/luna88k/cbus/cbus.c,v
diff -u -r1.9 cbus.c
--- luna88k/cbus/cbus.c 11 Mar 2021 11:16:58 -0000 1.9
+++ luna88k/cbus/cbus.c 4 May 2024 07:46:55 -0000
@@ -36,11 +36,16 @@
#define CBUS_DEBUG
#endif
@ao-kenji
ao-kenji / nono-mpu-cmmu-version.diff
Last active April 16, 2024 11:14
[merged into the main tree with modification] A patch for nono to set reasonable MPU/CMMU version.
--- vm/mpu88xx0.cpp.orig Fri Feb 23 08:37:00 2024
+++ vm/mpu88xx0.cpp Fri Feb 23 11:21:39 2024
@@ -37,6 +37,11 @@
cmmu[0].reset(new m88200(this, 7));
cmmu[1].reset(new m88200(this, 6));
+ // xmem の writeback バグが修正されているバージョンを設定する。(所有している実機にあわせ 0x9)
+ // OpenBSD の sys/arch/m88k/m88k/m8820x_machdep.c::m8820x_apr_cmode() 参照。
+ cmmu[0]->SetVersion(0x9);
+ cmmu[1]->SetVersion(0x9);
#!/bin/sh
#
# partially taken from 7.1: ports/net/curl/Makefile
# works fine with curl-7.85.0
#
# speed up some time-consuming configure tests
export curl_cv_func_select_args="int,fd_set *,struct timeval *,int"
export curl_cv_func_recv_args="int,void *,size_t,int,ssize_t"
export curl_cv_func_send_args="int,const void *,size_t,int,ssize_t"
@ao-kenji
ao-kenji / sjson-c99.diff
Last active June 18, 2023 06:59
[Merged into nanotodon tree]
diff --git a/sjson.h b/sjson.h
index 24a0d88..3069b13 100644
--- a/sjson.h
+++ b/sjson.h
@@ -196,10 +196,37 @@ typedef struct sjson_node
};
} sjson_node;
+typedef struct sjson__str_page
+{