6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 5:51 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: 6502 as modern-day OS?
PostPosted: Fri Oct 02, 2015 3:49 am 
Offline

Joined: Fri Oct 02, 2015 3:32 am
Posts: 4
Hi I am new here and it was this idea that brought me here.

I am considering the re-building of the 6502 OS to a modern day machine.
To clarify I am not talking about an emulated, simulated, or virtualized 6502 but rather the 6502 OS called from the hard disk by the kernel at the target machine's start up.

The target machine I had in mind for this project is a Dual ULTRASPARC III CPU SUN Workstation.
The build plan is either an UNIX or Solaris Kernel (32 bit) calling the 6502 OS (preferably the Commodore 64 version) thus letting the 6502 run as the machine's native OS.

Now I understand that some serious editing of 6502 needs to occur to make that happen, and that the chosen kernel will need some edits too, all of this I am ok with, but what I wanted to ask here is...


Before I get knee deep in coding something that may never work I thought it better to ask those that know first; Has anyone done something like this before?

Any advice is warmly welcomed
tks


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 02, 2015 4:31 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1951
Location: Sacramento, CA, USA
I'm slightly confused ... am I to understand that you are attempting to port the entire C64 ROM 6510 assembly source to SPARC assembly and re-assemble it? I'm sure that it's possible, since the processors are Turing-equivalent, but considerable additional effort would be required to simulate the C64's I/O hardware (or modify the C64 OS to accommodate the workstation's I/O hardware).

Mike B.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 02, 2015 4:39 am 
Offline

Joined: Fri Oct 02, 2015 3:32 am
Posts: 4
yeap that's what I am planning to do
After looking at the 6502 code porting to the kernel looks doable and if the kernel is reworked I may be able to farm the board management tasks to the kernel letting 6502 talk only to the kernel rather than run the machine itself

But it's all purely theoretical at the mo


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 02, 2015 8:06 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I don't know that this has ever been done before! It does sound like a mammoth task.

I'd recommend starting with something a very great deal smaller, like Bruce's one page monitor, or the Apple I monitor. Let me re-re-use a quote: I'm reminded of Thomson's Rule for First-Time Telescope Makers: "It is faster to make a four-inch mirror then a six-inch mirror than to make a six-inch mirror"


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 02, 2015 8:15 am 
Offline

Joined: Fri Oct 02, 2015 3:32 am
Posts: 4
Haha thanks will check out that link


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 02, 2015 11:37 am 
Offline

Joined: Tue Sep 03, 2002 12:58 pm
Posts: 336
GrantK wrote:
Has anyone done something like this before?


Michael Steil did something like it a few years ago: he wrote a static recompiler that could translate 6502 binaries to C. Throw in some magic to deal with I/O, and you get Apple I or Commodore 64 BASIC as native executables.

http://www.pagetable.com/?p=35 and http://www.pagetable.com/?p=48


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 02, 2015 3:51 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Ah, of course you are right! See also Norbert Kehrer's work: http://members.aon.at/nkehrer/sbt.html
I don't think he has (yet) published his sources, but he has presented these slides:
http://de.slideshare.net/norbert_kehrer ... etupslides

See also Andrew Kelley's pages:
http://andrewkelley.me/post/jamulator.html

There was a previous related discussion nearby:
viewtopic.php?f=2&t=2541


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 02, 2015 4:19 pm 
Offline

Joined: Fri Oct 02, 2015 3:32 am
Posts: 4
Thanks guys this is awesome stuff
Will spend the day reading all of this.

In my prelim build plan it is looking like this;
Subtle changes made to 6502
A portion of the kernel re-written to deal with 6502 requests,
ie hardware calls such as read/write redirected to machine's HD
Then packaging all of SPARC's drivers within the 6502 directory to be called upon by the kernel at installation.

I think it is not a huge task and indeed it is definitely one worth doing.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 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: