Sega Master System / Mark III / Game Gear|
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew
Adding FM sound to Master System Mode on a Gen/MDPosted: Tue Oct 31, 2006 8:44 pm
Last edited by TheGZeus on Tue Nov 07, 2006 3:59 am; edited 1 time in total
The genesis expansion port ( http://www.gamesx.com/cartouts/gennyport.htm ) is mostly the Cartridge port, but has a few changes/additions.
The Mark III/SMS expansion port is as I recall, just a male version of the cartridge port on an SMS.
What I'm thinking is that it might be possible to make an adapter to connect the FM sound unit to the Genesis/MD and so run SMS games with FM sound with the Power Base Convertor/Master System Convertor/Mega Adaptor.
A Mega Adaptor and a Mega Drive 1 Japanese model together cost less than a Mark III in good condition.
If it's not easy/not possible, you have to admit, it's a neat idea.
Re: Differences betwen Gen/MD and SMS/MKIII expansion ports(re: FM sound)Posted: Fri Nov 03, 2006 6:04 pm
There are a few signals used for I/O devices like the YM2413 that haven't been identified on the Genesis cartridge connector, mainly /IORQ, /KBSEL, and KILLGA. They are probably there, most likely in the upper address lines, but some research would need to be done to figure that out.
Assuming those same signals are available on the expansion connector, your idea would work. Neoflash has already made a YM2413-enabled Genesis cartridge, so we know this technique works from the cartridge side, and it should work on the expansion port too.
Given the simplicity of the Power Base Converter hardware, it may be easier to make your own Genesis <-> SMS adapter with the FM support added that goes into the cartridge slot. The other catch is locating FM sound chips; the original YM2413 is hard to find and the newer YM2413B (which may or may not sound identical to the original version) can only be ordered in bulk quantities.
It's a great idea. :)
||Posted: Fri Nov 03, 2006 7:41 pm|
I know people in Japan.
The original FM sound units are around. Generally paired to a Mark III(which I wouldn't mind owning as well) but some are out there all alone.
So if an adapter that connected enough of the pins to match could be made, the FM sound unit just needs a male SMS cart end.
The PBC idea has come to mind.
If a gender convertor(double male) could be found, theoretically, the FM sound unit could be connected to the top of the Tototek SMS/MKIII convertor. This should allow Japanese MKIII games to run with full FM sound.
It's all theory, though.
Even the real PBC has an IC on it. The function of that IC is likely the secret to those missing functions.
||Posted: Sat Nov 04, 2006 1:30 am|
I got all inspired to dump this chip to see how it functions, and it shattered into a bazillion pieces while being desoldered. :(
On the flip side, I was able to make a complete pinout of the device:
Signetics CK2605 PLA
Sega p/n: 315-5342
/RESET_IN |01 20| +5V
Z80 A2 |02 19| Unused (to solder pad, test point)
GEN.B6 (VA18) |03 18| /SLOT-CE (Cartridge conn.)
Z80 A1 |04 17| /SLOT-CE (Card conn.)
GEN.A16 (VA17) |05 16| Z80 D7
Z80 /RD |06 15| Z80 D6
Z80 A0 |07 14| Z80 D1
Z80 /WR |08 13| Z80 D5
Z80 D3 |09 12| Z80 D2
GND |10 11| Z80 D4
A RC reset circuit drives /RESET_IN and Z80 /RST on the SMS cartridge connector, as well as going to the left side of JP1. The master reset signal /MRES goes to the right side of JP1, but JP1 is open. /MRES is the Genesis' own RC reset circuit output.
VA18 becomes /SLOT-CE for the cartridge port in MK3 compatibility mode. I don't know what VA17 is, maybe /IORQ or a strobe for further address decoding. It's clear that the chip implements the missing slot control register, but the signals it monitors don't make much sense. I've double checked the connections however.
All this functionality is for the card connector only, if you've seen pics of the Master Mega Converter adapter; it implements the SMS cartridge connector only and has no extra hardware beyond a switch and resistor for the NMI button.
About the having connections in Japan thing, while that might help it's standard practice to sell ICs in bulk anywhere in the world. IIRC the MSX people wanted to get some YM2413B's and it was a 1000-piece minimum order, or something along those lines.
||Posted: Sat Nov 04, 2006 1:46 am|
Nonono I mean the WHOLE UNIT.
There are NOS FM sound units, and those plugged into mark IIIs at places like Hard Off and Manga Souko.
They're not cheap, but they do exist. A female midi connector would work to run the audio from the unit back into the audio ins...
The thing with the ribbon connector is plugged into the expansion port. it has a pass-through for the AV and does it's own mixing.
||Posted: Sat Nov 04, 2006 7:03 am|
This Power Base Converter stuff is getting interesting. Upon closer inspection I don't think the PLA mimics the slot select register at all. It does seem to route the incoming /SLOT-CE signal to the cartridge or cart port depending on which one is in use.
But what isn't immediately clear is how a card is detected when inserted - there isn't any kind of sense bit. Since the PLA is connected to A2-A0 and D7-D1 (D0 has a pulldown resistor) I wonder if it might output some kind of compact startup program after a reset - 8 bytes at the most. It could respond to the Z80 reset sequence and feed bytes to the CPU using /RD, and perhaps a write is what triggers the final slot selection. This would explain why there aren't enough address bus connections for more complete address decoding, as it only needs memory addresses $0000-$0007. The /SLOT-CE input includes /MREQ, so there's no conflict with I/O accesses.
Does anyone know which one takes precedence if a card *and* cartridge are inserted in the PBC? Now I've got to get another one of these things. :)
||Posted: Sat Nov 04, 2006 8:01 am|
|I'll report on precedence in the morning.|
||Posted: Sun Nov 05, 2006 3:27 am|
|The cart port has precedence over the card port.|
||Posted: Sun Nov 05, 2006 3:51 am|
|Oh, and if the card isn't inserted properly, it seems to cause horrendous video noise and 60hz humm in the audio...|
||Posted: Sun Nov 05, 2006 7:26 am|
I haven't heard that noise at all. It is weird that on a real Sega Master System, the card port takes priority if both are inserted, and it is the exact opposite on the Power Base Converter.
A tad off topic but not really: Was the FM pack released in Japan (I assume it was a separate unit) compatible with the US SMS via the expansion port? If we are trying to compare the expansion port of an SMS and a Genesis because of the FM pack, then I have to assume that the FM pack was built for the SMS or something like that. I'm not British, so I don't know as much about the SMS as others here. :)
||Posted: Sun Nov 05, 2006 7:36 am|
Also, wikipedia the Master System. It'll give you a break down of its history. The SG-1000 series has less engligh documentation, but it's around.
those images will say most of what needs to be said.
I actually think the SMS might have been released after the FM unit.
I know the connectors are the same because the expansion port has a gender convertor unit available. It's simply a PCB with straight traces and double female ends.
You can then plug SMS games into it, it's marketed for use with the Japanese SMS because the FM is built in, but the difference between a Japanese SMS and a Mark III is the FM and 3D built into them as opposed to outboard.
Thus, I know I can make an FM unit attach to an SMS or a Mark III, so my thinking travelled to where we are now.
||Posted: Sun Nov 05, 2006 10:44 am|
|The FM Unit is for the Mark III, which has a different expansion port pinout to the SMS.|
||Posted: Sun Nov 05, 2006 3:59 pm|
Great, now we're into FURTHER unknown territorry.
So, we need the expansion port pinout from the MKIII to compare with the MD.
||Posted: Sun Nov 05, 2006 5:02 pm|
||Posted: Sun Nov 05, 2006 7:32 pm|
It's no problem, the SMS expansion port has the exact same signals as the Mark-III expansion port. Building an adapter to go between the SMS and FM unit shouldn't be a problem at all; apart from getting a custom PCB made that mates with the FM unit edge connector properly.
And thanks for testing the Power Base Converter, I appreciate it!
||Posted: Sun Nov 05, 2006 8:30 pm|
Hey, I'll test anything you like, if I have or you give/lend/give-lend it to me...
Also, an adaptor would really consist of wiring a female SMS exp slot and a male connector made to be compatable, hideous mess of soldering to each end with a ribbon connector between all stuffed in a box.
Regardless, the task at hand is the idea of making a Gen/MD adaptor.
There are two reasons:
1. This would make the MD/Gen fully compatable with virtually every 16/8 bit Sega console game. Figure out how to get a 32x in there....and it's a waste of time...
2. It might add 9 voices to homebrew MD/Gen and CD titles.
Condensed info so far:
1. The FM sound chip CAN be run by an MD, if made compatible. Proven by Flash Cart, though no hands on tests.
2. The SMS and MK-III expansion ports are compatible.
3. The SMS EXP port is a male cart connector.
4. The MD's cart slot is almost 100% compatible with the SMS and MKIII slots, and may need an IC to manage its signals.
5. The MD/Gen's expansion slot is 90% the same as its cart slot.
A. That 10% difference on #5
B. The unit will need to be attached in some unorthodox way to work with a CD unit.
C. It may not run the FM unit on MD mode.
D. The results WILL be unweildy, as running the sound back into the MD/Gen's audio in pins from the out on the FM unit will be almost as cumbersome as external mixing.
E. FM sound units are relatively rare, and aren't cheap.
I think step one would be to contact Steve Snake as ask if the SMS FM chip will operate with Fusion in MD mode without 'hacks' to the 'hardware.'
||Posted: Sun Nov 05, 2006 10:04 pm|
|While you're at it, try and find a way to get the Power Base Converter to work with the 32X still attached.|
||Posted: Sun Nov 05, 2006 11:01 pm|
Unless somebody got a custom PCB made for this purpose. Like the SMS Gender Adapter thing.
32X and the Power Base Converter are mutually exclusive, so you'll never be able to have the functionality of both. :(
Only programs running in SMS mode could take advantage of an external YM2413; in Genesis mode those signals work differently. In fact you'd probably have to remove the YM2413 from the expansion port when playing Genesis games for that reason (also, using the expansion port means the Sega CD can't be used)
Yeah, some of the SMS mode specific signals present in the higher 68000 address lines aren't available on the expansion port, as well as others.
Very unorthodox. ;)
Not at all, it will be quite convenient - the audio input pins are present on the expansion port. No external cabling needed.
This might conflict with the Sega CD and/or 32X which use the same pins themselves.
It won't work in MD mode at all, and would either need to be disabled electronically or physically removed from the expansion port. This is because some of the signals change their purpose between SMS and MD mode.
Personally, while I feel this idea could work, it would probably be easiest to just get one of those Neoflash cartridges when it comes out, or make a FM unit adapter for the Sega Master System rather than the Genesis. This whole thing sounds like a project getting out of hand. ;)
||Posted: Mon Nov 06, 2006 12:28 am|
Well, the expansion port looks to be a no-go.
So it looks like paralleling the cart in, but isolating/managing the signals in a way I don't understand(digital is something relatively new to me. I can wrangle anything analog all day long, but digital is a task) is the best bet. After all, the 3D glasses are just plugged into the card slot.
alternatively, wiring IN a Mark III expansion slot might be....insane but workable.
Making/designing a PCB is not for me. At all.
The MD can't use the FM chip.
The unit would have to be disconnected for MD/CD use.(would a switch that drops the power and grounds work?)
So, it's theoretically possible.
The PBC would need basically a Y-connector type but MKIII EXP male rather than another cart port, and this would all have to be removed when not in use.
The audio out on the FM sound unit is in the form of a duplicate AV out similar to the MKIII, but sans the RGB signals.
You have to plug the FM unit into the AV out of the III and then plug your AV connector into the FM unit.
So to get audio into the MD, you need to also alter the PBC/clone to connect the audio in pins.
This whole setup will at best look like a Dev system.
The good-looking alternative is the dismantle the FM unit and see if it fits in the PBC, and hard-wire it in.
||Posted: Mon Nov 06, 2006 8:37 am|
Looking at the Card slot, the only difference seems to be more connections on the card slot, a lack of Keyboard Select(irrelevant) and the Z80 I/OReg replaced with MReg.
Depending on what's needed on the FM Sound Unit, the card slot looks like the thing. Finding a dead MyCard or Sega Card would be step one, then it's a matter of a little soldering. Or you could have someone who knows how make a PCB.
As a matter of fact, I actually spent a few days' of occasional searching for an image or info, as I was sure the SMS had an FM unit that plugged into the card slot.
I have no idea where I got that idea. I started looking before I knew jack aobut 8-bit sega stuff. Months ago.
Perhaps the SMS I saw at the used game shop years ago and thought insanely priced was really the super rare Japanese SMS and the poor markings/unknowledgeable stoner staff confused me into thinking what was built in all went into the card slot. I'd seen the glasses before...
||Posted: Mon Nov 06, 2006 8:36 pm|
That IC on the PBC might be doing something other than simply managing the card/cart priority.
Well, I'm sure it is, but here's proof:
The Sega CD won't fucntion with the PBC in it.
The MD/Gen with a CD attached checks for a cart in the slot, and runs the SCD BIOS instead if there's nothing to read in the cart slot.
It may be a simple matter of grounding a certain pin, but that IC might be there to tell the MD to go into 8-bit mode as well as handle calls to the proper pins in that mode.
This past bit was pulled directly from my......face.
This project is growing in scope in my mind(scope leaves my mind minty fresh).
The idea of getting FM sound into the PBC is a good one, I think.
A few ideas for the next step:
Test an FM sound unit with a PBC/Mega Adaptor on the card slot with FM sound equipped games. Granted, these intitial tests will require external mixing.
See if an FM unit fits in the the PBC case(behind the cart slot in that big void is likely to have room for the PCB bare).
Whether it does or not, this is significant modification of vintage hardware.
Ideally, a custom-made FM unit would be made that DOES fit in the PBC with a few solder points to the right places. One could also make something akin to Tototek's PBC-type item. This would simply add the needed functionality. Striking a deal with Tototek after doing the design might not be a bad idea. But first:
We've already heard that Yamaha doesn't do orders under 1k.
what could be done is get together with a small electronics maker(doesn't actually matter what kind) and see if you can get some samples.(I know a friend who's done this, he does repair work, had the same situation)
That would allow for a prototype or two.
2 things could follow:
1. an order of 1k chips, and alot of soldering, and marketing online worldwide(gooddealgames etc).
2. doing something in FPGA ala the C-one.
Instead of emulating an entire system and having it be extra configurable, it would simply allow for getting the design on the prototype developed simply and relatively easily into a small number of parts, also it would make debuggin easier down the road. A serial port for reprogramming might be a good idea for the initial run.
What's the best idea? I have no idea. Again, digital stuff is all theory to me. Having never worked with it in any practical sense, I have no idea of the costs involved.
I know analog, I have some digital theory down, and a decent knowledge of business on a basic level. Good mentors.
Though considering I only started caring about 3 months ago, I seem to have grasped my share of digital-ness...and my friend Weeze's. He looks at me like I'm speaking in tongues when I go off like this.
|Posted: Mon Nov 06, 2006 11:22 pm|
The card slot doesn't have any of the necessary signals for the YM2413. It's an I/O port mapped device rather than memory mapped.
You need at least D0-D7, A0-A2, /WR and /RD, KILLGA. Then /KBSEL or if that isn't present, /IORQ, /M1, A7-A6 which /KBSEL is the equivalent of.
Only the expansion port or cartridge port on an SMS has these.
||Posted: Mon Nov 06, 2006 11:25 pm|
I was afraid of that.
Well the EXP port seems to be paralleled off the cart port.
is that correct?
Is it possible to just parallel the connections, or does there need to be secondary buffering(analog term, sorry).
||Posted: Mon Nov 06, 2006 11:55 pm|
Thought I'd mention a few other reason I think this is a good idea.
There seems to be a greater homebrew community for Sega 8-bit hardware than 16, and this might encourage more work to be done for two reasons:
1. The Genesis/Mega Drive is currently less expensive than the SMS on eBay et al.
2. SMS games can still enable Mode 5 video on the MD/Gen.
Thus, games coded with FM sound in mind can also enable even greater graphic capabilities.
Might even court some of the Genesis/MD community to code for the relatively simpler hardware.
You have almost as many sound channels as the 16 little bro with the FM chip enabled, and the same gaphic capabilities. However you don't have to program the FM sounds themselves, as they're hard-wired on the SMS/MKIII FM unit.
Arguably, this limits the programmer, but it would allow simple ports between the systems(this capability exists already to a degree, but if Mode 5 is enabled in the 8-bit version, it's one less thing to re-program).
The hard part is the FM Sound Unit has more channels(as I recall) than the Gen's FM chip, so even if you programmed the Gen's chip to make the same sounds, you have fewer to work with. The Gen already has the ability to use the SMS's standard sounds.
In short, homebrews can get to the graphical and sound/music levels(or near to them) of it's little brother but still be compatible with the old hardware, and porting is easy should you want more processing/memory power.
||Posted: Tue Nov 07, 2006 9:32 am|
|I think the main point would be for normal people to add a FM Sound Unit to their regular Master System to enjoy FM music in games supporting them.|
||Posted: Tue Nov 07, 2006 12:02 pm|
Well, I thought that was obvious. It requires far less work and thought, as well.
The idea of connecting it to a MD is what i was talking about.
Thus the thread title.
||Posted: Wed Nov 08, 2006 11:51 pm|
I actually rarely play Gen carts(I've become a weird CD/ SMS freak) and would like to leave my SMS convertor in, and the deird 'dev system' I've made out of an beat Genesis 2/semi-broken sega CD would be more interesting if it always had the SMS adaptor(tototek) in it. It doesn't use the cart port to run software.
So, my thought: is it possible to move the Cart Detect pin on the MD/Gen to a cart ground on the adaptor's input?
I'd imagine it would require cutting 2 traces and running one lead.
The SMS cart has 3 ground points. Can it spare one?
||Posted: Sun Jun 20, 2021 8:47 am|
Sorry for the necro bump.
Since several companies are selling "Power Base FM" converters (https://www.retrorgb.com/power-base-mini-fm-now-available-for-purchase.html), surely some of those signals, though undocumented, must be present from the MD cartridge slot.
Has anyone ever traced one of those FM converters?
||Posted: Sun Jun 20, 2021 4:22 pm|
|Didn't db Electronics make the design open-source? https://github.com/db-electronics/FMPBC|
||Posted: Sun Jun 20, 2021 6:25 pm|
"/KILLGA" is not available on the MD slot; the games that rely on detecting a Japanese SMS cannot be accommodated on a MD slot in M3 mode.
(see: http://etim.net.au/smsfm/smsfm.html - search for "++")
/IORQ exists, and is cardB7 (68kA19). /M1 is not needed.
The only possible option for /KILLGA - cardB10 (68kA22) - can be ruled "unlikely" because the pin must be pulled low (not high) for normal operation, and the mode is called "Mark3" instead of "Mark4" mode.
Other signals are outputs from the bus arbiter and not suitable inputs.
||Posted: Mon Jun 21, 2021 3:53 pm|
Yeah I quickly found out those converters weren't fully compatible.
I wasn't expecting KILLGA or !KBSEL to be available, they clearly aren't, but !M1 would have been nice.
I also found somewhere else about IORQ. Is it bidirectional? If I set up the VDP in MS mode then send a BUSRQ from some 68000 code, can special hardware in the cardtridge write to the VDP using IORQ and WR signals?
What about VA20? Could it be BUSRQ?
||Posted: Mon Jun 21, 2021 7:10 pm|
68k is permanently held in reset during Mark3 mode. Can't use it for anything.
None of the fun signals on the 50-pin US SMS cartridge connector seem to be available; it genuinely seems to be just those that are on the 44-pin Japanese SMS connector.
Given that /M1 is on the SG1000 connector it's a little disappointing that it's not somewhere on the Genesis connector, but I didn't see anything plausible when I sat down with an oscilloscope.
No. (Also, you can't really use BUSRQ without BUSACK...)
In all the times I measured it, 68kA20 = cardB8 is always driven high strongly. I have no idea what it's intended to be.
||Posted: Tue Jun 22, 2021 6:52 pm|
@linariq I think you didn't get what I meant. I'm not talking of using the MD in MS mode (by holding the !M3 pin low), but using it normally using 68000 code to send commands to the Z80. As an interface if you prefer.
My theorical approach was like:
1) 68000 sets VDP in MS mode then sends a BUSREQ command to the Z80
2) All Z80 ouputs go in high impedance
3) Special hardware in the cartridge switches !M3 low, 68000 is then kept reset (is that even possible to do dynamically?)
4) Special hardware in the cartridge can freely send IO requests
But again, only valid if signals going through the bus arbitrer are bidirectional
As for using BUSRQ without BUSACK it's absolutely no problem for my application (doesn't have to be time optimal, I can simply wait long enough to ensure Z80 is ready to release the bus).
||Posted: Wed Jun 23, 2021 1:17 am|
That is an excellent question. I don't know. I suspect not.
In the most pedantic and useless way, they must be sometimes, because in Megadrive mode those pins are driven by the 68k or DMA controller unit as necessary. But that doesn't mean there's any way to coax it to to work that way when it's running in Mark3 mode.