Well, this is my first post, so hello everybody.
I've wanted for a very long time to build my own tiny computer from scratch, and after a friend told me he was doing one himself, I began actually designing mine.
My idea was a 6502-based design, at the highest speed I could run it reliably, so I went with 10MHz W65C02. Because of the über-expensive shipping options of Mouser to Europe (my usual provider being RS-Components, but they don't stock WDC parts), I gave Chinese providers from eBay a go.
After unpacking it I noticed that the top of them were slightly darker than the bottom, meaning they could be well "blacktopped" chips (aka removed from boards, had the original laser-etched part number removed and re-labeled as a different one)
With a multimeter I tried measuring continuity between pin 1 (VPB on real WDC, ground on any other 6502) and pin 21 (ground), and indeed got continuity, meaning that they are a completely different IC,
or another true 6502 but relabeled as W65C02.
I thus got an Arduino, clocked it manually while probing on key pins (data, A15, A2~A0, R/W, SYNC), and found something
really odd.
I ran a very simple program, consisting of a RESET vector set to 0x0000, and a BRA -1 ("while (true);" loop) at 0x0000, and everything else set to NOP (EA):
Code:
.org $0000
start:
bra start
.pad $FFFA $EA
dw start
dw start
dw start
The boot log, right after releasing reset is as follows:
Code:
START
A:0005 D:EA SYNC:1 R/W:1
A:0005 D:EA SYNC:0 R/W:1
A:0005 D:E2 SYNC:0 R/W:0
A:0004 D:00 SYNC:0 R/W:0
A:0003 D:B4 SYNC:0 R/W:0
A:8004 D:00 SYNC:0 R/W:1 << reset vector read
A:8005 D:00 SYNC:0 R/W:1
A:0000 D:80 SYNC:1 R/W:1 << start executing BRA
A:0001 D:FE SYNC:0 R/W:1
A:0001 D:FE SYNC:0 R/W:1
A:0007 D:EA SYNC:0 R/W:1
A:0000 D:80 SYNC:0 R/W:1
A:0007 D:EA SYNC:0 R/W:1
A:0002 D:EA SYNC:1 R/W:1
A:0003 D:EA SYNC:1 R/W:1
A:0004 D:EA SYNC:1 R/W:1
A:0005 D:EA SYNC:1 R/W:1
A:0006 D:EA SYNC:1 R/W:1
A:0007 D:EA SYNC:1 R/W:1
A:0000 D:80 SYNC:1 R/W:1
(Remember only A15 and A2 to A0 are connected)
As you can see, this CPU clearly doesn't support the BRA, so I thought "hey, this gotta be a NMOS MOS 6502 part".
But, here's the odd part: in the official 6502 during boot the stack writes that are part of any interruption (PC and processor status) are gated into reads. However
they are not in this CPU. I have five of these fake 6502, and can say for sure they all behave the same, so it's not a one-off defect.
Any idea what kind of part do I have here? Could this be a 6502-compatible CPU designed from scratch by another manufacturer?