Forums

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

View topic - FM sound board + Wonderboy 3 = ?

Reply to topic Goto page Previous  1, 2
Author Message
  • Joined: 07 Jun 2011
  • Posts: 11
Reply with quote
Post Posted: Tue Jun 07, 2011 2:59 pm
Maxim wrote
When the gun trigger is pressed, the system is driving that line low. When the trigger isn't pressed, the system's driving it high while it is also being grounded. So something somewhere is being shorted unexpectedly.

Would it therefore be safe to implement a region switch such that when grounded, the existing trace is not connected?


EDIT:

I'm contemplating a few things here, first is to check how that rev is different than the published schematic.
BTW: Is there another one out there thats different that on smspower's documentation page?

Currently messing with the Hello World (enhanced) you made to run the region detection code in a loop... and to monitor a few things.

Will post results later

Cheers
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Tue Jun 07, 2011 9:59 pm
Last edited by Charles MacDonald on Wed Jun 08, 2011 2:07 am; edited 1 time in total
Maxim wrote
When the gun trigger is pressed, the system is driving that line low. When the trigger isn't pressed, the system's driving it high while it is also being grounded. So something somewhere is being shorted unexpectedly.

Would it therefore be safe to implement a region switch such that when grounded, the existing trace is not connected?


Yes, you could add a switch like that, which you'd turn on during power-up and turn off during gameplay. You'd still have a potential for damage during the region check routine I suppose, and you'd have to remember the flip the switch on then off when using the reset button.

For the adventurous, here is the schematic for a region mod that is compatible with the light gun, the FM unit, *and* is safe for the system. You will need to desolder (or cut) and lift pins 13,14 of the 315-5216 chip which requires some care. It is untested so use it at your own risk

With the switch on, reading port $DD always returns zero in D6 and D7. If that causes a conflict with some game after the initial region check, you can always turn the switch off. Say at the title screen.

If you don't want to add a switch to your system, you could connect the JP_MODE# input of U1 to the pause button and hold down pause when powering up the system to set the Japanese region. You can also use HCT parts if you don't want to use LS, and add a 0.1uF ceramic capacitor across the ground and +5V pins of each chip for decoupling (not shown).
  View user's profile Send private message Visit poster's website
  • Joined: 07 Jun 2011
  • Posts: 11
Reply with quote
Post Posted: Wed Jun 08, 2011 1:36 am
Hi Charles.

Sounds like a fun weekend breadboard experiment :)

I think with both this and a good coffee over the port explanation page i now get it.
Its a miracle this hack ever worked anywhere. the high voltage set by the 315-5216 chip _internally_ in the detection phase can hardly be pulled down by its pin. Some revs of 315-5216 could have varying internal protection/ diodes or whatever. Its all happening in "there".

If i get the chance ill try your circuit this weekend ... I don't mind cutting traces and pins.(nothing that cant be reverted anyway).

Thanks!
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Wed Jun 08, 2011 8:34 am
Ah, I has insufficiently understood the problem - it's the fact that it's a tri-state pin being grounded while driven from the chip that causes the risk. Can you explain how your design avoids this, for those of us that can't figure it out?
  View user's profile Send private message Visit poster's website
  • Joined: 07 Jun 2011
  • Posts: 11
Reply with quote
Post Posted: Wed Jun 08, 2011 1:32 pm
Just to make sure I understand (will need to do a Truth table) .. unless Charles has one (probably).

Since we cant reliably (safely) mess with the input/output pins 31/34 of 315-5216, the idea is to temporary steal the system-wide-shared data lines D7 and D6 under very strict conditions and put 0v on those only when the cpu requests reading $DD.

When it is not the case the system acts just like before the hack was made, and the (pins 13/14) of the 315-5216 are reconnected to the bus.

The reason there are so many logic gates and a 74XX139 demux is because there are lots of handshake lines at work that arbiters the data bus (!WR !RD !A0 and also KBSEL and KILLGA -although these are not linked to CPU's requests). I think if the hack doesnt work it will be a matter of timing. If the databus is not working as it should, then the cpu will not read the ROM properly and you can guess what happens then :)
  View user's profile Send private message Visit poster's website
  • Joined: 07 Jun 2011
  • Posts: 11
Reply with quote
Post Posted: Fri Jun 10, 2011 1:49 pm
Last edited by plgDavid on Fri Jun 10, 2011 1:59 pm; edited 1 time in total
Started doing the truth table and something does not make sense to me, maybe I'm wrong. In the second pass logic processing of the 74ls139:


!G = DOUT#
B  = JP_MODE#
A  = Z80 A0

74LS139 Thruth Table (from datasheet):

Input            Output
!G  B   A    |   !Y0 !Y1 !Y2 !Y3
1   X   X    |   1   1   1   1
0   0   0    |   0   1   1   1
0   0   1    |   1   0   1   1
0   1   0    |   1   1   0   1
0   1   1    |   1   1   1   0



then the Y's go into OR gates 74LS32 like
(!Y2 OR !Y3) (always true) , which ORed to anything else, !Y0, or otherwise is always true, so gate# is always 1 in this schematic

Perhap[s it would help to get more details on the exact intended logic 'algorithm' which was intended?
  View user's profile Send private message Visit poster's website
  • Joined: 13 Nov 2007
  • Posts: 219
Reply with quote
Post Posted: Fri Jun 10, 2011 1:58 pm
Could it be as simple as adding a simple timing circuit to the region mod, so that at start-up it times out after say 30 seconds? Or is there more to it?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Fri Jun 10, 2011 2:17 pm
There's more to it. The I/O chip's pins are bidirectional - i.e. tri-state. Tying them to ground when the chip's trying to output +5V is going to hurt the I/O chip, and it's still somewhat unreliable as to whether the chip then "reads" GND or +5V. Since you can't mess with that side of the I/O chip, you have to mess with something further up the chain - the link between the I/O chip and the CPU.

The proposed solution is to have something that changes the data going between the CPU and I/O chip so that when the inputs are read, the mod talks to the CPU instead of the I/O chip, on the data lines corresponding to the TH inputs.

However, it may not work if a game chooses to region-test only on the TR pins. Making the mod handle that would be a lot more complicated...
  View user's profile Send private message Visit poster's website
  • Joined: 05 Jun 2010
  • Posts: 757
  • Location: Pennsylvania, USA
Reply with quote
Post Posted: Sat Jun 11, 2011 4:11 am
Man, I am just glad that PAR can bypass all this bullshit in Wonderboy 3. Someone should do a rom hack to remove the check. It would be easier to burn your own ROM than to play around with this, it seems.
  View user's profile Send private message Visit poster's website
  • Joined: 07 Jun 2011
  • Posts: 11
Reply with quote
Post Posted: Sat Jun 11, 2011 12:09 pm
Maraakate wrote
Man, I am just glad that PAR can bypass all this bullshit in Wonderboy 3. Someone should do a rom hack to remove the check. It would be easier to burn your own ROM than to play around with this, it seems.


but that would bypassing all the fun!!
  View user's profile Send private message Visit poster's website
  • Joined: 05 Jun 2010
  • Posts: 757
  • Location: Pennsylvania, USA
Reply with quote
Post Posted: Sat Jun 11, 2011 2:28 pm
plgDavid wrote
Maraakate wrote
Man, I am just glad that PAR can bypass all this bullshit in Wonderboy 3. Someone should do a rom hack to remove the check. It would be easier to burn your own ROM than to play around with this, it seems.


but that would bypassing all the fun!!


So much fun! :D
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Sun Jun 12, 2011 5:36 am
plgDavid wrote
Started doing the truth table and something does not make sense to me, maybe I'm wrong. In the second pass logic processing of the 74ls139:


OK I made a lot of mistakes with the previous design, and I'm very sorry. :D

I don't have the discrete parts to build this, but I implemented it in a single 16V8 chip and modified my SMS1. I tested it with several games; Wonderboy III, Penguin Land, Space Harrier, and Alex Kidd & Lost Stars. All worked correctly.

Here's the JED and CUPL source for the 16V8 design.

http://cgfm2.emuviews.com/sms/smsmod.jed
http://cgfm2.emuviews.com/sms/SMSMOD.PLD

And here is the corrected schematic. It's untested but I triple-checked all the logic again to match the 16V8 design:

http://cgfm2.emuviews.com/sms/smsmod.png

I replaced the 74LS32 OR gate with a 74LS11 AND gate. I also changed the result when reading port $DD on a Mark III; the bits should be fixed to one.

If anyone tries it with the FM board, I'd like to know if it works with it. It should.
smsmod.png (8.29 KB)
Attachment fairy
smsmod.png

  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Sun Jun 12, 2011 8:29 am
Quote

However, it may not work if a game chooses to region-test only on the TR pins. Making the mod handle that would be a lot more complicated...


Do any games do this? If we can find one, I'll adjust the design to support TR too.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14740
  • Location: London
Reply with quote
Post Posted: Sun Jun 12, 2011 9:32 am
I don't know. They may avoid it because then the control pad buttons may interfere with the test?
  View user's profile Send private message Visit poster's website
  • Joined: 27 Jul 2010
  • Posts: 13
Reply with quote
Post Posted: Wed Jun 15, 2011 12:40 am
Maraakate wrote
Paul Baker wrote
Maxim wrote
The Action Replay can probably override the region check in software.


Indeed it can: 00cf8500

However, that'll still give you the PSG music. To force FM, you'll need to use a different code (either with or without the one above): 00c23201

I hope this method works for you, Maraakate.

EDIT: Again, I'm basing this on tests using an emulator - perhaps someone with an Action Replay can try the codes on real hardware. Even without an FM unit, the effect of each code should be obvious.


It works!! I can't believe it, it actually works! Took me a while to learn how to use the PAR, I thought I was doing it all wrong, the bottom switch position and hitting pause brings up the code menu. Huge thanks!


So, all this time later I finally got me a Master Everdrive so now I just need a little extra help. I just need to hack the rom to force FM audio. I don't really know how a PAR works but if someone could tell me the hex address and value to change in the rom that's the equivalent of that code then i'd be very grateful :)
  View user's profile Send private message
  • Joined: 07 Jun 2011
  • Posts: 11
Reply with quote
Post Posted: Fri Jun 17, 2011 12:53 pm
Charles MacDonald wrote

Here's the JED and CUPL source for the 16V8 design.


Thanks Charles. I got sidetracked a bit, but will resume trying this out soon.
Cheers
  View user's profile Send private message Visit poster's website
  • Joined: 07 Jun 2011
  • Posts: 11
Reply with quote
Post Posted: Fri Jun 24, 2011 5:34 pm
Hi Charles

Just posted a video with the results:
http://www.youtube.com/watch?v=OKerbe86JPY

This is a flaky breadboard hack, but seems like its working so far, i might do a small protoboard job.[/img]
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2009
  • Posts: 207
Reply with quote
Post Posted: Fri Jun 24, 2011 6:47 pm
Nice work!
  View user's profile Send private message
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Fri Jun 24, 2011 9:18 pm
plgDavid wrote
Hi Charles

Just posted a video with the results:
http://www.youtube.com/watch?v=OKerbe86JPY

This is a flaky breadboard hack, but seems like its working so far, i might do a small protoboard job.


Awesome! Glad it worked, and thank you very much for making the video. The most recent mod I posted is even simpler and works fine too (I've tested both myself).
  View user's profile Send private message Visit poster's website
  • Joined: 05 Jun 2010
  • Posts: 757
  • Location: Pennsylvania, USA
Reply with quote
Post Posted: Sat Jun 25, 2011 1:55 am
cr4zymanz0r wrote
Maraakate wrote
Paul Baker wrote
Maxim wrote
The Action Replay can probably override the region check in software.


Indeed it can: 00cf8500

However, that'll still give you the PSG music. To force FM, you'll need to use a different code (either with or without the one above): 00c23201

I hope this method works for you, Maraakate.

EDIT: Again, I'm basing this on tests using an emulator - perhaps someone with an Action Replay can try the codes on real hardware. Even without an FM unit, the effect of each code should be obvious.


It works!! I can't believe it, it actually works! Took me a while to learn how to use the PAR, I thought I was doing it all wrong, the bottom switch position and hitting pause brings up the code menu. Huge thanks!


So, all this time later I finally got me a Master Everdrive so now I just need a little extra help. I just need to hack the rom to force FM audio. I don't really know how a PAR works but if someone could tell me the hex address and value to change in the rom that's the equivalent of that code then i'd be very grateful :)


The code is the RAM address.
  View user's profile Send private message Visit poster's website
  • Joined: 07 Jul 2011
  • Posts: 11
Reply with quote
Post Posted: Thu Jul 07, 2011 3:36 pm
If I want to mod my SMS 1 to play SG-1000 and mk III games and I replace the BIOS rom with a Japanese BIOS, would I still have to do this mod to play all imports?
  View user's profile Send private message
  • Joined: 24 Sep 2006
  • Posts: 191
  • Location: Sydney, Australia
Reply with quote
Post Posted: Mon Jul 11, 2011 6:04 pm
blue lander wrote
If I want to mod my SMS 1 to play SG-1000 and mk III games and I replace the BIOS rom with a Japanese BIOS, would I still have to do this mod to play all imports?


Some games detect the region and change difficulty and/or language to suit. I don't think any games use this as a lock out.
  View user's profile Send private message
  • Joined: 01 May 2012
  • Posts: 21
Reply with quote
Post Posted: Thu May 31, 2012 9:09 pm
cr4zymanz0r wrote

So, all this time later I finally got me a Master Everdrive so now I just need a little extra help. I just need to hack the rom to force FM audio. I don't really know how a PAR works but if someone could tell me the hex address and value to change in the rom that's the equivalent of that code then i'd be very grateful :)


sorry to resurrect this old thread but is there a solution for everdrive users?
  View user's profile Send private message
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Fri Jun 01, 2012 11:52 am
keropi wrote
is there a solution for everdrive users?

See this thread.
  View user's profile Send private message Visit poster's website
  • Joined: 01 May 2012
  • Posts: 21
Reply with quote
Post Posted: Fri Jun 01, 2012 11:42 pm
Paul Baker wrote
keropi wrote
is there a solution for everdrive users?

See this thread.


thank you very much!
  View user's profile Send private message
  • Joined: 01 Aug 2013
  • Posts: 36
Reply with quote
Wonderboy III with Japanese BIOS and FM board
Post Posted: Tue Aug 13, 2013 11:03 pm
Hi there,

I have just a theoretical question:
Would a PAL Wonderboy III work including FM sound with a modded PAL SMS with a Japanese BIOS EPROM and a 60Hz switch installed, without switching the FM board to the JPFM_EN# signal (I mean by only using the standard FM_EN# signal)?
  View user's profile Send private message
  • Joined: 17 Dec 2012
  • Posts: 22
Reply with quote
Post Posted: Wed Aug 14, 2013 1:27 am
segatom wrote
Hi there,

I have just a theoretical question:
Would a PAL Wonderboy III work including FM sound with a modded PAL SMS with a Japanese BIOS EPROM and a 60Hz switch installed, without switching the FM board to the JPFM_EN# signal (I mean by only using the standard FM_EN# signal)?


I would assume it does. But cannot say for sure.
I got WBIII to work with FM sound on a JP region switched GameGear, without the need of the region switch included in the SMSFM board.
  View user's profile Send private message
  • Joined: 01 Aug 2013
  • Posts: 36
Reply with quote
Can I use the JPFM_EN# Signal permanently?
Post Posted: Wed Aug 14, 2013 8:52 pm
Okay, I've tested Wonderboy III (PAL) with my PAL console with a Japanese BIOS and a 50/60hz switch attached and Wonderboy III still won't output FM sound with the FM_EN# signal of the FM board.
But of course FM sound works with the JPFM_EN# signal.
I've also tested After Burner (PAL) and it works with the JPFM_EN# signal, too.
So is it possible (and also advisable) to use the JPFM_EN# signal permanently instead of the FM_EN# signal of the FM board for all games supporting the FM sound?
  View user's profile Send private message
  • Joined: 17 Dec 2012
  • Posts: 22
Reply with quote
Post Posted: Wed Aug 14, 2013 9:47 pm
segatom wrote

So is it possible (and also advisable) to use the JPFM_EN# signal permanently instead of the FM_EN# signal of the FM board for all games supporting the FM sound?


I remember Omp mentioning he experienced some weird game behavior with some games while using the JPFM setting. I assume from your question that you possibly do not want to drill a hole in your console for the switch.
If that is the case, you can hide the switch behind the expansion port door without any modification to the case. Check at the end of first post for exemple.
http://www.sega-16.com/forum/showthread.php?25130-Sega-Master-System-FM-sound-upgrade-guide-SMSFM-2-0-board-from-Viletim
  View user's profile Send private message
  • Joined: 01 Aug 2013
  • Posts: 36
Reply with quote
Post Posted: Wed Aug 14, 2013 10:21 pm
Yes, you are right - I don't want to drill holes into my console. :D

But I want to get one step further by controlling 3 modes by a microcontroller...

Mode 1 (PAL): 50hz, no FM sound, original BIOS activated

Mode 2 (NTSC): 60hz, no FM sound, original BIOS activated

Mode 3 (JAP NTSC): 60hz, FM sound, Japanese BIOS activated

:)

Therefore I'am still looking for the best solution to implement the FM board.

BTW: I also have 2 other questions...

1) What is exactly meant by "Japanese Mode/Language Switch"? Is it the connection of one Pin of the I/O chip to GND which could cause damage to the console eventually? If so, I won't install this feature because it seems to be to risky to me....

2) And what about the joypad combo "left+1+2" for Wonderboy III - this works only in combination with the language switch, right?
  View user's profile Send private message
  • Joined: 13 Aug 2010
  • Posts: 117
