6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Aug 02, 2024 11:24 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Jan 06, 2018 2:07 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10866
Location: England
I see (archive link) Alan Cox has made some forward progress on porting his portable OS to the 65816. He did have a 6502 port, which has fallen by the wayside a bit, and his main focus has been on the Z80 (specifically Amstrad's notebook NC100 machine) but it seems the '816 is back in the game:

Quote:
Fuzix on 65C816 is now fairly stable. There are some bugs to clean up, swap to tidy up and split I/D application support will need changes to the C compiler first but it basically works.

Applications are the same as the 6502, although existing 6502 apps may fail until recompiled as I had to add some workarounds for cc65 assumptions and a really disgusting hack to make setjmp/longjmp work correctly on both 6502 and 65C816.

The biggest gap to be honest is a decent free C compiler. cc65 does miracles with 6502 but a native 65C816 16bit compiler that honoured the rules needed to make stuff like fork() work would do far better. The other gap is a lack of floating point. That needs someone who understands FP hacking to write a library to pack/unpack IEEE floats, add, subtract, multiply, divide them and probably convert to/from integer. All the nastier high level stuff is available in C form in the C library and the compiler actually has the framework to do it.

v65c816 is a build for a small system (512K) that puts the entire OS and stacks and whatnot in bank 0, as well as having some in progress support for emulated framebuffer - so I can do graphics support for it next.

v65c816-big is a build for an 8MB system with a 125 process limit and other buffering configurations roughly consistent with what 2BSD used for a 16 user system. It's not actually very useful running 125 processes at a time because with an at best 14MHz processor you can't really get that much done. It does however show the upper limits of Fuzix (and maybe a bit beyond in truth) and takes 3 banks (bank 0 is entirely all the direct pages and stacks that must live there, bank 1 kernel code and bank 2 kernel data).

The emulator also has a fun hack for disk performance I'm hoping will get replicated in some of the upcoming retro 65C816 board design. Like the 6502 the 65C816 sucks at continually reading from an MMIO port and writing it to sequential memory locations. It sucks less than a 6502 because you've got 16bit index registers, but at the same clock it was doing about 100K/second that a Z80 can do 250K (with ini loops). The revised emulated disk interface has the same mmio port replicated across a chunk of address space and this allows a block move instruction (MVN) to do all the work at 6 clocks/byte. At that point the 65C816 suddenly jumps to twice as fast as the Z80 on disk I/O.


(Alan is etchedpixels on other forums but doesn't seem to be a member here.)


Last edited by BigEd on Sat Jan 13, 2024 10:07 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 06, 2018 3:05 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3366
Location: Ontario, Canada
Quote:
The revised emulated disk interface has the same mmio port replicated across a chunk of address space and this allows a block move instruction (MVN) to do all the work at 6 clocks/byte.
A slick trick! 8)

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 06, 2018 3:08 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10866
Location: England
I did briefly wonder how many little '816-isms would need to be added to a 'C02 core to support the present Fuzix build. It mightn't be too many, but it does dip into 16/16 mode to perform those block moves, and it often pulls and pushes the bank register.


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

All times are UTC


Who is online

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