SSJX.CO.UK
Content

Creating native Cybiko programs using the CyBornOS Tools 2

THIS GUIDE IS USED AT YOUR OWN RISK.

1. Introduction

This guide shows how to create native Cybiko programs using CybornOS without the need for Cygwin. It may be worth reading through the other Cyborn guide (here) as it does contain more information.

The CyBornOS system was created by Steve Gotthardt. For more information on the CyBorn project check out the Sourceforge homepage.

Important! I am pretty sure the .boot files created only work with a Cybiko Classic Version 2.

2. What's Needed

First you need a compiler, this you can get from SourceForge, download the 'h8300-hms-gcc' file:

Although the compiler has not been updated for quite a while, it does do the job. I am not aware of any potential compatibility problems using it. Things compile with it and that is the aim of all this!

Next you need the CyBorn files, I have hosted them here but to reduce the size I have removed the demo programs and some other unrequired files:

Now we need some files to compile to see if this works...

The lines demo and the very cool 3D Box demo were created by Steve Gotthardt not me. The included compiler script (mymake) were made by me to simplify compilation

3. Putting It All Together

Unzip the compiler into a folder, i used 'My Documents' but it does not really matter where it goes. You should get the following folder structure 'gcc-3.3.1-h8300-win32\usr\local'. The 'Local' folder is where everything will go.

Unzip the cyborn_small.zip file into the above 'Local' folder.

Unzip the cyborn_demos.zip file into the above 'Local' folder.

Important! When you extract the cyborn_small/demo file, make sure they do not get put into another lower down folder.

If all goes well the contents of the 'local' folder should look like this:

4. Creating The Demo Boot Files

I will not go into depth about this but this is what the mymake.bat looks like:

@echo off
set libdir=..\cyborn\lib
set incdir=..\cyborn\include
set builddir=..\cyborn\build
set boot=tfslide.boot

echo 'C to Assembly..'
..\bin\h8300-hms-gcc.exe *.c -I %incdir% -S -ms

echo 'Assembling..'
copy %builddir%\crt0.o 0crt.o
..\bin\h8300-hms-as.exe slide.s -o slide.o 
..\bin\h8300-hms-as.exe cvd1.s  -o cvd1.o
..\bin\h8300-hms-as.exe support.s  -o support.o

echo 'Linking...'
..\bin\h8300-hms-ld.exe -T %builddir%\cybikoboot.ld *.o %libdir%\libcyborn.a --relax -o %boot%

echo 'Object..'
..\bin\h8300-hms-objcopy.exe %boot% -O binary -I coff-h8300

echo 'Clean up'
del *.o *.s

pause

Some of the scripts are slightly different but they all do the same .c>.s>.o>.boot process.

If you double click on the script it should create a .boot file.

5. Sending the .boot file to the Cybiko

Using the Cybiko console, click on the 'Boot' button. Now chose the .boot file you want to send. You will now be prompted to reboot the Cybiko by pressing the reboot button on screen.

When you do this the Cybiko will restart and then transfer and run the .boot file. All being well, the new boot file should run!

If you escape from the program (or reset if the program crashes), the Cybiko will reboot back to the normal desktop.

Updated 20/04/2024
Created 14/06/2009