6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 9:32 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Mon Apr 03, 2006 5:04 pm 
Offline

Joined: Sat Sep 04, 2004 4:17 am
Posts: 30
Location: Last Ninja 2: Basement
I have been working on a 6502/65816 OS for over a year now, and I am beginning to wonder about the possibility of licensing my system to others. It is very different from other hobbyist OS projects, in that it is designed to be quite heavily customizable with ease (there are lots of options being created that let the builder of the OS choose between various tradeoffs such as performance vs. memory usage). I don't have it nearly complete yet, but I've already begun work on a self-hosting preprocessor/assembler/linker/loader toolchain, a library that provides variable storage that is automatically handled and garbage-collected without program intervention, and some basic debugging facilities. I have at least two platforms that I can show text on, and one with which I can establish a full console.

I don't know anything about selling this kind of thing, though. There's no high-level language available (obviously). I was thinking that it would be much easier to write programs for this thing if I created the library that managed data structures first, and built things like a CLI and whatnot on top of that library. I don't know if that matters to the kind of people that buy embedded operating systems, and it would be fantastic if someone could either tell me directly or point me to a primer on how to go about making and selling this thing so that it is attractive to embedded developers.

I'm pretty much a Commodore guy exclusively because I don't own any other 6502 equipment (SNES and whatnot excluded).

Anyone care to hit on this one?


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 20, 2006 9:24 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
daivox wrote:
I'm pretty much a Commodore guy exclusively because I don't own any other 6502 equipment (SNES and whatnot excluded).

Anyone care to hit on this one?


I'm not sure of the viability of licensing an OS for the 6502/65816. I wrote a layer that sits on top of the Commodore kernel API that provided a hierarchial namespace driver (a la QNX's virtual filesystem layer), that is even usable by BASIC. I proved the concept, and finishing it would take maybe a day or two more work, but as yet have not developed it further. However, the technology developed there will form the basis for the OS kernel for my Kestrel, which will also be strongly inspired by the Commodore kernel.

