The Coco Projects
All Projects by Bill Pierce
 Here are some of the projects that I have going on the Coco. Some of them have been ongoing since the 1980's and may never be finished. Others I hope to wind up before the year is over. I started on the Coco programming BASIC like most people. As I delved further into computers, I learned about machine language programming and how much faster it was. I started assembly by hand in the beginning, entering hex values with a poking program I wrote. Then using the info I got from W. Barden's M/L book and from Rainbow magazine, I wrote a simple, but usefull assembler in basic using the syntax learned from the book. It actually worked... somewhat... I wish I could find the cassette with that file on it, it served me well. I finally found a copy of the Edtasm+ program pack on sale at the Shack. It was $5 on the manager's special table. Programming was never the same. From there, I eventually went to Asm on OS-9 level 1 ver 2, then to OS-9 Level 2. When I finally left the Coco for a bit, about  6 or 7 years, I spent my time on the PC messing with MS Visual Basic 6.0 and a little MS Visual C++ (very little). The knowledge I had gained from my experience with the Coco was invaluable. I found MS Visual Basic 6 to be VERY similar to Basic09 on the Coco. There was not very much of a leaning curve in the move... At the first of this year (2011), I was given a "new" Coco system. I had forgotten how much FUN it is to program the Coco. My latest BIG project is to learn "C". I always put it off before, but now there's no excuses. The work I've done so far has shown me I should have made this move 25 years ago... things may have been different. I may have finished some of my "BIG" projects. The combination of the ease of "C" and the speed of M/L is making me want to start the 80s all over again and get it right this time!!
Note: All of My Coco programming projects are written, edited, and compiled or assembled on a real Coco or using a Coco emulator. I do not use any cross-assmblers or cross-compilers. For OS-9 Level 2, I normally use VCC with the Becker Port for use with DriveWire 4 so I can move projects back and forth between my Cocos and VCC with ease. The only reason I use VCC is that I can overclock the CPU to 75mhz and compiling only takes seconds. Also, on VCC screen scrolling in the editors is much quicker and makes for a good workflow. In OS-9 Level 1, I sometimes use XRoar with Becker port support for DW4, in Coco 2 mode. For now, most of my projects are in NitrOS-9 Level 2 & Level 1. In Level 2, I use Ed 3.1 for my text editor and my MJK C Compiler system which is just an updated OS-9 C compiler using c.comp and a few special utilities. See the "MJK C Compiler" page listed in the left sidebar for more info on this C compiler system. For assembly files, I use RMA/RLink or Asm. Both standard OS-9 assemblers. In NitrOS-9 Level 1, I use an updated Microware C compiler system and Asm. I use TSEdit for editing my source files. I believe in programming ON the Coco, not just FOR the Coco :-)
Here are some of my current projects. Some I will be making some blogs on, as well as screenshots in the future.
(see "The Projects" list on the left sidebar)
 This is not actually a software project but a diary (of sorts) of my current Coco 3/NitrOS-9 system. When I received this system in December of 2012, it was already heavily modded and now with the addition of the Glenside IDE hard drive interface, it is truely a "FrankenCoco". This blog chronicals the modifications to my Coco 3 and explains the advatages.
 Though this software suite was already in planning, finding out that DW4Man is not running properly due to problems with the built in DW4 parser, I have decided to move MShell from the backburner to the front and turn the heat on high. MShell started as a rewrite of the DW4Man code so that I could clean up and optimize that software. The more I looked at the code, the more the ideas came. The layout for the MShell software suite has grown to a massive suite of NitrOS-9 software. In planning is a suite of programs that replace 75% of the OS-9 commands and utilities!! To explain it all here would take several pages so I will wait until I post the coming blog to explain the functionality of this software suite..... and "Sweet" it is.... just wait for it.... It's coming.... "MShell - The Ultimate NitrOS-9 System Manager"
Coco Source File Repository (CSFR)
 This yet "unnamed" project has been brewing for quite some time now. It all started with my idea to get the NitrOS-9 sources to be compilable with assemblers on a Coco without using Cross-Assemblers on the PC. Then I made a big step forwards with the "Updater" feature in "DW4Man". Slowly gears started turning and a plan started falling into place.... What if we could set up a repository for Asm, RMA, and C sources on the internet (SourceForge maybe?) and through DriveWire and the PC's internet connection, download and update a "local" copy of the repo and build it. I think a perfect model for the build tools would be my "MJK C Compiler" discussed eleswhere on this site (see left sidebar). That compiler, with a few modifications to "Rcm2", the frontend unit, could be set up to use any compiler or assembler and possibly even basic09 (I would have to look into this). For now, DW4 has no support for uploading files back to the repo, but I believe if we talk "real nice" to Aaron Wolfe, this could be fixed.
 The idea would be the whole thing to work very similar to the current NitrOS-9 repo but on the Coco instead of a PC. Yes, it would be a slow process on the Coco as transfer speeds are still a bottleneck in this area, but to maintain a repo on the net with a Coco? That's just too Kool!!. I wouldn't mind the slow download times... and downloads only occur when there are updates and only the updated files will be downloaded, so... Once the initial files are downloaded, you will only need to update when there's new files. I already have a very simple version of this in the DW4Man "Update" feature. It's not very exstensive, but I didn't need anything complex for that function. I would have to write a little more elaborate update type function for this.
 One of the drawbacks to the current NitrOS-9 repo is that it will ONLY handle Asm and RMA type files. No C crosscompiler has ever been made fully functional for the Coco though a few have tried. With this system, you'll be working ON the Coco and not FOR the Coco so you can use any OS-9 assembly or C compiler you want on the sources. With this said, the possibilities abound... Not just a NitrOS-9 repository BUT a Color Computer Source File Repository. We could even cover RSDOS assembly as well as CB, ECB, SECB, & DECB files. As I said... this idea has been brewing a while and I'm now sure it can be done. I may be starting this project up soon as almost every piece of software I've done or am doing has something in it that can be used in the project. It will definately be a modular program with many modules for many functions, but as I said, it can be done!
C Programming Subroutines
In my adventure in programming in C for OS-9, I started out like everyone else and called things like "dir" and "pwd" from an OS-9 C system call from within the prorgam when I needed these types of functions. It didn't take me long to figure out that not everyone has the same utilities on their system as I do. Take the two major versions of "tmode", one uses syntax like "tmode -pause" where the other uses "tmode pau=0". There's no way of knowing which version a user will have on their system. I ran into this problem when I was developing the directory printing routines for my "Sound Chaser" software. The first complaint I had was "I'm getting an error with tmode". I knew then that using "outside" software from within a program wasn't going to work. I proceded to write my own version of "tmode" as a subroutine in "C" that could be called when I needed it. I soon discovered many other commands that needed to be made into subroutines like "pwd", "pxd" etc. I have now started a collection of C "subroutines" based on standard OS-9 commands as well as some that never exsisted. One of these would be my DriveWire routine used in almost all my software. I needed a way to communicate with the DW server directly and get the responses into string arrays for printing or what ever I needed them for.
 My collection is constantly growing as are my needs for the routines themselves. I will soon be starting a web page for these routines and explaining how to use them in your C and RMA code for your own OS-9/NitrOS-9 programming needs.
