It is currently Mon Dec 11, 2017 2:10 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Nov 28, 2016 2:44 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5886
Location: Canada
koitsu wrote:
The general theory about the behaviour differing in emulators and PowerPak is that whatever's triggering the problem may relate to RAM or ZP variables having different contents vs. an actual cart. This is par for the course/understandable, not too exciting.

The original claim was the following (and it's completely invalid -- there is no "sub-frame timing" or anything else we can't figure out going on):

Quote:
[14:18] <Buddybenj> Well like I said this either relies on sub-fram timing or very low level hardware quirks, so it would be nice if someone could test on a real cartridge at least three times

I would guess that the inconsistency on the same system is probably mostly due to human timing differences, e.g. some frame counter or other state in RAM that changes depending on when you actually press buttons and ends up taking part in the execution of the bug?

On different systems (emulator / powerpak / cartridge / various NES machines) you have different RAM initialization (including the battery backed RAM), different open bus behaviours, etc. Even if we didn't have to deal with the first issue of it being inconsistent even on the same setup, any of these things could change the behaviour yet again.


Top
 Profile  
 
PostPosted: Mon Nov 28, 2016 3:34 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 301
Is it actually "safe" to bankswitch the bank the CPU is currently reading from? i.e is the bankswitching behavior guaranteed to finish in time for the next cpu read? This is what happens when the cpu writes to $8000 before executing the $02 opcode. If the switching is not over before the next read, maybe the CPU ends up reading potentially random data? (This is just a guess from someone who knows nothing about the actual hardware, so take it for what it's worth: not much.)

Mesen treats $02 as a crash (halt) and stops the emulation there, but even if I let it keep going, I only get a black screen with a repeating loop of instructions containing a fair bit of unofficial opcodes.

The end result could be affected by the bankswitch behavior + maybe how the unofficial opcodes are treated? (opcodes doesn't explain NES vs Powerpak though)
Random memory vs all 0s at boot doesn't seem to affect the execution (but I only tried either option once)


Top
 Profile  
 
PostPosted: Mon Nov 28, 2016 3:42 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6507
Location: Seattle
Sour wrote:
Is it actually "safe" to bankswitch the bank the CPU is currently reading from?
With only one exception, NES bankswitching happens during the write cycle, so there's no "currently reading from".

Quote:
i.e is the bankswitching behavior guaranteed to finish in time for the next cpu read?
Yes. For most (if not all) of the discrete logic mappers, the latching event happens on a rising edge of /ROMSEL (i.e. at the end), the data bus won't be driven until the next /ROMSEL (unless it's driven immediately because of the RMW double-write), and the output is valid within 32ns, substantially less than the 210ns between rising edge of /ROMSEL to next falling edge of same.

While it's possible that ASIC mappers could be slower enough to be a problem, 210ns is an eternity even in 1980s logic.


Top
 Profile  
 
PostPosted: Fri Dec 02, 2016 4:46 pm 
Offline
User avatar

Joined: Fri Sep 11, 2015 10:39 am
Posts: 106
rainwarrior wrote:
Metroid has lots of known crash/glitch passwords, but none of them are going to set fire to your TV.


No way man, that's totally a real thing. Back when the Super Nintendo just came out, there was this kid at my school who told me he got one, and then he tried turning it on and his NES on at the exact same time, and he swears to me that they both blew up!

Then in High School when he was 14 he said he had a corvette, but he just didn't drive it to school.

Image


(Okay honestly those were two different people)


Last edited by Marscaleb on Fri Dec 02, 2016 4:59 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Dec 02, 2016 4:56 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5886
Location: Canada
koitsu wrote:
Note: the "O" in MOTHER is actually a zero, not a capital-oh. Though I'd mention that.

It is not. It is a capital letter O. Using a zero will result in an "ERROR TRY AGAIN" message.

I tried this on my Wii U virtual console version just for fun, though nothing particularly interesting happened (the screen turned red and the game hung). I'm curious if they've fixed whatever bug they had in the 3DS emulator 5 years ago that caused it to hang the system.

Also, we're apparently having a related discussion in another thread about "why do these rumours keep coming up?"
http://forums.nesdev.com/viewtopic.php?f=2&t=15187


Top
 Profile  
 
PostPosted: Sat Dec 03, 2016 10:19 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3967
Marscaleb wrote:
No way man, that's totally a real thing. Back when the Super Nintendo just came out, there was this kid at my school who told me he got one, and then he tried turning it on and his NES on at the exact same time, and he swears to me that they both blew up!

Then in High School when he was 14 he said he had a corvette, but he just didn't drive it to school.


Does his uncle work for Nintendo?

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Mon Dec 05, 2016 11:39 am 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
Can the processor recover from one of the KIL (JAM) [HLT] illegal opcodes by issuing a reset/break/interrupt? Or, do you have to power cycle it after a KIL?


Top
 Profile  
 
PostPosted: Mon Dec 05, 2016 11:55 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5886
Location: Canada
I believe a reset works, but not an IRQ/NMI. Some info here: http://www.pagetable.com/?p=39


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 8 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