Since my code is about 1.5K to 2K in size, I don't see the viability in licensing it anything else except GPL or compatible. For such high power-to-code-size ratio software, cloning it would be trivial. Even Commodore's kernel is only 4K in size (the 8K "Kernal" ROM for the C64 consists of 4K PET kernel, 2K for IEC serial bus functions, and 2K of spill-over from the BASIC ROM. Indeed, the kernel didn't really grow in size until the Commodore 128, due largely to having to deal with memory banking).

Applications which sit on top of the kernel, however, are much more likely candidates for licensing (e.g., web browsers and the like). But the core OS itself, unless it's something completely ground-breaking, I don't think would be worth the cost or the effort. The CPU architecture is so simple that all one needs to clone the thing would be API documentation.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 20, 2006 9:29 pm 
Offline

Joined: Sat Sep 04, 2004 4:17 am
Posts: 30
Location: Last Ninja 2: Basement
While one could easily clone my API, one could not so easily clone the self-hosting toolchain, the extreme build-time configurability, the scalability from memory-lacking 6502 systems to 65816s with 16MB of RAM, etc.

No one is going to want to repeat the work I'm doing.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 20, 2006 9:36 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
daivox wrote:
No one is going to want to repeat the work I'm doing.


That's what AT&T thought when they licensed (for free) Unix sources to various colleges. Berkeley replicated (and independently enhanced) it to form BSD. MIT started over from scratch, complete with toolchain, to form GNU project, which culminated (accidentally) with Linux (instead of Hurd, which is still being worked on, and shows pretty good promise too!).

I'm not saying that your idea is bad, but don't under-estimate the community at large.

And if you do decide to license it, for the love of God and all that is Holy, PLEASE listen to your customers!! Don't pull a Microsoft!

For me, my Kestrel's OS will be made LGPL, along with most other software I write. Part of the Kestrel's appeal is that it is a completely glass box, with top-notch documentation, schematics, as well as all-open software. Of course, I won't prevent commercial projects from being used on the Kestrel either, so if someone wants to port your environment to the Kestrel, more power to them. :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 20, 2006 9:47 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
2 options to look into.

a. have it up asa freebie for other developers to play with, hobbyists. Host it with source code so others can have fun. Most of the people on here who have their own web page thingsgo that route.

b. get into a developer relationship with WDC as one of their business partners, perhaps. their IP cores are used in many applications and your sysytem as a business tool for that community. Again, talk to WDC and see the options for going that route.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 20, 2006 10:06 pm 
Offline

Joined: Sat Sep 04, 2004 4:17 am
Posts: 30
Location: Last Ninja 2: Basement
To be quite honest, one of the reasons I'd rather not make the whole thing free is that I've put so much personal time into this that it's getting to be quite a big deal and a VERY personal effort. I'm about 20 more man-hours away from having everything needed to support mid-level programming constructs through an API instead of forcing every program to do it themselves, and it's basically boiled down to applying code to everything I've worked out on paper that's not already implemented. This thing's going to be buildable as a ROM replacement OR a fully loadable modular system to boot from a disk, and it'll be totally self-hosting when I get done with it. Shared libraries and dynamic linking are being worked on, too. I'm aiming for a complete base system, not just the kernel core, and that's what I'm talking about licensing.

Talking to WDC's not such a bad idea, but I'll surely need a more polished product before doing that. I think the ground-breaking aspect of what I am doing is in the self-hosting toolchain being present. You won't need cross-development tools anymore. A C64 could build programs, or an Apple IIgs, or even a Super NES. I don't think anyone has made a multitasking OS that's self-hosting for the 6502 series yet--at least, not a hobbyist one. LUnix, ACE, OS/A65, etc. are all nice, but one thing they are not is self-hosting.

The amount of code sharing that I'm doing is great. The kernel has plenty of re-entrant generic subroutines like 8-bit multiply, block moves, debug messages, and console I/O.

The point is, there's enough aspects of this OS that will make it easy to program on top of and scale to newer systems that I think it's of value to some people. It's not just a kernel, it's an entire working environment.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 20, 2006 10:54 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
Talk to WDC DURNG development. Now is a FANTASTIC time. some good reasons:

1. they have fantastic support. You will be talking to them during development. they have comilers and tool libraries you will want to use in your work.
2. you can see how the marketplace looks, to see if there is anything you will want to add or subtract from your project to be marketable.
3. WDC does enjoy knowing what is going on when it concernes their product. they are very much on top of things.


for the board I am doing for work, it is a quid pro quo. The 65C134 is a helluva great microcontroller but there seems to be very little hobbyist experience with it. I will be having the code and hardware and schematic up for hobbyists on here to use in their own designs. WDC is also interested as it provides real world tested in this sort of format. And it helps me on it as I can consult with some pretty darn great people all around so I am not designing in a vacuum. i had been on here for over 2 years on a pinball project I am doing at home. It is kind of frozen with a whole slew of other projects in my life but I do plan to get back into it.

I had been doing my work project on another CPU with a non-existant support base from either the company or fans, it was operating in a vacuum. Add in a nice but strange compiler really made life an uphill. then when the brick wall was hit, it was time to come back home. (the brick wall was discovering that the AT89C2051 cannot act like an I2C slave under any circumstances)....

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 20, 2006 11:08 pm 
Offline

Joined: Sat Sep 04, 2004 4:17 am
Posts: 30
Location: Last Ninja 2: Basement
Unfortunately, using compilers and libraries from other sources is the opposite of the way I want to do what I am doing. I am building everything from the ground up, and if I have to re-invent wheels in the process, that's what I'm going to do. After all, you have to re-invent the wheel sometimes to get better wheels.

How would I get in touch with WDC about this?

Never heard of the 65C134. What's it like?

I just had a funny thought. Maybe if WDC sees this thing I'm building, they may be interested in selling it to their clients. The problem is that this is such a preliminary stage that I don't have anything other than test programs that show debugging messages or throw errors at the system to show anyone.

One nice feature of my OS is runaway BRK protection. If a program doesn't call a specific routine that releases the CPU prematurely and a BRK is used, the process will be assumed as a runaway program and will be terminated. How many times have you slammed into a BRK op by accident because your program had a nasty little bug? How many times has your attempt at asm on the 64 resulted in hitting a long string of BRK ops?

I actually released early versions to the public, but no one really wrote back about it, so I pulled the project and privatized. Someone suggested I might be able to sell it. Here I am. I'd be more motivated if I knew there would be a demand for it, too.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 20, 2006 11:21 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
The toolsets and libraries will definitely help you out in your design cycle. They have an assembler and C compiler as well as design hardware.

Why re-ivent certain libraries if they are already there for your usage in your pogram?

The 65C134 is an all in one microcontroller. It uses the 65C02 core and adds in 4 8 bit ports, dual clocks and serial interfacings, all in a single 68 pin PLCC package (or a flatpack, I forget which kind exactly). It also sports multiple pin modes for the port pins to perform other functions AND it has a 4K code library built into the chip for your usage in your programs.

the 65C265 is the 816 version of the same all in one setup.


One example of a industrial application is an all in one game system for use in the automobile. A company livcensed the 816 core and used their own graphics into a sginel chip and it forms a game system.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 21, 2006 4:08 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
daivox wrote:
I'm about 20 more man-hours away from having everything needed to support mid-level programming constructs through an API instead of forcing every program to do it themselves


Congradulations! I've only just begun my software engineering work, but after spending a day working on it, I'm very pleased with the results. Yesterday I implemented the 65816 cross assembler, and today I am working on the core primitives of the Forth environment. Currently, it displays a banner to the screen then sits in an infinite loop because I don't yet have keyboard input.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 21, 2006 4:12 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
daivox wrote:
One nice feature of my OS is runaway BRK protection.


IIRC, GEOS had something along these lines too. However, my problem isn't BRK instructions -- it's JAM "instructions." Those you simply can't break out of. $42 (the WDM opcode for the 65816, for example) is a perfect example of a JAM opcode.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 21, 2006 4:14 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Nightmaretony wrote:
One example of a industrial application is an all in one game system for use in the automobile. A company livcensed the 816 core and used their own graphics into a sginel chip and it forms a game system.


Isn't this just *begging* for disaster though? We already have enough problems with men reading the newspaper while driving on the freeway at 80+ MPH (yes, I've seen it multiple times!), women putting on makeup, and people of both sexes who just plain don't know when to hang up the cellphone while driving.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 21, 2006 7:21 am 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
At work, we make entertainment systems for cars, TVs and dVD players built into headrests. And no, the driver doesnt watch whilke driving.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: