| View previous topic :: View next topic |
| Author |
Message |
kc5tja
Joined: 04 Jan 2003 Posts: 1339 Location: San Diego, CA
|
Posted: Sat Sep 12, 2009 3:22 am Post subject: |
|
|
| 8BIT wrote: | I have not followed this thread too closely, but if you can provide the code, I can run it on my SBC-3 (65816).
I also have a 65C02 SBC-2 I can try.
Daryl |
The code was posted above by BigEd. |
|
| Back to top |
|
 |
8BIT
Joined: 30 Aug 2002 Posts: 714 Location: Sacramento, CA
|
Posted: Sat Sep 12, 2009 4:35 am Post subject: |
|
|
Yes, it was. Forgive me, I have been rushing all day.
My test results:
65816 Emulation mode: $32
65816 native mode: $32
WDC 65c02: $32
hope that helps
Daryl |
|
| Back to top |
|
 |
BigEd
Joined: 11 Dec 2008 Posts: 397 Location: England
|
Posted: Sat Sep 12, 2009 8:58 am Post subject: emulation of status register |
|
|
That's great - thanks! I'm reassured to see them all acting the same. It looks like we have 3 emulators which need tweaks to their handling of the 2 special 6502 status bits (both bits are physically absent on 6502, so always read as 1. But IRQ pushes a value with a 0 in the B position. 65816 in E mode acts the same as 6502, even though it has bits in those positions when not in E mode.)
For completeness, I tweaked the test a little, to force the bits in both directions:
| Code: | 1388 A9 00 LDA#0
138A 48 PHA
138B 28 PLP
138C A9 00 LDA#0
138E 08 PHP
138F 68 PLA
1390 8D 87 13 STA 4999
1393 A9 FF LDA#255
1395 48 PHA
1396 28 PLP
1397 A9 00 LDA#0
1399 08 PHP
139A 68 PLA
139B 8D 86 13 STA 4998
139E 60 RTS
|
I find that the first part gives $32 and the second part gives $7f, on both 6502 and 65816. |
|
| Back to top |
|
 |
8BIT
Joined: 30 Aug 2002 Posts: 714 Location: Sacramento, CA
|
Posted: Sat Sep 12, 2009 12:16 pm Post subject: |
|
|
I ran in on the WDC 65C02, with the same results - $32, $7F
I'm also happy to report that my 65C02 Simulator for Windows also has these results. Its core was taken from the AppleWin Simulator.
Daryl |
|
| Back to top |
|
 |
BigEd
Joined: 11 Dec 2008 Posts: 397 Location: England
|
Posted: Thu Sep 17, 2009 6:12 pm Post subject: |
|
|
| 8BIT wrote: | I'm also happy to report that my 65C02 Simulator for Windows also has these results. Its core was taken from the AppleWin Simulator.
|
Nice! Mike now has a fix for py65, and Samuel has fixed up lib65816. All this was fallout really from trying to run a small part of the 6510 test suite - I still need to construct some sources so I can work with that. |
|
| Back to top |
|
 |
BigEd
Joined: 11 Dec 2008 Posts: 397 Location: England
|
Posted: Mon Mar 22, 2010 12:10 pm Post subject: Re: A 6510 testsuite |
|
|
| BigEd wrote: | An earlier thread points us to Wolfgang Lorenz' C64 testsuite
edit: Good news, it is in public domain. Bad news, it is in the form of p00 files (a pc64 format.) Good news, if a p00 file is binary and supposed to load at 0801 (see here) then we can load at 7e5 into py65 and jump to 0801 to ignore the header. Bad news, need to patch the i/o to suit py65. Good news, that shouldn't be too hard (see c64 rom) |
Good news: Tom Seddon preserved a copy of the full archive with ASCII sources, on his site
Christer Palm explains how to stub out the C64 OS in this posting. |
|
| Back to top |
|
 |
BigEd
Joined: 11 Dec 2008 Posts: 397 Location: England
|
Posted: Fri Aug 06, 2010 1:49 pm Post subject: Re: SBC self-testing program |
|
|
| BigEd wrote: | | Here's the test section for SBC ... fails on lib6502 ... |
I notice Ian has updated lib6502 with a one-line fix to SBC - and it now passes!
| Quote: |
2010-07-23 (v1.1) Many thanks to Steve Flintham for spotting a bug in SBC that set C and V incorrectly.
|
|
|
| Back to top |
|
 |
|