It is currently Fri Dec 14, 2018 5:54 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sun Aug 10, 2014 9:07 am 
Offline
User avatar

Joined: Fri Jan 24, 2014 9:05 am
Posts: 164
Location: Hungary
So I've been wondering if all the reset button on the console does is merely copying the reset vector to the program counter, or more? Does a hardware reset cause any changes to the PPU or the APU (resetting the channel sequencers or whatever) , and if so, does everything return to an unknown state like during startup?


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 10:35 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20870
Location: NE Indiana, USA (NTSC)
http://wiki.nesdev.com/w/index.php/PPU_power_up_state


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 10:50 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7821
Location: Seattle
And http://www.pagetable.com/?p=410 (6502 RESET is treated as a special case of an interrupt)


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 11:46 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7604
Location: Chexbres, VD, Switzerland
It's imporant to know that, on a western PAL or NTSC front loader NES, the RESET button actually reset the CIC, which in turn resets both the CPU and PPU.

On the original Famicom, as well as the redesigned Famicom AV, and the USA top loader (which looks similar to the Famicom AV), the Reset button just resets the CPU, and the PPU continues to run (and display a picture on the screen) while the button is held.

I don't know what is the situation on Famiclones.


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 7:48 pm 
Offline
User avatar

Joined: Fri Aug 23, 2013 2:14 am
Posts: 274
I figured this would be a good place to ask. I have a multicart with several games on it, and one of them is Karateka. When you lose, the game seems like it performs a software based reset, as it would take you back to the multicart menu. Did any other games use reset as a way to get back to the title screen? No one would've noticed it actually reset until it was on a multicart, as they probably wouldn't even imagine a thing such as a multicart could even exist.


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 7:51 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20870
Location: NE Indiana, USA (NTSC)
Most games do go back to the title screen after a Reset press.

The only one I can think of that doesn't is X-Men for the Sega Genesis, where one scene near the end requires the player to press the Reset button to restart an in-game computer. If the player presses Reset during this sequence, the game instead goes to the next scene; otherwise, it goes to the game's the opening scene. The way it tells the difference is by storing data in a certain part of RAM, which is preserved across a reset unless the game program explicitly clears it.


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 8:13 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7015
Location: Canada
OneCrudeDude: A simulated reset can be done with a single instruction. jmp ($FFFC)

This is very handy for returning to the title screen in a lot of situations.


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 11:38 pm 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1334
I think his point is that he finds it odd that Karateka returns to the [i]multicart's[i] menu screen, not the regular title screen, leading to the question of whether or not it is common for games to invoke a soft reset to return to their title state.


Top
 Profile  
 
PostPosted: Sun Aug 10, 2014 11:48 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3725
Location: Mountain View, CA
Thread makes me think of Zanac. If you die, you end up back at the main title screen and so on, which is almost certainly accomplished by simply jmping to wherever the "main entry point" is (but not the reset vector (i.e. not jmp ($fffc))). Instead, if you hit reset on the console 13 times, you end up with a stage select menu when trying to start the game. As a kid I thought this was incredible because "how does it know I'm hitting reset?!?!" -- when later I found out the NES was simply a 6502 console the reset vector point became obvious -- surely there's just some code that the vector points to which does clc/adc #1 to some ZP variable and later does cmp #13/bcs do_stage_select).

I'm sure there are games which just do jmp ($fffc) or some equivalent. And for a multicart, they probably had to insert a small bit of code to do the right thing (configure mapper) each time. They could have also done it through some means like setting the reset vector to a RAM address (ex. $0400) then in every game stick some actual code into RAM (at $0400) that did the mapper setup/etc.. Wouldn't be the first time I've seen games use a reset vector address outside of ROM space.


Top
 Profile  
 
PostPosted: Mon Aug 11, 2014 5:26 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20870
Location: NE Indiana, USA (NTSC)
mikejmoffitt wrote:
I think his point is that he finds it odd that Karateka returns to the [i]multicart's[i] menu screen

Either games are patched to jump back to the menu on reset or the mapper watches the incoming clock signal to see whether it has stopped (as would happen during reset). I have made multicarts using the former.


Top
 Profile  
 
PostPosted: Mon Aug 11, 2014 10:11 am 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 1024
I am aware that on the RF Famicom, the reset button is only connected to the CPU; I have seen the schematics. You should consider that different implementations will do different things, as already mentioned.

tepples wrote:
Either games are patched to jump back to the menu on reset or the mapper watches the incoming clock signal to see whether it has stopped (as would happen during reset). I have made multicarts using the former.


Although I have not done (yet), I have suggested once, that a game could check if the reset vector has been tampered with; if so, display an extra option on the main menu that says "QUIT" and jumps through the reset vector if activated.

_________________
.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 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