PDA

View Full Version : 74HC74 sega master system1 switchless trouble.



biscuit
08-25-2010, 06:56 PM
IGNORE THE REST OF THIS POST,AS HERE ARE THE METHODS ,WITH THE KNOWLEDGE OF THE ASSEMBLERGAMES EXPERTS TO MAKE IT POSSIBLE.


http://img189.imageshack.us/img189/2622/japeng.th.png (http://img189.imageshack.us/i/japeng.png/)

http://img266.imageshack.us/img266/6471/switchless.th.png (http://img266.imageshack.us/i/switchless.png/)






This simple little thing has turned into a right pain in the arse, and i'm just about ready to give up with it .

I've tried connecting up a 74HC74 ic to my sms 1 ,using part of simonbelmont2's mega drive guide below(which is adapted from the one on assemblergames).My sms1 is a UK pal version,with the 3 solder pads ,left is ntsc(ground), centre is the signal and right is pal(+5v) and i've cut the underside linking trace, between pal and signal.

My connections to the 74HC74 are like this;

SMS NTSC solder pad(gnd)to pin 7 (gnd)
SMS PAL solder pad (+5v) to pin 14,1,4 (Vcc)(1R'd)(1S'd)
SMS SIGNAL solder pad to pin 5 (1Q)
74HC74 pin 6 (Q') to pin 2 (1D) of 74HC74
74HC74 pin 3 (Q) to the SMS's IC 315-5216 pin 22 reset

http://emudocs.org/Master%20System/master.gif

http://nfggames.com/forum2/index.php?topic=3789.0

http://i272.photobucket.com/albums/jj190/simonbelmont2/Megadrive-GenesisSwitchlessMod.jpg

At the time,i left the LED off,but today i tried connecting up my bi-colour LED .It's 3 legs have the middle one as the anode and the outer legs are cathodes,so i assume this is a common anode LED ?

Well i couldn't get it to light up red then green,just 1 colour for one region and off for the other and i'm stumped with how you would connect it to work properly.

So i switched to two separate LEDs ,and connected PIN 5 Q to the SMS signal pad and also to a POT which is set to 400 ohms.This is then connected to LED 1's anode and to LED2's cathode. Then Q' to LED 1's cathode and LED 2' anode ,as per the picture (this is all on a breadboard )!

When i press reset,there's no rapid changing of the LEDs,what happens is this. LED 1 will be on when i switch on the sms and it will be in PAL mode,I can hold the reset button for half a second ,the sms will reset and LED 1 will stay lit,but when i let go of reset , LED 1 will go out and LED 2 will come on and the sms will be in NTSC mode.Now if i try the same thing again, sometimes it will do the same and revert back to PAL,but other times the LED will switch off as soon as i touch reset (now both LEDs are off)and after half a second i release the reset button ,and the LED that went off,comes back on and it's still in the original country mode it was in. This has happened 3 and more time in a row before it corrected itself .

Other times i have to tap the reset button,another time ,if i hold the rest button too long,the sms will reset to a black screen and needs switching off then on.There has never been an outcome like what you see in any of the switchless video's,where you hold the button for a time and the LED switches colour to show you it's in the new mode and you can release the button.This just doesn't happen for me.

I've also tied all the 2nd flip flop's input pins to vcc ,then i tried them at vss.

Just to be thorough ,this is an 74HC74N positive edge trigger and i'm only using 1 flip flop which i assume is correct for only having one output signal with an sms ,unlike the 2 outputs which the mega drive needs .

If i left the sms out of the connection and just prototyped the circuit on my breadboard ,would the LEDs toggle on and off with a set time between each high low status ?


http://www.assemblergames.com/forums/74HC74%20sega%20master%20system1%20switchless%20tr ouble. (http://i272.photobucket.com/albums/jj190/simonbelmont2/Megadrive-GenesisSwitchlessMod.jpg)

Calpis
08-25-2010, 09:45 PM
Eek a lot to look over. Since I came up with the first circuit I guess this one's mine :P

Here's what you want:

http://a.imageshack.us/img819/9315/blahe.gif

Edit: read more of your post. For the LED connect Q and /Q to the cathodes and connect the anode to 5V through the 300 ohm resistor. Are you sure there aren't 2 anodes though? I think that's the usual arrangement.

biscuit
08-25-2010, 10:43 PM
I'll give this a shot in the morning!
The last thing i thought was, maybe it was down to the reset signal being +5v,and did it need inverting with an npn .

Anyway thanks to the master here,lets see how we get on asit's 3:46 am here in bilighty.

biscuit
08-26-2010, 12:33 PM
http://generichid.sourceforge.net/tricolourled.htm

After checking that site,it confirms it,my 3 pin LED has the centre leg as the anode ,so it's a common anode arangement.

The LED is actually one cannibalised from a rockfire ps2 joypad converter.

biscuit
08-26-2010, 05:11 PM
He shoots,no good.

There's two outcomes,depending on which( PAL/NTSC )wire is connected to pin 1Q (pin 5)or do you mean i should lift and connect the PAL/NTSC pin(leg) on the sega IC 315-5124 (you do ,as you said PIN :redface:) ?

One just keeps one colour of the LED permanently on and the reset button just does as normal ,the other wire keeps the LED off.Which is to be expected ,as the PAL wire is Vcc and the NTSC wire is Vss .

Also ,about the two sega IC's ,do they need their legs lifting ,as i've just soldered straight to their connected pins.?

http://img838.imageshack.us/img838/1760/smsg.th.jpg (http://img838.imageshack.us/i/smsg.jpg/)

Uploaded with ImageShack.us (http://imageshack.us)

Calpis
08-26-2010, 09:09 PM
Don't lift anything! First remove whichever jumper you have set. The pad that you jumper to GND or VCC is the same thing as the mode (NTSC/PAL) pin on the VDP chip. That's what you should solder to instead of the pin for safety.

The flip flop will be reset (0) at startup so if you want it to default to NTSC, connect Q to the mode pin, if you want it to default to PAL connect /Q.

For the flip flop's R input, you don't need to solder directly to the chip either, trace 315-521X pin 41 to the resistor, capacitor, diode circuit. Tap the signal off the resistor on the side going to the chip.

The diagram you posted should work. Since it doesn't I think maybe the LED pinout is different or it's common cathode. For common cathode you'd connect the anodes to Q and /Q, then connect the cathode through the resistor to GND.

biscuit
08-27-2010, 12:21 AM
No joy ,what does make it work is this.

The 74hc74n is a positive edge triggered IC yes,well if i connect the signal wire (not the ntsc wire which is used as mm 0V or the PAL wire which is used as my 5v) in the circuit diagram to Q/ ,which is connected to my Pot.

Changing the resistance of the pot from high(positive)to low(negative), switches the region modes,:confused: the reset button does nothing and the LED doesn't flip flop colours.Obviously .

Also ,to QUOTE you "trace 315-521X pin 41 to the resistor, capacitor, diode circuit"

i traced them and found these were right next to the z80 IC ,not only that ,but it is also connected to pin 26 on the z80,so i'm lost in regard to how these connect to the 74hc74n as i just connected them to pin 3 and 1 as
your circuit diagram.

Is this just me or what ?????

Just noticed the time,5:22 am and i still haven't got this to work .

Calpis
08-27-2010, 01:31 AM
No joy ,what does make it work is this.

The 74hc74n is a positive edge triggered IC yes,well if i connect the signal wire (not the ntsc wire which is used as mm 0V or the PAL wire which is used as my 5v) in the circuit diagram to Q/ ,which is connected to my Pot.
The signal wire SHOULD be connected to either Q or /Q.


Changing the resistance of the pot from high(positive)to low(negative), switches the region modes,:confused: the reset button does nothing and the LED doesn't flip flop colours.Obviously .
Do you have the signal on the wrong side of the LED? The pot should only effect LED brightness. The LEDs should connect DIRECTLY to the Q and /Q outputs.


i traced them and found these were right next to the z80 IC ,not only that ,but it is also connected to pin 26 on the z80,so i'm lost in regard to how these connect to the 74hc74n as i just connected them to pin 3 and 1 as
your circuit diagram.
Ah I see, I only have the poor schematic to look at and just assumed they were different resets. Looking closely I can see the 315 chips input is actually part of a bus. It seems both the button reset and power on reset are logically ANDed so when you press the reset button, right now it's resetting the flip flop and never toggles. For now just tie 7474 reset to +5v and keep clock on the z80 /reset line. This will work but the SMS might start up in either state, try it. If you need it to be started in a specific state, you can copy the resistor,cap,diode power-on-reset circuit used by the SMS and attach it to the 74's reset.

biscuit
08-27-2010, 07:36 PM
Anode on bi LED goes through POT at 350 ohms then to Vcc 5+v .

SMS signal to 1Q = LED starts at one colour (green) on boot ,then auto switches to the other colour (red).Reset button has no effect and sms is in 50 hz.

SMS signal to 1 /Q = basically the same type of outcome.

I'll have a crack at putting together that resistor,cap and diode tomorrow! :banghead:

http://img28.imageshack.us/img28/507/anode1.th.jpg (http://img28.imageshack.us/i/anode1.jpg/)


http://img412.imageshack.us/img412/2662/anode2.th.jpg (http://img412.imageshack.us/i/anode2.jpg/)



http://img52.imageshack.us/img52/2987/zilog.th.jpg (http://img52.imageshack.us/i/zilog.jpg/)



http://img830.imageshack.us/img830/7697/solderpads.th.jpg (http://img830.imageshack.us/i/solderpads.jpg/)



http://img821.imageshack.us/img821/6094/tracecut.th.jpg (http://img821.imageshack.us/i/tracecut.jpg/)



http://img841.imageshack.us/img841/3985/breadboard.th.jpg (http://img841.imageshack.us/i/breadboard.jpg/)



http://img834.imageshack.us/img834/6364/74hc74n.th.jpg (http://img834.imageshack.us/i/74hc74n.jpg/)

biscuit
08-28-2010, 09:20 PM
I quickly knocked up a multivibrator circuit just to rule out a few things . The SMS has no problems changing regions.When the square wave is high (1)the SMS switches over to another region,when it goes low(0) ,the SMS switches back to the other region!

That's just with 1 normal LED connected and one momentary switch (without a debouncing circuit )and no ICs from the SMS included in the circuit.

biscuit
08-29-2010, 12:44 AM
Without using an IC ,instead, constructing a transistorised toggle flip-flop circuit on mybreadboard,with NTSC wire as the 0 Vss ,PAL wire as Vcc +5v and the SMS signal wire connected to the LED's anode ,i get perfect toggling between 50/60 hz speed .

Taking the sms out of the circuit and just using cells as my power supply,the LED toggles on and off,something which just doesn't happen with the other 74HC74N circuit :shrug: faulty IC's ?

Calpis
08-29-2010, 07:11 PM
I'm not sure, I just know the logic is sound. From the pictures I can't easily verify your connections. Just remember the flip flop's clock should be on the CPU's reset while the flip flop's reset should be on your own POR circuit. If you take off the LED maybe it will toggle, I suspect some issue with the LED connection but I really can't tell from here.

biscuit
08-29-2010, 11:25 PM
I'm not sure, I just know the logic is sound. From the pictures I can't easily verify your connections. Just remember the flip flop's clock should be on the CPU's reset while the flip flop's reset should be on your own POR circuit. If you take off the LED maybe it will toggle, I suspect some issue with the LED connection but I really can't tell from here.

The 74hc74n is positive edge triggered,well i think the clock signal from the sms is negative, Vss!
:gravedigging:

Calpis
08-30-2010, 02:53 AM
??? clock signal from the SMS? By a clock signal's very nature they are both positive and negative. In this case the "clock signal" is the /reset signal. The edge sensitivity doesn't matter, the flip flop is toggled on the rising edge ie when the reset button is released.

biscuit
08-31-2010, 12:31 AM
Right,i checked the voltage on a few points on the sms after soldering my flip-flop pcb together and it still having no positive effect .

IC 315-2516 leg 22,this gets 4.90Vcc! When the sms's momentary reset button is pressed,the voltage to leg 22 drops to 0Vss.

The zilog connection,it's getting 4.53Vcc ,this remains unchanged when the sms's momentary reset button is pressed(the wire from this leg, which is then going to the 1CP pin of the 74, isn't giving out a pulse to the clock ,yes ?!)so it's not getting the kick up the arse it 's looking for .

The only time the flip-flop filps and shows with the LEDs changing colour,is when i turn on the sms!

Calpis
08-31-2010, 01:13 AM
Right,i checked the voltage on a few points on the sms after soldering my flip-flop pcb together and it still having no positive effect .
The voltage is pretty irrelevant in digital circuits, outputs will be lower than the + rail, that's normal.


IC 315-2516 leg 22,this gets 4.90Vcc! When the sms's momentary reset button is pressed,the voltage to leg 22 drops to 0Vss.
This is to be expected entirely.


The zilog connection,it's getting 4.53Vcc ,this remains unchanged when the sms's momentary reset button is pressed(the wire from this leg, which is then going to the 1CP pin of the 74, isn't giving out a pulse to the clock ,yes ?!)so it's not getting the kick up the arse it 's looking for .

The only time the flip-flop filps and shows with the LEDs changing colour,is when i turn on the sms!
From this quote I question how it's wired. Are you soldering clock directly to the switch?? You need it to be "debounced" which you get when using the Z80 reset signal. If you get a toggle at power up, but none after, are you sure D is connected to /Q and not Q?

biscuit
09-01-2010, 03:23 AM
and it's still having no positive effect .


The voltage is pretty irrelevant in digital circuits, outputs will be lower than the + rail, that's normal.Positive effect, as in , a good outcome :thumbsup:


The SN74HC74N pcb has all it's unused inputs soldered together to vcc,any linking traces on the underside have also been severed and tested with my multi metre ,the diode i used looks 99.99% identical to the one on the motherboard ,the resistor is 10k ohms,the cap is 10uf 25v and orientated the correct way.

On boot up,the LED is green, then a tiny flash of red,then it returns back to green.Pressing the sms's reset button has no effect on the flip-flops behaviour ,just has a normal reset button outcome.
:banghead::lol:

http://img690.imageshack.us/img690/684/dscf5103g.th.jpg (http://img690.imageshack.us/i/dscf5103g.jpg/)



http://img841.imageshack.us/img841/4046/dscf5104.th.jpg (http://img841.imageshack.us/i/dscf5104.jpg/)



http://img716.imageshack.us/img716/8255/dscf5105.th.jpg (http://img716.imageshack.us/i/dscf5105.jpg/)



http://img176.imageshack.us/img176/9166/dscf5099.th.jpg (http://img176.imageshack.us/i/dscf5099.jpg/)



http://img192.imageshack.us/img192/6696/dscf5100p.th.jpg (http://img192.imageshack.us/i/dscf5100p.jpg/)


http://img844.imageshack.us/img844/1341/dscf5101o.th.jpg (http://img844.imageshack.us/i/dscf5101o.jpg/)


http://img412.imageshack.us/img412/448/dscf5102k.th.jpg (http://img412.imageshack.us/i/dscf5102k.jpg/)



http://img821.imageshack.us/img821/4492/dscf5094y.th.jpg (http://img821.imageshack.us/i/dscf5094y.jpg/)


http://img64.imageshack.us/img64/3884/dscf5095.th.jpg (http://img64.imageshack.us/i/dscf5095.jpg/)



http://img134.imageshack.us/img134/2358/dscf5096.th.jpg (http://img134.imageshack.us/i/dscf5096.jpg/)



http://img5.imageshack.us/img5/9852/dscf5097b.th.jpg (http://img5.imageshack.us/i/dscf5097b.jpg/)



http://img176.imageshack.us/img176/2285/dscf5098.th.jpg (http://img176.imageshack.us/i/dscf5098.jpg/)

biscuit
09-01-2010, 03:37 AM
http://www.smspower.org/Development/Documents#Z80Processor

There is an PDF there ,on the sms's zilog cpu which is a lotmore in depth than that poor quality schematic .

One thing i've not said yet and that's a big thanks for your help with this mod and putting up with whatever mistakes i'm making.



The Undocumented Z80 Documented (0.4) (http://www.smspower.org/uploads/Development/z80-documented.pdf?sid=50388d9914267423cd8e696d3bd71df b)

RESET Reset (input, active low). Initializes the CPU as follows: it resets the
interrupt flip-flops, clears the PC and IR registes, and set the interrupt
mode to 0. During reset time, the address bus and data bus go to a high-
empedance state, and all control output signals go to the inactive state.
Note that RESET must be active for a minimum of three full clock cycles
before the reset operation is complete.

l_oliveira
09-01-2010, 12:13 PM
Let me give you guys an MUCH simpler idea:

Latch the state of the RESET button on power up. Just the 7474 and nothing else is needed.

You can change the "default" value by using either Q or /Q on the output. Only half of the 7474 will be used.

If you're so inclined on using the LEDs you can drive them from the outputs or just use the other half of the flipflop for that purpose (without loading a led straight on the NTPAL input... Not that does matter much lol)

So if you power on the SMS with RESET button being held it latches 0 as the value on the flipflop, changing the output to that value as long as the console is powered on. Not holding RESET will cause it to latch 1 and again it will last for as long the console is powered on. PW_ON_RESET is usually already generated internally by the console through an resistor/capacitor/diode bootstrap reset circuit.

Calpis
09-01-2010, 03:37 PM
I thought reset toggling was the idea.. Also the above circuit won't work if the POR is itself drained by the reset button which from all the trouble it seems to be.

biscuit
09-01-2010, 10:32 PM
I thought reset toggling was the idea..


Seeing as this is a SMS 1,and if the rest button method is non workable,what about trying to use the SMS's pause button ?

biscuit
09-01-2010, 10:36 PM
I thought reset toggling was the idea.. Also the above circuit won't work if the POR is itself drained by the reset button which from all the trouble it seems to be.


The Z80A executes a RESET cycle when the base unit is turned on. This is the only Z80A reset mechanism implemented.
The momentary RESET button on the console does not control Z80A reset; it is attached to an input port for software polling.



Is that maybe why my 7474 LED would toggle only when i powered the SMS on ?

l_oliveira
09-01-2010, 10:38 PM
I find this strange as far as I am aware, the RESET button on the SMS is software driven.

The RESET pin on the console is just a bit on a I/O port which have as purpose:

Prevent games from being reset if they're already at their title screens

Prevent the SMS1 SEGA logo from BOOT ROM from being displayed every time RESET is pressed. If you issue an POR it will display the SEGA LOGO.

If you issue an POR on a MD console it will display the "Produced by or under licence from SEGA ENTERPRISES." message. If you just press reset it won't (but MD reset is actually reseting the 68000 by hardware)


Have you tried to add an pullup to the RESET button ?

biscuit
09-01-2010, 11:28 PM
Let me give you guys an MUCH simpler idea:

Latch the state of the RESET button on power up. Just the 7474 and nothing else is needed.

You can change the "default" value by using either Q or /Q on the output. Only half of the 7474 will be used.

If you're so inclined on using the LEDs you can drive them from the outputs or just use the other half of the flipflop for that purpose (without loading a led straight on the NTPAL input... Not that does matter much lol)

So if you power on the SMS with RESET button being held it latches 0 as the value on the flipflop, changing the output to that value as long as the console is powered on. Not holding RESET will cause it to latch 1 and again it will last for as long the console is powered on. PW_ON_RESET is usually already generated internally by the console through an resistor/capacitor/diode bootstrap reset circuit.

Well, i connected up Q directly to the LED anode and to the SMS's signal and the cathode of the LED (through a POT set to just over 300 ohms)to Vss and everything works .:thumbsup:

Wow ,the first bit of good news ,excellent now if we can make it 2 for 2 with the reset/pause button to toggle the regions .

biscuit
09-01-2010, 11:34 PM
I find this strange as far as I am aware, the RESET button on the SMS is software driven.

The RESET pin on the console is just a bit on a I/O port which have as purpose:

Prevent games from being reset if they're already at their title screens

Prevent the SMS1 SEGA logo from BOOT ROM from being displayed every time RESET is pressed. If you issue an POR it will display the SEGA LOGO.

If you issue an POR on a MD console it will display the "Produced by or under licence from SEGA ENTERPRISES." message. If you just press reset it won't (but MD reset is actually reseting the 68000 by hardware)


Have you tried to add an pullup to the RESET button ?

About the mega drive point,on the original model 1 version,there are two versions of this console,one where if the reset button is pressed ,it sends a vss signal ,and the other model one pcb version sends Vcc when the reset button is pressed!


Have you tried to add an pullup to the RESET button ?

With Calpis's circuit ?

biscuit
09-01-2010, 11:47 PM
What are you both using to draw these circuit schematics ?

l_oliveira
09-02-2010, 12:40 AM
What are you both using to draw these circuit schematics ?

I am using this:
http://www.suigyodo.com/online/e/

Suggestion from Lawrence at NFG:

http://nfggames.com/forum2/index.php

Direct link to the thread:
http://nfggames.com/forum2/index.php?topic=3735.0

Great stuff :thumbsup:

biscuit
09-02-2010, 08:12 AM
http://img266.imageshack.us/img266/6471/switchless.th.png (http://img225.imageshack.us/i/switchless.png/)





http://img844.imageshack.us/img844/7766/schematic.th.jpg (http://img844.imageshack.us/i/schematic.jpg/)

http://img821.imageshack.us/img821/6094/tracecut.th.jpg (http://img821.imageshack.us/i/tracecut.jpg/)

http://img413.imageshack.us/img413/7697/solderpads.th.jpg (http://img413.imageshack.us/i/solderpads.jpg/)

http://img198.imageshack.us/img198/6024/smsreset.th.jpg (http://img198.imageshack.us/i/smsreset.jpg/)

http://img42.imageshack.us/img42/689/pwrreset.th.jpg (http://img42.imageshack.us/i/pwrreset.jpg/)

http://img440.imageshack.us/img440/9365/7474ic.th.jpg (http://img440.imageshack.us/i/7474ic.jpg/)

http://img823.imageshack.us/img823/9330/resistor.th.jpg (http://img823.imageshack.us/i/resistor.jpg/)

http://img534.imageshack.us/img534/6094/tracecut.th.jpg (http://img534.imageshack.us/i/tracecut.jpg/)

http://img839.imageshack.us/img839/3863/ledconnections.th.jpg (http://img839.imageshack.us/i/ledconnections.jpg/)

http://img138.imageshack.us/img138/2347/ledlegs.th.jpg (http://img138.imageshack.us/i/ledlegs.jpg/)

http://img826.imageshack.us/img826/4622/standarscolour.th.jpg (http://img826.imageshack.us/i/standarscolour.jpg/)

http://img713.imageshack.us/img713/3341/5060ledcolour.th.jpg (http://img713.imageshack.us/i/5060ledcolour.jpg/)

I think you should add this to the gamesX wiki ? No need to buy and flash a PIC either.

l_oliveira
09-02-2010, 10:57 AM
Register there yourself and feel free to contribute.

Lawrence and Kendrick aways welcome contributions to their wiki. :thumbsup:

Also both are fellow users of ASSEMbler games forums as well

By the way, I use that circuit on my SEGA Saturn to switch it from Japan to USA (It defaults to Japan) and on my Mega Drive (also defaults to Japan)

biscuit
09-02-2010, 01:20 PM
That bit of software you recommended is dot on like.

biscuit
09-03-2010, 04:04 PM
To get you the english or japanese mode working .Instead of using an external switch,it can be wired to the pause button instead,as when you press it,it gets grounded i assume.

So apply this with the 50/60 hz speed mod and you now have a great multi system master system,without hacking up the casing!

Just keep the pause button held before you switch on and let go a few seconds after the sega logo.

http://img189.imageshack.us/img189/2622/japeng.th.png (http://img189.imageshack.us/i/japeng.png/)




http://img831.imageshack.us/img831/730/leg34.th.jpg (http://img831.imageshack.us/i/leg34.jpg/)


http://img641.imageshack.us/img641/3473/pausebuttonconnection.th.jpg (http://img641.imageshack.us/i/pausebuttonconnection.jpg/)

http://img203.imageshack.us/img203/8162/5060hzandengjapmod.th.jpg (http://img203.imageshack.us/i/5060hzandengjapmod.jpg/)

http://img337.imageshack.us/img337/5857/2ndstartupsegalogojapmo.th.jpg (http://img337.imageshack.us/i/2ndstartupsegalogojapmo.jpg/)

http://img833.imageshack.us/img833/2620/markiiilogoforfantasyzo.th.jpg (http://img833.imageshack.us/i/markiiilogoforfantasyzo.jpg/)

http://img822.imageshack.us/img822/7827/cloudmasterenglish.th.jpg (http://img822.imageshack.us/i/cloudmasterenglish.jpg/)

http://img832.imageshack.us/img832/2785/cloudmasterjapanmodetit.th.jpg (http://img832.imageshack.us/i/cloudmasterjapanmodetit.jpg/)