Cartridge slot questions

For hardware talk only (please avoid ROM dumper stuff)
TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Cartridge slot questions

Post by TmEE co.(TM) » Wed Jan 15, 2020 5:43 pm

I have not seen the edit, I was waiting for a new post lol. I'll do measurements soon.

32X audio output is almost 4Vpp on the cartslot pins, and it clips early, both tips of the sine are flat. There's a 45Hz -3db point high pass filter forming in most MDs (47µF cap in 32X, 75ohm load on most MDs).

Actual PWM output, aliased by the digital nature of the scope lol :
Image
Final output going to cartslot (prior to highpass filter capacitors) :
Image

Black starts at 25mV above ground and goes up to 800mV with more or less exactly 25mV steps on red and green channels, but blue channel is about 20mV lower in full scale amplitude, which explains the subtle yellow tint compared to MD output that is seen on all 32X I have had access to.
RGB output going to the TV has twice the amplitude of what goes in the encoder (and is divided by two by 75ohm resistors in the SCART cable and loading resistors in TV). Divider on 32X RGB divides the signal to about 660mV as it enters the encoder. MD input is divided by 2 exactly like SCART cable+TV would do, and 660mV also enters the encoder, so 32X and MD sides have equal weighting, with exception of blue channel on 32X which is nearly one RGB step lower in amplitude giving subtle yellow tinting.

Video output from 32X VDP :
Image
Last edited by TmEE co.(TM) on Thu Jan 16, 2020 12:26 am, edited 1 time in total.
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

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Cartridge slot questions

Post by Chilly Willy » Wed Jan 15, 2020 10:29 pm

Wow, the video is pretty damn linear. And it does make sense that the pwm would clip before reaching maximum - when dealing with RC filtered waves, there's a region towards the center that has better linearity that is lost towards the ends. When doing "one bit" audio waves, it's always recommended to stay well within the full range to avoid noise. One such implementation I've seen only uses the range from 1/4 total to 3/4 total. I imagine that the 32X "suffers" in a similar manner. Generally, games ran the audio at ~22kHz, and added four 8-bit samples together. If all the samples were at max and added in phase, that would put it very close to full range, but that wouldn't often be the case.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Cartridge slot questions

Post by TmEE co.(TM) » Thu Jan 16, 2020 12:25 am

The clipping is due to the mixing+amp chip, it isn't rail-to-rail IO capable (but it can get very close to ground due to special design, with top side being typical ~1V shy from a power rail) and due to it there will be early clipping. If the attenuated and filtered PWM signal was given a DC offset and a bit lower gain there could be no clipping at all but that requires more components than it was deemed worthwhile.
I'm not sure what the exact range is on the digital end of things, but probably around 95% of full range is usable without ill effects.
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

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Cartridge slot questions

Post by Sik » Thu Jan 16, 2020 12:44 am

TmEE co.(TM) wrote:
Wed Jan 15, 2020 5:43 pm
Black starts at 25mV above ground and goes up to 800mV with more or less exactly 25mV steps on red and green channels, but blue channel is about 20mV lower in full scale amplitude, which explains the subtle yellow tint compared to MD output that is seen on all 32X I have had access to.
3 2 X

Anyway, if I'm understanding correctly this means the audio output (as far as the cartridge slot goes) is ±2V, excluding bias? Though I may be misinterpreting the results (aside from covering 4V in its range). Just trying to document what others should aim for in case they want to add their own audio hardware.
Sik is pronounced as "seek", not as "sick".

MrD
Very interested
Posts: 70
Joined: Sun Jan 26, 2014 4:29 pm

Re: Cartridge slot questions

Post by MrD » Thu Jan 16, 2020 5:55 am

Sik wrote:
Wed Jan 15, 2020 5:30 pm
*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).
That's the expansion port rather than the cartridge slot. Does that make a difference?

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Cartridge slot questions

Post by TmEE co.(TM) » Thu Jan 16, 2020 10:29 am

Sik wrote:
Thu Jan 16, 2020 12:44 am
Anyway, if I'm understanding correctly this means the audio output (as far as the cartridge slot goes) is ±2V, excluding bias?
Yup, +/-2V into 75ohm load is the target for cartslot audio.
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

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Cartridge slot questions

Post by Sik » Thu Jan 16, 2020 11:04 am

MrD wrote:
Thu Jan 16, 2020 5:55 am
That's the expansion port rather than the cartridge slot. Does that make a difference?
I don't think so, many of the signals are shared between the two (and some of the Mega Drive components too), e.g. /CAS0 acts as the output enable for everything that isn't work RAM (for some reason work RAM gets /RAS0 instead, which incidentally isn't exposed in either slot).

It could be argued that DMA acts differently depending on the address but I don't think this is the case? (in fact, Mega CD's WORD-RAM shares a DMA bug with the SVP, and those work off different slots).
TmEE co.(TM) wrote:
Thu Jan 16, 2020 10:29 am
Sik wrote:
Thu Jan 16, 2020 12:44 am
Anyway, if I'm understanding correctly this means the audio output (as far as the cartridge slot goes) is ±2V, excluding bias?
Yup, +/-2V into 75ohm load is the target for cartslot audio.
Thanks, this will do for now.

I recall it being mentioned that some systems may be missing the 75Ω resistor, is this true? Is there anything that should be done about this? How does the 32X behave in this case?
Sik is pronounced as "seek", not as "sick".

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: Cartridge slot questions

Post by TmEE co.(TM) » Thu Jan 16, 2020 12:34 pm

MD2 VA0 and VA1 do not have 75ohm load on the cartslot signals. 32X just has very low output impedance amp that can drive headphones (i.e 16 ohm load), there's no variation in output level due to it. You just need a beefy amp to make things work.
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

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Cartridge slot questions

Post by Sik » Sun Feb 09, 2020 9:23 pm

OK this stalled again I guess.

I'm still not sure how to describe /CAS2 and /ASEL. I know they're related to DRAM refresh, and that /CAS0 asserts before /CAS2 when it happens, but that's it. I'm not sure under what circumstances this refresh cycle is asserted though. Is it regularly? How often? What value does A23-A1 have? Does it require to enable refresh through $A11000? (though it seems it isn't needed)

The thread I linked earlier seems to imply that the /ASEL /CAS0 /CAS2 sequence (with /CE_0 or /ROM held low) triggers for every transfer during a DMA. What the heck are /ASEL and /CAS2 doing here if this isn't refresh? Is there anything I'm missing?

I really want to put up the cartridge slot page on Plutiedev even if I leave /CAS2 and /ASEL for later… but I can't even come up with a short summary for them and got laughed at when I wrote "Used for DRAM refresh?" so can somebody explain me what am I even supposed to say?
Sik is pronounced as "seek", not as "sick".

Post Reply