gcvideo - Open source GameCube component cable solution

Discussion in 'Modding and Hacking - Consoles and Electronics' started by darcagn, Aug 31, 2014.

  1. OzOnE

    OzOnE <B>Site Supporter 2013</B>

    Joined:
    Nov 10, 2011
    Messages:
    502
    Likes Received:
    102
    Yep. I'm slightly wary about mentioning the HDMI thing too often, but then if / once I got a kit together, I'd still have to say it somewhere.
    I know the lawyers might try to protect the protocol / license, but it's quite unfair that it's a ubiquitous signalling standard that we all have to use nowadays.


    That's not too bad then. Maybe the GC is driving the video bus better than the N64 does, as the N64 did seem a bit more fussy about wire length etc.

    I recently saw the project for the Neo Geo as well. The audio code is really handy too.
    I prefer using a proper Tx chip though, as it ensures it will have the correct drive levels, and work with 99% of modern TVs.

    I actually wanted to target the Neo Geo too, so looks like I missed the boat. :( lol

    The Neo Geo makes sense though, as it's one of those machines that is much easier to mod than others.
    I eventually want to mod my Neo Geo CD as well (I sold my Neo Geo cart board).

    EDIT: Unseen - just wondering what sort of CPU core you're using for your OSD?
    I've had trouble finding some pre-existing code which is easy to get firmware onto, and has good debugging / GCC support.

    The ZPU core looks OK, and I have GCC set up on Ubuntu for that, but I'm not exactly an "expert" in Linux by any means. :p
    I did write a simple OSD in Verilog years ago, but I'm curious to know if yours is coded in C etc.?


    Thanks. ;)

    StarFox does look particularly nice on the direct stream.
    Sadly, the quality doesn't translate too well to YouTube, even with high initial bitrates of 20-35 Mbps H.264.

    I never realized until I uploaded those vids just how high a bitrate you have to use to get good quality on YouTube.
    It's not the same as pre-filtered HD broadcast TV though - games have a lot of fine details which are hard to preserve.

    Well, it does still look very nice, and the Zelda clip looks better than most others on YouTube (that aren't emulators), so I'm happy with that. :p


    OzOnE.
     
    Last edited: Mar 7, 2015
  2. Unseen

    Unseen Spirited Member

    Joined:
    Sep 1, 2014
    Messages:
    100
    Likes Received:
    6
    It wasn't even the first one that targeted the NeoGeo, I saw another project a few months ago that used (linedoubled) analog output to a VGA monitor.

    EDIT: You could add HDMI to Tim's NESRGB instead, it should also use discrete resistors as DAC like the Neo Geo. ;)

    It's a ZPU because that's the smallest (in terms of FPGA slices) softcore CPU with GCC support that I know. Specifically it's the ZPUflex core with a few simple, custom peripherals around it. It's quite fun to basically build your own microcontroller with whatever weird peripheral you need. =) If you just want a sample system to experiment with I can probably package up my current WIP sources.

    As for debugging... I've survived on printf, ISim and occasionally routing signals to external pins connected to a logic analyzer. I think there are ZPU-extensions for JTAG debugging out there, but I haven't been desperate enough to look for them yet.

    The OSD is a text-mode display, similar to the common VGA text mode FPGA modules, but unlike those it is referenced to the timing of the existing video signal. On the CPU side it's just a bit of RAM that happens to output its contents as a 45x30 text screen. Each char is mapped as a full word because the ZPUflex can't use byte load/store instructions in its internal RAM, but only 9 bits are actually stored (7 bits char code, 2 bits attributes). Everything from there is in software which I still need to write - the screenshot was a test if the menu was working as intended and one line in there is currently faked.

    You could try to scale it to 720p or 1080p before uploading, Youtube seems to use lower compression for the HD versions of the videos.

    You should try Twilight Princess some day, it has quite fine details in its title screen.
     
    Last edited: Mar 7, 2015
  3. OzOnE

    OzOnE <B>Site Supporter 2013</B>

    Joined:
    Nov 10, 2011
    Messages:
    502
    Likes Received:
    102

    I think kevtris has the NES stuff pretty much wrapped up. :p

    https://www.youtube.com/watch?v=QnQuBN3iYVA

    Ahh, so it is ZPU. :)
    It is quite a nice core, and could be made to be quite powerful as well.

    Thanks. I might give that another try soon.
    If you do decide to upload your OSD code, that would be awesome.

    I recall seeing some great tutorials from Alastair (he did some great work on the Minimig core too)...

    http://retroramblings.net/?page_id=1031

    I did try that with one of the test vids, and it definitely made a difference. I noticed that YouTube seems to prefer certain codecs and bitrate combinations too.

    OzOnE.
     
    Last edited: Mar 8, 2015
  4. lwizardl

    lwizardl Living The Dream

    Joined:
    Mar 30, 2005
    Messages:
    507
    Likes Received:
    45
    Yup I do own a xrgb mini, bought it from Yakumo on here. I have not got the Euro Scart to jp21 adapter yet, but have been buying up euro scart cables as I can find them.
    So far I have snes, ps1, ps2, and 4 3-port scart hubs. I have a hd-pvr 2 and it does record 60fps, I tell it to scale down to 30fps due to storage space. I have had nothing but problems with the hd-pvr 2 to be honest, the only reason I keep it is due to it is the only device that still includes the toslink spdif port.
     
  5. MonkeyBoyJoey

    MonkeyBoyJoey "Now you're thinking with portals!" - Cave Johnson

    Joined:
    Mar 1, 2015
    Messages:
    1,329
    Likes Received:
    121
    Hey Unseen, could this project work with the Sega Game Gear? I know Tim Worthington makes a GGTV board that does Composite, S-Video, and RGB so could what he did be done for digital HDMI and DVI output?
     
  6. Unseen

    Unseen Spirited Member

    Joined:
    Sep 1, 2014
    Messages:
    100
    Likes Received:
    6
    Not as-is - the Game Gear uses 5V-logic, connecting it directly to the inputs of the FPGA would destroy it. Also, the "firmware" for the FPGA would need to be rewritten.
     
  7. MonkeyBoyJoey

    MonkeyBoyJoey "Now you're thinking with portals!" - Cave Johnson

    Joined:
    Mar 1, 2015
    Messages:
    1,329
    Likes Received:
    121
    When the other versions are done or when you have the time, would you be willing to look into it? Is there a way to lower the voltage so we could use the same FPGA?

    It might be a tight fit to mount the FPGA internally and if wire length is an issue, then the only way to keep it external would be to use something that attaches to the system like the PowerBack rechargeable battery accessory so it could hold the FPGA and its components while keeping the wires as short as possible. Turning the GG into a console might be a better option, since you could keep it completely internal and have a custom case for the system.

    It would probably make screen replacements easier because you could use a small HD monitor and get better quality than those SD Composite monitors.
     
  8. Unseen

    Unseen Spirited Member

    Joined:
    Sep 1, 2014
    Messages:
    100
    Likes Received:
    6
    Sure, but that needs additional components, i.e. a new or an additional PCB.

    If an LCD replacement is the goal, driving the LCD directly instead of converting to some intermediate standard may be a better option. Are there even any LCDs available that are about the same size as the original, have a sufficiently-small controller and accept a better signal than composite?
     
  9. MonkeyBoyJoey

    MonkeyBoyJoey "Now you're thinking with portals!" - Cave Johnson

    Joined:
    Mar 1, 2015
    Messages:
    1,329
    Likes Received:
    121
    How could we make an add-on board that does this?

    Sorry if it came out as that. My goal was to hook it up the Game Gear to an HDTV or monitor via HDMI or DVI instead of analog Composite, S-Video, or RGB. I'm not sure if there are any screens like that, but if there are, they are probably expensive.
     
  10. Unseen

    Unseen Spirited Member

    Joined:
    Sep 1, 2014
    Messages:
    100
    Likes Received:
    6
    The same way other circuits are built too: Figure out what you want it to do, design the circuit, draw some schematics and build it - either using a prototyping method like perfboard or by creating a layout for a printed circuit board that you then either etch yourself or order from a PCB house.

    Ah, I misunderstood you then. Since there seems to be enough information about the GameGear's internal video bus available, it should be possible in principle. Removing the large black border around the picture will most likely not be possible though.
     
  11. MonkeyBoyJoey

    MonkeyBoyJoey "Now you're thinking with portals!" - Cave Johnson

    Joined:
    Mar 1, 2015
    Messages:
    1,329
    Likes Received:
    121
    It's ok. Doesn't Tim's GGTV board have a switch for disabling the video compression, making games output at fullscreen, or is it just disabling video compression for Master System games played on the Game Gear? I've seen a video on YouTube that certain Game Gear games actually output in fullscreen when hooked up to a TV, even with video compression enabled. It was one of the Mickey Mouse games. I can link the video if you want.
     
  12. adimifus

    adimifus <B>Site Supporter 2013</B><BR><B>Site Supporter 20

    Joined:
    Nov 18, 2011
    Messages:
    235
    Likes Received:
    0
    The video compression you're referring to is the compression when playing Master System games on the Game Gear. The video for actual Game Gear games isn't compressed at all. The reason for the switch is the compressed video doesn't display on the GGTV's video output. And the reason for not simply disabling it permanently is if you want the option of using the Game Gear normally, Master System games won't display on the LCD unless the video IS compressed.

    Technically, all Game Gear games output full screen. The lower resolution Game Gear LCD only displays the middle of the frame. Most games just have solid colors outside of the area the Game Gear LCD shows, but I think some show graphics all the way to the actual video border.
     
    Last edited: Mar 12, 2015
  13. MonkeyBoyJoey

    MonkeyBoyJoey "Now you're thinking with portals!" - Cave Johnson

    Joined:
    Mar 1, 2015
    Messages:
    1,329
    Likes Received:
    121
    Thank you for clearing that up. One of the Mickey Mouse games does in fact go to the edge of the video border when hooked up to a TV. I think its Castle of Illusion. I wonder if there is a way to make all Game Gear games go all the way to the edge of the video border. If there is, it would probably make the games look bad.
     
  14. OzOnE

    OzOnE <B>Site Supporter 2013</B>

    Joined:
    Nov 10, 2011
    Messages:
    502
    Likes Received:
    102
    @MonkeyBoyJoey - I have some boards for the Game Gear that I made recently, and just so happened to have soldered the main CPLD chips onto four more last night. ;)

    They are still prototypes, but the video output is probably the cleanest and sharpest you're going to get.

    It uses a Mega Drive 2 type mini-DIN connector for the video output.

    The current version only outputs RGB atm, but it has some DACs onboard for possibly doing composite / S-Video encoding too.
    It may need a CPLD with more logic on to do that though.

    The proto boards also don't have the mounting holes on, so will have to be glued to the GG PCB or case.

    They also fix an issue with Tim's original code - it didn't output the Red, Green and Blue pixels at exactly the same time, so added a fair bit of "ghosting" to the edges.
    You can see this on the yellow edges on Sonic, or on the trees...

    https://youtu.be/FiJL27Jy-rI?t=16m7s

    AFAIK, the switch is for expanding Master System games to full screen on the video output, but doing so disables the internal screen.
    (You also get some GG games that are essentially the MS version in a GG cart, like Castle of Illusion.)

    The switch simply Grounds a test pad on the GG PCB itself, so it's not doing any "processing" on the CPLD or anything.

    @adimifus is right though - all Game Gear games will only show a smaller image in the centre of the TV screen.
    "Master System" games will do the same thing unless you flip the switch to expand it to full-screen (which then disables the internal LCD, 'cos it can't display it.)

    The small image isn't really a big deal though, as it still looks great on the TV.
    On many modern TVs you can even zoom in a bit more so it fills the screen better.

    Not sure when I'll be doing the next round of PCBs for this though - these are just for testing atm, and I have two more GGs to mod.

    Doing video expansion on all GG games would probably require some RAM to buffer the frames.
    At the very least it would need an FPGA or CPLD with more logic on.

    There may be some tricks for doing the expansion without external RAM though.
    You can expand the lines horizontally quite easily, then use a small block of internal RAM to buffer some lines and expand vertically, and then adjust the sync timings so the TV would centre the image.

    I'll post some pics of the PCB in a mo...

    OzOnE.
     
    Last edited: Mar 12, 2015
  15. MonkeyBoyJoey

    MonkeyBoyJoey "Now you're thinking with portals!" - Cave Johnson

    Joined:
    Mar 1, 2015
    Messages:
    1,329
    Likes Received:
    121
    I'm excited for those! I'm ok with it being just RGB, but if you would like to output S-Video, maybe a Sega Saturn 10 pin mini din would work better because then all you would need are Sega Saturn cables. I think those connectors are rare though. I didn't know his board had that issue. I've seen Luke's video on his Mega Gear and thought about doing that to my GG but ultimately decided that mine should stay portable.

    Maybe just using the TV's zoom feature would be better then. If you can, could you look at what it would take for true digital DVI on a GG? Also, if you haven't already, I would recommend installing Tim's SMS FM Sound board in one of those GGs.
     
  16. OzOnE

    OzOnE <B>Site Supporter 2013</B>

    Joined:
    Nov 10, 2011
    Messages:
    502
    Likes Received:
    102
    Thanks, I'll have a look at the Saturn cables thing.
    I can probably find the sockets on AliExpress or elsewhere, but need to be sure I can still get the Saturn cables easily.

    For Composite and S-Video, I'll probably just add a proper chip for it (like Tim's and other boards).

    EDIT: I didn't want to sound critical of Tim's excellent work btw - I spoke with him via e-mail years ago, and he's done some great stuff. His original N64 RGB blog / code / schematic inspired me to play with HDMI on the N64 in the first place. :)

    It's just that I noticed on Luke's vid that the GG video mod appeared to be outputting the pixels as soon as the colours are latched, hence giving the slight ghosting and strange edges in places. I'm assuming Luke is using the mod kit from Otaku's, so it's likely using Tim's original code as well?


    I wanted to add Composite anyway so I can replace the LCD in the GG as well.
    A pure digital connection to the LCD would be best ofc, but many of the cheaper "reversing camera" LCDs only accept Composite.

    They should still be a huge improvement over the original screen.

    For DVI / HDMI, I'm still trying to finish the board layout for the latest HDMI board, and almost ready to send off for proto boards.

    The current board design is still around 47 x 39mm, but may still squeeze into the GG.

    If the LCD is replaced too, it will definitely fit, since the CCFL backlight can be completely removed as well.
    (The inverter for the old backlight is easily disabled too, just by removing the inductor for the power.)

    It would be trivial to get the GG code working on the HDMI board.
    The only problem is that some modern TVs won't accept 240p / 288p / 480i / 576i via HDMI, only 720p and above.

    To "upscale" would likely require external RAM, but I may be able to do what kevtris does with his HDMI NES board...

    As the NES outputs only 240p (or 288p) and generally doesn't change vid modes in-game (like the N64 does), he simply locks the HDMI output sync to the incoming sync from the NES. He can then just buffer a few lines an expand it to 720p etc. for the HDMI output.

    I want to try targeting as many machines as possible with the HDMI board.
    I'm constantly learning more about PCB layouts, so not sure I can stretch to adding SDRAM to the small board just yet.

    With the right code though, it might be possible to do some basic scan-doubling to at least get it outputting 480p / 576p or 720p to the TV.
    That would then pretty much guarantee it working with 99% of modern TVs out there.

    Here are some pics of the GG RGB boards (hope I'm not threadjacking?)...

    A few notes...

    I put a footprint on the board for one of those rocker / joystick switches.
    I thought it would be a good option for adjusting the brightness / contrast / colour on the LCD upgrades, but I might change the switch.

    I know the wires are a bit of a mess atm.

    The board is upside-down for the photo.
    (I will probably move the mini-DIN to the other side of the board anyway, so it all fits the case properly.)

    It needed a small mod where three extra resistors are added to the DACs (to get the video levels just right).
    (This can be sorted just by using different resistor values, but I'll be getting new boards made regardless.)

    You can see the board doesn't have mounting holes yet.

    These issues will all be fixed in the final version. Hey, that's why it's called a "prototype", right? :p

    [​IMG]

    [​IMG]

    OzOnE.
     
    Last edited: Mar 12, 2015
  17. OzOnE

    OzOnE <B>Site Supporter 2013</B>

    Joined:
    Nov 10, 2011
    Messages:
    502
    Likes Received:
    102
    @MonkeyBoyJoey - look's like you were right - getting hold of the 10-pin mini-DIN sockets for the Saturn cables is near impossibru. lol

    [​IMG]

    I just checked on AliExpress, eBay, and Mouser, and they seem very rare.
    Mouser only list the 9-pin types as a maximum.

    Oh well.
    The 9-pin "Mega Drive 2" type sockets have enough pins for RGB, Composite, Stereo audio, +5V, and Sync, so it would be simple enough just to add a switch so it will output S-Video instead.

    (ie. Chroma via "Sync", and Luma via "Composite" etc.)


    OzOnE.
    P.S. This discussion also reminded me that I need to add voltage level translation to the HDMI board for 5-Volt machines. doh!
    (The Altera CPLD on the GG board can handle 5-Volt levels directly though.)
     
    Last edited: Mar 12, 2015
  18. Unseen

    Unseen Spirited Member

    Joined:
    Sep 1, 2014
    Messages:
    100
    Likes Received:
    6
    As far as I know support for either 480p or 576p are required for all HDMI sinks which can be created from a 240p or 480i signal with very little hassle on an FPGA (if it has enough BRAM). I didn't have any problems with 480i yet on the devices I tested as long as pixel doubling was used to ensure that the pixel clock doesn't drop below the 25MHz minimum. Some devices didn't like 240p via HDMI though.
     
  19. MonkeyBoyJoey

    MonkeyBoyJoey "Now you're thinking with portals!" - Cave Johnson

    Joined:
    Mar 1, 2015
    Messages:
    1,329
    Likes Received:
    121
    I found a female 10 pin mini-din cable connector on eBay: http://www.ebay.com/itm/231500102105
    It's not a PCB mount but it could still work.

    I thought Luma was Sync information and Chroma was the Color info. Maybe try Luma via Sync and Chroma via Composite pins so you can create Sync on Luma RGB cables.
     
    Last edited: Mar 12, 2015
  20. OzOnE

    OzOnE <B>Site Supporter 2013</B>

    Joined:
    Nov 10, 2011
    Messages:
    502
    Likes Received:
    102
    Yeah, I think 480p / 576p works on almost all TVs.

    My Samsung is one of those that definitely doesn't like 480i / 576i via HDMI though, sadly.

    Scan-doubling might be possible for the N64 (when it switches to interlaced), and other machines, but it's tricky with the small size of FPGA I'm using and no external RAM.

    I'm looking to just get these boards made at first, as it's taking me way too long to get projects done.
    I can then hopefully add SDRAM (or even SRAM) to it, to go from interlaced to progressive more easily.

    True though - scan-doubling from 240p -> 480p, and 288p -> 576P should be no problem. :)

    I tried enabling pixel doubling on the HDMI board for the Gamecube before, but the monitor still wouldn't accept it.
    It would probably have far more chance of working on the TV, but I can't recall if I tried it on my Samsung.

    I was hoping to try scan-doubling on the GG board, as well as converting the colour space to Component, but there's not enough spare logic on these chips (the ageing EPM7064).

    I want to eventually get these boards out to people at a reasonable price, and it's difficult to know what people are prepared to pay for them tbh.
    It's getting harder to find small non-BGA CPLD chips at a decent price, and the EPM7064 is one of the few that you can still buy and manually solder.

    In other words - I'd love to put a larger CPLD on the boards, but I don't think most people would want to pay much above $40-50 for a kit.

    OzOnE.
     

Share This Page