MOS 6509 look-alikes?

For discussing the 65xx hardware itself or electronics projects.
sjgray
Posts: 29
Joined: 15 Aug 2009

Post by sjgray »

Nice! 6509's are in very short supply... Anyone willing to build and test?!

Steve
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Post by Dr Jefyll »

I wrote:
Do CBM-II applications use illegal instructions?!
Still curious about this point. If we don't need to preserve the illegal op's then the '816 may be better than an '02 in regard to creating a 6509 substitute using add-on logic.

Steve, is your Rogers email working properly? I haven't heard back from a msg I sent you on Friday. Maybe you're just enjoying the holiday...

Jeff
sjgray
Posts: 29
Joined: 15 Aug 2009

Post by sjgray »

Dr Jefyll wrote:
I wrote:
Do CBM-II applications use illegal instructions?!
Still curious about this point. If we don't need to preserve the illegal op's then the '816 may be better than an '02 in regard to creating a 6509 substitute using add-on logic.

Steve, is your Rogers email working properly? I haven't heard back from a msg I sent you on Friday. Maybe you're just enjoying the holiday...

Jeff
Holidays have been crazy... Sorry, I seemed to have missed your email.
Things have settled down now, thankfully.

Btw, I'd be surprised if any cbmii software used illegal opcodes, simply because there's so little software for the machines.

Steve
brain
Posts: 113
Joined: 05 May 2009

Re: MOS 6509 look-alikes?

Post by brain »

Sorry for resurrecting a long ago thread, but I created a PCB for a 6509 Replacement:

Image
Image

I am considering building a few test boards, if someone is interested in testing.

Jim
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: MOS 6509 look-alikes?

Post by BigDumbDinosaur »

brain wrote:
Sorry for resurrecting a long ago thread, but I created a PCB for a 6509 Replacement:
...
I am considering building a few test boards, if someone is interested in testing.

Jim
I can't read what is in your images.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: MOS 6509 look-alikes?

Post by BigEd »

Thanks Jim, that's a very interesting development!
sjgray
Posts: 29
Joined: 15 Aug 2009

Re: MOS 6509 look-alikes?

Post by sjgray »

Very nice! This is long overdue.

Steve
DerTrueForce
Posts: 483
Joined: 04 Jun 2016
Location: Australia

Re: MOS 6509 look-alikes?

Post by DerTrueForce »

It's usually a good idea to post schematics in black and white, because there are some people here that are colour-blind.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: MOS 6509 look-alikes?

Post by BigEd »

For reference and for interest, there's a long and active thread over on the cbm-hackers mailing list discussing "Hardware emulation of 6509 using 6502?" which are worth a read - hopefully as and when some excellent discoveries are made or conclusions reached we can summarise or link to them:
http://www.softwolves.com/arkiv/cbm-hac ... html#25459
http://www.softwolves.com/arkiv/cbm-hac ... html#26201
brain
Posts: 113
Joined: 05 May 2009

Re: MOS 6509 look-alikes?

Post by brain »

BigEd wrote:
For reference and for interest, there's a long and active thread over on the cbm-hackers mailing list discussing "Hardware emulation of 6509 using 6502?" which are worth a read - hopefully as and when some excellent discoveries are made or conclusions reached we can summarise or link to them:
http://www.softwolves.com/arkiv/cbm-hac ... html#25459
http://www.softwolves.com/arkiv/cbm-hac ... html#26201
It's a shame the Interwebs have not found a way to "join" a discussion across two forums, as the cbm-hackers thread is a direct continuation of this thread.

In short:

I implemented Dr. Jefyll's schematic from this thread in a small piggyback PCB.
We determined that the design also should trap the databus, so as to not read from the computer during a $0/$1 read (next design rev)
There are potential issues with the CLK signal (6509 uses external clocks, 6502 creates them internally)
Currently, we are tracking down a problem where a write on the 6502 does not push the right value to the databus (or, it does not keep it there long enough)

There's a companion thread to discover the specific nature of the indirect addressing (page crossings, behavior when writing value, etc.)

Jim
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: MOS 6509 look-alikes?

Post by BigEd »

All very interesting Jim, thanks for the update!
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: MOS 6509 look-alikes?

Post by Dr Jefyll »

brain wrote:
It's a shame the Interwebs have not found a way to "join" a discussion across two forums
Yes, wouldn't that be nice. 8)

If it's helpful at all, here's Jim's schematic again with new colors plus a note or two I added. This initial implementation connects the 65C02 data bus directly to the motherboard, but a future version will establish that connection via the CPLD so the 65C02 can when necessary listen to the CPLD only and not the motherboard, for the reason Jim noted.
Attachments
Fake 6509 Schematic (Jim Brain) news colors.png
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: MOS 6509 look-alikes?

Post by Dr Jefyll »

Astonishing update from Jim Brain! I'm still rubbing my eyes after reading the last line of this section. :shock:
Quote:
Updates:

* After not having success with the '245 daughter-board, I wired up a 50MHz oscillator in hopes that I could synthesize a proper PHI_IN for the 6502 such that the PHI2_OUT would match the PHI2 on the PCB.
* After not having success, I started probing the R/W line, on the assumption that it was being forced to an incorrect state.
* I looked at the schematic, and I noticed U12, which appears to be a databus buffer for the RAM.
* I tapped pin 1 and looked at it.
* I then noticed that, aside from being inverted, it was occurring at the wrong half of the 6502 cycle.
o On the 6509, PHI2 goes low, R/W will go low for the upcoming write cycle, PHI2 goes high, '245 pin 1 goes high for a half cycle, and then goes low at the moment R/W goes high.
o On the 6502, PHI2 on the 6502 goes low, R/W will go low for the cycle to do the write, and immediately the pin 1 goes high, going low just as phi2 on the 6502 goes high
* On a hunch, I inverted the PHI signal going to the 6502, so it matched PHI1_6509.

The B128 booted up.

I had been using the following datasheet for the 6509 reference: http://archive.6502.org/datasheets/mos_6509_mpu.pdf

Which is linked from Wikipedia, and from the 6502.org web site.

which shows pin 40 as PHI2_IN, and pin 38 as PHI1_IN

But, the p500 schematics on Zimmers.net shows them reversed:

http://www.zimmers.net/anonftp/pub/cbm/ ... 01of15.gif

As does the B128 LP schematic:

http://www.zimmers.net/anonftp/pub/cbm/ ... 4-left.gif

And the B128 HP Schematic:

http://www.zimmers.net/anonftp/pub/cbm/ ... 059-01.gif

Thus, it appears the official datasheet is wrong, and has been wrong for 40 years.
<snip>
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Tor
Posts: 597
Joined: 10 Apr 2011
Location: Norway/Japan

Re: MOS 6509 look-alikes?

Post by Tor »

Astonishing indeed. And that means that other sources, which presumably copied the datasheet, are wrong too, e.g. this one: http://mhv.bplaced.de/test/pinout/6509
brain
Posts: 113
Joined: 05 May 2009

Re: MOS 6509 look-alikes?

Post by brain »

I assume all copies, everywhere are wrong.

The challenge is going to be how one fixes it. 6502.org stores the datasheet both as a working copy for folks to consult during repairs (and new efforts, such as this one), and for posterity. In this case, where such a fundamental error has been found, does 6502.org "fix" the posted and linked copy (storing the original elsewhere to maintain the archival qualities), or not?
Post Reply