Cloning the GameCube component cable

Portables, case replacements, mods etc, all in here!
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Sun Aug 09, 2015 7:38 pm

Soldered the i2s lines. It is working :D

It seems to work with 480p, 576p and linedoubled video. I think it does not work with interlaced, because every "pixel" of a packet (not sure how you call these) is sent twice.

Currently the audio is still sampled at 32 KHz, just like with NeoGeoHDMI, so that will need to be changed as well. Other than that I must say that for me the sound is a lot better than with analog. I can use HDMI on my TV with analog sound, but it really does not sound good. Most likely because they did not bother with making good analog inputs.

Sending video infoframe is currently disabled.

Edit: my TV seems to have some serious issues with recognizing the video. Basically I need to turn either my TV or my GameCube on and off multiple times before it recognizes the signal. Another option is to program the FPGA by JTAG multiple times until the TV recognizes the signal. I never really had that problem with the GCVideo DVI version. It will just work fine. I have my own code to generate a 480p signal (it uses the 54 MHz clock from the GC and also generates the pixel enable signal, basically it simulates decoded video from the GC and it goes to the HDMI with audio component, where normally the GCVideo code goes to) and if I use that my TV will sync with no problems at all. Not sure why this happens.. Perhaps the GC video timings are a bit weird. Unseen, do you know if a 480p line at least always has 858 pixels? Because in that case I could always try to modify the GC's video timings to the CEA spec and see if that helps.

I'll also try another TV soon.
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: Cloning the GameCube component cable

Post by tueidj » Sun Aug 09, 2015 11:42 pm

Most GC games only use 32KHz audio anyway, so there wouldn't be much difference.
User avatar
megalomaniac
Posts: 2480
Joined: Sun Aug 21, 2011 5:33 am
Location: Drunk in Texas
Contact:

Re: Cloning the GameCube component cable

Post by megalomaniac » Mon Aug 10, 2015 1:37 am

*most
emu_kidid wrote: beer is like WD40 for megalomaniac's brain, gets the gears moving
>>> BadAssConsoles.com <<<

Image Image Image
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: Cloning the GameCube component cable

Post by tueidj » Mon Aug 10, 2015 4:09 am

There's only two that I'm aware of that don't, and they're not what I would consider good games.
User avatar
Unseen
Posts: 190
Joined: Fri Jul 04, 2014 11:52 am

Re: Cloning the GameCube component cable

Post by Unseen » Mon Aug 10, 2015 7:43 am

meneerbeer wrote:Perhaps the GC video timings are a bit weird. Unseen, do you know if a 480p line at least always has 858 pixels? Because in that case I could always try to modify the GC's video timings to the CEA spec and see if that helps.
I think the timings are reasonably close to CEA and IIRC 858 pixels per line should be correct - if the Cube would send more or less than that, the vertical frequency would be off too.

You could try the 240p test suite, as far as I know Artemio tried to stay close to the specs for all modes.
Asking for support by PM is anti-social. Ask in an open forum instead, so other people can benefit from the answers!
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Mon Aug 10, 2015 10:29 am

Unseen wrote:
meneerbeer wrote:Perhaps the GC video timings are a bit weird. Unseen, do you know if a 480p line at least always has 858 pixels? Because in that case I could always try to modify the GC's video timings to the CEA spec and see if that helps.
I think the timings are reasonably close to CEA and IIRC 858 pixels per line should be correct - if the Cube would send more or less than that, the vertical frequency would be off too.

You could try the 240p test suite, as far as I know Artemio tried to stay close to the specs for all modes.
I think I will give hsync regeneration a try. It should be pretty straightforward to add that to the blanking regenerator. My video testpattern is working very well (when I run it, I can hear the GC's audio), so my guess is that it has something to do with the GameCube's signal.

If I was able to use SignalTap things would go so much faster. :cry:

Audio is now 48 KHz, seems to work great. I will share the code at some point. I use the blanking regenerator to indicate when a horizontal blanking period is about to start and end. Based on those signals the modified hdmidirect code will start counting. Thanks to that it works with 576p and 480p without having to recognize which videotype is incoming.

Edit: Unseen, didn't you have a HDMI signal analyzer? In that case it might be interesting to test my code with it.
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Tue Aug 11, 2015 3:17 pm

OK, decided to upload my code here. It is attached to this message. If you'd like you can have a look at it, Unseen.

It comes with the Xilinx project file. The constraint file used to be for my own FPGA board, but I changed it back to the Pluto IIx board. That also means I had to change the inversion of the Green and Blue TMDS outputs in hdmidirectv:

Code: Select all

TMDS_shift_red_delay<=(videoGuardBandDelayed[1] ? 10'b1011001100 : (dataGuardBandDelayed[1] ? 10'b0100110011 : (tercDataDelayed[1] ? TERC4_red : TMDS_red)));
TMDS_shift_green_delay<=~((dataGuardBandDelayed[1] || videoGuardBandDelayed[1]) ? 10'b0100110011 : (tercDataDelayed[1] ? TERC4_green : TMDS_green));
TMDS_shift_blue_delay<=~(videoGuardBandDelayed[1] ? 10'b1011001100 : (tercDataDelayed[1] ? TERC4_blue : TMDS_blue));
So how does it work? I have changed the blanking_regenerator to generate a pulse of one cycle (HBlankStart) when a blanking period is about to begin. When a blanking period is about to end I also sent a pulse (HBlankEnd):

Code: Select all

-- generate HBlankStart and HBlankEnd
if current_pixel = (hor_active_end-1+7) then -- working: (hor_active_end-1+7)
	HBlankStart <= '1';
else
	HBlankStart <= '0';
end if;
		
if current_pixel = (hor_active_start-11+7) then --working: (hor_active_start-11+7)
	HBlankEnd <= '1';
else
	HBlankEnd <= '0';
end if;
The +7 is because the video signal is delayed by 7 extra cycles while traveling through the scanline generator, osd and yuv to rgb (and an extra cycle is added in the toplevel). The HBlankStart and HBlankEnd go to the hdmidirectv component, which will start counters when a pulse is received. That way it will know when to do the dataguardband, videoguardband, terc4 data etc.

Currently it only seems to work for 576p and 480p signals for me. My TV will not sync to interlaced signals. To display interlaced signals you need to enable the linedoubler. The problem, as already described before, is that my TV will usually not sync to the HDMI signal at all. The TV will say that there is no signal at all. When I turn my cube on and off however, or if I reprogram the GC a few times using JTAG or I turn on and off my TV, it will sometimes successfully sync and display the video with audio just fine. This also means that if you want to try out the code, there is a good chance your TV will not display it at all.

Something interesting: once my TV finally syncs with the signal it will flawlessly accept resolution changes. For instance when going from the linedoubled 576i menu (so 576p over HDMI) to 480p video in Swiss.

I have also added an extra toplevel (toplevel_testpattern_p2x.vhd). If you synthesize that one, a 480p testpattern is displayed instead of the processed gamecube video. For me this pattern works flawless. TV always displays it and it is mixed successfully with the GC's audio to a HDMI signal.

One more thing, currently I always send a 480p 4:3 VIC. My TV will still display 576p signals, even with this VIC. However, I guess some TVs will not like this. So maybe it is a good idea to try this code out with a 480p game. If you use the video testpattern it is not a problem ofcourse.

Hopefully someone else (Unseen?) can have a look at the code as well, so we can get this to work completely stable.
Attachments
gcvideo_hdmi.tar.gz
(72.01 KiB) Downloaded 464 times
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Sat Aug 15, 2015 4:58 pm

Worked on this again today and started using chipscope. I have fixed the problem. The video guardband and preamble were too early.. One of my TVs seemed to still know what to do with the image ~10% of the time.

Now I will have a look at 480i and 576i modes. I think it should be fairly simple to make those work.

I will upload a bitfile for the Pluto2x, so other people can give it a try if they'd like. I do not have a Pluto2x, so I can not test it myself.
andre104623
Posts: 694
Joined: Wed May 07, 2014 2:24 pm

Re: Cloning the GameCube component cable

Post by andre104623 » Sat Aug 15, 2015 5:39 pm

meneerbeer wrote:Worked on this again today and started using chipscope. I have fixed the problem. The video guardband and preamble were too early.. One of my TVs seemed to still know what to do with the image ~10% of the time.

Now I will have a look at 480i and 576i modes. I think it should be fairly simple to make those work.

I will upload a bitfile for the Pluto2x, so other people can give it a try if they'd like. I do not have a Pluto2x, so I can not test it myself.
So we have audio over HDMI working?! If so that's great really will change everything with gcvideo-DVI project. Many people didn't want to do the project because of this reason I on the other hand love the optical audio output.
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Sat Aug 15, 2015 5:48 pm

andre104623 wrote:
meneerbeer wrote:Worked on this again today and started using chipscope. I have fixed the problem. The video guardband and preamble were too early.. One of my TVs seemed to still know what to do with the image ~10% of the time.

Now I will have a look at 480i and 576i modes. I think it should be fairly simple to make those work.

I will upload a bitfile for the Pluto2x, so other people can give it a try if they'd like. I do not have a Pluto2x, so I can not test it myself.
So we have audio over HDMI working?! If so that's great really will change everything with gcvideo-DVI project. Many people didn't want to do the project because of this reason I on the other hand love the optical audio output.
Yes audio over HDMI is working, but it is not working yet for 480i and 576i. Also untested for 240p and 288p.
andre104623
Posts: 694
Joined: Wed May 07, 2014 2:24 pm

Re: Cloning the GameCube component cable

Post by andre104623 » Sat Aug 15, 2015 5:55 pm

meneerbeer wrote:
andre104623 wrote:
meneerbeer wrote:Worked on this again today and started using chipscope. I have fixed the problem. The video guardband and preamble were too early.. One of my TVs seemed to still know what to do with the image ~10% of the time.

Now I will have a look at 480i and 576i modes. I think it should be fairly simple to make those work.

I will upload a bitfile for the Pluto2x, so other people can give it a try if they'd like. I do not have a Pluto2x, so I can not test it myself.
So we have audio over HDMI working?! If so that's great really will change everything with gcvideo-DVI project. Many people didn't want to do the project because of this reason I on the other hand love the optical audio output.
Yes audio over HDMI is working, but it is not working yet for 480i and 576i. Also untested for 240p and 288p.
That's great when I get a chance I will try flashing my pluto :D When I feel like taking apart that cube again ;)
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Sat Aug 15, 2015 7:45 pm

Audio for 240p, 480i, 576i has been fixed. :D I have not tried 288p yet.

I am not yet sending the correct VIC.. TV does not seem to mind.
andre104623
Posts: 694
Joined: Wed May 07, 2014 2:24 pm

Re: Cloning the GameCube component cable

Post by andre104623 » Sun Aug 16, 2015 3:37 am

meneerbeer wrote:Audio for 240p, 480i, 576i has been fixed. :D I have not tried 288p yet.

I am not yet sending the correct VIC.. TV does not seem to mind.
Do you think it would be possible to port the audio over hdmi code to xilinx xcs50a used in the shuriken video? I know the FPGA is small but this board has worked flawlessly for the past 2 months minus the OSD, linedoubler, scanlines. But its been great i mean my pluto also works great after figuring out the TV compatibility issue. I sure do love my OSD settings though. So do you think it would be possible?
User avatar
Unseen
Posts: 190
Joined: Fri Jul 04, 2014 11:52 am

Re: Cloning the GameCube component cable

Post by Unseen » Sun Aug 16, 2015 8:55 am

meneerbeer wrote:OK, decided to upload my code here. It is attached to this message. If you'd like you can have a look at it, Unseen.
Yay!

Unfortunately there is a slight problem that prevents me from using it: The Neo Geo HDMI code is GPL-licensed, so merging it with mine would make GCVideo GPL-licensed too. Usually I don't have a problem with that, but for GCVideo I took extra care to ensure that it is fully BSD-licensed(*) because that simplifies things in case someone starts to offer modding services.

(*) For example I had to rewrite the crt0.S for the ZPU from scratch because the original one was GPL'ed and had its copyright assigned to the FSF who are really unlikely to relicense code from GPL to 2-BSD on request.
meneerbeer wrote:I am not yet sending the correct VIC.. TV does not seem to mind.
It would be interesting to see if sending a correct AVI frame removes a problem I saw with the XRGB Mini: When booting Final Fantasy Crystal Chronicles in 480p mode, it would detect the initial 480i mode correctly as 720x480i (it recognized that the signal was pixel-doubled), but when the game switches to 480p, it would detect the signal as 360x480p - still throwing away every second pixel until the input cable is unplugged or the input changed to something else and back.
Asking for support by PM is anti-social. Ask in an open forum instead, so other people can benefit from the answers!
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Sun Aug 16, 2015 9:48 am

Unseen wrote: Yay!

Unfortunately there is a slight problem that prevents me from using it: The Neo Geo HDMI code is GPL-licensed, so merging it with mine would make GCVideo GPL-licensed too. Usually I don't have a problem with that, but for GCVideo I took extra care to ensure that it is fully BSD-licensed(*) because that simplifies things in case someone starts to offer modding services.
I do not really know a lot about licenses, so I hope I did not do anything stupid here. When I check about GPL then it seems you can still sell the binaries, as long as you supply the source code as well? I do not really understand where the issue arises when it becomes GPL.
Do you think it would be possible to port the audio over hdmi code to xilinx xcs50a used in the shuriken video? I know the FPGA is small but this board has worked flawlessly for the past 2 months minus the OSD, linedoubler, scanlines. But its been great i mean my pluto also works great after figuring out the TV compatibility issue. I sure do love my OSD settings though. So do you think it would be possible?
Just tried it. It seems too big currently. Even with the SPDIF audio removed. There is a good chance that Unseen's implementation fits.
User avatar
Unseen
Posts: 190
Joined: Fri Jul 04, 2014 11:52 am

Re: Cloning the GameCube component cable

Post by Unseen » Sun Aug 16, 2015 11:01 am

meneerbeer wrote:I do not really know a lot about licenses, so I hope I did not do anything stupid here. When I check about GPL then it seems you can still sell the binaries, as long as you supply the source code as well? I do not really understand where the issue arises when it becomes GPL.
The problem is that people who sell a pre-flashed board may be asked to provide the source code for exactly the version that was on the board they sold. If someone really wants to annoy them, they could even be asked to provide it on a physical medium by mail (GPL2 is quite old).
Just tried it. It seems too big currently. Even with the SPDIF audio removed. There is a good chance that Unseen's implementation fits.
I'm not sure if it will, my design trades block RAMs for logic because I still had four left - the XC3S50A only has three in total.
Asking for support by PM is anti-social. Ask in an open forum instead, so other people can benefit from the answers!
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Sun Aug 16, 2015 2:46 pm

Unseen wrote:
meneerbeer wrote:I do not really know a lot about licenses, so I hope I did not do anything stupid here. When I check about GPL then it seems you can still sell the binaries, as long as you supply the source code as well? I do not really understand where the issue arises when it becomes GPL.
The problem is that people who sell a pre-flashed board may be asked to provide the source code for exactly the version that was on the board they sold. If someone really wants to annoy them, they could even be asked to provide it on a physical medium by mail (GPL2 is quite old).
I see. I suppose "my" working version could be used as a reference (allthough it is quite different from your approach).
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Mon Aug 17, 2015 1:44 pm

Ok, I am now sending the correct VIC and I changed the moment that the packets are sent. They were sent too early before with as a result that one of the two TVs I tried would not give audio for 15 KHz modes. Also the video guardband was sent a little too early, which I was able to spot using ChipScope. With this I am pretty confident everything is fine now.

I have synthesized the code for the Pluto-IIx board, so someone with that board could give it a try. I do not have a Pluto-IIx, so I can not test it, so I am not entirely sure I did everything correctly. The bitfile and the code are added as attachment. The bitfile can be found in the tar.gz as well.
Attachments
gcvideo_hdmi_v2.tar.gz
(134.67 KiB) Downloaded 542 times
andre104623
Posts: 694
Joined: Wed May 07, 2014 2:24 pm

Re: Cloning the GameCube component cable

Post by andre104623 » Mon Aug 17, 2015 2:34 pm

meneerbeer wrote:Ok, I am now sending the correct VIC and I changed the moment that the packets are sent. They were sent too early before with as a result that one of the two TVs I tried would not give audio for 15 KHz modes. Also the video guardband was sent a little too early, which I was able to spot using ChipScope. With this I am pretty confident everything is fine now.

I have synthesized the code for the Pluto-IIx board, so someone with that board could give it a try. I do not have a Pluto-IIx, so I can not test it, so I am not entirely sure I did everything correctly. The bitfile and the code are added as attachment. The bitfile can be found in the tar.gz as well.
Ill give it a try tonight on my pluto. I want to make some external way of flashing my pluto board without opening the console

Edit: I see the .bit file but I think I also need the SPI.mcs file as well
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Mon Aug 17, 2015 4:15 pm

Do you use JTAG to flash it?

When I look at the instructions on Github you can flash the .bit file using RS232.

I generated the .mcs file though. It is attached to this post. Had to pack it again, otherwise I could not upload it. :P

Hopefully it will work for Pluto-IIx as well. Allthough it can also be a problem with the video output being slightly off, making some displays not accept it.
Attachments
toplevel_p2xh_mcs.tar.gz
(110.35 KiB) Downloaded 486 times
andre104623
Posts: 694
Joined: Wed May 07, 2014 2:24 pm

Re: Cloning the GameCube component cable

Post by andre104623 » Mon Aug 17, 2015 4:42 pm

meneerbeer wrote:Do you use JTAG to flash it?

When I look at the instructions on Github you can flash the .bit file using RS232.

I generated the .mcs file though. It is attached to this post. Had to pack it again, otherwise I could not upload it. :P

Hopefully it will work for Pluto-IIx as well. Allthough it can also be a problem with the video output being slightly off, making some displays not accept it.
Thank you, I'm using a clone Xilinx USB programmer so yes JTAG. When I just flashed my other pluto last month with version 1.3 IMPACT would ask me for the .bit then it would see a SPI flash with the FPGA at that point I have to select a .mcs/.svf and type of SPI flash it is which is m25p40 then I program just the SPI change the config to SPI to load FPGA config file if I remember right then it would work fine. But this time I used that wire to DDC from 5v and now works great on my main TV. Not so much my living room TV though the shuriken video works fine on the living room TV in all modes even 480i but the Pluto with only display 480p on that TV. I have the Pluto installed in my WASP fusion gamecube not the Qoob because at least with the Qoob you can force the 480p on menu on the pluto I can enable linedoubler on 480i OSD but it doesn't make a picture on the TV in 480i mode living room TV.

My bedroom TV can display all modes even 576i/p its not picky Shuriken or pluto. The Shuriken video is definitely more compatible with all displays though but I really like the OSD

When I flash the audio over HDMI code will I lose my optical output?
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Mon Aug 17, 2015 4:59 pm

I enabled the SPDIF module, so yes, you should have SPDIF audio. In case you do not get an image (perhaps I did something wrong), you could try the optical out to check if that at least works.
andre104623
Posts: 694
Joined: Wed May 07, 2014 2:24 pm

Re: Cloning the GameCube component cable

Post by andre104623 » Mon Aug 17, 2015 5:01 pm

meneerbeer wrote:I enabled the SPDIF module, so yes, you should have SPDIF audio. In case you do not get an image (perhaps I did something wrong), you could try the optical out to check if that at least works.
Cool I will report back with my findings
andre104623
Posts: 694
Joined: Wed May 07, 2014 2:24 pm

Re: Cloning the GameCube component cable

Post by andre104623 » Mon Aug 17, 2015 7:40 pm

First test isn't looking good. I got sound for about 3 seconds on boot up then cuts out also no picture (work TV). Plugged in to the computer monitor I get a picture 480i looks bad 480p on swiss looks fine. I'm going to try using on my bedroom TV when I get home in 1 hour will update then with more info. But I did hear sound the first 3 seconds of boot up that's progress!

Will update with pics as well

Somehow the beta code has broke my TV compatibility i only get 3 seconds of sound on boot up from hdmi optical output is still working fine. Reverting back to 1.3 when i get a chance so i can finish playing zelda Oot tonight since I'm almost at the end. First i want to flash 1.1 again and see if i get a TV signal maybe something in 1.3 is making my pluto work on my TV and just wasn't my wire fix.

I will be willing to try again if it gets fixed but in the state it is in it's completely useless to me since i would be back on a computer monitor. Im sure its working fine on meneerbeer build PCB but pluto no go
meneerbeer
Posts: 212
Joined: Wed Sep 03, 2014 9:13 am

Re: Cloning the GameCube component cable

Post by meneerbeer » Mon Aug 17, 2015 10:08 pm

That is too bad. Not sure what could be the issue. I will have to test it on more TVs anyways, but I only have access to two unfortunately.

Did you at least try 480p/576p? Those modes are most likely to be accepted by any TV.

If only I could get it to fit inside the Shuriken video, that would rule out a lot of the problems.. I still think it is possible to make something that fits inside it, but it requires a lot of work. :(

I will be gone untill the start of september by the way, so I won't be able to look at this at all coming days.

Thanks for trying out the code anyways. :)
Post Reply