Is CD+G possible?

dshadoff
Posts: 329
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 8 times
Been thanked: 66 times

Re: Is CD+G possible?

Unread post by dshadoff »

zakk4223 wrote: Sat Jul 03, 2021 7:41 pm Interesting. With my mister modification it doesn't do anything, but I'm only trying with Information Society and Rock Paintings. Maybe they only have one channel anyways.
I finally got a chance to apply the patch to Main_MiSTer and try this out... looks pretty good ! (for cdrdao -> CHD rips)

However, I was wondering whether you were expecting it to work with CloneCD-type rips... it doesn't. Or rather, it plays them as audio CDs only.
The changes to Main_MiSTer would seem to imply that it should be opening the *.sub file, and reading from it though...
dshadoff
Posts: 329
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 8 times
Been thanked: 66 times

Re: Is CD+G possible?

Unread post by dshadoff »

Oh, my mistake - I applied the patch from a couple of days ago, and just now noticed that you had updated it.
The new one appears to work.

Thanks !
zakk4223
Posts: 171
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by zakk4223 »

I can also confirm the 'cd+g channel' is a pure 'software' feature. It works with no changes to the core or main (other than all the changes to support CD+G).

I'll assemble the required PRs in a day or two; soon everyone will be able to enjoy facts about Minnesota while listening to Information Society
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by rhester72 »

@zakk4223 Do you want more test rips? I had another disc show up yesterday.
dshadoff
Posts: 329
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 8 times
Been thanked: 66 times

Re: Is CD+G possible?

Unread post by dshadoff »

I found some technical information about how the graphic data is encoded into bytes (in addition to how the subcode is encoded on the disc).

This won't be necessary for playback, as the software players already implement the playback protocol - but since the list of CD+G discs that exist is pretty short, if somebody wants to see what the technical capabilities are, and encode a disc, some technical information is here
https://web.ncf.ca/aa571/cdgfaq.htm (Note: lots of broken links)
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by rhester72 »

This might be the longest disc I've ever ripped - 19 tracks, 69:46:15.

https://www.rendezvo.us/cdg_try2/Little ... Hoy%21.chd
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by rhester72 »

OK, finally got it working after doing my own Quartus build - I think I picked up an earlier prebuild before things were ironed out.

Is what appears to be random decoding and/or paint errors a known issue? No matter what disc I choose (or how many times I cold restart), a minimum of one (but often 2-4) vertical 'strips' anywhere from 2 to 8 'blocks' high on various parts of each screen are either flat-out corrupt or "leftovers" from a prior screen (but in the wrong place!). Not quite sure how to explain it, I can make a video if it'll help.
User avatar
Moondandy
Posts: 198
Joined: Mon May 25, 2020 2:14 am
Location: Edinburgh, Scotland
Has thanked: 2 times
Been thanked: 22 times

Re: Is CD+G possible?

Unread post by Moondandy »

I didn't know CD+G was a thing until I read this thread, have ordered a copy of this Jimmi Hendrix one:
https://www.discogs.com/Jimi-Hendrix-Ex ... ase/589570

I was planning on doing some testing on various CD based consoles so when I am doing it will try this on the ones I have and document which can actually play these things.
dshadoff
Posts: 329
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 8 times
Been thanked: 66 times

Re: Is CD+G possible?

Unread post by dshadoff »

Just be careful when ordering; many of the circa-1990 discs have both CD+G version and non-CD+G versions (and the CD+G versions are getting harder to find as time goes on).

Of course, there are also apparently karaoke CD+G discs...
User avatar
Mellified
Posts: 144
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 43 times

Re: Is CD+G possible?

Unread post by Mellified »

Moondandy wrote: Sat Jul 10, 2021 4:27 pm I didn't know CD+G was a thing until I read this thread, have ordered a copy of this Jimmi Hendrix one:
https://www.discogs.com/Jimi-Hendrix-Ex ... ase/589570

I was planning on doing some testing on various CD based consoles so when I am doing it will try this on the ones I have and document which can actually play these things.
I played that disc on my Sega CD back in the day. It added some interesting visuals to the music. Would be nice to see it working again!
zakk4223
Posts: 171
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by zakk4223 »

rhester72 wrote: Sat Jul 10, 2021 1:24 am OK, finally got it working after doing my own Quartus build - I think I picked up an earlier prebuild before things were ironed out.

Is what appears to be random decoding and/or paint errors a known issue? No matter what disc I choose (or how many times I cold restart), a minimum of one (but often 2-4) vertical 'strips' anywhere from 2 to 8 'blocks' high on various parts of each screen are either flat-out corrupt or "leftovers" from a prior screen (but in the wrong place!). Not quite sure how to explain it, I can make a video if it'll help.
I see it sometimes, and it isn't consistent at all for me. So it's likely not something simple. This is one of the disadvantages of not having a SegaCD myself to compare/test with. It's like it misses an update for a block randomly; kinda makes me suspect this could be some sort of subtle timing issue related to when the subcode data interrupt is generated.
dshadoff
Posts: 329
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 8 times
Been thanked: 66 times

Re: Is CD+G possible?

Unread post by dshadoff »

I see what you mean; I saw this very often on the cdrdao->CHD rips, but not so much on the CloneCD ones.
Are you using a FIFO to stream the subcode data, or is it possibly being overwritten by the next sector ?

Since the CDDA seems to have a pretty big 8000-sample output FIFO (plus whatever SCSI FIFO exists), if the subcode doesn't have something similar, there could be data loss (but then there should also be a flush whenever there is a repositioning...).
zakk4223
Posts: 171
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by zakk4223 »

The existing MegaCD subcode stuff I resurrected+fixed didn't have a FIFO. It just updates/simulates the ring buffer the raw subcodes are stored in and asserts the interrupt. That ring buffer is only 15 words bigger than a full subcode set, although the interrupt is supposed to only fire when a full subcode set is 'valid' in the buffer. I guess there could be some timing differences with how that buffer is filled and the overflow flag managed since we aren't reading from a cd directly.

I'm also not very (as in, at all...) experienced with FPGA programming so there may be something I'm doing wrong. Maybe I should be using a signal instead of a variable etc. I also need to dig a bit deeper into how ARM->Core data transfer works so I can understand that bit of code better.
dshadoff
Posts: 329
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 8 times
Been thanked: 66 times

Re: Is CD+G possible?

Unread post by dshadoff »

I think it's close enough for a pull request; if there is an improvement or bugfix needed, it can come afterward.
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by rhester72 »

If you can make it there, you can make it anywhere...

https://www.rendezvo.us/cdg_try2/Lou%20 ... D+G%5D.chd
zakk4223
Posts: 171
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by zakk4223 »

This was in the latest update of Main+MegaCD core. One step closer to the ultimate FPGA Karaoke machine
Stupid Dufus
Posts: 33
Joined: Sun Aug 30, 2020 12:04 am
Has thanked: 8 times
Been thanked: 4 times

Re: Is CD+G possible?

Unread post by Stupid Dufus »

Just wanted to say I tried it out with Information Society. Blast from the past. First CD I ever asked for as a kid. Thanks for adding this in.
User avatar
WiteWulf
Posts: 39
Joined: Tue Feb 09, 2021 3:09 pm
Has thanked: 12 times
Been thanked: 10 times

Re: Is CD+G possible?

Unread post by WiteWulf »

Hi folks, I'm curious to see these running. I've grabbed some CD+G CHD files (linked from this thread) and loaded them up in the MegaCD core in MiSTer. I get music but no graphics, even after selecting the CD+G option in the CD player app. Am I missing something?

The MegaCD BIOS version appears to default to is a Japanese v2.00, so I'm guessing "[BIOS] Mega-CD 2 (Japan) (v2.00C).md"
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 35 times

Re: Is CD+G possible?

Unread post by rhester72 »

It should 'just work'. Are you sure your main and core are both up-to-date?
User avatar
WiteWulf
Posts: 39
Joined: Tue Feb 09, 2021 3:09 pm
Has thanked: 12 times
Been thanked: 10 times

Re: Is CD+G possible?

Unread post by WiteWulf »

Yeah, did an update_all before I tried it. Weird, I’ll try again later.

*edit* Yeah, update_all.sh wasn't running properly. I usually start it off and go do something more interesting while it runs :) Turns out that update.sh was abending as some ssl certs were out of date, so I had to run security.sh to fix those. Now everything's up to date and I have the current versions of main and megacd I've got the CD+G working, thanks 8-)

FYI, regarding different data channels: the Lou Reed disk has lyrics in (I think) Spanish and French on channels 2 and 3.
Post Reply