Page 1 of 2

X16 Booted on 65816

Posted: Tue Sep 13, 2022 7:45 am
by Wavicle

Tracking an issue in my latest PCB gave me a brain tickle back to a conversation I had with Adrian Black (who famously has a Digital Basement) and Tech Man Dan Retro Tech Dan at VCFMW this past weekend. The '816 wouldn't boot on X16 due to a VERA timing sensitivity. Fixing VERA's timing issue should, in theory, correct both problems.

Presenting Commander X16 booted on a W65C816S at 8MHz:

image.thumb.png.ba3d76352c8d800790068eff445dbfa9.png


X16 Booted on 65816

Posted: Tue Sep 13, 2022 12:50 pm
by rje

So when I went to click on the "WOW!" icon, I couldn't find one.  But I don't want to have to make do with "Like".  So...
oooooo   oooooo     oooo   .oooooo.   oooooo   oooooo     oooo .o. 
`888. `888. .8' d8P' `Y8b `888. `888. .8' 888
`888. .8888. .8' 888 888 `888. .8888. .8' 888
`888 .8'`888. .8' 888 888 `888 .8'`888. .8' Y8P
`888.8' `888.8' 888 888 `888.8' `888.8' `8'
`888' `888' `88b d88' `888' `888' .o.
`8' `8' `Y8bood8P' `8' `8' Y8P
                                                                                  


X16 Booted on 65816

Posted: Tue Sep 13, 2022 2:55 pm
by svenvandevelde


On 9/13/2022 at 9:45 AM, Wavicle said:




Tracking an issue in my latest PCB gave me a brain tickle back to a conversation I had with Adrian Black (who famously has a Digital Basement) and Tech Man Dan at VCFMW this past weekend. The '816 wouldn't boot on X16 due to a VERA timing sensitivity. Fixing VERA's timing issue should, in theory, correct both problems.



Presenting Commander X16 booted on a W65C816S at 8MHz:



image.thumb.png.ba3d76352c8d800790068eff445dbfa9.png



First of all. Amazing and WOW! Secondly ... What is a W65C816S about? Sorry for my silly question.

Is this a new processor?


X16 Booted on 65816

Posted: Tue Sep 13, 2022 3:51 pm
by Wavicle


On 9/13/2022 at 7:55 AM, svenvandevelde said:




First of all. Amazing and WOW! Secondly ... What is a W65C816S about? Sorry for my silly question.



Is this a new processor?



It's the full(er) part number of the 65816. The "16-bit"* successor to the 6502 that was in machines like SNES and Apple IIgs. David mentions the reasons for not using it in his dream computer #2 video. The biggest problem with the '816 wasn't so much demultiplexing the AD bus as getting the CPU and VERA to talk at all.



* not really 16-bit but did have a 16bit ALU and most registers were widened to 16 or 24 bits (I think the PC was widened to 24 bits, I could be wrong on that).


X16 Booted on 65816

Posted: Tue Sep 13, 2022 3:54 pm
by svenvandevelde

And it has a richer instruction set, correct? With a z register?


X16 Booted on 65816

Posted: Tue Sep 13, 2022 3:58 pm
by ZeroByte

Probably the biggest deal with 816 after the 24-bit bus is the segment pointers (forgive me, folks, if my terminology is off - I have -zero- experience with 816 assembly). I think of it as "portable zeropage" but even more is portable than that. The stack is portable, and there is a data segment as well - so you can make it point to any arbitrary table and then walk through it relative to the segment and not its actual address - these sorts of things speed up execution, and make multitasking and relocatable code easier.


X16 Booted on 65816

Posted: Tue Sep 13, 2022 4:06 pm
by kelli217

Sven, it's quite useful to read the Wikipedia entry on the processor. It is not an in-depth programmer's manual, but it gives a surprisingly comprehensive overview of the architecture. https://en.wikipedia.org/wiki/WDC_65C816


X16 Booted on 65816

Posted: Tue Sep 13, 2022 5:18 pm
by EMwhite

The "Programming the..." by David Eyes is over 600 pages, and for a reason; addressing modes and shifting back and forth from an 8 bit to 16 bit Accumulator and X/Y and 'l'ong/far instructions, but mostly compiler errors is a bit much for casual 6502 programmers.

David was right to NOT choose the 65816 (since part of his design criteria was to provide a platform for Commodore peeps, some of which were interested in porting code, some of which were interested in coding new games and apps).  [I'm generalizing so please be kind].

Stefany Allaire chose the 65816 and uses them on all of her C256 line machines from the FMX through the 'U' and 'U+' to the GEN X (embedded), but chose the 65C02 for the Jr. which is in the hands of about a dozen developers at the moment.  The Jr. is very much a 'rightsized' machine, meaning that the video modes, graphics capabilities, etc. are rightsized to match the 65C02 while *816 systems go 'big'.

The CPU indeed has a 24 bit adds bus (internally) so you'll need to get used to FF:FFFF addressing.  From a hardware perspective, however, you'll note that [in dip form] it's still a 40 pin package, so how does that work?  It's multiplexed, so therefore, it's complicated.  So HW engineers will have their hands full and that's where people usually give up or opt to pass.

This single page covers some of the diffs fairly well but if interested in 65816, grade the 'Eyes' book on Amazon, it's printed on 'white pages' paper, if that means anything you : ) https://apprize.best/programming/65816/23.html

 

 


X16 Booted on 65816

Posted: Tue Sep 13, 2022 6:19 pm
by EMwhite

I do need to caution that the link above, while useful, is an absolute nightmare of ads.  Probably the worst I've seen but it's still worth a quick look, maybe with an incognito browser window : )


X16 Booted on 65816

Posted: Tue Sep 13, 2022 7:01 pm
by BruceMcF


On 9/13/2022 at 1:18 PM, EMwhite said:




...The CPU indeed has a 24 bit adds bus (internally) so you'll need to get used to FF:FFFF addressing.  ...



In the above application, the upper 8 bits of the address bus are ignored. The richer set of instructions, more suitable for use in a general purpose 8bit computer than the 6502, are available, but the addressing would be the same 64KB memory map, HighRAM window and ROM window.

It is a better processor for assembly language programming, better for Forth programming, better for C programming, better for Pascal programming and better for Sweet16 programming, but the 65C02 has a smaller die mask.