|
Joined: Apr 2012
Posts: 330 Likes: 33
Senior Member
|
OP
Senior Member
Joined: Apr 2012
Posts: 330 Likes: 33 |
As you know I'm still learning/improving the bbc driver when time permits.
The various machines use different variants of the 6502 CPU and would like to clarify that they are actually using the most appropriate.
bbcb has 6502A and uses M6502 bbcbp has 6512A and uses M6502 bbcm has 65C12A and uses M65SC02 bbcmc has 65SC12P and uses M65SC02
So that's four different variants but currently only use M6502 and M65SC02. Are they using closest match available? I expect 6512A has advantages over 6502A.
Thanks.
BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
|
|
|
|
Joined: Feb 2010
Posts: 71
Member
|
Member
Joined: Feb 2010
Posts: 71 |
6512 is just a 6502 without a internal clock generator module. You seem to be talking crap.
|
|
|
|
Joined: May 2003
Posts: 225
Senior Member
|
Senior Member
Joined: May 2003
Posts: 225 |
6512 is just a 6502 without a internal clock generator module. Another difference between the 6502 and 6512, is the data bus is enable on the 12. Looking over the other variants, more items such as additional instructions and address modes come into play: http://www.cpu-world.com/info/6502/65xx_65Cxx_65SCxx_differences.html
|
|
|
|
Joined: Mar 2001
Posts: 16,960 Likes: 76
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 16,960 Likes: 76 |
I expect 6512A has advantages over 6502A. Actually, all the 6503+ variants except for the 6510 are disadvantaged in some way over a stock 6502. Most famously, the Atari 2600's 6507 only has an 8k address space and no interrupts. Anyhow, from an emulation POV, the CPUs we're using all line up properly. An NMOS 6512 is a 6502 for emulation purposes, and the CMOS 6512 is an 'SC02 for emulation purposes.
|
|
|
|
Joined: Apr 2012
Posts: 330 Likes: 33
Senior Member
|
OP
Senior Member
Joined: Apr 2012
Posts: 330 Likes: 33 |
Anyhow, from an emulation POV, the CPUs we're using all line up properly. An NMOS 6512 is a 6502 for emulation purposes, and the CMOS 6512 is an 'SC02 for emulation purposes. That's exactly what I wanted to confirm, thanks.
BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
|
|
|
|
Joined: Apr 2012
Posts: 330 Likes: 33
Senior Member
|
OP
Senior Member
Joined: Apr 2012
Posts: 330 Likes: 33 |
I've been running the Dormann tests https://github.com/Klaus2m5/6502_65C02_functional_tests in bbcb and bbcm to test m6502 and m65sc02 respecitively. The 6502 test passes in bbcb but 65C02 fails in bbcm when testing SBC. A BBC compatible image of the tests is at https://github.com/mattgodbolt/jsbeeb/blob/master/discs/bcdtest.ssd?raw=true which passes on real hardware. To run in bbcm: - load the image - select DFS, D + BREAK (F12) - type *BCDTEST I suspect this is the reason I have a few Master versions of games hanging in bbcm. Making changes to a CPU core is a little beyond me at the moment so would appreciate someone who knows it to take a look, thanks.
BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
|
|
|
|
Joined: Jun 2001
Posts: 488 Likes: 4
Senior Member
|
Senior Member
Joined: Jun 2001
Posts: 488 Likes: 4 |
I've been running the Dormann tests https://github.com/Klaus2m5/6502_65C02_functional_tests in bbcb and bbcm to test m6502 and m65sc02 respecitively. The 6502 test passes in bbcb but 65C02 fails in bbcm when testing SBC. A BBC compatible image of the tests is at https://github.com/mattgodbolt/jsbeeb/blob/master/discs/bcdtest.ssd?raw=true which passes on real hardware. To run in bbcm: - load the image - select DFS, D + BREAK (F12) - type *BCDTEST I suspect this is the reason I have a few Master versions of games hanging in bbcm. Making changes to a CPU core is a little beyond me at the moment so would appreciate someone who knows it to take a look, thanks. Yeah, the cmos versions of the 6502 are buggy for sbc in decimal mode, a missing xor gate iirc. I haven't yet added that though, forgot. It's such a specific bug that I kinda doubt it causes hangs, but who knows.
|
|
|
|
Joined: Jun 2014
Posts: 90
Member
|
Member
Joined: Jun 2014
Posts: 90 |
There are two issues with 6502 vs 65C02 decimal mode - the most obvious is that for 65C02, N/V/Z flags are set properly, so ADC is affected along with SBC (and both take one cycle longer to compute). The second one is that invalid decimal values will return different results between the two CPUs.
|
|
|
|
Joined: Mar 2006
Posts: 1,074 Likes: 5
Very Senior Member
|
Very Senior Member
Joined: Mar 2006
Posts: 1,074 Likes: 5 |
There is a decimal mode bug causing incorrect sbc results, specific to the rare 65SC02 used on the amiga 8 port serial card, and its derivatives used on the c65 prototypes. I believe this bug is what OG is talking about. The plain 65C02 is not affected by this bug, AFAIK.
LN
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
|
|
|
|
Joined: Mar 2001
Posts: 16,960 Likes: 76
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 16,960 Likes: 76 |
And none of this applies to the WDC 65C02, which has different added instructions and is forward-compatible with the 65816.
|
|
|
2 members (Pernod, Duke),
20
guests, and
2
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,158
Posts119,916
Members5,034
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|