elks-enhanced

publicRead
Owner: themasterBranch: masterCommits: 6893Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL

Commit diff

Commit 47d1daeebd51c800f8a359df8557761968118ad
commit 47d1daeebd51c800f8a359df8557761968118ad2
Author: Greg Haerr <greg@censoft.com>
Date:   Sun Feb 8 19:30:32 2026 -0700

    [build] Add bochs emulator support for IBM PC text and graphics
---
 bochs.rc | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 bochs.sh |  9 +++++++++
 2 files changed, 58 insertions(+)

diff --git a/bochs.rc b/bochs.rc
new file mode 100644
index 00000000..ae8db8a2
--- /dev/null
+++ b/bochs.rc
@@ -0,0 +1,49 @@
+# Bochs configuration file for ELKS
+# Use by running: ./bochs.sh or bochs -qf bochs.rc
+#
+
+# filename of ROM images
+romimage: file="$BXSHARE/BIOS-bochs-latest"
+vgaromimage: file="$BXSHARE/VGABIOS-lgpl-latest.bin"
+
+# default disk image is 2880k floppy. Change below for other sizes:
+#floppya: 360k=Unix360.img, status=inserted
+#floppya: 1_44=image/fd1440-minix.img, status=inserted
+#floppya: 2_88=image/fd2880-minix.img, status=inserted
+floppya: 2_88=image/fd2880.img, status=inserted
+
+# hard disk
+ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
+#ata0-master: type=disk, path="hd32-minix.img", mode=flat, cylinders=63, heads=16, spt=63
+
+# choose the boot disk.
+boot: a
+
+# default 1MB memory
+megs: 1
+
+# defines the parameters of the clock inside Bochs
+clock: sync=realtime, time0=938581955   # Wed Sep 29 07:12:35 1999
+
+# use term to run in existing terminal window, otherwise sdl2 for new (graphical) window
+display_library: sdl2
+#display_library: term
+
+# default PS/2 mouse emulation
+# (must set 'export MOUSE_TYPE=ps2' from shell or in /etc/profile on ELKS)
+# then use CTRL-ALT to enable/disable mouse emulation when running bochs
+#mouse: enabled=1, type=serial, toggle=ctrl+alt
+mouse: enabled=1, type=ps2, toggle=ctrl+alt
+
+# start with mouse disabled
+mouse: enabled=0
+
+#com1: enabled=1, mode=term, dev=/dev/ttys001
+#com1: enabled=1, mode=mouse
+
+# where do we send log messages?
+#log: bochsout.txt
+panic: action=ask
+error: action=report
+info: action=report
+#debug: action=report
diff --git a/bochs.sh b/bochs.sh
new file mode 100755
index 00000000..d076c011
--- /dev/null
+++ b/bochs.sh
@@ -0,0 +1,9 @@
+# Helper to run ELKS in bochs
+#
+# Prior to running this script:
+# export BXSHARE= to bochs installation directory
+
+[ -z "$BXSHARE" ] && export BXSHARE=/usr/local/Cellar/bochs/3.0/share/bochs
+
+# default image is 2880k floppy, change floppya: in bochs.rc for other sizes
+bochs -qf bochs.rc