Cartridge slot questions
Cartridge slot questions
Here I am trying to document the cartridge slot because it turns out that trying to find anything is a pain in the ass (let alone anything accurate). No wonder this thread exists.
The function of the pins in Master System mode is woefully underdocumented. Those that are the same function are easy to guess, but then we have the Pause button, the Reset button, whatever other lines YM2413 needs (we know that it works because there are cartridges with it, yet nobody seems to have publicly documented them? at least /IOREQ, but seems a few others are needed too). Trying to look up PBC schematics only gives me one that's both incomplete and full of misleading pin names, and trying to look up PBC board pics isn't exactly helping much either.
How do /CAS2 and /ASEL work exactly? (OK, they seem to go together with /CE_0 too) Yes, this was discussed in the Plutiedev Discord server already, but I'd like to have more permanent documentation here (maybe have somebody draw a pic of the signal timing :P).
There's an EDCLK line on the cartridge slot, which is the clock used for H40 pixels. I suppose this is why the 32X only officially supports H40 mode? Moreover, how many cycles does it take to advance one pixel? (I think one pixel is two cycles? though I could be wrong here)
How do the audio lines work? I know SL1 and SR1 are the left and right speaker input respectively, but it seems knowledge ends at "the 32X connects them" and "Nomad and model 3 lack them". What's the voltage range for them?
EDIT: oh, and before I forget, also it'd be nice to know what incompatibilities are out there (i.e. which models are missing to connect which lines).
The function of the pins in Master System mode is woefully underdocumented. Those that are the same function are easy to guess, but then we have the Pause button, the Reset button, whatever other lines YM2413 needs (we know that it works because there are cartridges with it, yet nobody seems to have publicly documented them? at least /IOREQ, but seems a few others are needed too). Trying to look up PBC schematics only gives me one that's both incomplete and full of misleading pin names, and trying to look up PBC board pics isn't exactly helping much either.
How do /CAS2 and /ASEL work exactly? (OK, they seem to go together with /CE_0 too) Yes, this was discussed in the Plutiedev Discord server already, but I'd like to have more permanent documentation here (maybe have somebody draw a pic of the signal timing :P).
There's an EDCLK line on the cartridge slot, which is the clock used for H40 pixels. I suppose this is why the 32X only officially supports H40 mode? Moreover, how many cycles does it take to advance one pixel? (I think one pixel is two cycles? though I could be wrong here)
How do the audio lines work? I know SL1 and SR1 are the left and right speaker input respectively, but it seems knowledge ends at "the 32X connects them" and "Nomad and model 3 lack them". What's the voltage range for them?
EDIT: oh, and before I forget, also it'd be nice to know what incompatibilities are out there (i.e. which models are missing to connect which lines).
Sik is pronounced as "seek", not as "sick".
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: Cartridge slot questions
That still doesn't tell me what voltage range you should use to keep the audio signal in a "reasonable" range (I'm not a Mega Drive circuit expert :v), only that it's mixed as-is with the rest of the audio (my initial guess would be that the ideal range would be ±1V but honestly I could be wildly wrong). The 75ohm resistor seems to be in the system itself rather than the cartridge, but we may need to confirm if it's the case in all systems?
Anyway, what we figured out in the Plutiedev Discord about the Master System mode so far (between searching around and looking at schematics):
EDIT: screw this paragraph, it seems to not boot if VA22 isn't pulled low (??? isn't /M3 enough?) We have no clue what VA22 is for, except that the PBC connects it to ground. The Master System cartridge slot has a /CONT line which is exposed as-is to the Z80 through the ports, in a Master System it's usually high (probably left floating), but on Mega Drive it shows up as low. I wonder if VA22 is that /CONT line, but until we probe it together with a test ROM we won't know.
EDIT: VA20 seems to stay high? :/ (no idea if it's an input or output here) VA20 is also a suspicious gap here. It's possible it isn't used at all, but again unless we probe it we can't know for sure.
EDIT: these seem dead in Master System mode (unsurprising). Also, do /CART and /TIME have any effect in Master System mode? (my gut feeling is no, but would be nice to know for sure… Sega sure as heck missed the opportunity of giving them what was mapped to VA21 and VA19 since they fill more or less the same role) Also /ASEL while we're at it, for completeness.
EDIT: had forgotten about a few lines.
EDIT: update (more lines probed).
EDIT: thanks to Enforced for probing the lines :v
…also the rest from random pages on the internet (and the dB Electronics stuff linked)
Anyway, what we figured out in the Plutiedev Discord about the Master System mode so far (between searching around and looking at schematics):
- /M3: pull this low (of course)
- VA16-1: address bus
- VD7-0: data bus
- VA23: Pause button
- VA22: always pull low? (PBC ties it to ground, refuses to run without this)
- VA21: pull low for card, floating for cartridge
- VA20: unused?
- VA19: /IOREQ
- VA18: /CE for cartridge
- VA17: /CE for card
- /CE_0: Master System's /M0-7 (/CE for $0000-$7FFF)
- /CAS2: Master System's /M8-B (/CE for $8000-$BFFF)
- /CAS0: /OE (Master System's /RD)
- /LWR: /WE (Master System's /WR)
- /MRES: hard reset as usual
- /CART: ignored
- /TIME: never asserted (likely unused)
- /DTACK: never asserted (likely unused)
- /AS: never asserted (likely unused)
- /ASEL: never asserted (likely unused)
- Video signals: work as usual
- /VRES: becomes useless (always shows as low)
EDIT: screw this paragraph, it seems to not boot if VA22 isn't pulled low (??? isn't /M3 enough?) We have no clue what VA22 is for, except that the PBC connects it to ground. The Master System cartridge slot has a /CONT line which is exposed as-is to the Z80 through the ports, in a Master System it's usually high (probably left floating), but on Mega Drive it shows up as low. I wonder if VA22 is that /CONT line, but until we probe it together with a test ROM we won't know.
EDIT: VA20 seems to stay high? :/ (no idea if it's an input or output here) VA20 is also a suspicious gap here. It's possible it isn't used at all, but again unless we probe it we can't know for sure.
EDIT: these seem dead in Master System mode (unsurprising). Also, do /CART and /TIME have any effect in Master System mode? (my gut feeling is no, but would be nice to know for sure… Sega sure as heck missed the opportunity of giving them what was mapped to VA21 and VA19 since they fill more or less the same role) Also /ASEL while we're at it, for completeness.
EDIT: had forgotten about a few lines.
EDIT: update (more lines probed).
EDIT: thanks to Enforced for probing the lines :v
…also the rest from random pages on the internet (and the dB Electronics stuff linked)
Last edited by Sik on Sun Jan 05, 2020 9:19 pm, edited 1 time in total.
Sik is pronounced as "seek", not as "sick".
Re: Cartridge slot questions
Here are schematics I created of the PowerBase Converter and Mega Adapter just so they don't get lost to time.
- Attachments
-
- PowerbaseConverter.png (160.51 KiB) Viewed 48263 times
-
- MegaAdapter.png (144.49 KiB) Viewed 48263 times
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: Cartridge slot questions
I can tell you for certain the cart audio lines work like normal in SMS mode. The MD Neo Myth cart uses them for the YM2413 output when enabled for use with FM-supported games. Makes sense as they're just tied straight into the audio mixing.
Also, however the cart adapters work, the YM works from the cart. So all needed lines are there.
The SMS Neo Myth also has a YM2413 in the cart, but since there's no audio lines on a real SMS cart port, it has a mixer on the cart. The audio from the SMS goes to the cart where it's mixed with the YM audio and then goes out to your sound system.
Also, however the cart adapters work, the YM works from the cart. So all needed lines are there.
The SMS Neo Myth also has a YM2413 in the cart, but since there's no audio lines on a real SMS cart port, it has a mixer on the cart. The audio from the SMS goes to the cart where it's mixed with the YM audio and then goes out to your sound system.
Re: Cartridge slot questions
That’s interesting as the Export SMS carts do not have IOREQ present. The Japanese SMS has an IORD and IOWR signal. Maybe they are using some logic to try to figure out when an IO request is happening?
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: Cartridge slot questions
Indeed, there are no info about voltage range. All that we have: 75 Ohm terminated and DC cancelled. Anyway, since that goes to the first stage AMP it can't be stronger than regular Line Out. I think it is about ~250mV.Sik wrote: ↑Sun Jan 05, 2020 6:42 pmThat still doesn't tell me what voltage range you should use to keep the audio signal in a "reasonable" range (I'm not a Mega Drive circuit expert :v), only that it's mixed as-is with the rest of the audio (my initial guess would be that the ideal range would be ±1V but honestly I could be wildly wrong). The 75ohm resistor seems to be in the system itself rather than the cartridge, but we may need to confirm if it's the case in all systems?
Re: Cartridge slot questions
I suppose it would be nice to know what range the 32X outputs on the audio lines (though I heard reports that the 32X's output may be a bit too loud). It is the one piece of official hardware that makes use of it. Also the cartridges with YM2413 seem to use its output directly (?) so maybe looking at that would be good as well?
https://www.smspower.org/Development/CartridgeSlot
I'm guessing that /IOREQ+/RD = /IORD and /IOREQ+/WR = /IOWR, meaning you have to rely on multiple lines. But the separate read and write lines are likely going to be connected straight to the relevant chips anyway.
Except Western SMS does have /IOREQ? (what it lacks is separate /IORD and /IOWR, but it has the unified /IOREQ much like Mega Drive does)
https://www.smspower.org/Development/CartridgeSlot
I'm guessing that /IOREQ+/RD = /IORD and /IOREQ+/WR = /IOWR, meaning you have to rely on multiple lines. But the separate read and write lines are likely going to be connected straight to the relevant chips anyway.
Sik is pronounced as "seek", not as "sick".
Re: Cartridge slot questions
You’re right, Sik. My bad. I was confusing the lack of IORD and IOWR on Export SMS with no IO at all. Apologies.
-
- Very interested
- Posts: 746
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Re: Cartridge slot questions
Also MCD does via EXT socket. So yes, we should study those hardware.Sik wrote: ↑Mon Jan 06, 2020 5:23 amI suppose it would be nice to know what range the 32X outputs on the audio lines (though I heard reports that the 32X's output may be a bit too loud). It is the one piece of official hardware that makes use of it. Also the cartridges with YM2413 seem to use its output directly (?) so maybe looking at that would be good as well?
Last edited by HardWareMan on Tue Jan 07, 2020 10:56 am, edited 1 time in total.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: Cartridge slot questions
I would assume that the CMOS 32X custom chip output a 5V (4.whatever-ish V) square wave. That is fed to an 8.2 Kohm series resistor which then feds a couple caps (for filtering and DC removal), with a 3 Kohm resistor going to ground.
Code: Select all
0.1uF
PWM ----------8.2K----------------------||------------------mixer input
| |
3K 3300 pF
| |
GND GND
Re: Cartridge slot questions
OK this kinda stalled.
Forgot to mention that when the Master System stuff was probed the video signals remained intact (if useless due to being stuck with a H40 clock), so there goes the whole deal with EDCLK, /HSYNC, /VSYNC and /YS.
Was discussing this in Plutiedev and our guesstimation from that last circuit is that the 32X may be outputting under ±0.7V (I think Soni came first with a number and then we adjusted for the bias removal), so that may be our reference range? Albeit now I think it'd be better to also measure the Mega CD as well as the YM2612 and PSG themselves (at least in a few boards) and document all of them so people can get an idea of what to expect (as there's no actual hard limit on the voltage range).
EDIT: to be specific, the number we got is 1.333V, which divided by two is 0.667V… 0.7V feels like far too much rounding, but that's what the discussion settled on. Tolerances and such aren't helping our case either.
Forgot to mention that when the Master System stuff was probed the video signals remained intact (if useless due to being stuck with a H40 clock), so there goes the whole deal with EDCLK, /HSYNC, /VSYNC and /YS.
Was discussing this in Plutiedev and our guesstimation from that last circuit is that the 32X may be outputting under ±0.7V (I think Soni came first with a number and then we adjusted for the bias removal), so that may be our reference range? Albeit now I think it'd be better to also measure the Mega CD as well as the YM2612 and PSG themselves (at least in a few boards) and document all of them so people can get an idea of what to expect (as there's no actual hard limit on the voltage range).
EDIT: to be specific, the number we got is 1.333V, which divided by two is 0.667V… 0.7V feels like far too much rounding, but that's what the discussion settled on. Tolerances and such aren't helping our case either.
Sik is pronounced as "seek", not as "sick".
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Re: Cartridge slot questions
Someone make me a 32X test ROM with same sort of grayscale ramp as seen here : viewtopic.php?f=22&t=2188
And while at it, play a full scale sinewave on both L and R side, I'll get the scope out and measure the levels at various points.
And while at it, play a full scale sinewave on both L and R side, I'll get the scope out and measure the levels at various points.
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: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: Cartridge slot questions
I'll work on that tomorrow. Should be pretty easy.
EDIT: Okay, here's my quick test. Fusion seems to have some noise in the PWM audio, though there really shouldn't be any. It's 44.1kHz with a range of 512. PAL allows a max range at 44.1kHz of 517, so it's not quite absolute full range. I did color ramps to go with the greyscale ramp. Source included.
EDIT: Okay, here's my quick test. Fusion seems to have some noise in the PWM audio, though there really shouldn't be any. It's 44.1kHz with a range of 512. PAL allows a max range at 44.1kHz of 517, so it's not quite absolute full range. I did color ramps to go with the greyscale ramp. Source included.
Re: Cartridge slot questions
*wonders if Tiido noticed that edit*
Alright, still trying to understand what /CAS2 does no matter how many times I get it explained x_X So far all I can seem to understand for sure is that /CAS0 asserts before it and that /ASEL is somehow involved (not sure about /ASEL's timing though). Oh, and this thread has their timings when a DMA transfer is in progress, which confuses me more as it looks as if every access asserted them which I assumed wasn't the case (besides /CAS0)?
I suppose that main thing confusing me is that I'm not sure when is /CAS2 supposed to assert (let alone what effects $A11000 has on all this).
Alright, still trying to understand what /CAS2 does no matter how many times I get it explained x_X So far all I can seem to understand for sure is that /CAS0 asserts before it and that /ASEL is somehow involved (not sure about /ASEL's timing though). Oh, and this thread has their timings when a DMA transfer is in progress, which confuses me more as it looks as if every access asserted them which I assumed wasn't the case (besides /CAS0)?
I suppose that main thing confusing me is that I'm not sure when is /CAS2 supposed to assert (let alone what effects $A11000 has on all this).
Sik is pronounced as "seek", not as "sick".