65816 Test Suite

Topics pertaining to the emulation or simulation of the 65xx microprocessors and their peripheral chips.
User avatar
AndrewP
Posts: 368
Joined: 30 Aug 2021
Location: South Africa

Re: 65816 Test Suite

Post by AndrewP »

Mostly just to post this somewhere for myself so I don't lose it again; there is another suite of 65816 tests (amongst many others) over here:

https://github.com/SingleStepTests/Proc ... main/65816

Very useful for emulators that can arbitrarily set memory values and the program counter because it's just a bunch of JSON for the start state and the expected end state.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65816 Test Suite

Post by BigDumbDinosaur »

BigEd wrote:
(Just writing this as a counter-point - your recommendations and strong recommendations are, of course, only yours. I wouldn't want your opinions to be taken as consensus.)
All recommendations are de facto opinions, Ed, whether offered individually or by a group.  It should be obvious to others reading this topic that my recommendation is an opinion, one based upon extensive experience in programming the 65C816.  I have never suggested that my recommendations are consensus.
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: 65816 Test Suite

Post by BigEd »

AndrewP wrote:
…there is another suite of 65816 tests (amongst many others) over here:

https://github.com/SingleStepTests/Proc ... main/65816
Interesting find Andrew, thanks! (Single instructions, full bus activity, randomly generated, verified against hardware)
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: 65816 Test Suite

Post by 8BIT »

Well, I finally got my SBC-4 reconfigured and ran the full test suite and all tests passed, including the BCD math. This confirms the suite's tests are accurate.

If you haven't dug into the code, both binary and BCD math tests all the status bits - Carry, Zero, Negative, and Overflow. All are accurate in both modes, including math on invalid BCD numbers. Don't ask me how many hours I worked on that feature.

I am much more confident now that the 65816 Simulator is mostly working. I still have to work on getting the cycle counting verified, as I was focused on instruction accuracy. I'm sure there will be many exceptions to the basic cycle times listed in the datasheet.

Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: 65816 Test Suite

Post by BigEd »

Splendid news, well done! I get the feeling this test suite will lead to a great leap forward in several ways.
User avatar
Yuri
Posts: 372
Joined: 28 Feb 2023
Location: Texas

Re: 65816 Test Suite

Post by Yuri »

Seems that there is no uart.asm in the zip file. I commented out the include and it assembled and ran without issue though.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: 65816 Test Suite

Post by 8BIT »

Oops - uart.asm was for the sbc-4. The Kowalski version just uses the io.asm for terminal IO.

Good catch! I'll edit the post with the update.

thanks!
Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: 65816 Test Suite

Post by 8BIT »

The zip file has been updated in the head post. It also includes a fix for a few 16-bit immediate values that were not declared with the !# operand specifier. This would have resulted in errors for the pending 1.4.0.3 version release coming very soon.

Daryl
Please visit my website -> https://sbc.rictor.org/
Post Reply