Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Freedom is still the most radical idea of all." -- Nathaniel Branden


devel / comp.arch / Re: Could we build a better 6502?

SubjectAuthor
* Could we build a better 6502?Thomas Koenig
+* Re: Could we build a better 6502?Quadibloc
|+* Re: Could we build a better 6502?John Levine
||+* Re: Could we build a better 6502?MitchAlsup
|||`* Re: Could we build a better 6502?aph
||| `* Re: Could we build a better 6502?Anton Ertl
|||  `* Re: Could we build a better 6502?MitchAlsup
|||   +- Re: Could we build a better 6502?Thomas Koenig
|||   +- Re: Could we build a better 6502?Anton Ertl
|||   `* Re: Could we build a better 6502?Quadibloc
|||    `* Re: Could we build a better 6502?Thomas Koenig
|||     +* Re: Could we build a better 6502?Brian G. Lucas
|||     |`* Re: Could we build a better 6502?Quadibloc
|||     | +- Re: Could we build a better 6502?Brian G. Lucas
|||     | `- Re: Could we build a better 6502?Anton Ertl
|||     +* Re: Could we build a better 6502?Stephen Fuld
|||     |+- Re: Could we build a better 6502?Terje Mathisen
|||     |`* Re: Could we build a better 6502?pec...@gmail.com
|||     | +* Re: Could we build a better 6502?MitchAlsup
|||     | |+* Re: Could we build a better 6502?pec...@gmail.com
|||     | ||`* Re: Could we build a better 6502?Stephen Fuld
|||     | || `- Re: Could we build a better 6502?pec...@gmail.com
|||     | |`* Re: Could we build a better 6502?Timothy McCaffrey
|||     | | +- Re: Could we build a better 6502?Michael Barry
|||     | | `* Re: Could we build a better 6502?Thomas Koenig
|||     | |  `* Re: Could we build a better 6502?Timothy McCaffrey
|||     | |   +* Re: Could we build a better 6502?pec...@gmail.com
|||     | |   |`* Re: Could we build a better 6502?Michael Barry
|||     | |   | `- Re: Could we build a better 6502?Thomas Koenig
|||     | |   `* Re: Could we build a better 6502?chris
|||     | |    `* Re: Could we build a better 6502?pec...@gmail.com
|||     | |     +* Re: Could we build a better 6502?MitchAlsup
|||     | |     |`- Re: Could we build a better 6502?Thomas Koenig
|||     | |     `* Re: Could we build a better 6502?chris
|||     | |      `* Re: Could we build a better 6502?George Neuner
|||     | |       `* Re: Could we build a better 6502?chris
|||     | |        +* Re: Could we build a better 6502?MitchAlsup
|||     | |        |`* Re: Could we build a better 6502?Thomas Koenig
|||     | |        | +- Re: Could we build a better 6502?Bernd Linsel
|||     | |        | `* Re: Could we build a better 6502?David Brown
|||     | |        |  `* Re: Could we build a better 6502?chris
|||     | |        |   `* Re: Could we build a better 6502?David Brown
|||     | |        |    `* Re: Could we build a better 6502?Terje Mathisen
|||     | |        |     `* Re: Could we build a better 6502?Thomas Koenig
|||     | |        |      `- Re: Could we build a better 6502?Terje Mathisen
|||     | |        `* Re: Could we build a better 6502?Al Grant
|||     | |         `- Re: Could we build a better 6502?chris
|||     | `* Re: Could we build a better 6502?Thomas Koenig
|||     |  +- Re: Could we build a better 6502?MitchAlsup
|||     |  +- Re: Could we build a better 6502?pec...@gmail.com
|||     |  +* Re: Could we build a better 6502?Thomas Koenig
|||     |  |+* Re: Could we build a better 6502?Stefan Monnier
|||     |  ||`* Re: Could we build a better 6502?Ivan Godard
|||     |  || `* Re: Could we build a better 6502?Stefan Monnier
|||     |  ||  `* Re: Could we build a better 6502?John Dallman
|||     |  ||   +- Re: Could we build a better 6502?Stefan Monnier
|||     |  ||   +* Re: Could we build a better 6502?pec...@gmail.com
|||     |  ||   |`- Re: Could we build a better 6502?Ivan Godard
|||     |  ||   `- Re: Could we build a better 6502?Stephen Fuld
|||     |  |`* Re: Could we build a better 6502?pec...@gmail.com
|||     |  | `* Re: Could we build a better 6502?Thomas Koenig
|||     |  |  `- Re: Could we build a better 6502?pec...@gmail.com
|||     |  `* Re: Could we build a better 6502?Thomas Koenig
|||     |   +* Re: Could we build a better 6502?Anton Ertl
|||     |   |+* Re: Could we build a better 6502?Thomas Koenig
|||     |   ||`* Re: Could we build a better 6502?pec...@gmail.com
|||     |   || `- Re: Could we build a better 6502?MitchAlsup
|||     |   |`* Re: Could we build a better 6502?David Schultz
|||     |   | +* Re: Could we build a better 6502?Anton Ertl
|||     |   | |`- Re: Could we build a better 6502?David Schultz
|||     |   | `* Re: Could we build a better 6502?MitchAlsup
|||     |   |  `* Re: Could we build a better 6502?pec...@gmail.com
|||     |   |   `- Re: Could we build a better 6502?MitchAlsup
|||     |   `- Re: Could we build a better 6502?MitchAlsup
|||     `* Re: Could we build a better 6502?Anton Ertl
|||      `* Re: Could we build a better 6502?Thomas Koenig
|||       `* Re: Could we build a better 6502?MitchAlsup
|||        +* Re: Could we build a better 6502?Marcus
|||        |+* Re: Could we build a better 6502?MitchAlsup
|||        ||`* Re: Could we build a better 6502?Thomas Koenig
|||        || `- Re: Could we build a better 6502?Anton Ertl
|||        |`- Re: Could we build a better 6502?Thomas Koenig
|||        `- Re: Could we build a better 6502?Thomas Koenig
||+* Re: Could we build a better 6502?Quadibloc
|||`- Re: Could we build a better PDP-8, was 6502?John Levine
||`- Re: Could we build a better 6502?Tim Rentsch
|`* Re: Could we build a better 6502?Quadibloc
| +* Re: Could we build a better 6502?Thomas Koenig
| |`* Re: Could we build a better 6502?Anton Ertl
| | `* Re: Could we build a better 6502?David Schultz
| |  `* Re: Could we build a better 6502?Brett
| |   `* Re: Could we build a better 6502?David Schultz
| |    `* Re: Could we build a better 6502?Brett
| |     `* Re: Could we build a better 6502?David Schultz
| |      `* Re: Could we build a better 6502?Brett
| |       `- Re: Could we build a better 6502?David Schultz
| +* Re: Could we build a better 6502?Stefan Monnier
| |`* Re: Could we build a better 6502?Thomas Koenig
| | +* Re: Could we build a better 6502?Stefan Monnier
| | |+* Re: Could we build a better 6502?MitchAlsup
| | ||`- Re: Could we build a better 6502?pec...@gmail.com
| | |`* Re: Could we build a better 6502?pec...@gmail.com
| | +- Re: Could we build a better 6502?MitchAlsup
| | `* Re: Could we build a better 6502?pec...@gmail.com
| `- Re: Could we build a better 6502?MitchAlsup
+* Re: Could we build a better 6502?Marcus
+* Re: Could we build a better 6502?MitchAlsup
+* Re: Could we build a better 6502?EricP
+* Re: Could we build a better 6502?Guillaume
+- Re: Could we build a better 6502?EricP
+* Re: Could we build a better 6502?Timothy McCaffrey
+- Re: Could we build a better 6502?JimBrakefield
+* Re: Could we build a better 6502?Anssi Saari
+* Re: Could we build a better 6502?John Dallman
+* Re: Could we build a better 6502?Anton Ertl
+* Re: Could we build a better 6502?Michael Barry
+* Re: Could we build a better 6502?pec...@gmail.com
+* Re: Could we build a better 6502?Bernd Linsel
+- Re: Could we build a better 6502?clamky
+* Re: Could we build a better 6502?Quadibloc
`- Re: Could we build a better 6502?Quadibloc

Pages:12345678910111213
Re: Could we build a better 6502?

<b2c5e723-bf5c-401f-ba6b-cbd1c40eb7a7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19526&group=comp.arch#19526

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:73c9:: with SMTP id v9mr17432217qtp.214.1627981905702;
Tue, 03 Aug 2021 02:11:45 -0700 (PDT)
X-Received: by 2002:a05:6808:10d5:: with SMTP id s21mr13571839ois.7.1627981905424;
Tue, 03 Aug 2021 02:11:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 3 Aug 2021 02:11:45 -0700 (PDT)
In-Reply-To: <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:bd00:a1a0:cd43:6c2c:1297:d04a;
posting-account=LutruAoAAAATsnFU5eS3mBdP_JaNBOzH
NNTP-Posting-Host: 2600:1700:bd00:a1a0:cd43:6c2c:1297:d04a
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com>
<sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com>
<g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at>
<cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com>
<se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b2c5e723-bf5c-401f-ba6b-cbd1c40eb7a7n@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: barrym95...@yahoo.com (Michael Barry)
Injection-Date: Tue, 03 Aug 2021 09:11:45 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Michael Barry - Tue, 3 Aug 2021 09:11 UTC

