MegaDrive 1 CXA1645 mod

Discussion in 'Modding and Hacking - Consoles and Electronics' started by Bearking, Mar 29, 2011.

  1. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    I have an old Japanese MegaDrive 1 with one of those awful CXA1145 video encoder chips. Using RGB I get some ugly "jailbars" in all the blue colors.
    XRGB-3 screenshot:
    [​IMG]
    Notice how the red and green colors look perfect.

    The stock CXA1145 is wired up roughly like this:
    [​IMG]

    And when I swapped the green and blue in and outputs like this:
    [​IMG]
    - The blue colors were perfect but now the greens had jailbars. So the video encoder is definitely to blame here...
    I also have another JAP MegaDrive 1 and the problem is the same on that as well. Tapping the R,G and B lines from the input of the chip doesn't work.

    I read that the Sony CXA1645 is better so I ordered one and it got here yesterday. I removed the old CXA1145 from the MegaDrive and soldered it in like this:

    Pin: Soldered to:
    1 (GND): MegaDrive MB Pin 1 (GND)
    2 (R in): MegaDrive MB Pin 2 (R in)
    3 (G in): MegaDrive MB Pin 3 (G in)
    4 (B in): MegaDrive MB Pin 4 (B in)
    5 (N/C): Nothing
    6 (SCIN IN): GND (not sure about this one...)
    7 (PAL/NTSC): MegaDrive MB Pin 7*1
    8 (N/C): Nothing
    9 (YCLPC): 0.1uF > GND
    10 (SYNC IN): MegaDrive MB Pin 10 (SYNC)
    11 (N/C): Nothing
    12 (Vcc): MegaDrive MB Pin 12 (Vcc)
    13 (IREF): MegaDrive MB Pin 13 (?)*2
    14 (VREF): MegaDrive MB Pin 14 (?)
    15 (Y OUT): MegaDrive MB Pin 15*3
    16 (C OUT): MegaDrive MB Pin 16*4
    17 (N/C): Nothing
    18 (FO): 20K > GND
    19 (Vcc2): MegaDrive MB Pin 19 (Vcc)
    20 (CVIDEO): MegaDrive MB Pin 20 (CVIDEO)
    21 (B OUT): MegaDrive MB Pin 21 (B OUT)
    22 (G OUT): MegaDrive MB Pin 22 (G OUT)
    23 (R OUT): MegaDrive MB Pin 23 (R OUT)
    24 (GND2): MegaDrive MB Pin 24 (GND)

    Here are datasheets for both 1145 and 1645:
    CXA1145: http://www.alldatasheet.com/datasheet-pdf/pdf/77343/SONY/CXA1145P.html
    CXA1645: http://www.alldatasheet.com/datasheet-pdf/pdf/46646/SONY/CXA1645.html

    A picture of both in NTSC mode:
    http://i40.photobucket.com/albums/e236/Konsolkongen/MegaDriveCXA.png?t=1301335310

    But it doesn't work :( I don't get any sound or video at all :( I have checked for shorts but all seems okay.

    I then tried the following things according to the datasheets as I noticed several differences:

    Pin 7*1 The PAL/NTSC line on the MegaDrive was neither GND or 5V which was very strange as this pin is the same on the stock video encoder and the machine is NTSC. I cut this trace and connected it to 5V.
    Pin 13*2 I noticed the caps and resistors on the 1145 datasheet didn't match the ones in the 1645. I cut the trace to the pin and soldered a 47K and a 0.1uF (UNPOLARIZED, does that matter?) from pin 13 to GND.
    Pin 15*3 I noticed that there were several differences after the Y OUT in the two datasheets. Since I don't need S-Video I decided to cut this pin.
    Pin 16*4 Same as above. I cut the C OUT pin.

    The MegaDrive still doesn't work :( There are a number of pins that still doesn't match 100% to the data sheet. Those are pins 12, 13 (unpolarized 0.1uF where the datasheet says polarized), 14 and 19.

    I'm thinking that cutting ALL traces to the video encoder and soldering everything according to the datasheet might help. But really I'm more confused about pin 6 (SCIN). According to the datasheet this can be either GND or something else...:
    [​IMG]
    I have no idea what the "SG4 SIN 0.5Vp-p" is so I just hooked it up to GND. Can this be why it's not working?

    Any help would be greatly appreciated. I only need RGB video out if that makes it any easier.
    I'm a bit worried why I don't get any sound when I hook it up as is. I mean the MegaDrive should work even with a faulty Video encoder, right?

    I found this thread while searching for a solution yesterday:
    http://www.assemblergames.com/forums/showthread.php?t=6467

    It seems Retro has some experience on the CXA1645 chip so I hope you can help me here :)
     
  2. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    They're not pin compatible chips.

    The 1645 requires a subcarrier circuit, as it doesn't have a built-in oscillator. I covered that in the thread you linked. It doesn't do audio, either. It won't give composite sync out on its own. The Y/C mixer is different, too - so it doesn't have Y in or Chroma in. And there are a couple of things that the 1145 didn't have.

    I'm not on a computer where I can easily compare the circuits right now, but that should hopefully show you why you're not getting anything. You certainly want to sort out all those sync issues for starters!

    *EDIT*

    You haven't read the datasheet properly, though. It clearly notes on the pin description that pin 6 is the subcarrier input, and to see notes on operation 3 and 5:

    ...and here was my subcarrier circuit, which is NTSC. You could adjust it accordingly for PAL, of course.

    http://www.assemblergames.com/forums/showpost.php?p=98111&postcount=15

    N.B. that was taken from the following (as previously mentioned, but worth mentioning again):

    http://www.nexusuk.org/projects/rgb2svid/circuit
     
    Last edited: Mar 29, 2011
  3. link83

    link83 Enthusiastic Member

    Joined:
    Mar 22, 2008
    Messages:
    526
    Likes Received:
    8
    Sorry I cant help with your main question, but I found this bit interesting:-
    I am curious if you also tried bypassing/replacing the components on the blue input on the Mega Drive motherboard? (IIRC I think the RGB outputs are a direct connection to the AV port) If not how can you be certain that the video encoder is at fault? :confused:
     
    Last edited: Mar 29, 2011
  4. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    You are right. I completely forgot to mention that I have the MegaDrive stereo modified so the audio part of the video encoder isn't needed. Still I don't get any sound, not even from the headphone jack. I only hear a buzzing noise when I turn it on :(

    Sync out isn't needed. I was tapping sync from the IN pin anyway:
    Sync IN > 220uF > 75ohm > LM1881 - works great :)
    Y and C won't be needed at all.

    Sorry but I don't understand any of that :/ I can build that no problem, but I don't understand the logic. I doubt adding this will make the sound work?

    What I need the video encoder for is actually nothing more than the R,G and B IN and OUT's. Will the MegaDrive work without a video encoder installed?

    Looking at the datasheet this is what it says about the RGB lines:
    http://i40.photobucket.com/albums/e236/Konsolkongen/japmegadrivelogo11.png?t=1301441871

    Couldn't I just remove the Video encoder again, buy the parts for the RGB lines and build that myself in a much larger scale? That would probably be the easiest solution :)
     
  5. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    Looking at the slightly ropey diagrams on the 'Net, it looks like there's only a resistor and capacitor between the RGB lines and the 1145. You could check the caps, of course. It also looks like it may get the sync directly from the composite sync in, and not bother with the output... but I'd double check.

    Are you doing all this through the XRGB, or do you have a proper RGB TV/monitor available?
     
  6. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    Yes I did that :) I switched traces just before the two capacitors on the underside of the motherboard, so the blue signal passed through the greens cap and vice versa. I also tried swapping the capacitors just to make sure that wasn't the problem :)

    Now I got everything wired back up to normal:
    [​IMG]
     
  7. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    Checked the caps already :) Only have the XRGB-3 unfortunately. But it's not usually picky with signals and should play sound no matter what.

    The sync is the same as when I used the 1145 as I'm tapping it from pin 10.
     
  8. retro

    retro Resigned from mod duty 15 March 2018

    Joined:
    Mar 13, 2004
    Messages:
    10,354
    Likes Received:
    822
    Tapping? So you're not using the proper socket, then? How come?

    You'd also need to check that you're not breaking another part of the Megadrive's circuit (never mind the 1145 part for now) and stopping that from working. I don't really see there being too much of an issue, though.
     
    Last edited: Mar 29, 2011
  9. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    Do you mean the DIN socket? I had to completely rewire that for the stereo mod. Maybe the word "tapping" doesn't mean what I thought :p

    I have soldered a wire to Pin 10 (SYNC IN) > 75 ohm resistor > 220uF cap > LM1881 circuit > DIN socket. Has always worked just fine.

    I removed the 1145 from the motherboard when I installed this new one. Was that a mistake?
     
  10. Twimfy

    Twimfy Site Supporter 2015

    Joined:
    Apr 10, 2006
    Messages:
    3,570
    Likes Received:
    32
    So IS there a simple solution to this for PAL MD?

    I have the same issue.
     
  11. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
  12. raylyd

    raylyd Guest

    All mega drive model ones jap usa pal all have the same fault.
     
  13. Twimfy

    Twimfy Site Supporter 2015

    Joined:
    Apr 10, 2006
    Messages:
    3,570
    Likes Received:
    32
    Y'know I only use a MD 1 because I prefer the look. I might actually just mod a MD2 board into a MD1 case. Will cut out so much bullshit.
     
  14. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    So will the MegaDrive work without the Video encoder in place? If that's so I'll probably just rip out the CXA1645 and attempt to build a RGB color booster myself.
     
  15. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,906
    Likes Received:
    21
    Your "jailbars" are probably interference from composite.

    Rearranging the green and blue inputs breaks composite and S-video... That might not be an issue for you if you use J 21 pin RGB, but it's not a good solution for others using SCART or who want to use composite or S-video.

    Right now you're using the chip only for its RGB amplifiers. Yes the MD can operate without the RGB encoder at all, and maybe without amplifiers at all, but you really should use amps to drive the cable.

    I would change everything back to normal, remove the colorburst crystal and see if that helps. If not, reattach the crystal and check the distance between traces for blue and composite. If they're too close separate them. If that doesn't get rid of the noise then I'd remove all of the RGB encoder circuitry and build general purpose video amps for RGB and sync (you'd need 4x non-inverting amplifiers with a gain of 2 with a 75 ohm resistor then 220uF capacitor in series on the outputs).
     
    Last edited: Mar 30, 2011
  16. link83

    link83 Enthusiastic Member

    Joined:
    Mar 22, 2008
    Messages:
    526
    Likes Received:
    8
    Would that be caused by internal chip interference, or the external circuitry? Just wondering if it would help to cut the composite video trace and rewire it away from the RGB output traces.
     
  17. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    I know. I only did that to isolate the cause of jailbars to the video encoder. It's all back to normal.

    I decided to restore the MegaDrive to normal. The old 1145 chip had died when I removed it so I had to take one from an old ugly EU MegaDrive I had. Installed it and now everything works fine again (with jailbars). I just cut the legs on the 1645 so it can't be used again... oh well. At least now I can play the MegaDrive again :)

    Those "4x non-inverting amplifiers" what do they look like? I still want to get rid of the jailbars but changing the video encoder seems like too much trouble.
     
    Last edited: Mar 30, 2011
  18. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    Using the PC-engine colorbooster mod here on Gamesx:
    http://www.gamesx.com/grafx/pce_rgb.jpg
    - I was able to get rid of the jailbars :D.

    I took the RGB directly from the video chip > PC Engine RGB amp, and this is what I got:
    [​IMG]

    :p I then added a 470ohm resistor after the RGB amp and now it looks like this:

    [​IMG]

    [​IMG]

    The colours are obviously too dark, but otherwise it looks promising. Then then not really, as the colors runs together in some areas and they also gets brighter and darker when the screen is moving.

    Here it looks somewhat decent. The colors have run out at the palm on the right but other than the too dark colors and a soft picture it looks pretty nice:
    [​IMG]

    Now look what happens when I jump onto the platform and up in the air:

    [​IMG]

    The sky just got darker and Sonic got kinda gray! This sucks!

    What can I do to prevent that the colors gets messed up depending on screen movement? And what about the stuff that runs together?

    I feel like I'm very close to a perfect image so any help would be much appreciated :)

    EDIT: The colors also got brighter/darker when movement before I added the 470ohm resistor.
     
    Last edited: Apr 9, 2011
  19. Twimfy

    Twimfy Site Supporter 2015

    Joined:
    Apr 10, 2006
    Messages:
    3,570
    Likes Received:
    32
    I can still see the Jailbars slightly on the first picture but I think that's as close as you'll get with that issue.

    As for the other stuff I've no clue but I'll be interested to see what you come up with as even though my picture is pretty damn good (when my Scart cable works properly) it could be a little better.
     
  20. Bearking

    Bearking Konsolkongen

    Joined:
    Aug 2, 2010
    Messages:
    855
    Likes Received:
    100
    Yes they are slightly visible but I think that might be because of the extreme brightness :)
     

Share This Page