Fun with reset signals
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
Fun with reset signals
Trying to diagnose a startup issue on the Genesis, so I figured I'd document what the reset signals do. There are a lot of them:
Reset signals
WRES - Active high reset signal, pressing the RESET switch shorts it to +5V. Normally held low with a pull-down resistor. No debouncing.
VRES# - To 68000 and cartridge connector, generated by 315-5364. Asserted for 128 VCLKs (Thanks Eke!) which is approx. 130ns/cycle x 128 cycles = 16.7ms. Triggered by the rising edge of either SRES (power-up reset) or WRES (reset button) being asserted.
MRES# - Directly from the RC reset circuit (R=47K, C=10uF), goes to cartridge connector.
SRES# - Output of a LM358 that compares the output of the charging capacitor on MRES# to Vref (measured at 2.0V) from the CXA1145 Vref pin. The output is 0V when MRES#<Vref and 5V when MRES#>= Vref.
FRES - Active high reset signal. The falling edge is synchronous with SRES#. Goes to the expansion connector.
Reset button
When the reset button is pressed, VRES# is pulsed low starting a variable amount of time from the rising edge of WRES. Minimum is 2.1ms. The VRES# low pulse is always 128 VCLKs (16.7us). This means that jamming on the reset button will not send malformed reset pulses to the 68000.
Power up
When power is applied, MRES# rising edge to SRES# rising edge is about 166ms. VRES# rising edge is always 12.8ms after SRES#.
On a VA6 MegaDrive (315-5433 ASIC), the SRES# rising edge to VRES# rising edge is 98304 VCLKs (256*384) consistently.
Power down
When power is removed, SRES# falls first, then VRES# about 2.5ms later. MRES# stays high for quite a while the capacitor discharges.
In general
MRES# is the main reset signal.
SRES# is derived from MRES# and is asserted earlier than VRES#. It goes to the 315-5313, 315-5309, and 315-5364 such that these chips are reset well before the 68000 starts running. It is only asserted on a cold boot.
The 315-5364 ensures VRES# is asserted for the correct amount of time based on the SRES# and WRES inputs.
For cartridges, MRES# indicates a power-up reset (cold boot), VRES# is for both power-up and reset-button resets.
Executing a RESET instruction on the 68000 will pulse VRES# for 128 VCLKs like normal, and no other reset signals will be affected.
A circuit in the cartridge can drive MRES# low using an open collector output, which will in turn trigger SRES# and then VRES#. This will fake a cold-boot event without cycling the power.
Reset signals
WRES - Active high reset signal, pressing the RESET switch shorts it to +5V. Normally held low with a pull-down resistor. No debouncing.
VRES# - To 68000 and cartridge connector, generated by 315-5364. Asserted for 128 VCLKs (Thanks Eke!) which is approx. 130ns/cycle x 128 cycles = 16.7ms. Triggered by the rising edge of either SRES (power-up reset) or WRES (reset button) being asserted.
MRES# - Directly from the RC reset circuit (R=47K, C=10uF), goes to cartridge connector.
SRES# - Output of a LM358 that compares the output of the charging capacitor on MRES# to Vref (measured at 2.0V) from the CXA1145 Vref pin. The output is 0V when MRES#<Vref and 5V when MRES#>= Vref.
FRES - Active high reset signal. The falling edge is synchronous with SRES#. Goes to the expansion connector.
Reset button
When the reset button is pressed, VRES# is pulsed low starting a variable amount of time from the rising edge of WRES. Minimum is 2.1ms. The VRES# low pulse is always 128 VCLKs (16.7us). This means that jamming on the reset button will not send malformed reset pulses to the 68000.
Power up
When power is applied, MRES# rising edge to SRES# rising edge is about 166ms. VRES# rising edge is always 12.8ms after SRES#.
On a VA6 MegaDrive (315-5433 ASIC), the SRES# rising edge to VRES# rising edge is 98304 VCLKs (256*384) consistently.
Power down
When power is removed, SRES# falls first, then VRES# about 2.5ms later. MRES# stays high for quite a while the capacitor discharges.
In general
MRES# is the main reset signal.
SRES# is derived from MRES# and is asserted earlier than VRES#. It goes to the 315-5313, 315-5309, and 315-5364 such that these chips are reset well before the 68000 starts running. It is only asserted on a cold boot.
The 315-5364 ensures VRES# is asserted for the correct amount of time based on the SRES# and WRES inputs.
For cartridges, MRES# indicates a power-up reset (cold boot), VRES# is for both power-up and reset-button resets.
Executing a RESET instruction on the 68000 will pulse VRES# for 128 VCLKs like normal, and no other reset signals will be affected.
A circuit in the cartridge can drive MRES# low using an open collector output, which will in turn trigger SRES# and then VRES#. This will fake a cold-boot event without cycling the power.
Last edited by Charles MacDonald on Sun Oct 27, 2013 4:05 am, edited 2 times in total.
-
- Very interested
- Posts: 2443
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Naiss info !
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 750
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
What about ZRES ( which goes to Z80 and YM2612 RESET pins) ? Is it asserted with VRES when Reset Button is pressed ? Does it remain asserted until software restarts the Z80 manually ?
There is also FRES, which goes to Mega CD unit through the expansion connector, it seems to be simply an inverted SRES signal, used to reset the whole Mega CD unit.
There is also FRES, which goes to Mega CD unit through the expansion connector, it seems to be simply an inverted SRES signal, used to reset the whole Mega CD unit.
Last edited by Eke on Wed Apr 24, 2013 8:56 pm, edited 1 time in total.
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
Ah, that's a really good question, I'll check it in a few days and update this post.Eke wrote:What about ZRES ( which goes to Z80 and YM2612 RESET pins) ? Is it asserted with VRES when Reset Button is pressed ? Does it remain asserted until software restarts the Z80 manually ?
I'll see if I can test FRES too, at least to determine when/how it is asserted in relation to the others.
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
Aha! I didn't think to observe the reset signals against the 68000 clock -- great idea. I assumed the delays were made in an analog fashion, but clearly they have some kind of 7-bit counter here to measure that time period so precisely.Eke wrote:I was able to test it and can confirm that, when RESET button is pressed, !ZRES is held low at the same time as !VRES and !HALT on 68k side... but remains low after that until software enables it again.
68k RESET pulse is asserted for 128 VCLK
Thanks for testing these things. I don't suppose you've looked at FRES? (or maybe it isn't very interesting
-
- Very interested
- Posts: 750
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
This sounds quite logical, you know.Eke wrote:I was able to test it and can confirm that, when RESET button is pressed, !ZRES is held low at the same time as !VRES and !HALT on 68k side... but remains low after that until software enables it again.
And this describes in M68KUM.Eke wrote:68k RESET pulse is asserted for 128 VCLK
I know it's logical, but I was playing with my new "toy" and it doesn't cost much time to confirm itThis sounds quite logical, you know.
M68K user manual says !RESET (and !HALT) should be asserted at least 132 cycles to be safe, because the RESET instruction itself asserts !RESET during 124 cycles but that 10 cycles are enough to reset the processor if you don't care about RESET instruction (not sure how it behaves when the main ASIC is forcing reset line in high state and CPU drives it low).And this describes in M68KUM.
Again, I agree it's not very important information but the point was more to document unverified stuff, for the "fun", you know.
I tried but couldn't really figure anything, even when !DISK input is forced to GND, I never saw it changing when !VRES and !ZRES are going low, only strange pulse (very short) that could as well be periodic noise. I tried picking up the signal directly at the connector or just before the resistor but it was the same. Maybe I'm doing something wrong, I really don't know as I didn't really spend much time on it then.I don't suppose you've looked at FRES?
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
Personally I always think such research is necessary. Even if it's to confirm things already known, every bit of information is important. It's great that you are looking into these things.Eke wrote:I know it's logical, but I was playing with my new "toy" and it doesn't cost much time to confirm it
Hmm, that's okay then. Maybe it is only asserted in strange situations, like transitioning from CART pulled low to high. Sometime I'll try looking at it again.I tried but couldn't really figure anything, even when !DISK input is forced to GND, I never saw it changing when !VRES and !ZRES are going low, only strange pulse (very short) that could as well be periodic noise. I tried picking up the signal directly at the connector or just before the resistor but it was the same. Maybe I'm doing something wrong, I really don't know as I didn't really spend much time on it then.
I looked at the Mega CD schematics and it uses FRES, so at least we know it has some purpose.
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
FWIW, page 70 of 105 of the "Mega CD 1 of 2 A4.pdf" service manual has a description of the FRES signal in Japanese (renamed "IFRES"), as well as FDC ("IFDC") and other signals that go between the Mega Drive expansion port and 315-5548 inside the Mega CD.
Maybe somebody could translate the FRES description?
Maybe somebody could translate the FRES description?
I couldn't see FRES changing when pushing the RESET button, i think it only reflects changes on SRES, which, as mentionned above, is asserted on Power On or when MRES input pin is asserted from cartridge.
From the early revisions schematics, you can see that FRES comes from the I/O chip, which only get SRES, not WRES/VRES
From the early revisions schematics, you can see that FRES comes from the I/O chip, which only get SRES, not WRES/VRES
-
- Very interested
- Posts: 292
- Joined: Sat Apr 21, 2007 1:14 am
I did some tests on a Genesis 2 (VA0) today. FRES is pulsed high when you apply power, and otherwise always remains low.
The pulse width is about 137.4 ms wide. The falling edge is synchronous with the rising edge of SRES, e.g. 12.8ms before VRES# goes high, FRES goes low and SRES# goes high.
The rising edge is a little more complex. For some reason VRES# has a 2ms high pulse after the 7805 output has risen to about 4V, and the rising edge of FRES is synchronous with the falling edge of that short pulse. I'm fairly certain an original model Genesis did not do this on VRES#, so I can't say how FRES acts on that system.
Regardless, FRES appears to be an active-high reset signal triggered once during power-up and never again.
The pulse width is about 137.4 ms wide. The falling edge is synchronous with the rising edge of SRES, e.g. 12.8ms before VRES# goes high, FRES goes low and SRES# goes high.
The rising edge is a little more complex. For some reason VRES# has a 2ms high pulse after the 7805 output has risen to about 4V, and the rising edge of FRES is synchronous with the falling edge of that short pulse. I'm fairly certain an original model Genesis did not do this on VRES#, so I can't say how FRES acts on that system.
Regardless, FRES appears to be an active-high reset signal triggered once during power-up and never again.