Reply with quote
Post Posted: Thu Aug 15, 2013 12:17 pm
More or less. Language detection involves an I/O chip, nothing to do with the BIOS.

MaxWar wrote
I would assume it does. But cannot say for sure.
I got WBIII to work with FM sound on a JP region switched GameGear, without the need of the region switch included in the SMSFM board.


You've successfully region modded GameGear? It's been talked about but I wasn't aware of an actual attempt.
  View user's profile Send private message Visit poster's website
  • Joined: 17 Dec 2012
  • Posts: 22
Reply with quote
Post Posted: Thu Aug 15, 2013 2:05 pm
lumclaw wrote

You've successfully region modded GameGear? It's been talked about but I wasn't aware of an actual attempt.


I think we have to thank the recently revealed GG service manual/schematic. There is a pin on the ASIC that controls the region, its basically Jap=on/0ff . When switch to Jp mode the console behave just like a japanese GG. When sms games are played on it they behave like on a Japanese master system ( ie. PowerStrike becomes Aleste, WBIII works with FM. )
  View user's profile Send private message
  • Joined: 13 Aug 2010
  • Posts: 117
Reply with quote
Post Posted: Sun Aug 18, 2013 1:21 am
Sounds promising. I'm not one to be able to write up any kind of newbie's guide to that.
  View user's profile Send private message Visit poster's website
  • Joined: 29 Dec 2013
  • Posts: 37
Reply with quote
Post Posted: Fri Mar 20, 2015 10:58 am
I know this is an old topic, but I just got the new v2.2 FM board, and it has the JP mode switch that goes to pin 23 on the IC. I get the JP version on the game but no FM sound. for Wonderboy in Monster Land the FM works great in both US mode and JP mode, but I get nothing on Wonderboy 3. any help? I would ask Tim but he is on vacation.
  View user's profile Send private message
Reply to topic Goto page Previous  1, 2



Back to the top of this page

Back to SMS Power!