DSP1 question
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: DSP1 question
Oh, look at that, they're on the side.
Well, I didn't want to get the camera out, so you'll have to take my word for it.
[DSP1] Pilotwings (M7600A \ 0 N 2)
[DSP1A] Super 3D Baseball (M7600A \ 36 3)
[DSP1B] 3D Ballz (M7600A \ 53 1)
[DSP2] Dungeon Master (M7600A \ 1 0 1)
[DSP3] SD Gundam GX (M7600A \ 42 3)
[DSP4] Planet's Champ - TG3000 (M7600A \ 52 1)
[ST010] Exhaust Heat II (M22000C \ 31 2)
[ST011] Hayazashi Nidan Morita Shougi (15.00X \ G1 Q)
[ST018] Hayazashi Nidan Morita Shougi 2 (M21440C \ 50 3)
[Cx4] Rockman X2 (20.0MC \ T D K Y)
[Cx4] Rockman X3 (M20000C \ 5N 1)
[SA1] Mini Yonku Shining Scorpion 4WD (no crystal)
[SPC7110] Tengai Makyou Zero - Far East of Eden (no crystal)
[Mario Chip 1] Star Fox (no crystal, but there's a capacitor where it normally would be, PCB labels it L1)
[GSU1] Wildtrax (21.4MC \ TDK T)
[GSU2] Super Mario - Yoshi's Island (M21440C \ 30 2)
DSP1B had a tiny bit of grime on the 6, so it looked a little like M7800A. But I really doubt it's the one exception.
ST011 was the only ceramic clock, and it was really, really hard to read, even with a magnifying glass. The G1 Q part is suspect.
Thanks for pointing this out. Looks like my timing for the DSP1-4 was a little bit too fast.
Well, I didn't want to get the camera out, so you'll have to take my word for it.
[DSP1] Pilotwings (M7600A \ 0 N 2)
[DSP1A] Super 3D Baseball (M7600A \ 36 3)
[DSP1B] 3D Ballz (M7600A \ 53 1)
[DSP2] Dungeon Master (M7600A \ 1 0 1)
[DSP3] SD Gundam GX (M7600A \ 42 3)
[DSP4] Planet's Champ - TG3000 (M7600A \ 52 1)
[ST010] Exhaust Heat II (M22000C \ 31 2)
[ST011] Hayazashi Nidan Morita Shougi (15.00X \ G1 Q)
[ST018] Hayazashi Nidan Morita Shougi 2 (M21440C \ 50 3)
[Cx4] Rockman X2 (20.0MC \ T D K Y)
[Cx4] Rockman X3 (M20000C \ 5N 1)
[SA1] Mini Yonku Shining Scorpion 4WD (no crystal)
[SPC7110] Tengai Makyou Zero - Far East of Eden (no crystal)
[Mario Chip 1] Star Fox (no crystal, but there's a capacitor where it normally would be, PCB labels it L1)
[GSU1] Wildtrax (21.4MC \ TDK T)
[GSU2] Super Mario - Yoshi's Island (M21440C \ 30 2)
DSP1B had a tiny bit of grime on the 6, so it looked a little like M7800A. But I really doubt it's the one exception.
ST011 was the only ceramic clock, and it was really, really hard to read, even with a magnifying glass. The G1 Q part is suspect.
Thanks for pointing this out. Looks like my timing for the DSP1-4 was a little bit too fast.
Re: DSP1 question
byuu wrote: [Mario Chip 1] Star Fox (no crystal, but there's a capacitor where it normally would be, PCB labels it L1)
[
Isn't a "L" designation for an inductor? Don't have a Yi near me at the moment.... You sure it's a cap?
Re: DSP1 question
Yeah, L is usually an inductor.Markfrizb wrote:Isn't a "L" designation for an inductor? Don't have a Yi near me at the moment.... You sure it's a cap?byuu wrote: [Mario Chip 1] Star Fox (no crystal, but there's a capacitor where it normally would be, PCB labels it L1)
There's two pertinent boards here, both are odd:
SHVC-1C0N5S-01
- has pads for a SMT 74'04 but has a through-hole inductor surface mounted between the pins of where the first inverter would have been. (Inductors in this form factor are often green.)
SNSP-1C0N5S-01
- is the one Byuu is talking about, where it's just a generic SMT rectangular prism. But yeah, it's labeled L1, and so I'd assume it's an inductor. SMT prism inductors are usually really low inductance, though; it's hard to get more than a few microhenries in one.
Given that neither board has a 74'04, I have to assume the MARIO CHIP has an internal clock source, an internal oscillator driver (and the inductor is used in its self-resonant mode), or it's fed off the 21MHz from the cartridge edge. snescentral only has one side of the PCBs, though, so I can't look for myself.
Re: DSP1 question
The second part of what you said.lidnariq wrote:, or it's fed off the 21MHz from the cartridge edge. snescentral only has one side of the PCBs, though, so I can't look for myself.
If you half an incoming frequency using a divide by 2 circuit (basically a DFF toggling), you get a really nice 50-50 square wave no matter what distorted garbage comes in. But to get the chip to run at the 21 MHz, well, then you have to have an on-board oscillator.
Re: DSP1 question
Thanks for writing down the part numbers & thanks for the photos! After updating the fullsnes.htm timing sections... these are the currently known cartridge/expansion clocks:
Newly added values are DSPn=7.600MHz and confirmed/corrected ST010=22.000MHz. And just discovered: SNES central does now have S-DD1 bottom side pics at http://www.snescentral.com/article.php?id=0046 - revealing that the board uses the SNES master clock, too.
Only missing value in the above list is the S-RTC clock source (probably 32.768kHz or 32.000kHz, not that it'd be too important, the RTC seconds output should be certainly 1Hz either way).
Code: Select all
DSPn 7.600MHz Plastic Type "[M]7600A" (used without divider)
ST010 22.000MHz Plastic Type "[M]22000C" (internally 11.000MHz)
ST011 15.000MHz Ceramic Type "15.00X" (used without divider)
ST018 21.440MHz Plastic Type "[M]21440C"
CX4 20.000MHz Plastic Type "[M]20000C" or "20.0MC/TDKY"
MC1 <master> SNES Master Clock
GSU1 21.4MHz Plastic Type "21.4MC/TDKT"
GSU2 21.44MHz Plastic Type "[M]21440C"
SA-1 <master> SNES Master Clock
S-DD1 <master> SNES Master Clock
SPC7110 <master> SNES Master Clock
SGB <master> SNES Master Clock
SGB2 20.9MHz External oscillator (located on PCBs solder-side)
BS-X 18.432MHz Satellaview Receiver Unit (on expansion port)
RTC-4513 32.768kHz On-chip 32.768kHz quartz crystal in RTC chip
S-3520 32.768kHz External 32.768kHz quartz crystal (SFC-Box)
S-RTC ? kHz External unknown-frequency crystal
ACE <dotclk> SNES Dot Clock (Exertainment RS232 on expansion port)
Only missing value in the above list is the S-RTC clock source (probably 32.768kHz or 32.000kHz, not that it'd be too important, the RTC seconds output should be certainly 1Hz either way).
Interesting theory... makes sense (at leats if the 21MHz SNES master clock is distorted (I've never checked that), or if it has some unexpected voltage). A workaround could be some divide-by-2 then multiply-by-2 circuit (but yeah, it may be cheaper/easier to use an on-board oscillator).whicker wrote:If you half an incoming frequency using a divide by 2 circuit (basically a DFF toggling), you get a really nice 50-50 square wave no matter what distorted garbage comes in. But to get the chip to run at the 21 MHz, well, then you have to have an on-board oscillator.
Re: DSP1 question
Either way, I suspect the inductor is there to serve as a current-mode lowpass filter, cleaning up the input so that any overtones of 21MHz are filtered out.
Re: DSP1 question
So should we be emulating the M21440C as 21440000hz or as 21477272hz?
How do you feel about emulating the tolerances of these oscillators?
For instance, a clock rate may nominally be 21477272hz (or 21440000hz maybe?), but in practice, the clock rate varies by a small amount. And for ceramic types, by a larger margin. And the clock can fluctuate a bit as it heats up, and each chip can have their own variances despite being the same part.
Do you think it'd be a good thing to introduce some volatility to the clock rates? It might help to catch software that is really poorly written and only works due to an -exact- clock alignment. Such software would fail in many systems, so catching it might be beneficial.
I'm sure you are right. I don't even know what an inductor is. It was cap-like (eg cyllindrical.)Isn't a "L" designation for an inductor? Don't have a Yi near me at the moment.... You sure it's a cap?
It used the SNES 21MHz clock at half frequency. I definitely recall hearing that even this was unreliable, which explains why GSU1 boards have their own crystal. But I wonder how unreliable it is since Star Fox / Mario Chip 1 runs just fine.Given that neither board has a 74'04, I have to assume the MARIO CHIP has an internal clock source
Sure. Since you're probably the only other person alive who would ever even consider this ...Thanks for writing down the part numbers & thanks for the photos!
How do you feel about emulating the tolerances of these oscillators?
For instance, a clock rate may nominally be 21477272hz (or 21440000hz maybe?), but in practice, the clock rate varies by a small amount. And for ceramic types, by a larger margin. And the clock can fluctuate a bit as it heats up, and each chip can have their own variances despite being the same part.
Do you think it'd be a good thing to introduce some volatility to the clock rates? It might help to catch software that is really poorly written and only works due to an -exact- clock alignment. Such software would fail in many systems, so catching it might be beneficial.
Re: DSP1 question
As it reads 21440, it should be clearly 21.440xxxMHz. There might some reason why haven't used 21.477272Mhz: Probably the 21440 part was just cheaper, or maybe they wanted to avoid video interference, or (unlikely) 21.477 was too fast for the chip.byuu wrote:So should we be emulating the M21440C as 21440000hz or as 21477272hz?
Of course, emulating it as 21.477272Mhz would be ways easier and won't make too much of a difference.
Actually, that shape is more common for resistors (small capacitors usually look more like flat pan-cakes).byuu wrote:I'm sure you are right. I don't even know what an inductor is. It was cap-like (eg cyllindrical.)
An inductor is a piece of wire wrapped around a metal core. Like all wires it does (basically) just work as this: You input a voltage at one end, and it does output the same voltage at the other end. Which is just boring. The thing doesn't do much.
The special feature is that it behaves like a heavy wheel that gets accellerated by the electrons flowing through it. If you increase/decrease the voltage then it will rotate faster/slower, but as it acts like a heavy wheel it will take some time, and won't accellerate/deaccelerate instantly. In practice: It will keep a constant output voltage even if the input voltage goes up or down for a moment.
It could be used to eliminate high frequency noise (unlikely in this case, as it shall certainly pass the 21MHz, and I can't see where higher frequency noise could come from). Or (more likely & as lidnariq said) it's intended to filter out overtones. Eg. if the SNES were outputting something like a 21MHz square-wave, then the signal would (try to) accellerate the wheel instantly on raising and falling edges, but the inductor would refuse to pass the voltages like that, and instead it would spit-out some kind of 21MHz sine-wave.
I wouldn't go that far as doing that. And it would have it's ups and downs. Normal users (gamers) will probably just want the game to work as intended, they won't appreciate it if you make the emulation more unstable (unless a game should rely on unstable timings).byuu wrote:How do you feel about emulating the tolerances of these oscillators?
It might be useful for developers, though if you are doing it behind their back, then they won't have a clue why their games are crashing once or when. Best might be some stress test option with maybe 4 settings (Normal Clock, Slightly Faster, Slightly Slower, and Randomly Increasing/Decreasing Clock).
I doubt that there are too many developers for co-processor games, but for the APU it might be actually useful.
Re: DSP1 question
I wonder what clock signal the SNES PowerPak feeds to the DSP-1, given the fact that there doesn't seem to be any crystal on the PCB ...


Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)
Re: DSP1 question
There are advantages and drawbacks to simulating oscillator frequency ratio variance. The advantage, as you said, is that poorly written programs fail fast on the developer's machine. The drawback is that changing the ratio may change whether or not waiting for the DSP to finish causes a lag frame, breaking movie playback.byuu wrote:Do you think it'd be a good thing to introduce some volatility to the clock rates? It might help to catch software that is really poorly written and only works due to an -exact- clock alignment. Such software would fail in many systems, so catching it might be beneficial.
Re: DSP1 question
But an inductor by itself won't divide by two. One needs some kind of active logic to divide a frequency by two. (Is there some inside the MARIO CHIP?)byuu wrote:It used the SNES 21MHz clock at half frequency. I definitely recall hearing that even this was unreliable, which explains why GSU1 boards have their own crystal. But I wonder how unreliable it is since Star Fox / Mario Chip 1 runs just fine.Given that neither board has a 74'04, I have to assume the MARIO CHIP has an internal clock source
Re: DSP1 question
Yes - at least optionally: The CPU and the Multiply Unit of the MC1/GSU1/GSU2 can be configured to run at full speed or half speed (there are I/O ports that allow to do that configuration by software). Starfox and (most) GSU1 games are running the CPU at half speed (=around 10MHz). Don't know which multiply speed they do use.lidnariq wrote:One needs some kind of active logic to divide a frequency by two. (Is there some inside the MARIO CHIP?)
-
qwertymodo
- Posts: 775
- Joined: Mon Jul 02, 2012 7:46 am
Re: DSP1 question
byuu, unless you're going to start emulating delays down to the gate level within individual chips, emulating oscillator variance isn't likely to do anything useful...
Ramsis, if I had to guess, I'd say the PowerPak is generating the clock signal in the FPGA, they tend to have built in hardware for generating all sorts of clock multipliers/dividers. In turn, I'd guess the FPGA is using the SNES Master Clock signal from the cart edge as its clock source.
Also, from the SNESCentral pics of the S-RTC board, that's just a run-of-the-mill 32.768KHz tuning fork. It gets fed into a 16-bit counter in order to get out millisecond clock ticks. So, mystery solved, you now have all of them.
Ramsis, if I had to guess, I'd say the PowerPak is generating the clock signal in the FPGA, they tend to have built in hardware for generating all sorts of clock multipliers/dividers. In turn, I'd guess the FPGA is using the SNES Master Clock signal from the cart edge as its clock source.
Also, from the SNESCentral pics of the S-RTC board, that's just a run-of-the-mill 32.768KHz tuning fork. It gets fed into a 16-bit counter in order to get out millisecond clock ticks. So, mystery solved, you now have all of them.
Re: DSP1 question
Well yes, there may be cases where one might need to count timings in fractions of clock cycles, or cases where a signal is just changing so it is neither stable High nor stable Low. But simple timing problems could be emulated. For example an APU uploader that sends data at 100Kbyte/s, but can receive only 99Kbyte/s at the remote side.qwertymodo wrote:byuu, unless you're going to start emulating delays down to the gate level within individual chips, emulating oscillator variance isn't likely to do anything useful...
The http://www.snescentral.com/pcbboards.ph ... VC-LJ3R-01 photo doesn't show a part number. Or are those tiny cylindrical oscillators always having 32.768kHz?qwertymodo wrote:Also, from the SNESCentral pics of the S-RTC board, that's just a run-of-the-mill 32.768KHz tuning fork. It gets fed into a 16-bit counter in order to get out millisecond clock ticks. So, mystery solved, you now have all of them.
I think I have also came across circuits that used "32kHz" in the past... but maybe they did mean kilo=1024 in that circuits. And aside from the 32.xxxkHz range, theoretically it should be even possible to put something like a 20MHz quartz into that package.
Where do you have the info about the "16-bit counter" from? Do you have a matching Sharp datasheet?
Re: DSP1 question
That form factor (especially pay attention to diameter) seems to always be in the tens of kilohertz range. It doesn't necessarily have to be 32KiHz; I'm pretty certain I've seen things in that form factor all the way from 10kHz up to 60kHz or so.nocash wrote:Or are those tiny cylindrical oscillators always having 32.768kHz?
That seems to be more or less the only place where everyone uses kibihertz: 32kHz almost always means 32768Hz. I think it's because it, with a 15-bit counter, makes it utterly trivial to get out a 1Hz clock source for miscellaneous things.I think I have also came across circuits that used "32kHz" in the past... but maybe they did mean kilo=1024 in that circuits.
I believe the cut of the quartz crystal needed for the frequency range imposes some constraints on housing size and shape; I tentatively think you couldn't get a 20MHz crystal in that specific form factor.nocash wrote:And aside from the 32.xxxkHz range, theoretically it should be even possible to put something like a 20MHz quartz into that package.
Almost all battery-backed RTCs work the exact same way; a 32KiHz crystal divided in silicon to produce a clock pulse rate anywhere between 2⁰ and 2¹⁵. (e.g. the gameboy's MBC-3)nocash wrote:Where do you have the info about the "16-bit counter" from? Do you have a matching Sharp datasheet?