I've had a few requests to reveal my methods in handling the Drivewire server, managing menus, internet updating on the Coco and all the "regular" features I've used repeatedly in DW4Man, Sound Chaser, BootMajik and HRSMan. The GUI is a simple, 80 column text based menu system using the arrow keys and ENTER for scrolling the screen and selecting files. I've decided to build MenuTemplet, a simple templet written in "C" with most of the functionality of the utility functions in these programs as well as menu templets to help get you started to build programs on your own. This will be a "grow your own" style project in which I provide the skeleton and you provide the meat. There will be many features here that I've developed (and stolen) over the past 2 years. I will try to comment each section fully explaining how to use each part. Examples will be given on "forking" and "chaining" other processes from the main menu and keeping everything in the same GUI. Anyone having run DW4Man or Sound Chaser has seen this GUI in action and it's smooth and stable. I hope to have this one uploaded soon for developing your own menu driven programs.
Not long ago, Robert Gault and I were discussing some problems with some of the modules in NitrOS-9. He sent me a program call "HRSDOS" which is basically the same program as "RSDOS" for OS-9 that allows moving files from a DECB formatted disk to an OS-9 drive and moving OS-9 files to a DECB disk. HRSDOS was an enhanced version of this software that not only allowed you to work with DECB disks but with RSDOS partitioned hard drives and Virtual hard drives (vhd) through DriveWire. You can copy RSDOS files from any "virtual" RSDOS disk on a partitioned vhd or hd. This program is making life on the Coco easier. Mr Gault then asked me if I was interested in the sources to this program, knowing I would do something with it. I've decided to turn it into HRSView, with basically the same functionality but with a graphic user interface in which you can select files from an RSDOS/OS9 disk and move them to an OS9/RSDOS disk. A sort of RSDOS to OS-9 file manager. I most likely will be making this a part of the DW4Man suite of modules as well as a stand alone program. With a fully functional program and source, all I have to do is build a GUI wrapper around it. This one's gonna be easy :-)
CyberEdit (CE) is actually a program I started in Microsoft Visual Basic on my Windows PC. I have since moved the project to my Coco as the Coco is easier to program for MIDI than my PC.... imagine that!
CE is a MIDI parameter edit for my Fender CyberTwin guitar amplifier. The CyberTwin is an amazing piece of machinery with complete MIDI control of all features  of the amp. The CyberTwin is a "modeling amp" in that it has a computer that reconfigures the amp, preamp and tone sections of the amp to "model" many other makes of amps. MIDI control of this amp includes being able to edit all these features as well as control any of the front knobs on the amp as well. This will be a relitively easy project as I have all the MIDI specs to the amp and MIDI is very easy on the Coco. I'll have the blog on this up soon.
BootMajik is going to be a NitrOS-9 boot disk creation utility that does all the work for you!
In respose to all the years of hearing "I don't use OS-9, I can't even make a boot disk that works", I have decided to try to create a progam that will change making a boot disk for OS-9 from being a major PITA to nothing more than selecting a few well prompted choices from a menu and hitting ENTER.
This is something OS-9 has needed from the beginning. Too many people stopped using OS-9 after trying to make their first boot disk and failing. I will admit, it's not an easy task. It took me quite some time to grasp the concept myself. And with all todays options with NitrOS-9, it's gotten even more confusing. There needs to be a place where all known modules and drivers can be found and explinations of what hardware/software they control. BootMajik will try to be that somewhere. I will be using the same user interface that was used in the award winning DW4Man and Sound Chaser.
When I work on the Coco or the Emulator for that matter, I hate to have to move over to the PC keyboard or the PC mouse just to change a virtual disk or to set some Midi parameters. DW4Man hopes to be all the Drivewire user wants in a utility. With such features as virtual disk management, configuration editor, midi manager, virtual disk database and hopefully many more features, the user should never have to go back to the PC keyboard or mouse for any Drivewire parameter settings. Already with a full screen GUI with menuing system, it's becoming the most usefull tool on my Coco. I've now started the blog to show the progress and explain some of the features and their use. This system will be perfect for those people developing Divewire servers on RazzberryPi's and other single board systems. There will be no need for a monitor as all can be done from the Coco. The link to the blog for DW4Man is in the sidebar on the left. As I get more progress on the project, I may eventually put up a beta test link as well. This is going to one big project!
Sound Chaser
 Sound Chaser is a Multi-Format music player for OS-9. It runs on either an 80 column hardware text screen or the 80 column graphics screen. It will display up to 400 music files in many formats on a scrollable screen for selection to be played. This program has really become an obsession to me right now. I can't seem to stop working on it. It reminds me of the old days... staying up till 4 AM... Lots and lots of coffee... Wife giving me mean looks... Man I've really missed this stuff!!
 Sound Chaser is about 60% finished and moving fast. It's my first "Official" C project. This one definately gets a blog...
