Fenestra6502

For discussing the 65xx hardware itself or electronics projects.
hatsugai
Posts: 9
Joined: 10 Oct 2020

Fenestra6502

Post by hatsugai »

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
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Fenestra6502

Post by BigEd »

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.
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Fenestra6502

Post by Dr Jefyll »

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
hatsugai
Posts: 9
Joined: 10 Oct 2020

Re: Fenestra6502

Post by hatsugai »

Thank you for your kind comments.

hatsugai
Martin_H
Posts: 837
Joined: 08 Jan 2014

Re: Fenestra6502

Post by Martin_H »

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.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Fenestra6502

Post by barrym95838 »

prologue.JPG
benchmark.JPG
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)
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Fenestra6502

Post by BigEd »

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?
hatsugai
Posts: 9
Joined: 10 Oct 2020

Re: Fenestra6502

Post by hatsugai »

I fixed a number of mistakes on the schematic.

hatsugai
hatsugai
Posts: 9
Joined: 10 Oct 2020

Re: Fenestra6502

Post by hatsugai »

The benchmark result of MC6809 is corrected. (I miscopied.)

tarai: 54.421 sec -> 51.421 sec

hatsugai
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Fenestra6502

Post by BigEd »

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.
hatsugai
Posts: 9
Joined: 10 Oct 2020

Re: Fenestra6502

Post by hatsugai »

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
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: Fenestra6502

Post by drogon »

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
Last edited by drogon on Fri Oct 16, 2020 11:53 am, edited 1 time in total.
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Fenestra6502

Post by BigEd »

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...
hatsugai
Posts: 9
Joined: 10 Oct 2020

Re: Fenestra6502

Post by hatsugai »

I wrote a code generator of CCLV for MC6800 and measured the execution time of fib and tarai.

Image
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Fenestra6502

Post by BigEd »

Interesting! (Your CCLV repository is here.)
Post Reply