GeckOS is a unix-alike multitasking and multithreading operating system for the 6502.
Version 2 is an extensive rewrite and has a lot of new features:
-
multithreading
-
dynamic memory management
-
relocatable fileformat
-
lib6502 standard library
-
internet support
-
Either
-
Download and unpack the GeckOS source distribution from 6502.org.
-
Clone the Github repository
-
-
Download and install the xa65 cross-assembler. On Linux, xa is usually included in the distribution. Alternatively download from xa65 site.
-
For the Commodore ports, download and install the VICE emulator. Usually VICE is included in Linux distributions, but ROMs may have to be provided separately. If you want, download, build and install it from the VICE homepage.
-
In the unpacked GeckOS directory, type "make runc64" to build the system, and run it in the VICE x64 emulator. For other ports use 'make runcbm8x96' for the PET 8296 port, 'make runpet32k' for the PET 32k demo, 'make runc128' for the 1 MHz / 40 col C128 version, or 'make runc128f' for the 2 MHz / 80 col / 1571 C128 version.
GeckOS/A65 is a full-featured Multitasking/Multithreading operating system for the 6502. It is preemptive and implements some Unix-like features, like signals, semaphores, relocatable fileformat, standard library, internet support via a kind of simplified sockets and last but not least virtual consoles.
It is extremly scalable. Stripped down to the scheduler and interrupt handling the kernel is only slightly above 2k. In normal embedded systems the kernel has around 4k, with only application programs running. Full featured systems have a 4k kernel, and several support tasks provided system services like TCP/SLIP and (different) filesystems.
The kernel is almost completely hardware independent. All the architecture-specific stuff is in a separate subdirectory for each architecture.
The lib6502 as standard library allows easy access to the system services. Parts of this library are already implemented in another 6502 operating system, Lunix by Daniel Dallmann. This way source code compatibility is achieved.
Version 2.0.0 features a "slipd" server process that brings easy internet access to all lib6502 programs, that can now access TCP connections like files. A stable WWW server running on the OS is built into the slipd daemon. Also a remote login can be done. This way the OS can run programs to for example read sensors and write the stuff to files, which are exported by the WWW server.
The relocatable o65 fileformat used by the lib6502 standard library in version 2.0.0 allows more than one instance of a program being run at the same time without interference, even without virtual memory. Also the very same binaries runs on all supported platforms (if they do not use architecture specific stuff, but lib6502 calls only).
GeckOS is a microkernel architecture. It uses a small kernel that mainly provides the inter-process communication and the scheduling between tasks. Anything else is done in separate tasks (or processes in other operating systems).
The following diagram gives an overview on the architecture:
---------- --------- --------- ------- -------- | fsdev | | fsiec | | fsibm | | lsh | | lmon | tasks... | | | | | | ------------------------------------- | | | | | | | lib6502 ---------- --------- --------- ------------------------------------- ---------------------------- -------------- ----- ---------- -------- | | | | fsm | | | | | | | | | env | -------------- | | | | | | | | ------------------ | | stream | | mem | | | | | | | | | -------------------------------------- | | | | | devices | | | | | ------------------------------------------------- ---------- -------- --------- ------- ----------- ---------- | video | | par | | spooler | | serial | devices... --------- ------- ----------- ----------
The kernel is divided into multiple modules that work together and faciliate the communication between the devices (like console (video), serial, …) and the different tasks.
A Task can be a system task like a filesystem driver (like fsiec(8) or fsdev(8)), or user space tasks like lsh(1) or lmon(1). File commands like ls(1) or mkdir(1), and filters like wc(1), hexdump(1) etc are implemented as separate tasks. Userspace programs usually use the Lib6502 as mediator between application and kernel.
For more information please see the (older but still useful) description in OS/A65 V1 Architecture. The supported devices are described in Devices.
GeckOS supports TCP/IP networking through an own TCP/IP stack. For details see SLIP.
For the development of OS/A65 programs there are two possibilities:
-
lib6502 with the o65 file format This allows source compatibility (to some degree) with Lunix, as well as that the program runs on all supported platforms. lib6502 programs are simply assembled with my xa65 crossassembler with the including the file "lib6502.i65" and the assembler option "-LLIB6502" set. This tells the compiler to put "LIB6502" into the file as undefined reference that is resolved when loading. The lib6502 jump table is relative to this address.
-
A system application not only uses lib6502 calls (if it uses them) but also kernel calls. The kernel can be at different addresses for different architecture as well. Therefore you have to add "-LOSA2KERNEL" to the assembler line. This address is also resolved when loading. If the file should also be used as a ROM file, then it has to have a ROM boot header, see the kernel description.
More information on how to build can be found in Build.
-
lib6502 description
-
README that comes with the binary.
-
The list of known bugs is maintained on github bug tracker.
-
Using the shell is described in it’s man page.
-
Cenbe’s commentary on GeckOS
-
Issue list for GeckOS 2.2
-
Issue list for GeckOS 2.1
-
What’s new in 2.0.9 since 2.0.0
-
The Changelog for version 1.3.* and for the development of 2.0.0.
I didn’t dream of this becoming such a nice project when I started building this computer in 1989.
After someone asked me to release it to the public, I decided to put it under the GNU public license. (Which, of course, doesn’t hold true for the ported BASIC interpreter, which is taken from the C64. See basic.1.adoc for more.) Also the character ROMs are taken from the C64. However, Commodore in its old form doesn’t exist anymore and attempts to contact the new right holders have not brought any success, so I put them here.
Well, when I did this project, it was just for fun. But now I find it quite nice. Well, if you know some magazin that would like to publish some of it, I will be glad writing an article or so (if anybody really wants it ;-)
Ideas, proposals and bug reports are collected and managed on github in the GeckOS Issue Tracker.
Last modified 14 april 2020 by A. Fachat