OS-9: Difference between revisions

From F256 Foenix
Jump to navigationJump to search
(The new commands did not work, so I'm adding back the old one)
 
(38 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==
OS-9 is a 6809-based operating system that is well-known on the Tandy Color Computer. Its open-source successor, NitrOS-9, is now running on the Foenix F256. For all intents and purposes, OS-9 and NitrOS-9 are interchangeable.
The FNX6809 combined with the F256 makes a great system for running OS-9/6809. [[wikipedia:OS-9|OS-9]] is a real-time, embedded operating system created by [[wikipedia:Microware|Microware Systems Corporation]]. While it was used in many areas of industry, home computer users know it best for its implementation on the [[wikipedia:TRS-80_Color_Computer|Tandy Color Computer]] sold by Radio Shack


The FNX6809 combined with the F256 makes a great system for running OS-9/6809. OS-9 was a real-time, embedded operating system created by Microware Systems Corporation. While it was used in many areas of industry, home computer users know it best for its implementation on the Tandy Color Computer sold by Radio Shack
Today, a community effort has led to the creation of [https://github.com/nitros9project/nitros9 NitrOS-9], an open source version of the OS-9 operating system. Throughout this page, I'll refer to NitrOS-9 as OS-9.


Today, a community effort has led to the creation of NitrOS-9, an open source version of the OS-9 operating system. Throughout this document, I'll refer to NitrOS-9 as OS-9.
== A word about platforms ==
This page assumes you're running on Linux or macOS. If you're using Windows, these instructions don't apply, and someone will have to step up and write steps to develop on that platform.
 
== Tooling ==
Cross-hosted development is the fastest way to develop for the F256. For this you need the following:
 
* [http://www.lwtools.ca lwtools] - an assembler/linker package
* [https://github.com/nitros9project/toolshed ToolShed] - a set of tools for creating disk images
* [https://github.com/nitros9project/nitros9 NitrOS-9] - the NitrOS-9 operating system in source form
* [https://github.com/pweingar/FoenixMgr FoenixMgr] - tools to load code into RAM or Flash of the F256.
 
You can pull these down individually, or better yet, use [https://github.com/strickyak @strickyak]'s great [https://github.com/strickyak/coco-shelf/ CoCo Shelf repository]. It has a <code>Makefile</code> which gets all of the above and puts it in a convenient location (note that you'll have to update your shell script of choice to include the locations of the binaries in the <code>PATH</code> environment variable).
 
Here are the terminal commands for Linux and macOS to pull down all the required software:
cd
git clone <nowiki>https://github.com/strickyak/coco-shelf.git</nowiki>
cd coco-shelf
export PATH="$PATH:$HOME/coco-shelf/bin"
make ANON=1 nitros9/done FoenixMgr/done


== A word about platforms ==
(If you have a github account and your github ssh key is loaded,
This document assumes you're running on Linux or macOS. If you're using Windows, someone will have to step up and write a document for that platform.
you can omit `ANON=1` on the last command,
so it will check out git repositories using your github username,
in case you want to push changes.)
 
There is a special Make target for re-flashing the F256Jr or F256K,
but first time you run this command, it should fail. 
Then you have to edit the `port=` line in `FoenixMgr/foenixmgr.ini`
and run the command again (with the cable plugged in):
make ANON=1 run-f256-flash        # Old command for F256Jr that works?
or
make ANON=1 run-f256jr-flash      # TODO fix this
or
make ANON=1 run-f256k-flash      # TODO fix this
 
== Building FEU and OS-9 Level 1 from scratch ==
FEU is the Foenix Executive Utility. It resides in flash and hosts a debugger and booters that can bring up operating systems like OS-9. FEU runs under OS-9 Level 1, so go ahead and build the entire operating system:
cd nitros9
export NITROS9DIR=$PWD
cd level1/f256
make
cd feu
Now you can flash the image into the F256. You must have a USB cable connected to the system from your computer. Note: if you're using a Mac, you won't be able to upload code into the F256 due to the [https://www.maxlinear.com/support/design-tools/software-drivers driver manufacturer] being so behind on updates. You can use a Linux VM and FoenixMgr tools in bridge mode on the Mac.
 
There are distinct builds of FEU for the F256 Jr and the F256K. Power up the machine, then select the correct command:
cd feu
make flash_f256jr
or
cd feu
make flash_f256k
Once the flash completes, restart the machine and FEU should come up.
 
== Building OS-9 Level 2 ==
To build OS-9 Level 2, run these commands:
cd ../../level2/f256
make dsk
 
This produces the following disk images for the F256 Jr and the F256K:


== Foenix-specific tools ==
NOS9_6809_L2_v030300_f256jr_dw.dsk
To get code into the F256, you need [https://github.com/pweingar/FoenixMgr FoenixMgr]. Download this package and follow the instructions to install it on your machine.
NOS9_6809_L2_v030300_f256jr_sd.dsk
NOS9_6809_L2_v030300_f256k_dw.dsk
NOS9_6809_L2_v030300_f256k_sd.dsk


Note, if you're using a Mac, you won't be able to upload code into the F256 due to the driver manufacturer being so behind on updates. I have a Linux VM and use FoenixMgr tools in bridge mode on there. This allows me to run the commands on my Mac and direct them to the Linux VM.
The ''dw'' disk images are for booting from DriveWire. The ''sd'' disk image are for booting from the SD card. You need to write the images onto an SD card, then insert the SD card into the F256 and restart.


== Cross-hosted software ==
Here's how to image the SD card.
Cross-hosted development is the fastest way to develop code for the F256. For this you need the following:


* lwtools - an assembler/linker package
==== Linux ====
* ToolShed - a set of tools for creating disk images
On Linux, insert the SD card into your computer. Ttype <code>lsblk</code> to find the correct device and replace ''sdx'' on the command line below with it:
* NitrOS-9 - the NitrOS-9 operating system in source form


You can pull these down individually, or better yet, this fork of @strickyak's great CoCo Shelf repository. It has a <code>Makefile</code> which gets all of the above and puts it in a convenient location (note that you'll have to update your shell script of choice to include the locations of the binaries in the <code>PATH</code> environment variable).
dd if=NOS9_6809_L2_v030300_f256k_sd.dsk of=/dev/''sdx''


Here are the commands to type at the terminal to pull down all the required software:
==== macOS ====
<code>cd
On macOS, insert the SD card into your Mac. A dialog will likely appear telling you that the disk you attached isn't readable. Click the "ignore" button, then type <code>diskutil list external</code> to obtain the device name of the SD card and replace ''diskx'' on the command line below with it:
git clone <nowiki>https://github.com/strickyak/coco-shelf.git</nowiki>
sudo dd if=NOS9_6809_L2_v030300_f256k_sd.dsk of=/dev/''diskx''
cd coco-shelf
Once the command completes, type:
  export PATH=$PATH:$HOME/coco-shelf/bin
  diskutil eject /dev/''diskx''
make mirror-stuff done-lwtools done-cmoc done-toolshed done-nitros9</code>
You can then safely remove the SD card.

Latest revision as of 14:51, 26 June 2024

Introduction[edit | edit source]

The FNX6809 combined with the F256 makes a great system for running OS-9/6809. OS-9 is a real-time, embedded operating system created by Microware Systems Corporation. While it was used in many areas of industry, home computer users know it best for its implementation on the Tandy Color Computer sold by Radio Shack

Today, a community effort has led to the creation of NitrOS-9, an open source version of the OS-9 operating system. Throughout this page, I'll refer to NitrOS-9 as OS-9.

A word about platforms[edit | edit source]

This page assumes you're running on Linux or macOS. If you're using Windows, these instructions don't apply, and someone will have to step up and write steps to develop on that platform.

Tooling[edit | edit source]

Cross-hosted development is the fastest way to develop for the F256. For this you need the following:

  • lwtools - an assembler/linker package
  • ToolShed - a set of tools for creating disk images
  • NitrOS-9 - the NitrOS-9 operating system in source form
  • FoenixMgr - tools to load code into RAM or Flash of the F256.

You can pull these down individually, or better yet, use @strickyak's great CoCo Shelf repository. It has a Makefile which gets all of the above and puts it in a convenient location (note that you'll have to update your shell script of choice to include the locations of the binaries in the PATH environment variable).

Here are the terminal commands for Linux and macOS to pull down all the required software:

cd
git clone https://github.com/strickyak/coco-shelf.git
cd coco-shelf
export PATH="$PATH:$HOME/coco-shelf/bin"
make ANON=1 nitros9/done FoenixMgr/done

(If you have a github account and your github ssh key is loaded, you can omit `ANON=1` on the last command, so it will check out git repositories using your github username, in case you want to push changes.)

There is a special Make target for re-flashing the F256Jr or F256K, but first time you run this command, it should fail. Then you have to edit the `port=` line in `FoenixMgr/foenixmgr.ini` and run the command again (with the cable plugged in):

make ANON=1 run-f256-flash        # Old command for F256Jr that works?

or

make ANON=1 run-f256jr-flash      # TODO fix this

or

make ANON=1 run-f256k-flash       # TODO fix this

Building FEU and OS-9 Level 1 from scratch[edit | edit source]

FEU is the Foenix Executive Utility. It resides in flash and hosts a debugger and booters that can bring up operating systems like OS-9. FEU runs under OS-9 Level 1, so go ahead and build the entire operating system:

cd nitros9
export NITROS9DIR=$PWD
cd level1/f256
make 
cd feu

Now you can flash the image into the F256. You must have a USB cable connected to the system from your computer. Note: if you're using a Mac, you won't be able to upload code into the F256 due to the driver manufacturer being so behind on updates. You can use a Linux VM and FoenixMgr tools in bridge mode on the Mac.

There are distinct builds of FEU for the F256 Jr and the F256K. Power up the machine, then select the correct command:

cd feu
make flash_f256jr

or

cd feu
make flash_f256k

Once the flash completes, restart the machine and FEU should come up.

Building OS-9 Level 2[edit | edit source]

To build OS-9 Level 2, run these commands:

cd ../../level2/f256
make dsk

This produces the following disk images for the F256 Jr and the F256K:

NOS9_6809_L2_v030300_f256jr_dw.dsk
NOS9_6809_L2_v030300_f256jr_sd.dsk
NOS9_6809_L2_v030300_f256k_dw.dsk
NOS9_6809_L2_v030300_f256k_sd.dsk

The dw disk images are for booting from DriveWire. The sd disk image are for booting from the SD card. You need to write the images onto an SD card, then insert the SD card into the F256 and restart.

Here's how to image the SD card.

Linux[edit | edit source]

On Linux, insert the SD card into your computer. Ttype lsblk to find the correct device and replace sdx on the command line below with it:

dd if=NOS9_6809_L2_v030300_f256k_sd.dsk of=/dev/sdx

macOS[edit | edit source]

On macOS, insert the SD card into your Mac. A dialog will likely appear telling you that the disk you attached isn't readable. Click the "ignore" button, then type diskutil list external to obtain the device name of the SD card and replace diskx on the command line below with it:

sudo dd if=NOS9_6809_L2_v030300_f256k_sd.dsk of=/dev/diskx

Once the command completes, type:

diskutil eject /dev/diskx

You can then safely remove the SD card.