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

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Fenestra6502
PostPosted: Sat Oct 10, 2020 10:41 am 
Offline

Joined: Sat Oct 10, 2020 10:35 am
Posts: 9
Hi,

I made a 6502-based computer for high-level programming languages.
I also wrote a tiny compiler for the computer.

https://github.com/hatsugai/Fenestra6502

hatsugai


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Sat Oct 10, 2020 10:48 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Welcome! I came across a mention of your project yesterday and was intending to post about it.

It's a highly interesting idea:
Quote:
The circuit realizes "zero-page windows", which is similar to "register windows" adopted in several RISC processors. The circuit detects the instruction fetch of JSR/RTS and changes the mapping of zero-page on physical memory.


Very nice diagrams and explanation too - thanks for that and well done! (And thanks for choosing an open source license)

Several people here have a great interest in circuits which expand the capability of the 6502, and several have an interest in high level languages.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Sat Oct 10, 2020 11:38 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Welcome, hatsugai, and thanks for posting! (And thanks, Ed, for excerpting some highly pertinent detail, indispensable for an introductory post on the subject.)

hatsugai, I compliment you on the conception, execution and writeup of this project! It's a good idea that you've tidily implemented then carefully explained. Bravo!

(Off the top of my head, other circuits which expand the capability of the 6502 include Marc Brooks's radar controller, Acorn's in-house extended-address machine, and my KK Computer. Documentation is always a challenge, though, and I think I could learn a thing or two from hatsugai! :oops: )

cheers,
Jeff

_________________
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  
 Post subject: Re: Fenestra6502
PostPosted: Sat Oct 10, 2020 12:37 pm 
Offline

Joined: Sat Oct 10, 2020 10:35 am
Posts: 9
Thank you for your kind comments.

hatsugai


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Sat Oct 10, 2020 2:21 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
It's an interesting idea. You're basically creating a hardware data stack, which given the 6502's page zero addressing modes also acts like a register file.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Sat Oct 10, 2020 5:30 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1950
Location: Sacramento, CA, USA
Attachment:
prologue.JPG
prologue.JPG [ 26.26 KiB | Viewed 2416 times ]


Attachment:
benchmark.JPG
benchmark.JPG [ 30.4 KiB | Viewed 2416 times ]


It's easy to rationalize the results for all except the stock 65C02. This doesn't reflect well on the comparative abilities of cc65 to emit performant code (or is SDCC just unusually good?).

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Sat Oct 10, 2020 5:49 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
It might be saying that it's easier to make a performant C compiler for a Z80, but I think that's a different topic for this thread - a good idea for a new one perhaps?


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Wed Oct 14, 2020 7:17 am 
Offline

Joined: Sat Oct 10, 2020 10:35 am
Posts: 9
I fixed a number of mistakes on the schematic.

hatsugai


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Wed Oct 14, 2020 1:16 pm 
Offline

Joined: Sat Oct 10, 2020 10:35 am
Posts: 9
The benchmark result of MC6809 is corrected. (I miscopied.)

tarai: 54.421 sec -> 51.421 sec

hatsugai


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Wed Oct 14, 2020 5:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Thanks for the update! You might see the discussion over here
viewtopic.php?p=78840
using fib and tarai benchmarks on various platforms.

I had to look up the tarai benchmark:
https://en.wikipedia.org/wiki/Tak_(function)
Quote:
...tarai is short for tarai mawashi, "to pass around" in Japanese.
John McCarthy named this function tak() after Takeuchi

But note that tak() is subtly different from tarai(). See also this pdf.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Fri Oct 16, 2020 12:51 am 
Offline

Joined: Sat Oct 10, 2020 10:35 am
Posts: 9
Thank you for the information.

I was surprised to see the deep discussions.

I seem the tarai function is suitable for this kind of benchmarks, especially for measuring the performance of procedure/function calls.

Dr. Ikuo Takeuchi, the inventor of the tarai function, is famous as a Lisp hacker (one of the developper of TAO and NUE). It is said that tak version is McCarthy's mistake.

By the way, I made a MC6800 SBC (MC68B00, 2MHz) to compare the performance with Fenestra 6502 and others. Does anybody know if there is a C compiler for MC6800? If not, I will write a code generator of CCLV for MC6800.

hatsugai


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Fri Oct 16, 2020 7:04 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
BigEd wrote:
Thanks for the update! You might see the discussion over here
viewtopic.php?p=78840
using fib and tarai benchmarks on various platforms.

I had to look up the tarai benchmark:
https://en.wikipedia.org/wiki/Tak_(function)
Quote:
...tarai is short for tarai mawashi, "to pass around" in Japanese.
John McCarthy named this function tak() after Takeuchi

But note that tak() is subtly different from tarai(). See also this pdf.


Decided to post a bigger benchmark post and moved this one over to it - everything you wanted to know about benchmarking (well... maybe not everything!) is here:
viewtopic.php?f=1&t=6323

-gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Last edited by drogon on Fri Oct 16, 2020 11:53 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Fri Oct 16, 2020 8:55 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
hatsugai wrote:
Does anybody know if there is a C compiler for MC6800? If not, I will write a code generator of CCLV for MC6800.
hatsugai

I think there might not be one. (HP had one which ran on their Unix workstations and on VAX/VMS, but getting that working would be difficult.)

A new code generator could be of interest to many...


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Tue Oct 20, 2020 5:06 am 
Offline

Joined: Sat Oct 10, 2020 10:35 am
Posts: 9
I wrote a code generator of CCLV for MC6800 and measured the execution time of fib and tarai.

Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Fenestra6502
PostPosted: Tue Oct 20, 2020 8:17 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Interesting! (Your CCLV repository is here.)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

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