6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Jun 01, 2024 10:41 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Feb 25, 2016 3:37 am 
Offline

Joined: Thu Feb 25, 2016 3:19 am
Posts: 1
Does anyone know where I can find a binary instruction code or assembly or ( whatever ) that I can test a 65c816 core with ?

The case is :

I have written an 65c816 cpu core in ARM emulation.
I want to verify the core againt some known ( test vector / machine code / assembly program ) test program to test all 256 instructions and with different size of A and indexes

Because I don't have a real 65c816 hardware, all I worked on are based on the instruction set and cycle timings from datasheets.
If I write the test program myself, I might be testing the same misinterpretation of the datasheet
( for example, if I misinterpretate some addressing modes, I will write both the core and the test with the same mistakes )\


Thanks for any pointer


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 25, 2016 9:15 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10811
Location: England
Hi funnyguy, and welcome!

I think there is as yet no 816 testsuite - I hope I am wrong - but it's a good idea to ask the question and see if anyone knows of anything.

There are a number of testcases in Bruce Clark's 816 primer, in the Primers and Tutorials section at http://6502.org/tutorials/
(This document also demonstrates how many special cases and oddities there are!)

A very few people here do have working 816 systems and might be willing to run programs on request. I have one or two 816 chips but no working system at present.

It would be excellent if we had something like Klaus Dormann's self-checking suite, or Wolfgang Lorenz' exhaustive test, for the 816. Both can be found on the emulators page of this site at http://6502.org/tools/emu/

Edit: bear in mind that Klaus wrote his suite to test his own emulator, and IIRC, he too lacked hardware. But with assistance from people here who did have hardware he was able to correct the few bugs in the suite. He has since also extended the suite, as people have discovered interesting emulation mistakes which were not covered. Collaboration has been very fruitful in this case.


Last edited by BigEd on Thu Feb 25, 2016 2:59 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 25, 2016 9:21 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Hi there -

I have the same problem - in my case, it's an emulator for the 65816 in Forth (https://github.com/scotws/crude65816) - and so far have not found a test suite.

I'm attempting to solve the problem by first running the known 6502 test routines for the emulated mode of the 65816; first runs produced a weird error which I think has to do with the break flag, but couldn't pin down without actual hardware. So the next step has been to buy a W65C265SXB (http://wdc65xx.com/65xx-store/sxb-board ... nt-system/) which has a 65816. Unfortunately, it basically doesn't have any documentation, so Andrew and I are putting that together (https://github.com/scotws/265SXB-Guide) and he has also written a tool to access the Flash memory, since there are no such routines in WDC's Mensch Monitor (https://github.com/andrew-jacobs/w65c265sxb-hacker).

I've gotten to the point where I can load programs to the 265SXB's RAM via S28 under Linux (viewtopic.php?f=1&t=3616). Now I'm adding fake versions of the utility routines from the Mensch Monitor (PUT_CHR, etc) to my emulator. Once that is done, I can - phew - start writing little test routines for the emulator and run them on actual hardware for comparison. However, I'll probably do something fun first - a line editor like ed? - instead of starting with systematic tests, because all work and no play makes Jack a Z80 user. That should also catch any really basic bugs in the emulator.

Rough plan for the real tests is to pick one subject at the time - say, the stack index addressing stuff - develop a little test that goes through all aspects of that, and then in the end combine these little routines all to something larger. The 6502 tests are so good that I probably am just going to use those for emulated mode and concentrate on native. That will be enough work.

Hope some of that helps, and let me say that I really like the idea of an ARM emulation. There is a forum thread for discussions on emulating the 65816 (viewtopic.php?f=8&t=3459) for the ugly details, by the way.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 25, 2016 2:44 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3362
Location: Ontario, Canada
scotws wrote:
all work and no play makes Jack a Z80 user.

Welcome, funnyguy! Can you tell who's the other funny guy among us? :D

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: