Byblos: Difference between revisions

From XionKB
Jump to navigationJump to search
(partial rewrite)
m (don't link to redirects, and →‎Programs list: explain the ordered list to avoid confusion)
Line 9: Line 9:
|lic=[[ASL|ASL 1.1]]
|lic=[[ASL|ASL 1.1]]
}}
}}
'''Byblos''' is a software development kit developed for [[Sirius DOS]], [[A*]] and {{wp|Unix}}-based servers, with distinction for [[MILOTIX]] and Linux, BSD and Darwin (pan-Unix) support. It is divided into two versions: Byblos 1, a provisional SDK that uses existing compiler toolchains and host infrastructure of Unix-like operating systems, and Byblos 2, the proper SDK that provides [[FCC|its own C compiler]], [[Oración|assembler]], and [[Sirius C*|the first C* compiler]].
'''Byblos''' is a software development kit developed for [[Sirius DOS]], [[A*]] and {{wp|Unix}}-based servers, with distinction for [[MILOTIX]] and Linux, BSD and Darwin (pan-Unix) support. It is divided into two versions: Byblos 1, a provisional SDK that uses existing compiler toolchains and host infrastructure of Unix-like operating systems, and Byblos 2, the proper SDK that provides [[Feeble C compiler|its own C compiler]], [[Oración|assembler]], and [[Sirius C*|the first C* compiler]].


==Byblos 1==
==Byblos 1==
Line 442: Line 442:


====Programs list====
====Programs list====
To accommodate narrow columns without text rotation, this ordered list was devised to enumerate the various targets so that the programs list table can provide the operational support status thereof of each program.
# <tt>agbhb</tt>
# <tt>agbhb</tt>
# <tt>agbsp</tt>
# <tt>agbsp</tt>
Line 662: Line 663:
| &nbsp;
| &nbsp;
|-
|-
| style="text-align:center" | [[FCC]]
| style="text-align:center" | [[Feeble C compiler|FCC]]
| style="text-align:center" class="cell-red" | ✖
| style="text-align:center" class="cell-red" | ✖
| style="text-align:center" class="cell-red" | ✖
| style="text-align:center" class="cell-red" | ✖

Revision as of 06:51, 20 June 2024

Byblos SDK
Created by Alexander Nicholi
Initial release unreleased
Written in ANSI C, Make, POSIX sh
OSes Darwin, GNU/Linux
ISAs Apple silicon, x86-64
Licence ASL 1.1

Byblos is a software development kit developed for Sirius DOS, A* and Unix-based servers, with distinction for MILOTIX and Linux, BSD and Darwin (pan-Unix) support. It is divided into two versions: Byblos 1, a provisional SDK that uses existing compiler toolchains and host infrastructure of Unix-like operating systems, and Byblos 2, the proper SDK that provides its own C compiler, assembler, and the first C* compiler.

Byblos 1

Platform support

Byblos 1 is multi-platform. While it endeavours to target all systems of relevance to Xion Megatrends, only three host platforms are supported: GNU/Linux on Intel 64, Darwin/XNU on Intel 64 and Darwin/XNU on Apple silicon. The following table gives Byblos 1's platform support matrix with respect to building and running software in the first and second tables, respectively.

Compile time support matrix

Host Target
agbhb agbsp astar darwin86 darwinm1 freebsd
linux64 devkitARM devkitARM unknown none none LLVM
darwin86 devkitARM devkitARM unknown hb:LLVM hb:LLVM hb:LLVM
darwinm1 devkitARM devkitARM unknown hb:LLVM hb:LLVM hb:LLVM
Host Target
ibmpc illumos linux32 linux64 milotix openbsd
linux64 djGPP LLVM LLVM LLVM unknown LLVM
darwin86 djGPP hb:LLVM hb:LLVM hb:LLVM unknown hb:LLVM
darwinm1 djGPP hb:LLVM hb:LLVM hb:LLVM unknown hb:LLVM
Host Target
pcdos win311 win95 winnt32 winnt64  
linux64 djGPP djGPP MinGW MinGW MinGW  
darwin86 djGPP djGPP MinGW MinGW MinGW  
darwinm1 djGPP djGPP MinGW MinGW MinGW  

Runtime support matrix

Host Target
agbhb agbsp astar darwin86 darwinm1 freebsd
linux64 mGBA mGBA unknown none none QEMU/u
darwin86 mGBA mGBA unknown native none QEMU/u
darwinm1 mGBA mGBA unknown Rosetta 2 native QEMU/u
Host Target
ibmpc illumos linux32 linux64 milotix openbsd
linux64 Bochs QEMU/h native-ish native unknown QEMU/u
darwin86 Bochs QEMU/h QEMU/u QEMU/u unknown QEMU/u
darwinm1 Bochs QEMU/h QEMU/u QEMU/u unknown QEMU/u
Host Target
pcdos win311 win95 winnt32 winnt64  
linux64 DOSBox DOSBox Wine Wine Wine  
darwin86 DOSBox DOSBox Wine Wine Wine  
darwinm1 DOSBox DOSBox Wine Wine Wine  

Tool list

Tool name Description
devkitARM devkitPro's 32-bit ARM GCC toolchain.
hb:LLVM LLVM installed via Homebrew on macOS.
LLVM LLVM installed on a Unix-like.
djGPP Modified GCC for compiling 16-bit DOS programs.
MinGW Modified GCC for targeting Microsoft Windows.
mGBA Accurate GBA emulator.
QEMU/u QEMU virtualisation framework, in the low-friction userland virtualisation mode.
QEMU/h QEMU virtualisation framework, using a full-fat VM.
Bochs Accurate IBM-PC emulator.
Wine Translation layer for Windows programs to run on other operating systems.
Rosetta 2 Apple's transition system for running Intel Mac programs on Apple Silicon.
DOSBox Accurate MS-DOS emulator with a focus on gaming.

Supported targets

Target Full name ISA Host ASM C bin Notes
agbhb GBA homebrew ARMv4T Scratch-building GBA ROMs.
agbsp GBA sourcepage ARMv4T Source-patching existing GBA ROMs.
astar Anodyne A* unknown Too early to specify.
darwin86 Intel Mac x86-64 v1  
darwinm1 Apple Silicon Mac ARMv8 Only host that can target everything.
freebsd FreeBSD x86-64 v1  
ibmpc Real mode IBM-PC Intel i286 Not specific to any DOS conventions.
illumos illumos/OpenIndiana SPARC64 V9  
linux32 GNU/Linux 32-bit Intel i686  
linux64 GNU/Linux 64-bit x86-64 v1  
milotix MILOTIX x86-64 v3  
openbsd OpenBSD x86-64 v1  
pcdos Real mode PC-DOS Intel i286  
win311 Windows 3.11 Intel i286  
win95 Windows 95, 98 & Me Intel i386  
winnt32 Windows NT 4.0 32-bit Intel i386  
winnt64 Windows NT 5.1 64-bit x86-64 v1  
Notes
  • binpacking is a highly portable method of compiling assets statically into binaries
  • For assembly, uncertainty exists about toolchain support on macOS
  • For binpacking, it may eventually work but needs further research

Programs list

To accommodate narrow columns without text rotation, this ordered list was devised to enumerate the various targets so that the programs list table can provide the operational support status thereof of each program.

  1. agbhb
  2. agbsp
  3. astar
  4. darwin86
  5. darwinm1
  6. freebsd
  7. ibmpc
  8. illumos
  9. linux32
  10. linux64
  11. milotix
  12. openbsd
  13. pcdos
  14. win311
  15. win95
  16. winnt32
  17. winnt64
Utility 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Notes
Hinterlib libc surrogate + kernel
Inbound  
Outbound  
Rebound  
Earthbound  
Forerunner  
Precursor  
Simbel  
Oración  
FCC
Quindle A* foundation program
Gauntlet  
Senusret's A* foundation program
Sirius C*  
NatPython  
SablMap  
CheckASCII  
Checkline  
Flow72  

Installation

The root directory of the Byblos 1 SDK is whatever the value of the $BYBLOS environment variable is, falling back to /opt/byblos (the default value of $BYBLOS). Within this directory, the following hierarchy is observed:

Path Description Notes
$BYBLOS/{} Target root Use target's ident in place of {}
$BYBLOS/sbin "script" binaries
$BYBLOS/include C and C* header files
$BYBLOS/conf Configuration settings
$BYBLOS/man Documentation files
$BYBLOS/system SDK internal management data reserved for the exclusive use of the Byblos SDK; outside applications should never assume anything about this directory's contents or even that it exists at all

"Script" binaries are programs that are, by themselves, architecture independent, usually because they are interpreted or compiled just-in-time on loading. These are separated from native binaries which are, as files, specific to the architecture in use. Byblos does not support any architectures other than the one in use on a given system (more exactly, whichever µarch the running kernel is compiled for). For instance, if a user is running a "multilib" system such as on amd64 with i386 as lib32/, it will only support amd64.

The Byblos 1 SDK operates on the premise that the working development directory can be anywhere, while all tools and support files are either provided within the hierarchy above, or assumed present on the system-level. System-level utilities and libraries should be provisioned using system package managers and treated in full mutual exclusion to Byblos-specific tooling; Byblos stuff is not compiled into /usr/local, and system stuff is never compiled into $BYBLOS. Even if one must manually compile a package from source, it should never be installed with its --sysroot set to $BYBLOS! (Use /usr/local instead.)

When developing new SDK components in a source tree, they should be built and installed into $BYBLOS/local/* for testing and personal use. Packaged SDK software downloaded or installed from elsewhere will be configured to be installed into $BYBLOS/*, where it is versioned and stripped and so on.