--


  << Previous Topic | Next Topic >>Return to Index  

Soft reset

January 10 2007 at 8:24 AM
Fibonacci 
from IP address 200.106.209.30

-
Yep, me again.

Found a(nother) bug in both the "original" and Christian's release of Generator: soft reset not working properly.
Let me explain myself: in the original Sega Genesis, a press of the Reset button (as opposed to switching off and on) did not erase all the current game data from memory; to mention an example I remember well, in the first Sonic The Hedgehog game, if you did the level select code and then resetted the game, you would only have had to press A+Start at the title screen to redo it.

This is not the case with Generator.
A call to the Soft Reset from the Emulation menu does not have this effect; instead, it appears to work as if the console were switched off and back on. The level select code I described has to be fully redone after a reset, instead of just pressing A+Start.
I seem to remember there were later Sonic games whose level select codes required resetting the game - I don't suppose that can be done with Generator either.

Any idea of why is this happening? Is there a true "soft reset" hidden somewhere in the emulator? If not, will it ever be implemented?

Thank you for your time,

-Fibo

 
 Respond to this message   
AuthorReply


82.141.49.122

Re: Soft reset

January 14 2007, 12:38 PM 

gen_softreset() calls only cpu68k_reset(). This clears the complete RAM:

memset(cpu68k_ram, 0, 0x10000);

I think that's indeed wrong. A soft reset would never cause the RAM to be cleared in any
machine. Does it help if you move this line into the conditional block? The hard reset will not work probably then because the RAM won't be cleared then either.

 
 Respond to this message   


82.141.49.122

Re: Soft reset

January 14 2007, 1:10 PM 

I just tried this and yes it works.

 
 Respond to this message   


82.141.49.122

Re: Soft reset

January 14 2007, 2:27 PM 

I just see that the key handling is also wrong in one place (in my patched version),
so that Control+R always causes a hard reset whether you hold shift or not.

ui-gtk.c should read like this instead:

case SDLK_r:
if (event.key.keysym.mod & KMOD_CTRL) {
if (event.key.keysym.mod & KMOD_SHIFT)
ui_gtk_hardreset();
else
ui_gtk_softreset();
}
break;

and ui-sdl.c:

case SDLK_r:
if (event.key.keysym.mod & KMOD_CTRL) {
if (event.key.keysym.mod & KMOD_SHIFT)
ui_sdl_hardreset();
else
ui_sdl_softreset();
}
break;

I know there are also some cheats for Sonic games that require inserting the cartridges one after another to unlock levels or similar. It would be interesting to see whether these worked if the memory wasn't reset on loading a ROM either.


 
 Respond to this message   
Fibonacci

200.106.209.30

Re: Soft reset

January 17 2007, 11:47 PM 

Excuse me, but how do you "move this line into the conditional block"?

 
 Respond to this message   


82.141.60.139

Re: Soft reset

January 18 2007, 12:35 AM 

Never mind. Just get revision 3 here:

http://ghostwhitecrab.com/generator/

 
 Respond to this message   
Fibonacci

200.106.209.30

Re: Soft reset

January 21 2007, 12:08 PM 

Well, soft reset IS working now. I'm curious as to how did you implement it? I mean, what does the code of cpu68k_reset(void) do?

 
 Respond to this message   


82.141.60.53

Re: Soft reset

January 21 2007, 2:02 PM 

I added the function cpu68k_ram_clear(). cpu68k_reset() did this unconditionally. Now this happens only initially and when calling gen_reset().

 
 Respond to this message   
Anonymous

200.106.209.30

Re: Soft reset

January 26 2007, 4:34 PM 

I meant, what does the function do, besides NOT clearing the memory?

 
 Respond to this message   


82.141.60.65

Re: Soft reset

January 26 2007, 5:20 PM 

Read the sources. I don't know more than what the sources can tell.

 
 Respond to this message   
Current Topic - Soft reset
  << Previous Topic | Next Topic >>Return to Index  
 Copyright © 1999-2008 Network54. All rights reserved.   Terms of Use   Privacy Statement