It is currently Mon Feb 18, 2019 10:04 pm

All times are UTC - 7 hours



Forum rules





Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Jan 24, 2019 2:02 pm 
Offline

Joined: Thu Jan 24, 2019 1:35 am
Posts: 4
Great, thank you. So what you sent me is what I should be outputting. Let's have a look at DAS.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2019 5:18 am 
Offline

Joined: Thu Jan 24, 2019 1:35 am
Posts: 4
Hi Kingizor,

How did you get this output. Is it via an emulator?

I can now get a pass but then it then freezes. Is it possible to get hold of the assembler code to see what the rom does.

Attachment:
spc_smp_001.jpg
spc_smp_001.jpg [ 1.13 MiB | Viewed 1064 times ]


Top
 Profile  
 
PostPosted: Sat Jan 26, 2019 9:20 am 
Offline

Joined: Sat Jun 18, 2011 10:50 am
Posts: 15
It seems to run one pass with the running hash, then checks the final result against what it expects. If the two hashes don't match it runs a second pass but logs each interim result along the way. Therefore, one can make it produce that list by damaging the running hash as the first pass is being run. By doing that in an emulator that would otherwise pass, it willl produce the list of "correct" hashes for each step.

Your output (in particular the "Passed 01" message at the bottom), indicates all the listed opcodes are fine so the issue seems to lie somewhere else. This is where things get tricky because there are a lot of reasons things might go wrong. It looks as though it completes the first pass successfully but doesn't manage to convey that back to the CPU, so it ends up running the second pass anyway and uploads the results.

I'd check that writes to $F1 are only clearing the ports on the SMP side, and that the 4-in, 4-out behaviour is correct on both sides.

If it's neither of those, then I'm not really sure. Whatever it is, it's probably not something that would affect most games, so I'd be happy to ignore it for the time being.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2019 9:44 am 
Offline

Joined: Thu Jan 24, 2019 1:35 am
Posts: 4
Thank you again Kingizor. I have checked the APU IOs and they work fine. There must be something else wrong and I suspect it comes from my CPU code. I need to to test/simulate each opcode with a fine tooth comb.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2019 7:45 pm 
Offline

Joined: Mon Mar 27, 2006 5:23 pm
Posts: 1401
Really aggressive CPU instruction validation is a large missing component in the entire emulation scene.

The test suites all rely on the CPU core to be mostly functional, and some of the video circuitry implemented, in order to even run them.

But if you have a bug in a critical CPU instruction, you're in for a world of pain. The best I've found is to find another emulator and generate an instruction trace log from it, and then go line by line looking for bad flag / accumulator calculations.

A testing framework needs to be able to evaluate each instruction, without any other part of the CPU being present. That's not an easy problem, and one I'm not up for trying to solve right now, but at least you can be ~95% sure that someone evaluating a CPU interpreter is going to be using C or C++, so C would be the language of choice for the evaluation framework.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2019 8:02 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21101
Location: NE Indiana, USA (NTSC)
Then perhaps the answer is to start with a direct port of "nestest" (a basic 6502 test suite by kevtris) to SPC700, so that an emulator developer can detect where PC/AXY diverge from a known good trace. This should help shake out the most obvious problems with "critical" instructions.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 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:  
Powered by phpBB® Forum Software © phpBB Group