It is currently Wed Nov 22, 2017 10:47 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re:
PostPosted: Sun Jun 16, 2013 4:58 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
blargg wrote:
I just tested and 9C and 9E are screwey. I need to take them off the test. Depending on X and Y they sometimes write to $700, among other things. Maybe someone else can figure them out properly.


Stumbled upon this thread after noticing that those fail in my emu ("9C SYA abs,X", "9E SXA abs,Y").

My guess is that the "AND addr_high + 1" behavior comes from always calculating addr_high + 1, regardless of whether its needed to correct the address. In that case, maybe the screwy behavior occurs when the value is actually used, i.e. when "addr + x" or "addr + y" crosses into a new page.

Maybe it affects AXA and TAS in addition to SYA and SXA in that case.


Top
 Profile  
 
 Post subject: Re: New CPU test ROM
PostPosted: Sun Jun 16, 2013 5:26 am 
Offline
User avatar

Joined: Fri Mar 08, 2013 9:55 pm
Posts: 349
Location: Linköping, Sweden
Implementing it like that does make the tests pass. :)

If we cross over into a new page, then the calculated addr_high + 1 gets used, but for these opcodes addr_high + 1 is corrupted (prolly due to the result being put on the same bus as x/y), and the target address for e.g. SYA becomes ((y & (addr_high + 1)) << 8) | addr_low instead of the normal ((addr_high + 1) << 8) | addr_low. If we don't wrap to a new page, then the corrupted value doesn't get used for the address, so nothing special happens.

I'm guessing it works like that for all the instructions where the value is influenced by addr_high + 1, but confirmation would be nice.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: *Spitfire_NES* 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:  
Powered by phpBB® Forum Software © phpBB Group