This is one of those projects I was working on in the late 80's early 90's... Lyr2Ume is a Lyra to Umuse file conversion utility.  If I ever finish it, it will convert a Lyra format song to Umuse format that can be loaded into Ulitmuse and edited as normal. There were a couple of things that were holding this one back and the answer came in the last update to Ultimuse... about the same time I lost my Cocos to the floods of hurricane Floyde. Now that I'm up and running again, I will finally finish this project and feel like maybe the 80's were ok... maybe...
Bells & Whistles 09
 I always felt Bells & Whistles 2 (Rainbow 06/89) should be updated to OS9 Level 2. With a good GUI, a solid editor and a faithfull player, it could be the best Wavetable Music player for the Coco 3. I started working on this waaay back when I first got OS9 Lv2 and somehow got sidetracked and never finished it. Now since I've been working in "C", I think I could put a good GUI to it and the player is easy. I'll be bringing this one out of the closet real soon as it was well on it's way back then.
Ultimuse 3 & Lyra Editor
 At one point when I was working on the Lyra 2 Ultimuse 3 converter, I realized I had all the file contents sitting right there in the buffers... why not make a simple editor to do things like change the instruments or reassign the midi channels. I had most of this editor finished when my Cocos died during Hurricane Floyd. I have since run across all the code for it, which it's in Basic09, and I think I'll redo it in "C" and finish it up. Now I could even add players for the files as well since they are already written :-)
Standard Midi File Player
There have been a couple of SMF players for the Coco, but they all had thier limitations. I have a good working driver now with a good playback throughput. All it needs is a nice GUI. If it goes well... I may just go whole hog and write a midi sequencer. This one would differ in that unlike Umuse & Lyra's "Staff" style input, I want to use a more modern "Piano Roll" style editor. OS9's hi res graphics would be just right for this.
Mod Tracker
I know, I know... "Sock Master's already done it..."   But Not in OS9!!! Also.. Sock's program isn't actually a Mod Tracker. By definition, a Mod Tracker is the editor that creates the Mod files... The Mod Player plays them. Sock's program is only a player. I've actually talked once recently with the Sock man and he's suppose to get back with me and send some info and sources but I've yet to hear from him. He said he'd been getting the itch to do some more Coco work so we may see him soon. Meanwhile... I would really like to carry his idea further as even C64's had Mod Trackers!
(EDIT) SockMaster finally got back with me and I now have the sources for both the 6309 & 6809 mod file players for the Coco (CocoTracker). I will be working on this in the near future to try an OS9 conversion.
 Other than the "Paint" program for "Deskmate", the only other graphic editors I remember for Coco 3 & Os9 Lv2 was MVCanvas & Max9. MVC was a great program but in it's last incarnations, it still had a few bugs and Mike Haaland quit working on it before it was completely finished. Max9 by Steve Bjork was to me a totally unfinished and half thought out program. Steve could have done much better than this but was too busy with other interests by then to do any "serious" Color Computer programming.
 I have done several graphics editors in DECB and one in particular had every single feature of CocoMax II that was listed in Rainbow adds. And it was written in BASIC!! It was based on a program from Rainbow called "CocoDraw" in which I added every graphics enhancement I could find in the magazines and some I come up with on my own. I would like to port this program to OS9 and do it in "C" for speed with ML subroutines on speed critical stuff. A lot of the original had ML subs anyway.
 I always was and still am a Nintendo Zelda fan. The "Thelda " remake for Coco 3 was a good try but just not good enough. I've been playing Zelda a lot lately on Nes emulators so I can take screenshots of all the areas. I have already "re-drawn" almost all of the characters and animations using MVCanvas. All the graphics are exact duplicates of the original. The Zelda screens will fit perfect on a Coco 3 so the big thing will be coding for proper speed and reaction time. The Coco's biggest downfall in this project is sound. Almost all the game systems, even the original Nitendo, had propriety sound chips so the CPU didn't have to create the sound in software. I have been looking at some coding on "background" sound on the Coco using interrupts and I think it may work as long as I keep the sounds short and sweet. There probably will be no background music as the Coco cannot generate graphics and sound at the same time and the sound would stutter while graphics are drawn. This project will definately end up being a blog soon.
 RSDOS BASIC Games & Utilities
 I started this one back in the 80s and got sidetracked when the Midi bug bit me. I was going through Rainbow & Hot Coco and finding simple, but useful utilities and trying to port them over to either Basic09 or OS-9 Assembly. I think I remember even trying Burke & Burke's RSB, the RSDOS emulator for OS-9 as well. I had started on several files but never finished one. In my recent programming splurge on the Coco, I've needed several of my old DECB programs in OS-9. I've decided now to pick this project back up and see what I can come up with. The first will probably be the program by Lester Hands to convert the "play" function to and from Musica files that makes them loadable as M/L files that can then be "EXEC"ed to play them without the Musica program. The RSDOS version is in BASIC and only about 30 lines of code. This one will be easy. I've started making a list so that everytime I run across something in RSDOS that I think would be useful in OS-9, I jot down the magazine, disk, or book I saw it in so I can get back to it easily. There are a TON of small simple games in BASIC that would be really easy to convert. There is even quite a few M/L games that could be converted as well. A good example of this kind of work is "Kyum Gia - To Be Ninja" which was converted from RSDOS M/L to OS-9 and the author did an excellant job as well. Also the various Pac Man games, most of which had thier roots in RSDOS M/L code as well.
 This is a project I'm very passionate about to move the building of the NitrOS-9 project back to the Color Computer and it's emulators. After recent observations of the current NitrOS-9 repository on Source Forge, I (and others) have found many things have "gone south". This is not to say that the current administrators have done a bad job... just that the project has grown beyond the scope of the Coco and in that respect, has taken turns for the worse. As the site stands right now, the repo is currently "unbuildable" (Edt: now fixed). There were changes made in the repository management system and incomplete changes made in the build tools resulting in an unusable repository. That with the addition to covering builds for the Dragon 64, Dragon Alpha, and Atari Liber8 card not to even mention the Coco 1, Coco 2, and the Coco 3. All these additions were added as "conditional" build code that in the end, makes the code completely untransferrable to the Coco itself. The code will still build and run on a Coco, but most of the module sources can not be assembled on a real Coco. In my opinion, this is not how it should be done. This code should be buildable on a real Coco with only minor modifications and you should be able to "pull" a module source and use it on a real Coco to build new modules. When we alienate the very machine we're coding for, we have left our goal behind... NitrOS-9 for the Color Computer.
 It's with these thoughts in mind that I start this project. A project to move the NitrOS-9 sources back to the Coco and make them once again, buildable on the Coco itself. This will not be an easy project as there are many obstacles and road blocks. It will be a long slow process and I will be only working on it when I get time from other projects. But... I feel this is an important step to getting the Coco back in the stable state it was in the early 90s. So far, I've not enlisted anyone's help in this, but if this starts working as I plan, I may just make the project public and ask for help. Until then, the sources will be kept on my hard drive systems until I'm satisfied that things are building as they should.
 Dungeon Master's Apprentice
About the same time I bought my first Coco 2, I also started playing Dungeons and Dragons. I didn't take long to see that a computer would be an excellent way to keep a database of all my D&D info. Through my job (I was a milkman at the time), I met a fellow D&D player who was using his Commador 64 to do the very thing I was thinking of doing. He even printed out a BASIC listing of the program he used to roll characters with. We never did get around to the other programs. Using this C-64 listing as a guide, I stared at first in BASIC, then in Basic09, to write something similar. Eventually, my explorations into the world of Midi overshadowed most of the programming projects I had going and I dropped the whole idea. Now with a much better knowledge of Coco & OS-9 programming, I think I could write a dungeon manager that would be a breeze to run. I expect I'll be working on this one soon. I think I still have the old Basic09 sources somewhere...
All these projects and many, many more will fill my spare time when my studio isn't busy and my CTS (Carpel Tunnel Syndrom) gets to bothering me where I can't play guitar...