On Monday, August 2, 2021 at 2:13:38 PM UTC-7, ******@aol.com wrote:
> I don't know what the sequencing logic overhead would be (probably too much), but consider:
> Get rid of the direct page.
> Make the SP 16 bits.
> Instead of the DP, change most DP addressing to be SP+(unsigned) offsets.
> I'm not real familar with the 6502 ISA, but I think you should be able to do something
> like: LDA [SP+offset],X
> which adds offset to SP, loads the 16 bit address, adds X to it and loads A from the resulting address.
> Since all this is on the stack, instantly gets rid off all the DP allocation contention.
> It is also MUCH friendlier to generated code from compilers.
> The stack based values end up acting like registers, and if you want to make things faster, start caching the stack...
>
> (I know, everyone liked to put MMIO devices in the DP. Great for the embedded market, not so much for general computing).
>
> - Tim

The 65c816 added a 16-bit S, and (d8,S),Y and d8,S addressing modes that could be quite useful, but it also added a bunch of other stuff that never really flipped my switch.

Re: Could we build a better 6502?

<sebq08$ht9$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19528&group=comp.arch#19528

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-c228-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Tue, 3 Aug 2021 16:14:00 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sebq08$ht9$1@newsreader4.netcologne.de>
References: <sde7eg$hgb$1@newsreader4.netcologne.de>
<be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com>
<sdhkr7$15vg$1@gal.iecc.com>
<7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com>
<g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com>
<2021Jul27.194213@mips.complang.tuwien.ac.at>
<cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com>
<868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com>
<se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
Injection-Date: Tue, 3 Aug 2021 16:14:00 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-c228-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:c228:0:7285:c2ff:fe6c:992d";
logging-data="18345"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Tue, 3 Aug 2021 16:14 UTC

Timothy McCaffrey <timcaffrey@aol.com> schrieb:

> I don't know what the sequencing logic overhead would be (probably too much), but consider:
> Get rid of the direct page.

Agreed.

> Make the SP 16 bits.

I would probably try to limit the special registers as far as
possible, to save transistors. Having a stack pointer (other
than just using that as a convention for a regular register)
would entail something like an auto-increment.

> Instead of the DP, change most DP addressing to be SP+(unsigned) offsets.

What is a DP?

> I'm not real familar with the 6502 ISA, but I think you should be able to do something
> like: LDA [SP+offset],X
> which adds offset to SP, loads the 16 bit address, adds X to it and loads A from the resulting address.
> Since all this is on the stack, instantly gets rid off all the DP allocation contention.
> It is also MUCH friendlier to generated code from compilers.

That was certainly not a concern at the time :-)

> The stack based values end up acting like registers, and if you want to make things faster, start caching the stack...
>
> (I know, everyone liked to put MMIO devices in the DP. Great for the embedded market, not so much for general computing).

Memory-mapped IO? Not sure what you mean here.

Re: Could we build a better 6502?

<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19536&group=comp.arch#19536

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:9244:: with SMTP id u65mr22260571qkd.46.1628023148888;
Tue, 03 Aug 2021 13:39:08 -0700 (PDT)
X-Received: by 2002:a4a:ea83:: with SMTP id r3mr15852379ooh.89.1628023148588;
Tue, 03 Aug 2021 13:39:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 3 Aug 2021 13:39:07 -0700 (PDT)
In-Reply-To: <sebq08$ht9$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=73.188.126.34; posting-account=ujX_IwoAAACu0_cef9hMHeR8g0ZYDNHh
NNTP-Posting-Host: 73.188.126.34
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com>
<sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com>
<g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at>
<cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com>
<se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: timcaff...@aol.com (Timothy McCaffrey)
Injection-Date: Tue, 03 Aug 2021 20:39:08 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Timothy McCaffrey - Tue, 3 Aug 2021 20:39 UTC

On Tuesday, August 3, 2021 at 12:14:02 PM UTC-4, Thomas Koenig wrote:
> Timothy McCaffrey <timca...@aol.com> schrieb:
> > I don't know what the sequencing logic overhead would be (probably too much), but consider:
> > Get rid of the direct page.
> Agreed.
> > Make the SP 16 bits.
> I would probably try to limit the special registers as far as
> possible, to save transistors. Having a stack pointer (other
> than just using that as a convention for a regular register)
> would entail something like an auto-increment.
Well, the 6502 already had a stack pointer, it was just 8 bits.

> > Instead of the DP, change most DP addressing to be SP+(unsigned) offsets.
> What is a DP?
Direct Page, or the first 256 bytes.
> > I'm not real familar with the 6502 ISA, but I think you should be able to do something
> > like: LDA [SP+offset],X
> > which adds offset to SP, loads the 16 bit address, adds X to it and loads A from the resulting address.
> > Since all this is on the stack, instantly gets rid off all the DP allocation contention.
> > It is also MUCH friendlier to generated code from compilers.
> That was certainly not a concern at the time :-)

Yes, it wasn't. Part of the trick of building a better CPU with modern knowledge is knowing that
such a thing *should* have been a concern.

> > The stack based values end up acting like registers, and if you want to make things faster, start caching the stack...
> >
> > (I know, everyone liked to put MMIO devices in the DP. Great for the embedded market, not so much for general computing).
> Memory-mapped IO? Not sure what you mean here.
The 6800, 6502, & 68000 all used memory mapped I/O (a portion of the memory space was carved out by external logic so
it generated I/O selects instead of memory). The 8080, et al, used a dedicated signal (and instructions) to indicate I/O read/writes.
Boards using the 6800 & 6502 typically used at least part of the DP for I/O ports. This was especially true for SOCs.
For an embedded board it made sense as it could help reduce program space it a tightly constrained memory.

- Tim

Re: Could we build a better 6502?

<042011ce-d4b6-46eb-b459-2535255879c6n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19538&group=comp.arch#19538

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:1704:: with SMTP id h4mr20899578qtk.346.1628037331160; Tue, 03 Aug 2021 17:35:31 -0700 (PDT)
X-Received: by 2002:a05:6830:409e:: with SMTP id x30mr7279984ott.329.1628037330919; Tue, 03 Aug 2021 17:35:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 3 Aug 2021 17:35:30 -0700 (PDT)
In-Reply-To: <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.173.72.76; posting-account=zjh_fgoAAABo0Nzgf6peaFtS6c-3xdgr
NNTP-Posting-Host: 5.173.72.76
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com> <sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com> <g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at> <cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com> <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me> <ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com> <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de> <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <042011ce-d4b6-46eb-b459-2535255879c6n@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: pec...@gmail.com (pec...@gmail.com)
Injection-Date: Wed, 04 Aug 2021 00:35:31 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 43
 by: pec...@gmail.com - Wed, 4 Aug 2021 00:35 UTC

timca...@aol.com wrote:
> On Tuesday, August 3, 2021 at 12:14:02 PM UTC-4, Thomas Koenig wrote:
> > Timothy McCaffrey <timca...@aol.com> schrieb:
> > > I don't know what the sequencing logic overhead would be (probably too much), but consider:
> > > Get rid of the direct page.
> > Agreed.
But 16-bit direct page allows for easy frame creation (also in high level languages), allowing for efficient reentrant code.

> > > Make the SP 16 bits.
> > I would probably try to limit the special registers as far as
> > possible, to save transistors. Having a stack pointer (other
> > than just using that as a convention for a regular register)
> > would entail something like an auto-increment.
> Well, the 6502 already had a stack pointer, it was just 8 bits.
> > > Instead of the DP, change most DP addressing to be SP+(unsigned) offsets.
> > What is a DP?
> Direct Page, or the first 256 bytes.
> > > I'm not real familar with the 6502 ISA, but I think you should be able to do something
> > > like: LDA [SP+offset],X
> > > which adds offset to SP, loads the 16 bit address, adds X to it and loads A from the resulting address.
> > > Since all this is on the stack, instantly gets rid off all the DP allocation contention.
> > > It is also MUCH friendlier to generated code from compilers.

> > That was certainly not a concern at the time :-)
> Yes, it wasn't. Part of the trick of building a better CPU with modern knowledge is knowing that
> such a thing *should* have been a concern.
Not really. There were very well designed industrial ISA's like IBM/360 for "advanced IT", but we are talking about simple $25 microprocessor that was accidentally promoted to CPU role.
Compilers where inefficient, memory was expensive, so everything serious was written in assembler.
High level languages required 16 bit arithmetic, the common way was to write virtual machine (like SWEET16). Virtual machines offered much more expressive and compact assembler for the price of 10x slowdown.
The simplest way to improve 6502 in the context of high level languages is to make all registers and operations 16 bit, sacrificing 8 bit performance. This should allow to obtain code density comparable to VMs.
We should add new 16bit direct page, with optional optimization: pages having lower byte equal zero should change addition into concatenation during address generation (optimisation can be triggered by instruction).
BCD arithmetic should be replaced by instructions for data conversion.
The final result is a simplified 65816, using 16-bit addresses, 8-bit ALU and without 8-bit modes hell.

> > > The stack based values end up acting like registers, and if you want to make things faster, start caching the stack...
> > >
> > > (I know, everyone liked to put MMIO devices in the DP. Great for the embedded market, not so much for general computing).
> > Memory-mapped IO? Not sure what you mean here.
> The 6800, 6502, & 68000 all used memory mapped I/O (a portion of the memory space was carved out by external logic so
> it generated I/O selects instead of memory). The 8080, et al, used a dedicated signal (and instructions) to indicate I/O read/writes.
> Boards using the 6800 & 6502 typically used at least part of the DP for I/O ports. This was especially true for SOCs.
> For an embedded board it made sense as it could help reduce program space it a tightly constrained memory.
>
> - Tim

Re: Could we build a better 6502?

<sedrv8$1164$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19546&group=comp.arch#19546

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!jazQyxryRFiI4FEZ51SAvA.user.46.165.242.75.POSTED!not-for-mail
From: chris-no...@tridac.net (chris)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Wed, 04 Aug 2021 11:59:52 +0100
Organization: Aioe.org NNTP Server
Message-ID: <sedrv8$1164$1@gioia.aioe.org>
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com> <sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com> <g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at> <cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com> <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me> <ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com> <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de> <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="33988"; posting-host="jazQyxryRFiI4FEZ51SAvA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; SunOS sun4u; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: chris - Wed, 4 Aug 2021 10:59 UTC

On 08/03/21 21:39, Timothy McCaffrey wrote:
> On Tuesday, August 3, 2021 at 12:14:02 PM UTC-4, Thomas Koenig wrote:
>> Timothy McCaffrey<timca...@aol.com> schrieb:
>>> I don't know what the sequencing logic overhead would be (probably too much), but consider:
>>> Get rid of the direct page.
>> Agreed.
>>> Make the SP 16 bits.
>> I would probably try to limit the special registers as far as
>> possible, to save transistors. Having a stack pointer (other
>> than just using that as a convention for a regular register)
>> would entail something like an auto-increment.
> Well, the 6502 already had a stack pointer, it was just 8 bits.
>
>>> Instead of the DP, change most DP addressing to be SP+(unsigned) offsets.
>> What is a DP?
> Direct Page, or the first 256 bytes.
>>> I'm not real familar with the 6502 ISA, but I think you should be able to do something
>>> like: LDA [SP+offset],X
>>> which adds offset to SP, loads the 16 bit address, adds X to it and loads A from the resulting address.
>>> Since all this is on the stack, instantly gets rid off all the DP allocation contention.
>>> It is also MUCH friendlier to generated code from compilers.
>> That was certainly not a concern at the time :-)
>
> Yes, it wasn't. Part of the trick of building a better CPU with modern knowledge is knowing that
> such a thing *should* have been a concern.
>
>>> The stack based values end up acting like registers, and if you want to make things faster, start caching the stack...
>>>
>>> (I know, everyone liked to put MMIO devices in the DP. Great for the embedded market, not so much for general computing).
>> Memory-mapped IO? Not sure what you mean here.
> The 6800, 6502,& 68000 all used memory mapped I/O (a portion of the memory space was carved out by external logic so
> it generated I/O selects instead of memory). The 8080, et al, used a dedicated signal (and instructions) to indicate I/O read/writes.
> Boards using the 6800& 6502 typically used at least part of the DP for I/O ports. This was especially true for SOCs.
> For an embedded board it made sense as it could help reduce program space it a tightly constrained memory.
>
> - Tim

One trick to minimise address decode logic, at least
for the systems here, was to use the top address bit to
split code and io space at the top, with ram memory at
the bottom. Then, another simple decode with the next
address bit down to select either io device or code
space.

A lot of talk about a better 6502, but having spent
a couple of years programming asm for 6502 based
embedded systems, the architecture had more than enough
capability for the task. The indirect addressing modes
in particular, provided a sort of virtualised 16 bit
operation capability. Never had any issues with
page zero usage, or running out of space. We built
complex systems using 6502, some of which are
probably still in use.

All in all, brilliant piece of design work for it's
time...

Chris

Re: Could we build a better 6502?

<be321f93-45a5-48f6-9ae2-c04681140b0bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19553&group=comp.arch#19553

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:1349:: with SMTP id f9mr243020qtj.16.1628091792836;
Wed, 04 Aug 2021 08:43:12 -0700 (PDT)
X-Received: by 2002:a05:6808:aba:: with SMTP id r26mr2730139oij.30.1628091792635;
Wed, 04 Aug 2021 08:43:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 4 Aug 2021 08:43:12 -0700 (PDT)
In-Reply-To: <042011ce-d4b6-46eb-b459-2535255879c6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:bd00:a1a0:d4fa:957f:d11c:7368;
posting-account=LutruAoAAAATsnFU5eS3mBdP_JaNBOzH
NNTP-Posting-Host: 2600:1700:bd00:a1a0:d4fa:957f:d11c:7368
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com>
<sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com>
<g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at>
<cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com>
<se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <042011ce-d4b6-46eb-b459-2535255879c6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <be321f93-45a5-48f6-9ae2-c04681140b0bn@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: barrym95...@yahoo.com (Michael Barry)
Injection-Date: Wed, 04 Aug 2021 15:43:12 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Michael Barry - Wed, 4 Aug 2021 15:43 UTC

On Tuesday, August 3, 2021 at 5:35:32 PM UTC-7, ******@gmail.com wrote:
> The simplest way to improve 6502 in the context of high level languages is to make all registers
> and operations 16 bit, sacrificing 8 bit performance. This should allow to obtain code density
> comparable to VMs.

65org16 does something like that, by widening all bytes and data paths to 16-bits and leaving pretty
much everything else alone.

https://github.com/BigEd/CPU-65Org16

Re: Could we build a better 6502?

<seegck$d0t$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19554&group=comp.arch#19554

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-c228-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Wed, 4 Aug 2021 16:48:20 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <seegck$d0t$1@newsreader4.netcologne.de>
References: <sde7eg$hgb$1@newsreader4.netcologne.de>
<be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com>
<sdhkr7$15vg$1@gal.iecc.com>
<7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com>
<g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com>
<2021Jul27.194213@mips.complang.tuwien.ac.at>
<cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com>
<868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com>
<se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<042011ce-d4b6-46eb-b459-2535255879c6n@googlegroups.com>
<be321f93-45a5-48f6-9ae2-c04681140b0bn@googlegroups.com>
Injection-Date: Wed, 4 Aug 2021 16:48:20 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-c228-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:c228:0:7285:c2ff:fe6c:992d";
logging-data="13341"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 4 Aug 2021 16:48 UTC

Michael Barry <barrym95838@yahoo.com> schrieb:
> On Tuesday, August 3, 2021 at 5:35:32 PM UTC-7, ******@gmail.com wrote:
>> The simplest way to improve 6502 in the context of high level languages is to make all registers
>> and operations 16 bit, sacrificing 8 bit performance. This should allow to obtain code density
>> comparable to VMs.
>
> 65org16 does something like that, by widening all bytes and data paths to 16-bits and leaving pretty
> much everything else alone.

> https://github.com/BigEd/CPU-65Org16

Looking at this, it doesn't have a way to deal with bytes, so you
would have to execute eight shift instructions to get to the high
byte of a word. That does not sound practical.

Re: Could we build a better 6502?

<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19557&group=comp.arch#19557

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:8242:: with SMTP id e63mr412433qkd.294.1628096467257; Wed, 04 Aug 2021 10:01:07 -0700 (PDT)
X-Received: by 2002:a54:4194:: with SMTP id 20mr378790oiy.78.1628096467013; Wed, 04 Aug 2021 10:01:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 4 Aug 2021 10:01:06 -0700 (PDT)
In-Reply-To: <sedrv8$1164$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=5.173.72.76; posting-account=zjh_fgoAAABo0Nzgf6peaFtS6c-3xdgr
NNTP-Posting-Host: 5.173.72.76
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com> <sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com> <g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at> <cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com> <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me> <ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com> <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de> <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <sedrv8$1164$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: pec...@gmail.com (pec...@gmail.com)
Injection-Date: Wed, 04 Aug 2021 17:01:07 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 21
 by: pec...@gmail.com - Wed, 4 Aug 2021 17:01 UTC


> A lot of talk about a better 6502, but having spent
> a couple of years programming asm for 6502 based
> embedded systems, the architecture had more than enough
> capability for the task. The indirect addressing modes
> in particular, provided a sort of virtualised 16 bit
> operation capability. Never had any issues with
> page zero usage, or running out of space. We built
> complex systems using 6502, some of which are
> probably still in use.
So I have few questions for you:
1) What is the code-to-data ratio in the embedded 6502?
2) What is the ratio of 16-bit to 8-bit computations?
3) How often the performance was a limiting factor?
4) Could the 16-bit 6502 be a more convenient option (with support for 8 bit data)?
> All in all, brilliant piece of design work for it's
> time...
I wonder if we could do much better using modern layout optimization tools.

>
> Chris

Re: Could we build a better 6502?

<9e877062-f6e7-44d4-9061-4677369f1f37n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19563&group=comp.arch#19563

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:29cf:: with SMTP id s15mr1046656qkp.363.1628105755953;
Wed, 04 Aug 2021 12:35:55 -0700 (PDT)
X-Received: by 2002:a05:6808:5d3:: with SMTP id d19mr8166218oij.155.1628105755760;
Wed, 04 Aug 2021 12:35:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 4 Aug 2021 12:35:55 -0700 (PDT)
In-Reply-To: <b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:1fa:9c49:66c4:5e6;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:1fa:9c49:66c4:5e6
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com>
<sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com>
<g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at>
<cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com>
<se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9e877062-f6e7-44d4-9061-4677369f1f37n@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 04 Aug 2021 19:35:55 +0000
Content-Type: text/plain; charset="UTF-8"
 by: MitchAlsup - Wed, 4 Aug 2021 19:35 UTC

On Wednesday, August 4, 2021 at 12:01:08 PM UTC-5, pec...@gmail.com wrote:
> > A lot of talk about a better 6502, but having spent
> > a couple of years programming asm for 6502 based
> > embedded systems, the architecture had more than enough
> > capability for the task. The indirect addressing modes
> > in particular, provided a sort of virtualised 16 bit
> > operation capability. Never had any issues with
> > page zero usage, or running out of space. We built
> > complex systems using 6502, some of which are
> > probably still in use.
> So I have few questions for you:
> 1) What is the code-to-data ratio in the embedded 6502?
> 2) What is the ratio of 16-bit to 8-bit computations?
> 3) How often the performance was a limiting factor?
> 4) Could the 16-bit 6502 be a more convenient option (with support for 8 bit data)?
> > All in all, brilliant piece of design work for it's
> > time...
> I wonder if we could do much better using modern layout optimization tools.
<
I have been watching this thread develop with various people proposing
adding this or dropping that. I have slowly come to the following conclusion:
<
a) this was a design that prospered in the realm of embarrassing frugality,
There is not a SINGLE flip-flop in the design, there is no clock tree, there is
no scan path,...........it is delicious in its simplicity.
<
b) modern tools know nothing of this realm and impose a huge burden on
designs targeting this corner of the design space.
<
c) the concept that we, who have exploited billions of transistors, could perform
well in the ares of a handful of thousands of transistors is ludicrous. That we
who have dozens of metal layers could "do" a design with only 1 is also ludicrous.
No modern "tool" software can operate in this realm
<
d) Modern design software (Verilog, simulators, FPGA breadboarding)
is all designed to help those with industrial scale issues, not those of
"significantly smaller than a modern hobbiest"
<
I take my hat off to them; And give them a well deserved bow !
<
{All of the above apply to me as much as anyone else in this forum--excepting
perhaps BGB}.
>
> >
> > Chris

Re: Could we build a better 6502?

<sef71f$v5s$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19571&group=comp.arch#19571

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!jazQyxryRFiI4FEZ51SAvA.user.46.165.242.75.POSTED!not-for-mail
From: chris-no...@tridac.net (chris)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Thu, 05 Aug 2021 00:14:55 +0100
Organization: Aioe.org NNTP Server
Message-ID: <sef71f$v5s$1@gioia.aioe.org>
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <be7f8928-ee11-422e-b11e-f89d3ad39782n@googlegroups.com> <sdhkr7$15vg$1@gal.iecc.com> <7ba1c011-0d7a-40f3-b690-a729134ac9ecn@googlegroups.com> <g6Odnbe33KUHVWL9nZ2dnUU78U_NnZ2d@supernews.com> <2021Jul27.194213@mips.complang.tuwien.ac.at> <cee262df-cecf-4111-a213-6341934e564dn@googlegroups.com> <868dc60e-0882-44af-a545-c875f59553f3n@googlegroups.com> <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me> <ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com> <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de> <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <sedrv8$1164$1@gioia.aioe.org> <b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="31932"; posting-host="jazQyxryRFiI4FEZ51SAvA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; SunOS sun4u; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: chris - Wed, 4 Aug 2021 23:14 UTC

On 08/04/21 18:01, pec...@gmail.com wrote:

> So I have few questions for you:
> 1) What is the code-to-data ratio in the embedded 6502?

No idea, not sure if anyone considered such issues at the
time. While it only had a 16 bit address space, program
memory eproms were typically 1k or 2K x 8 and the programs
were quite small. For those really fluent in asm, a lot
can be done in just a few lines of code.

> 2) What is the ratio of 16-bit to 8-bit computations?

Again, no idea, but like pointers and C, once the indirect
modes were understood, it opened up a world of possibilities
in terms of data structures, lists and more.

> 3) How often the performance was a limiting factor?

Never on the projects I worked on. One such app was frame
accurate video controller for medical imaging. The frame
pulse synced timecode function for that used two interrupt
driven timers to generate the phase encoded waveform in
real time. Corrections were needed to take account of the
interrupt processing times, but that was the closest
we got to a hard limit on capability.

> 4) Could the 16-bit 6502 be a more convenient option (with support for 8 bit data)?

Western Design Center did a 16 bit version, as used in the
Apple IIC, but never used it in any project. For the
sort of embedded app worked on here, 6502 was more than
capable of getting the job done. Expectations were
different, in that most programming was done in asm. Did
buy the Manx C compiler or the Apple II later, but the output
code from that was dreadful, pages and pages of really bad
code that showed no understanding of the underlying strengths
of the architecture. Glacial in performance as well.

>> All in all, brilliant piece of design work for it's
>> time...
> I wonder if we could do much better using modern layout optimization tools

Iirc, it has been used as a core in some gate arrays, but
don't have details.

So much capability in modern micros, with compilers often producing
a single line of asm per line of C. A different world altogether...

Chris

>
>>
>> Chris

Re: Could we build a better 6502?

<r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19583&group=comp.arch#19583

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: gneun...@comcast.net (George Neuner)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Thu, 05 Aug 2021 13:28:20 -0400
Organization: A noiseless patient Spider
Lines: 96
Message-ID: <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
References: <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me> <ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com> <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de> <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <sedrv8$1164$1@gioia.aioe.org> <b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com> <sef71f$v5s$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="56b7198bf310963ac228dbed123f6b6d";
logging-data="9790"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18g2UvYpuCMQhcFedAbNvivthhirQecqEs="
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:rlQ1T9ng5vgwF9Oow92wzqfa0zY=
 by: George Neuner - Thu, 5 Aug 2021 17:28 UTC

On Thu, 05 Aug 2021 00:14:55 +0100, chris <chris-nospam@tridac.net>
wrote:

>> 4) Could the 16-bit 6502 be a more convenient option (with support for 8 bit data)?
>
>Western Design Center did a 16 bit version, as used in the
>Apple IIC, ...

The Apple //c used a WDC 65c02, but that chip was not 16-bit.

WDC had two 16-bit versions - 65c816 and 65c802 - which internally
were identical but differed in packaging: the 65c816 was 44-pin QFP,
the 65c802 was a 40-pin DIP that was pin and signal compatible with
65c02.

Both chips were selectable for 8 or 16 bit mode. In 8-bit mode they
behaved like a 65c02 but with some additional reg->reg and block move
instructions.

In 16-bit mode A,X,Y,D and S were extended to 16 bits, and two 8-bit
bank registers: PBR and DBR, allowed for 24-bit code and/or data
addresses. The stack and direct page were hard-wired to bank 00 [1st
64KB of memory], but were relocatable within the bank, and the stack
(theoretically at least) could expand up to 64KB.

Compilers for these chips typically overlaid the direct page on the
current stack frame, (ab)using the D register as a frame pointer.

Even the 65c802 programs could use 24-bit addresses - they just
wouldn't work outside of bank 00. For signal compatibility with 65c02
the 65c802 brought only the lower 16 address bits to the bus.

The 65c816 had additional signal lines for use with external cache.
Some of the Apple //gs accelerator boards did make use of them.

>... but never used it in any project. For the
>sort of embedded app worked on here, 6502 was more than
>capable of getting the job done. Expectations were
>different, in that most programming was done in asm. Did
>buy the Manx C compiler for the Apple II later, but the output
>code from that was dreadful, pages and pages of really bad
>code that showed no understanding of the underlying strengths
>of the architecture. Glacial in performance as well.

I also used the Manx compiler. The code quality certainly was not
comparable to good asm, but I have to question your characterization
of it as 'dreadful'.

Given the time period (~1986) and the limitations of the target, I
would characterize Manx's compiler as 'not bad': it generated
reasonably straight forward templated code, and then performed some
peep-hole optimization on the assembler.

I particularly appreciated Manx's ability to mix bytecode and native
code in the same program - letting you tune the program for function
vs speed without resorting to overlays (which also were supported).
The bytecode interpreter was pretty well designed with six 16-bit
registers, was reasonably quick (again considering the target), and
had its own assembler so you could write code for it directly.

Manx was usable with 2 floppy drives: each pass of its compiler was a
separate program, so you could run one pass over all the source (or
IR) files before having to change program disks for the next pass.
Assuming all the source and temp files fit onto 1 data disk, building
a program from multiple source files required only a couple of disk
swaps.

Manx's bytecode compiler fit onto the same program disk as the linker,
so it could be used without any disk swapping, allowing at least to
check your code would compile before mucking around with the native
compiler.

Another plus was that Manx bytecode was portable to any supported
chip. They had compilers for 6502, 6800, Z80 and 8086/88 that all
recognized the same object and overlay file formats. You could
compile a program to bytecode on /any/ supported chip and then link
with a target specific library to create a working program. Overlay
files that contained only bytecode were directly usable by any target.

Orca's native compiler unquestionably produced better code, but it
used overlays loaded from multiple program disks - using it from
floppies [though technically possible] required multiple disk swaps
/per/ source file ... it simply was impractical to use sans hard disk.
It also was a /lot/ more expensive than Manx and there was no bytecode
version.

Using Orca on Apple // was similar to using Whitesmith on Z80 ... a
painful experience at best.

YMMV, but I managed quite a lot with the Manx compiler.

Re: Could we build a better 6502?

<sehqk6$la0$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19586&group=comp.arch#19586

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!jazQyxryRFiI4FEZ51SAvA.user.46.165.242.75.POSTED!not-for-mail
From: chris-no...@tridac.net (chris)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Fri, 06 Aug 2021 00:01:26 +0100
Organization: Aioe.org NNTP Server
Message-ID: <sehqk6$la0$1@gioia.aioe.org>
References: <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me> <ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com> <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de> <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <sedrv8$1164$1@gioia.aioe.org> <b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com> <sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="21824"; posting-host="jazQyxryRFiI4FEZ51SAvA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; SunOS sun4u; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: chris - Thu, 5 Aug 2021 23:01 UTC

On 08/05/21 18:28, George Neuner wrote:

>
>
> YMMV, but I managed quite a lot with the Manx compiler.

Many of those who worked with microprocessors in the late 70's
came to the subject from an electronics hardware background, with
little or no computer science knowledge, nor appreciation of data
structures, algorithms, or os theory. That was the situation here.
Primarily analog hardware design background, with some digital
logic design using ssi devices. The solution was to buy
comp sci books to get a proper grounding in the subject. Bought
a Kim 1 working in the US in 1977 for $100, from memory and what
a subversive little machine that was, in terms of effect.

You saw far more in the wdc effort than I did and the same for
the Manx C complier. 6502 was off the shelf here in the uk, well
supported and understood, while wdc was far away and don't
remember if there was even a uk agent for the devices. Iirc, I
did a grey import to the uk for Manx C, probably after seeing
it advertised in Byte mag, and also having been fired up by
things like the AT&T programmers workbench report, blue book,
which seemed like another world. Still an asm programmer, didn't
really have the knowledge base at the time to make best use of
it, wasn't impressed with the code it produced and eventually
gave up. Of course, that is not the only metric and perhaps I
should have made more effort with it. Looking back, the 6502
was a serious effort to get as much minicomputer capability in
to a cheap 8 bit machine and that and other 8 bit micros started
the wave that killed the mini computer market.

After all that, Motorola released the 68000 series, and the
world changed forever...

Re: Could we build a better 6502?

<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19587&group=comp.arch#19587

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:240a:: with SMTP id fv10mr8459174qvb.11.1628208311119;
Thu, 05 Aug 2021 17:05:11 -0700 (PDT)
X-Received: by 2002:a05:6808:6cc:: with SMTP id m12mr13171514oih.51.1628208310818;
Thu, 05 Aug 2021 17:05:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Thu, 5 Aug 2021 17:05:10 -0700 (PDT)
In-Reply-To: <sehqk6$la0$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:64bc:2acd:2f93:f3a2;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:64bc:2acd:2f93:f3a2
References: <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com> <sef71f$v5s$1@gioia.aioe.org>
<r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com> <sehqk6$la0$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 06 Aug 2021 00:05:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: MitchAlsup - Fri, 6 Aug 2021 00:05 UTC

On Thursday, August 5, 2021 at 6:01:29 PM UTC-5, chris wrote:
> On 08/05/21 18:28, George Neuner wrote:
>
> >
> >
> > YMMV, but I managed quite a lot with the Manx compiler.
> Many of those who worked with microprocessors in the late 70's
> came to the subject from an electronics hardware background, with
> little or no computer science knowledge, nor appreciation of data
> structures, algorithms, or os theory.
<
These were the very same people who invented the XOR trick with
linked list pointers--saving ½ of the pointer space in data structures..
<
> That was the situation here.
> Primarily analog hardware design background, with some digital
> logic design using ssi devices. The solution was to buy
> comp sci books to get a proper grounding in the subject. Bought
> a Kim 1 working in the US in 1977 for $100, from memory and what
> a subversive little machine that was, in terms of effect.
>
> You saw far more in the wdc effort than I did and the same for
> the Manx C complier. 6502 was off the shelf here in the uk, well
> supported and understood, while wdc was far away and don't
> remember if there was even a uk agent for the devices. Iirc, I
> did a grey import to the uk for Manx C, probably after seeing
> it advertised in Byte mag, and also having been fired up by
> things like the AT&T programmers workbench report, blue book,
> which seemed like another world. Still an asm programmer, didn't
> really have the knowledge base at the time to make best use of
> it, wasn't impressed with the code it produced and eventually
> gave up. Of course, that is not the only metric and perhaps I
> should have made more effort with it. Looking back, the 6502
> was a serious effort to get as much minicomputer capability in
> to a cheap 8 bit machine and that and other 8 bit micros started
> the wave that killed the mini computer market.
>
> After all that, Motorola released the 68000 series, and the
> world changed forever...

Re: Could we build a better 6502?

<seiijs$50o$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19589&group=comp.arch#19589

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Fri, 6 Aug 2021 05:50:52 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <seiijs$50o$1@newsreader4.netcologne.de>
References: <se1hvt$li9$1@newsreader4.netcologne.de>
<se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
<sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
<sehqk6$la0$1@gioia.aioe.org>
<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 6 Aug 2021 05:50:52 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3b2f:0:7285:c2ff:fe6c:992d";
logging-data="5144"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 6 Aug 2021 05:50 UTC

MitchAlsup <MitchAlsup@aol.com> schrieb:
> On Thursday, August 5, 2021 at 6:01:29 PM UTC-5, chris wrote:
>> On 08/05/21 18:28, George Neuner wrote:
>>
>> >
>> >
>> > YMMV, but I managed quite a lot with the Manx compiler.
>> Many of those who worked with microprocessors in the late 70's
>> came to the subject from an electronics hardware background, with
>> little or no computer science knowledge, nor appreciation of data
>> structures, algorithms, or os theory.
><
> These were the very same people who invented the XOR trick with
> linked list pointers--saving ½ of the pointer space in data structures.

I didn't know that one - nice hack.

You could use this for Fortran's unformatted files too, which are
(usually) similar to doubly linked lists except that it uses the
record length and not the address of the following data.

Maybe it's a good thing that I didn't learn about this before.

Re: Could we build a better 6502?

<seil53$6ag$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19590&group=comp.arch#19590

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a544-189e-0-4047-a645-6917-9432.ipv6dyn.netcologne.de!not-for-mail
From: bl1-remo...@gmx.com (Bernd Linsel)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Fri, 6 Aug 2021 08:34:10 +0200
Organization: news.netcologne.de
Distribution: world
Message-ID: <seil53$6ag$1@newsreader4.netcologne.de>
References: <se1hvt$li9$1@newsreader4.netcologne.de>
<se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
<sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
<sehqk6$la0$1@gioia.aioe.org>
<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
<seiijs$50o$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 6 Aug 2021 06:34:11 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a544-189e-0-4047-a645-6917-9432.ipv6dyn.netcologne.de:2a0a:a544:189e:0:4047:a645:6917:9432";
logging-data="6480"; mail-complaints-to="abuse@netcologne.de"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
In-Reply-To: <seiijs$50o$1@newsreader4.netcologne.de>
 by: Bernd Linsel - Fri, 6 Aug 2021 06:34 UTC

On 06.08.2021 07:50, Thomas Koenig wrote:
> MitchAlsup <MitchAlsup@aol.com> schrieb:
>
> I didn't know that one - nice hack.
>
> You could use this for Fortran's unformatted files too, which are
> (usually) similar to doubly linked lists except that it uses the
> record length and not the address of the following data.
>
> Maybe it's a good thing that I didn't learn about this before.
>

It is only useful when you are iterating the list from one or the other
end and know where you came from.

If you just pick a node (e.g. by a pointer from outside), and then want
to find an adjacent node, insert or delete one, you're stuck.

As a summary: Nice, but seldom useful.

--
Regards,
Bernd

Re: Could we build a better 6502?

<sej113$mj8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19591&group=comp.arch#19591

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Fri, 6 Aug 2021 11:56:46 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <sej113$mj8$1@dont-email.me>
References: <se1hvt$li9$1@newsreader4.netcologne.de>
<se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
<sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
<sehqk6$la0$1@gioia.aioe.org>
<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
<seiijs$50o$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 6 Aug 2021 09:56:52 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d85487478ca4eaf978b33cb5a76fc06d";
logging-data="23144"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KKlWqAaLbpWNT3ULO3H9JEMlONMPT22Y="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:8YcVQshfduyMKdjBTffNqSlazHA=
In-Reply-To: <seiijs$50o$1@newsreader4.netcologne.de>
Content-Language: en-GB
 by: David Brown - Fri, 6 Aug 2021 09:56 UTC

On 06/08/2021 07:50, Thomas Koenig wrote:
> MitchAlsup <MitchAlsup@aol.com> schrieb:
>> On Thursday, August 5, 2021 at 6:01:29 PM UTC-5, chris wrote:
>>> On 08/05/21 18:28, George Neuner wrote:
>>>
>>>>
>>>>
>>>> YMMV, but I managed quite a lot with the Manx compiler.
>>> Many of those who worked with microprocessors in the late 70's
>>> came to the subject from an electronics hardware background, with
>>> little or no computer science knowledge, nor appreciation of data
>>> structures, algorithms, or os theory.
>> <
>> These were the very same people who invented the XOR trick with
>> linked list pointers--saving ½ of the pointer space in data structures.
>
> I didn't know that one - nice hack.
>

If you want to see some nice hacks with 6502 code, look at the BBC
Micro. These were amazing pieces of engineering - in the days when
8-bit home computers ran BASIC (or in one unusual case, FORTH), the BBC
Micro had a flexible operating system that supported ROMs for different
languages and different file systems. One of the machine code hacks I
remember from it was that the multiplication table (the 6502 didn't have
a hardware multiplier, so a lookup table was used) overlapped some of
the character maps for the screen. That was an engineering solution,
not a computer science solution!

Re: Could we build a better 6502?

<sej99j$1pth$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19594&group=comp.arch#19594

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!jazQyxryRFiI4FEZ51SAvA.user.46.165.242.75.POSTED!not-for-mail
From: chris-no...@tridac.net (chris)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Fri, 06 Aug 2021 13:17:54 +0100
Organization: Aioe.org NNTP Server
Message-ID: <sej99j$1pth$1@gioia.aioe.org>
References: <se1hvt$li9$1@newsreader4.netcologne.de> <se2o7s$uis$1@dont-email.me> <ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com> <97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com> <d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com> <sebq08$ht9$1@newsreader4.netcologne.de> <3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com> <sedrv8$1164$1@gioia.aioe.org> <b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com> <sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com> <sehqk6$la0$1@gioia.aioe.org> <e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com> <seiijs$50o$1@newsreader4.netcologne.de> <sej113$mj8$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="59313"; posting-host="jazQyxryRFiI4FEZ51SAvA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; SunOS sun4u; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
X-Notice: Filtered by postfilter v. 0.9.2
 by: chris - Fri, 6 Aug 2021 12:17 UTC

On 08/06/21 10:56, David Brown wrote:
> On 06/08/2021 07:50, Thomas Koenig wrote:
>> MitchAlsup<MitchAlsup@aol.com> schrieb:
>>> On Thursday, August 5, 2021 at 6:01:29 PM UTC-5, chris wrote:
>>>> On 08/05/21 18:28, George Neuner wrote:
>>>>
>>>>>
>>>>>
>>>>> YMMV, but I managed quite a lot with the Manx compiler.
>>>> Many of those who worked with microprocessors in the late 70's
>>>> came to the subject from an electronics hardware background, with
>>>> little or no computer science knowledge, nor appreciation of data
>>>> structures, algorithms, or os theory.
>>> <
>>> These were the very same people who invented the XOR trick with
>>> linked list pointers--saving ½ of the pointer space in data structures.
>>
>> I didn't know that one - nice hack.
>>
>
> If you want to see some nice hacks with 6502 code, look at the BBC
> Micro. These were amazing pieces of engineering - in the days when
> 8-bit home computers ran BASIC (or in one unusual case, FORTH), the BBC
> Micro had a flexible operating system that supported ROMs for different
> languages and different file systems. One of the machine code hacks I
> remember from it was that the multiplication table (the 6502 didn't have
> a hardware multiplier, so a lookup table was used) overlapped some of
> the character maps for the screen. That was an engineering solution,
> not a computer science solution!
>

The aim65 from Rockwell had optional roms for assembler, forth, basic
and perhaps more, but developed a couple of products using the single
line assembler in the monitor roms. Had to go back and fill in all the
branch targets, a sort of manual 2nd pass, but worked well enough to
get the job done. The BBC micro was a clever design though, but
never worked on one here.

Some clever stuf in the Apple II io page roms, where Wozniac
saved single bytes of code space by fixing a relative branch to
form a new instruction, or a branch target. Io pages were just 256
bytes each, so not much free space for driver code...

Re: Could we build a better 6502?

<sejd7b$ag3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19595&group=comp.arch#19595

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Fri, 6 Aug 2021 15:24:58 +0200
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <sejd7b$ag3$1@dont-email.me>
References: <se1hvt$li9$1@newsreader4.netcologne.de>
<se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
<sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
<sehqk6$la0$1@gioia.aioe.org>
<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
<seiijs$50o$1@newsreader4.netcologne.de> <sej113$mj8$1@dont-email.me>
<sej99j$1pth$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 6 Aug 2021 13:24:59 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d85487478ca4eaf978b33cb5a76fc06d";
logging-data="10755"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX195DtYHwCIz5nZ8UMrTya9D3iWb60bAR4g="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:l5ILJgMHKlCW+EX2zdy+Lpb0hRE=
In-Reply-To: <sej99j$1pth$1@gioia.aioe.org>
Content-Language: en-GB
 by: David Brown - Fri, 6 Aug 2021 13:24 UTC

On 06/08/2021 14:17, chris wrote:
> On 08/06/21 10:56, David Brown wrote:
>> On 06/08/2021 07:50, Thomas Koenig wrote:
>>> MitchAlsup<MitchAlsup@aol.com>  schrieb:
>>>> On Thursday, August 5, 2021 at 6:01:29 PM UTC-5, chris wrote:
>>>>> On 08/05/21 18:28, George Neuner wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> YMMV, but I managed quite a lot with the Manx compiler.
>>>>> Many of those who worked with microprocessors in the late 70's
>>>>> came to the subject from an electronics hardware background, with
>>>>> little or no computer science knowledge, nor appreciation of data
>>>>> structures, algorithms, or os theory.
>>>> <
>>>> These were the very same people who invented the XOR trick with
>>>> linked list pointers--saving ½ of the pointer space in data structures.
>>>
>>> I didn't know that one - nice hack.
>>>
>>
>> If you want to see some nice hacks with 6502 code, look at the BBC
>> Micro.  These were amazing pieces of engineering - in the days when
>> 8-bit home computers ran BASIC (or in one unusual case, FORTH), the BBC
>> Micro had a flexible operating system that supported ROMs for different
>> languages and different file systems.  One of the machine code hacks I
>> remember from it was that the multiplication table (the 6502 didn't have
>> a hardware multiplier, so a lookup table was used) overlapped some of
>> the character maps for the screen.  That was an engineering solution,
>> not a computer science solution!
>>
>
>
> The aim65 from Rockwell had optional roms for assembler, forth, basic
> and perhaps more, but developed a couple of products using the single
> line assembler in the monitor roms. Had to go back and fill in all the
> branch targets, a sort of manual 2nd pass, but worked well enough to
> get the job done. The BBC micro was a clever design though, but
> never worked on one here.
>
> Some clever stuf in the Apple II io page roms, where Wozniac
> saved single bytes  of code space by fixing a relative branch to
> form a new instruction, or a branch target. Io pages were just 256
> bytes each, so not much free space for driver code...
>

I used to have to do that kind of stuff for some of the brain-dead 8-bit
microcontrollers. I remember that on the COP8, you would do table
lookup using a "load indirect" instruction but it would only work within
a 256-byte code page. So if you wanted a 256-entry lookup table, you
had to combine the load indirect and its following "return" inside the
data table somehow. I solved that on a couple of occasions by adding an
offset to all the entries in a table so that the instructions I needed
turned up in the table - and then compensated after reading the table.
This kind of thing is fun in its way, but I am not sorry to see the back
of such chips.

Re: Could we build a better 6502?

<7afef4d1-8634-4cdb-bfb9-942193b1c6e4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19609&group=comp.arch#19609

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:f14f:: with SMTP id y15mr1906699qvl.12.1628282821388; Fri, 06 Aug 2021 13:47:01 -0700 (PDT)
X-Received: by 2002:a05:6808:2208:: with SMTP id bd8mr16647990oib.110.1628282821121; Fri, 06 Aug 2021 13:47:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 6 Aug 2021 13:47:00 -0700 (PDT)
In-Reply-To: <sde7eg$hgb$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=5.173.72.76; posting-account=zjh_fgoAAABo0Nzgf6peaFtS6c-3xdgr
NNTP-Posting-Host: 5.173.72.76
References: <sde7eg$hgb$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7afef4d1-8634-4cdb-bfb9-942193b1c6e4n@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: pec...@gmail.com (pec...@gmail.com)
Injection-Date: Fri, 06 Aug 2021 20:47:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 27
 by: pec...@gmail.com - Fri, 6 Aug 2021 20:47 UTC

piątek, 23 lipca 2021 o 12:59:30 UTC+2 Thomas Koenig napisał(a):
> Another direction for retro-architectures... I've been looking
> at the 6502 a bit, and it really is quite an interesting design.
> Squeezing the functionality of a CPU into ~3500 transistors (plus
> ~1000 transistors used as resistors) was quite an achievement.
>
> Could we do better knowing what we know now?
What about manufacturing improvements?
Why couldn't we use a second layer of metallic connections?
The additional cost is 33% (or less) of the lithography phases, but we can significantly reduce the die size!
It should pay off.
>
> "Better" could of course mean different things - more instructions
> per cycle, possibility of higher frequency, higher code density,
> easier programming (programming the 6502 was not easy, especially
> on the C-64 where Commodore had used up almost all of the zero
> page for its Basic - I hardly ever used the X register).
>
> The boundary conditions were of course severe. 16 bit address
> bus, combined program and data bus of 8 bit. At least memory
> was rather fast and could be accessed once per cycle without
> problems (and even with the possibility of another, interleaved
> access for graphics). Plus, any more transistors were bound to
> increase the size and decrease the yield, leading to much
> higher cost and erosion of the competetive advantage that the
> 6502 and its derivatives had at the time.

Re: Could we build a better 6502?

<38b605ab-04e5-4cd1-af0f-71577380fd5en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19610&group=comp.arch#19610

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:57c4:: with SMTP id w4mr11002713qta.39.1628290387349;
Fri, 06 Aug 2021 15:53:07 -0700 (PDT)
X-Received: by 2002:a05:6830:1658:: with SMTP id h24mr8868743otr.182.1628290387053;
Fri, 06 Aug 2021 15:53:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 6 Aug 2021 15:53:06 -0700 (PDT)
In-Reply-To: <7afef4d1-8634-4cdb-bfb9-942193b1c6e4n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.50.182.0; posting-account=AoizIQoAAADa7kQDpB0DAj2jwddxXUgl
NNTP-Posting-Host: 136.50.182.0
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <7afef4d1-8634-4cdb-bfb9-942193b1c6e4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <38b605ab-04e5-4cd1-af0f-71577380fd5en@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: jim.brak...@ieee.org (JimBrakefield)
Injection-Date: Fri, 06 Aug 2021 22:53:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: JimBrakefield - Fri, 6 Aug 2021 22:53 UTC

On Friday, August 6, 2021 at 3:47:02 PM UTC-5, pec...@gmail.com wrote:
> piątek, 23 lipca 2021 o 12:59:30 UTC+2 Thomas Koenig napisał(a):
> > Another direction for retro-architectures... I've been looking
> > at the 6502 a bit, and it really is quite an interesting design.
> > Squeezing the functionality of a CPU into ~3500 transistors (plus
> > ~1000 transistors used as resistors) was quite an achievement.
> >
> > Could we do better knowing what we know now?
> What about manufacturing improvements?
> Why couldn't we use a second layer of metallic connections?
> The additional cost is 33% (or less) of the lithography phases, but we can significantly reduce the die size!
> It should pay off.
> >
> > "Better" could of course mean different things - more instructions
> > per cycle, possibility of higher frequency, higher code density,
> > easier programming (programming the 6502 was not easy, especially
> > on the C-64 where Commodore had used up almost all of the zero
> > page for its Basic - I hardly ever used the X register).
> >
> > The boundary conditions were of course severe. 16 bit address
> > bus, combined program and data bus of 8 bit. At least memory
> > was rather fast and could be accessed once per cycle without
> > problems (and even with the possibility of another, interleaved
> > access for graphics). Plus, any more transistors were bound to
> > increase the size and decrease the yield, leading to much
> > higher cost and erosion of the competetive advantage that the
> > 6502 and its derivatives had at the time.

Looking at the 6502 and widening to 16 & 32-bits or improving overall performance:
A legacy upgrade needs to be mostly compatible with the original ISA.
In order to squeeze in the additional op-codes some "refactoring" will be
necessary? I.e. implement a superset of the original?
Almost any re-spin on newer process nodes will be faster. Per Alsup, a
re-spin on current process nodes will be miniscule. So the problem reduces
to finding a "cash cow" customer?

BTW, FPGA implementations of original can hit 200MHz and use under 500 LUTs..
This equates to less than $0.50 FPGA fabric at quantity one pricing. A 16-bit wide
version at twice that?

Re: Could we build a better 6502?

<sekf72$v65$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19611&group=comp.arch#19611

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Fri, 6 Aug 2021 16:05:06 -0700
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <sekf72$v65$1@dont-email.me>
References: <sde7eg$hgb$1@newsreader4.netcologne.de>
<7afef4d1-8634-4cdb-bfb9-942193b1c6e4n@googlegroups.com>
<38b605ab-04e5-4cd1-af0f-71577380fd5en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 6 Aug 2021 23:05:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="31cb87aef5ca05f9fb4a4f0268ccdd36";
logging-data="31941"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/zGmV/QA1vJfwR2pCwetl"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:OHCu3Rn2/npEnplpfJjq/4hylFQ=
In-Reply-To: <38b605ab-04e5-4cd1-af0f-71577380fd5en@googlegroups.com>
Content-Language: en-US
 by: Ivan Godard - Fri, 6 Aug 2021 23:05 UTC

On 8/6/2021 3:53 PM, JimBrakefield wrote:
> On Friday, August 6, 2021 at 3:47:02 PM UTC-5, pec...@gmail.com wrote:
>> piątek, 23 lipca 2021 o 12:59:30 UTC+2 Thomas Koenig napisał(a):
>>> Another direction for retro-architectures... I've been looking
>>> at the 6502 a bit, and it really is quite an interesting design.
>>> Squeezing the functionality of a CPU into ~3500 transistors (plus
>>> ~1000 transistors used as resistors) was quite an achievement.
>>>
>>> Could we do better knowing what we know now?
>> What about manufacturing improvements?
>> Why couldn't we use a second layer of metallic connections?
>> The additional cost is 33% (or less) of the lithography phases, but we can significantly reduce the die size!
>> It should pay off.
>>>
>>> "Better" could of course mean different things - more instructions
>>> per cycle, possibility of higher frequency, higher code density,
>>> easier programming (programming the 6502 was not easy, especially
>>> on the C-64 where Commodore had used up almost all of the zero
>>> page for its Basic - I hardly ever used the X register).
>>>
>>> The boundary conditions were of course severe. 16 bit address
>>> bus, combined program and data bus of 8 bit. At least memory
>>> was rather fast and could be accessed once per cycle without
>>> problems (and even with the possibility of another, interleaved
>>> access for graphics). Plus, any more transistors were bound to
>>> increase the size and decrease the yield, leading to much
>>> higher cost and erosion of the competetive advantage that the
>>> 6502 and its derivatives had at the time.
>
> Looking at the 6502 and widening to 16 & 32-bits or improving overall performance:
> A legacy upgrade needs to be mostly compatible with the original ISA.
> In order to squeeze in the additional op-codes some "refactoring" will be
> necessary? I.e. implement a superset of the original?
> Almost any re-spin on newer process nodes will be faster. Per Alsup, a
> re-spin on current process nodes will be miniscule. So the problem reduces
> to finding a "cash cow" customer?

If you use width-tagging metadata then you don't even have to enlarge
the instruction set, except for loads where you need to handle bigger
offsets anyway.

Re: Could we build a better 6502?

<ae2a142a-5745-4ad1-8d4a-3cc8c0e83eefn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19612&group=comp.arch#19612

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:538:: with SMTP id h24mr784127qkh.18.1628293344426; Fri, 06 Aug 2021 16:42:24 -0700 (PDT)
X-Received: by 2002:a05:6830:30a2:: with SMTP id g2mr6521603ots.206.1628293344149; Fri, 06 Aug 2021 16:42:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 6 Aug 2021 16:42:23 -0700 (PDT)
In-Reply-To: <sekf72$v65$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.50.182.0; posting-account=AoizIQoAAADa7kQDpB0DAj2jwddxXUgl
NNTP-Posting-Host: 136.50.182.0
References: <sde7eg$hgb$1@newsreader4.netcologne.de> <7afef4d1-8634-4cdb-bfb9-942193b1c6e4n@googlegroups.com> <38b605ab-04e5-4cd1-af0f-71577380fd5en@googlegroups.com> <sekf72$v65$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ae2a142a-5745-4ad1-8d4a-3cc8c0e83eefn@googlegroups.com>
Subject: Re: Could we build a better 6502?
From: jim.brak...@ieee.org (JimBrakefield)
Injection-Date: Fri, 06 Aug 2021 23:42:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 59
 by: JimBrakefield - Fri, 6 Aug 2021 23:42 UTC

On Friday, August 6, 2021 at 6:05:09 PM UTC-5, Ivan Godard wrote:
> On 8/6/2021 3:53 PM, JimBrakefield wrote:
> > On Friday, August 6, 2021 at 3:47:02 PM UTC-5, pec...@gmail.com wrote:
> >> piątek, 23 lipca 2021 o 12:59:30 UTC+2 Thomas Koenig napisał(a):
> >>> Another direction for retro-architectures... I've been looking
> >>> at the 6502 a bit, and it really is quite an interesting design.
> >>> Squeezing the functionality of a CPU into ~3500 transistors (plus
> >>> ~1000 transistors used as resistors) was quite an achievement.
> >>>
> >>> Could we do better knowing what we know now?
> >> What about manufacturing improvements?
> >> Why couldn't we use a second layer of metallic connections?
> >> The additional cost is 33% (or less) of the lithography phases, but we can significantly reduce the die size!
> >> It should pay off.
> >>>
> >>> "Better" could of course mean different things - more instructions
> >>> per cycle, possibility of higher frequency, higher code density,
> >>> easier programming (programming the 6502 was not easy, especially
> >>> on the C-64 where Commodore had used up almost all of the zero
> >>> page for its Basic - I hardly ever used the X register).
> >>>
> >>> The boundary conditions were of course severe. 16 bit address
> >>> bus, combined program and data bus of 8 bit. At least memory
> >>> was rather fast and could be accessed once per cycle without
> >>> problems (and even with the possibility of another, interleaved
> >>> access for graphics). Plus, any more transistors were bound to
> >>> increase the size and decrease the yield, leading to much
> >>> higher cost and erosion of the competetive advantage that the
> >>> 6502 and its derivatives had at the time.
> >
> > Looking at the 6502 and widening to 16 & 32-bits or improving overall performance:
> > A legacy upgrade needs to be mostly compatible with the original ISA.
> > In order to squeeze in the additional op-codes some "refactoring" will be
> > necessary? I.e. implement a superset of the original?
> > Almost any re-spin on newer process nodes will be faster. Per Alsup, a
> > re-spin on current process nodes will be miniscule. So the problem reduces
> > to finding a "cash cow" customer?
> If you use width-tagging metadata then you don't even have to enlarge
> the instruction set, except for loads where you need to handle bigger
> offsets anyway.

One way to tag the data is in the address. By giving up two or three bits of address one
can tag both the data size and its type (in powers of two). Since there are usually fewer
addresses than data items one saves on memory costs. (tags use trailing zeros count
to encode type and then size; another tag bit and one can have a 3X multiplier).
However suspect Godard meant tags on the data registers and not tags in memory
(using separate loads & store instructions for each data size tag)?

Re: Could we build a better 6502?

<sem61k$k18$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19617&group=comp.arch#19617

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!pIhVuqI7njB9TMV+aIPpbg.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Sat, 7 Aug 2021 16:40:53 +0200
Organization: Aioe.org NNTP Server
Message-ID: <sem61k$k18$1@gioia.aioe.org>
References: <se1hvt$li9$1@newsreader4.netcologne.de>
<se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
<sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
<sehqk6$la0$1@gioia.aioe.org>
<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
<seiijs$50o$1@newsreader4.netcologne.de> <sej113$mj8$1@dont-email.me>
<sej99j$1pth$1@gioia.aioe.org> <sejd7b$ag3$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="20520"; posting-host="pIhVuqI7njB9TMV+aIPpbg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101
Firefox/60.0 SeaMonkey/2.53.8.1
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Sat, 7 Aug 2021 14:40 UTC

David Brown wrote:
> On 06/08/2021 14:17, chris wrote:
>> The aim65 from Rockwell had optional roms for assembler, forth, basic
>> and perhaps more, but developed a couple of products using the single
>> line assembler in the monitor roms. Had to go back and fill in all the
>> branch targets, a sort of manual 2nd pass, but worked well enough to
>> get the job done. The BBC micro was a clever design though, but
>> never worked on one here.
>>
>> Some clever stuf in the Apple II io page roms, where Wozniac
>> saved single bytes  of code space by fixing a relative branch to
>> form a new instruction, or a branch target. Io pages were just 256
>> bytes each, so not much free space for driver code...
>>
>
> I used to have to do that kind of stuff for some of the brain-dead 8-bit
> microcontrollers. I remember that on the COP8, you would do table
> lookup using a "load indirect" instruction but it would only work within
> a 256-byte code page. So if you wanted a 256-entry lookup table, you
> had to combine the load indirect and its following "return" inside the
> data table somehow. I solved that on a couple of occasions by adding an
> offset to all the entries in a table so that the instructions I needed
> turned up in the table - and then compensated after reading the table.
> This kind of thing is fun in its way, but I am not sorry to see the back
> of such chips.

We still did a lot of these things for early PC code, since the only way
to add OS functionality was to write TSR drivers, and they had to fit in
memory alongside the largest documents/spreadsheets people wanted to edit.

My personal favorite was the TMKBVEGA.COM program which in just 700
bytes of resident memory provided a full Norwegian keyboard handler,
with all our special characters and key layout, along with replacement
text generator fonts for 25/43/50-line text modes.

The complexity pales in comparison with the triple-layer bootstrap code
for my MEMI-compatible executable text generator.

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: Could we build a better 6502?

<sembpl$mho$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19619&group=comp.arch#19619

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Sat, 7 Aug 2021 16:19:01 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sembpl$mho$1@newsreader4.netcologne.de>
References: <se1hvt$li9$1@newsreader4.netcologne.de>
<se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
<sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
<sehqk6$la0$1@gioia.aioe.org>
<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
<seiijs$50o$1@newsreader4.netcologne.de> <sej113$mj8$1@dont-email.me>
<sej99j$1pth$1@gioia.aioe.org> <sejd7b$ag3$1@dont-email.me>
<sem61k$k18$1@gioia.aioe.org>
Injection-Date: Sat, 7 Aug 2021 16:19:01 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3b2f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3b2f:0:7285:c2ff:fe6c:992d";
logging-data="23096"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 7 Aug 2021 16:19 UTC

Terje Mathisen <terje.mathisen@tmsw.no> schrieb:

> The complexity pales in comparison with the triple-layer bootstrap code
> for my MEMI-compatible executable text generator.

Some more details?

Wikipedia gives me the Brunei Ministry of Energy, somehow I doubt
that this was what was meant :-)

Re: Could we build a better 6502?

<semlhp$1mpc$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19621&group=comp.arch#19621

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!aioe.org!pIhVuqI7njB9TMV+aIPpbg.user.46.165.242.91.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: Could we build a better 6502?
Date: Sat, 7 Aug 2021 21:05:32 +0200
Organization: Aioe.org NNTP Server
Message-ID: <semlhp$1mpc$1@gioia.aioe.org>
References: <se1hvt$li9$1@newsreader4.netcologne.de>
<se2o7s$uis$1@dont-email.me>
<ed3ba617-1238-4dcb-9829-a8cea7065ec5n@googlegroups.com>
<97d08afd-1f4b-4ae8-92cf-e11b1d17018cn@googlegroups.com>
<d8f66b34-5748-4205-b97b-5199386bd53fn@googlegroups.com>
<sebq08$ht9$1@newsreader4.netcologne.de>
<3344a3e4-cdbe-4bc3-aa08-4cfaf20e52f1n@googlegroups.com>
<sedrv8$1164$1@gioia.aioe.org>
<b085c32c-bda8-43e9-ab68-fe150e50a4c7n@googlegroups.com>
<sef71f$v5s$1@gioia.aioe.org> <r9tnggdei7s8aot5kldfbrf43ak1jo28n3@4ax.com>
<sehqk6$la0$1@gioia.aioe.org>
<e11eb8f5-7901-4b97-8cc7-c21032f6af74n@googlegroups.com>
<seiijs$50o$1@newsreader4.netcologne.de> <sej113$mj8$1@dont-email.me>
<sej99j$1pth$1@gioia.aioe.org> <sejd7b$ag3$1@dont-email.me>
<sem61k$k18$1@gioia.aioe.org> <sembpl$mho$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="56108"; posting-host="pIhVuqI7njB9TMV+aIPpbg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101
Firefox/60.0 SeaMonkey/2.53.8.1
X-Notice: Filtered by postfilter v. 0.9.2
 by: Terje Mathisen - Sat, 7 Aug 2021 19:05 UTC

Thomas Koenig wrote:
> Terje Mathisen <terje.mathisen@tmsw.no> schrieb:
>
>> The complexity pales in comparison with the triple-layer bootstrap code
>> for my MEMI-compatible executable text generator.
>
> Some more details?
>
> Wikipedia gives me the Brunei Ministry of Energy, somehow I doubt
> that this was what was meant :-)
>
Sorry, I swapped two letters: I meant MIME-compatible, i.e. an
executable which can only use byte values from the 70+ ascii characters
which are guaranteed to pass unmodified through all email gateways.

I wrote it to be minimally self-modifying (I got away with a single
two-byte Jcc backward branch) since it is impossible to write any form
of loop in x86 without using byte values with the high bit set.

It is also resistant to several forms of editing, most importantly it
handles having the normal CRLF line ends raplaced with unix LF, Mac CR
or even Word style one line per paragraph: Basically any zero to
two-byte sequence is allowed.

(It works this way because there is a CMP AX,CRLF 3-byte sequence which
covers the line end, this is followed by two effectively NOP bytes which
will move into the CMP immediate bytes if the line end is shortened.)

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Pages:12345678910111213
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor