#Philips CD-i

16926 messages · Page 17 of 17 (latest)

terse flare
#

Yes, all unstable Mains after 20251111 have this exact behavior. It was discussed a long time ago... at that day... that this break is accepted by this community.

#

Yes. Because the file type .chd or .cue are no longer part of the save file as well. This was also a wish by the users.
Your saves will not be deleted. They just need to be renamed.

#

At the same time, all CDs in /media/fat/games/CD-i have the same NvRAM. Like the PSX does that too. A sub folder is required to have a unique NvRAM.

#

I need to go to bed now. I will look at this during the next days, since this might be bigger issue. This also means that there is no overlap between SAM users with CD-i VCD and those that use unstable Main. Because if that was the case, we would have noticed this earlier.

eager pier
#

Night, and thanks for all your work.

west pagoda
#

*all the fish.

terse flare
#

I've crafted an idea which needs further testing and analysis before I put that even into unstable. After some dialog with the prime ministers of dutch discord interactive media, this is the suggestion:

- The machine is reset, when the tray is closed and the image was already used to launch the application and a new image has been mounted. This should fix SAM as well.
- The machine is not reset, when the tray is open and another image with the same NvRAM is inserted, which in our case can only occur when a multi disc application requests the next disc to be inserted. The eject button is missing on the MiSTer.

There are still small issues

  • I can't test multi disc change with commercial software, because I don't know of a single title and have no save game to start the scenario.
  • According to CD-i Fan there might be a chance that the tray must be opened manually when instructed to do so to change the disc with a multi disc title. This goes against the Green Book but I need to be sure this is true. IF that is true, the core needs to detect this condition somehow to not force a reset.
#

Since most of you probably don't own a physical CD-i: Like a CD32, a CD-i is always performing a reset when the tray is opened. To avoid the reset, the application must advertise this to the OS before the tray is ejected automatically.

eager pier
#

Is this reset only for multi-disk games? The other cores handle that the same way they handle save files, they don't reset if you are loading an image file from the same folder as the previous one

terse flare
#

I wasn't even aware of that problem until now.

signal jay
#

@terse flare I have a very minor bug report: when unplugging the mouse during a game (at least in Inca), the game audio starts to stutter. I didn't really investigate where it comes from and what the Linux side is doing when this happens. I know you have more interesting stuff to work on now 🙂

#

plugging the mouse back in fixes the issue

terse flare
# signal jay <@328601793565294592> I have a very minor bug report: when unplugging the mouse ...

That issue is still caused by the data stalling problem. I don't have a solution for that right now and the problem is big.thisisfinefire
I could make the sector cache even larger but that only makes the issue less likely. PSX solves this by halting the whole machine when this condition is detected. The CD-i core already had a sector cache added. But MiSTer Main is a broken mess. 300ms of cache aren't enough because it is stalled incredibly long. And even if all RAM from the FPGA is used, it would still be insufficient to fix making a screenshot.

signal jay
#

oh, sounds like a deep rabbit hole 🙂

terse flare
# signal jay oh, sounds like a deep rabbit hole 🙂

It is.NotLikeThis There are solutions that would require a rewrite. A large 3 second buffer in DDR would fix this. But this is just a patch for something that is incredibly broken with the software running on the Linux side. The MiSTer is supposed to be a low latency machine. 300ms is a very long time and I consider this a small disaster. NEVER ever should system() be used in a fast paced control loop that should be called at least every 5ms.
If MiSTer 2 will ever be a thing, Main should be rewritten.

eager pier
#

Tell sorg that Muahaha

#

But yeah, I am guessing it's putting way too much work in the USB side?

terse flare
eager pier
#

Is this with a basic setup? There are many Scripts one can load that continue running things in the background on the CPU that might make this harder to track down

#

Even bluetooth, which would be over usb

terse flare
#

We can of course always make a sector cache bigger. But this will lead to an inrush situation after seeking, putting unnecessary burden on MiSTer Main. Another solution would be to make the core stable against this stalling. The MPEG parts are especially angry about this. The audio and video streams would require a precise stop on - maybe - the video frame boundary.

signal jay
#

I don't mind taking a look at Main, unless you think that's useless or has already been done.

young grotto
#

stutters when adding or removing devices usually only persist for like, a few hundred milliseconds tops

spring gate
#

That is a weird issue, is it just a USB mouse or does it happen with anything USB like a controller?

#

Have we seen that on any other cores before?

young grotto
#

stuttering like, permenantly after you unplug something? no

#

maybe main is in some kind of a panic if it can't find any input device or something?

terse flare
young grotto
#

thats usually only one stall

#

it sounded like they were saying the entire time the mouse was unplugged it kept doing it

signal jay
#

I'm on lastest master though, haven't tried the latest unstable Main or CD-i builds.

terse flare
signal jay
#

haha, oops 😄

terse flare
signal jay
#

I'm looking at that date and how long ago that is...

terse flare
signal jay
#

ok, since you are begging, I will think about it 😛

terse flare
#

In case the audience really wants it, we can make a custom release with the latest non DVC stable and fix it with a sector cache. But since we hadn't complains about stability for a long time, I've assumed everyone was just using the unstable one since DVC was a long requested feature. And MPEG is clearly not stable ^^ yet

tranquil leaf
#

Does someone knows how to patch the bios to change the cyan color to black ? It would be better for SAM. We could even use a special core.

#

By the way, i just tested Mister_SAM with latest Mister and CD-i core from today. I think it's a bit more stable, but it always end up crashing on the menu screen after approx 10/15 videos. Don't know if i can do something to log the problem.

terse flare
bright zinc
#

We try not to say the dreaded D word here 😄

terse flare
young grotto
#

idk why but i find it incredibly awesome that cdi can be kind of dual purposed as a videoplayer like this

terse flare
young grotto
#

yeah its poetic or something

terse flare
young grotto
#

they could always just have like their own build they grab from whenever its stable

#

i wouldn't worry about that kind of thing until you at least have DVC in the main core, anyone toying with it now should expect there be dragons

terse flare
# stiff flare Do I pin this?

I'm not really sure. It was supposed to be an emergency fix for the way SAM makes use of this core in an attempt to get possible SAM users a hot fix. Sometimes I don't know if I want to roll out a change to everyone or just a small set of users. It does seem that since November, no user has launched a second title after the core was loaded, triggering the bug in the first place. Or they were unphased by chaos that unfolded and just reset the machine.

#

I mean it already is creating fruit. It seems I've made a mistake. With Main 2025 06 25 I've fixed a buffer overflow in Main, breaking the table of contents. With 2025 09 30 that bug was fixed but the buffer overflow was reintroduced. @river idol has performed a check for me on his machine and yeah, Main is broken and can cause a segmentation fault. It seems I have been too hasty with those changes. Too reactive perhaps.
SAM has a high chance of triggering this, because the CD is constantly spinning and image data is loaded.

gray badge
#

I can test this tomorrow (later today?) while I work, Slamy

#

The idea is to just let sam run? I have noticed that sam will occasionally crash now that it plays videos in the CDI core, but I hadn’t found a reproducible path for that. Maybe that was this

tranquil leaf
tranquil leaf
terse flare
#

SAM Folks, I'm unable to reproduce this Heisenbug. I keep staring at the MiSTer and we both are heavily sweating by now. But I think I've made a blunder when reviewing my own code that might have resulted into the same buffer overflow that I've tried to fix once. In Germany we call that brown meadow programming. It is code from another person that you now maintain. Since the CD-i ODE is just the one of the PSX, because it worksderpsmile, I've might not fully understood what the original intent of some functionality was.
This MiSTer binary is the unstable of today with a small fix applied. Please use it with the CD-i core from #1103404843512631357 message and let's see if this fixes the issue as expected.

gray badge
#

Just so I'm clear, what is the bug? Just the crash?

#

@fervent urchin which core does SAM use? CDi_dvc_rc3.rbf or CDi_unstable_20260222_1329c1.rbf

fervent urchin
solar mirageBOT
#
local cdi_url=$(curl -k -s "https://raw.githubusercontent.com/MiSTer-unstable-nightlies/Unstable_Folder_MiSTer/main/db_unstable_nightlies_folder.json" | \
gray badge
fervent urchin
#

that's right, it will use whatever cd-i core is in _Unstable folder

gray badge
#

Needed to rename to CDi_unstable_20260222_1329c1.rbf otherwise I would get an RBF not found

gray badge
#

Dunno if this was a download error or the bug, but the heart of darkness ad didn't play [2026-02-24 16:39:53] Picked core (samvideo): psx (likelihood: 31.61%) [2026-02-24 16:39:53] nextcore = psx [2026-02-24 16:39:53] /tmp/.SAM_List/psx_tvc_vcd.json found. [2026-02-24 16:39:53] Removing PSX-Heart_of_Darkness.chd from /tmp/.SAM_List/psx_tvc_vcd.json [2026-02-24 16:39:53] Searching for psx\|playstation[2026-02-24 16:39:53] Picked PSX-Heart_of_Darkness.chd[2026-02-24 16:39:53] Video selected via TVC: PSX-Heart_of_Darkness.chd[2026-02-24 16:39:53] Checking availability of http://archive.org/download/mister-sam-cdi-vcd-commercials/PSX-Heart_of_Darkness.chd... [2026-02-24 16:39:54] URL is available: http://archive.org/download/mister-sam-cdi-vcd-commercials/PSX-Heart_of_Darkness.chd Preloading PSX-Heart_of_Darkness.chd from archive.org for smooth playback [2026-02-24 16:39:56] Saved local copy of video: /media/fat/video/PSX-Heart_of_Darkness.chd [2026-02-24 16:39:56] Found VCD JSON: /media/fat/Scripts/.MiSTer_SAM/tvc/psx_tvc_vcd.json [2026-02-24 16:39:56] Duration set to 47 (from JSON: 31)Now playing: PSX Commercial - Heart of Darkness[2026-02-24 16:39:59] CD-i core is loaded [2026-02-24 16:40:00] Timer synced to video: 47 seconds [2026-02-24 16:40:46] Filters for 'psx' already applied this session. Skipping.[2026-02-24 16:40:46] Filtered list already exists.[2026-02-24 16:40:46] Searching for game matching string: Heart of DarknessERROR: File not found - /media/fat/games/PSX/1 USA/H-M/Heart of Darkness (USA) (Disc 1)/Heart of Darkness (USA) (Disc 1).cue [2026-02-24 16:40:46] Gamelist for 'psx' not found in '/media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists'. Building... [2026-02-24 16:40:46] Building gamelist for psx in /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists ROM check failed. Picking a new ROM to try again (1/3)... [2026-02-24 16:42:01] Filtered list already exists. [2026-02-24 16:42:01] Searching for game matching string: Heart of Darkness Starting now on the Sony Playstation: Heart of Darkness (USA) (Disc 1)

fervent urchin
tranquil leaf
#

Video works for me on latest everything (Test Mister file and Test Core RBF) when played in the CD-i core

#

Now, i'm currently testing Mister SAM with the same config.

#

Force Video Plane -> DVC, Overclocking and Disable Seek time make Mister SAM very nice. I hope it'll be stable (still running after approx 10 videos)

#

Seems solid...

tranquil leaf
#

Still running. I think we can say we're good

tranquil leaf
#

I just stopped now after 6 hours without any problem. problem is fixed for good. I think now the core must be forked with a new name... VCD Player ?

terse flare
#

I probably will combine this PR with something else. My idea is to start the CD-i core with the standard root folder NvRAM. Is there some argument against it? The nice thing about this is that even without "Forced NvRAM live update" a reset is not required when the image is not in a sub folder.

terse flare
#

I need an opinion. This core has too many permutations in the options, potentially affecting behavior of resets. We now have

Autoplay
Hardware Config -> NvRAM live update -> allows core to rug pull the NvRAM without a reset, the OS usually is ok with that
Debug Options -> CD image live update -> allows changing the image without opening the tray (very dirty, don't do it)

The only normal use case might be Autoplay which uses a custom kernel module for the OS to start the application.
If I go through with the state of #1103404843512631357 message, the core will not perform a reset when the first image is selected, even if auto play is activated. So, if the system menu is visible, auto play will not work. Play needs to be pressed.
So, the current implementation applies auto play only on reset.

#

If this is not wanted, I need to add a reset when Auto play is activated. There was a time where this was always the case, because the first load of a CD image always loaded an NvRAM as well. So Autoplay didn't need an extra reset handling. With the new suggested Main, the CD-i will always have at least the root folder NvRAM after launch. Because this would spare us one reset.
I hope I got my points along. I think I might be overcomplicating things. It's just... I don't like how the PSX core behaves. I want the CD-i core to act more natural :3

#

If there is a voice of reason against an initial non empty NvRAM (like cdiemu or MAME do), this voice must now speak up.☝️

gray badge
terse flare
#

This means 3 users have tested it. Very good

#

Another thing, and the question already scares me. Does SAM feed a custom configuration into the CD-i core? Without affecting the normal operation? Or is it the same?

gray badge
#

(if that's not already a thing)

radiant minnow
#

@terse flare MadDog MCree seems to look perfect now! No more strange parts in frames! 🙂

terse flare
radiant minnow
#

Ooops, I just had a play and (as far as I got, which was a duel after completing the Saloon and Bank scenes) everything worked apparently well! 🙁

#

So I ran here to tell you

#

Mr Undertaker has always been nice to me in regards to errors and sync

solar mirageBOT
#
samvideo_freq="alternate"
fervent urchin
gray badge
fervent urchin
#

no worries, havent actually tested it in the test brnach

tranquil leaf
#

I honestly thinks Mister_SAM needs a way to have its own options without impacting normal use of CDi core... e.g : I would want DVC plane, overclock & seek time disabled for SAM and not for normal CDI.
Is there a way without forking and changing core name before recompiling ? I did it in the past for other cores, it's not so hard and would need to be done once. But i think there also would be caveats to not follow the cdi core progress.

restive jay
#

I could envision this core also allowing you to play like, mp3s and flac, and such. Maybe also supporting midis and some game-specific audios like NSF files.

fiery forge
fiery forge
#

oh, totally missed that one. will add right away! thanks! 😄

eager pier
#

Maybe some kind of whitelist people can setup of what games are even good for it to load, pretty boring if it keeps randomly loading games that just stay at the title screen

#

(I remember when I was setting up that NES screensaver, same issue, but it supported downloading from a database of replay files and would load those so you aren't just seeing title screens, usually from a random location too so it's not all from the start of a game)

young grotto
#

can it just use an mgl?

#

mgls offer exactly that

lavish crow
gray badge
#

The sound is imperceptively better and the gpu is imperceptively slower

young grotto
#

i'd just stick to the single-ram for psx, there's no real benefit and the dualram core is much less tested

wintry dust
#

putting the psx core in there makes me want to revive those monkey gifs of them beating people

young grotto
#

its good for testing your dual ram is working ok? you'll hear it right away if not

eager pier
young grotto
#

yeah you can have an mgl basically instance the entire core with a new name

#

you might not even realize but the GB/GBC "cores" are one core with 2 MGLs

tranquil leaf
eager pier
#

I assumed the Game Boy core was just simply the Game Boy Color core

#

The Atari 2600 core is just the 7800 core after all

ionic island
#

vice versa

#

gameboy color is gameboy

#

it uses a mgl so you can have different screen settings

#

like filters and whatnot

stiff flare
eager pier
#

Ok, well, that rules out Robby. Who was it?

young grotto
#

clicks stopwatch over two hours from MGL mentioned to robby commenting?

ionic island
#

I think it was moondandy

fervent urchin
# eager pier (I remember when I was setting up that NES screensaver, same issue, but it suppo...

SAM automatically filters static games. it's not perfect but it works pretty well! I created short 90s videos of every game for most consoles and then used ffmpegs scene detection. the results are the blacklist files in the game list folder: https://github.com/mrchrisster/MiSTer_SAM/tree/main/.MiSTer_SAM/SAM_Gamelists

GitHub

Contribute to mrchrisster/MiSTer_SAM development by creating an account on GitHub.

young grotto
#

its impressive the amount of effort you've put into SAM at this point

fervent urchin
#

lol, yeah .. probably spent too much time on it but then again it's been a hobby for the last 5 years or so at this point

remote rapids
terse flare
#

Due to the nature of how unstable builds work, it wasn't listed, but #unstable-nightlies message from today contains the latest fixes for CD-i as well:

* CD-i: Fixed buffer overflow
* CD-i: Mount root folder NvRAM after core load
  Instead of starting with an empty NvRAM, "saves/CD-i/CD-i.sav" will be loaded instead.
  Avoids machine reset by NvRAM change in case a root folder CD image shall be used

I've only noticed one upsetting side effect. Since the NvRAM image is now always a valid one, the initial NvRAM writing of the ROM (yes, it sadly does that) will now result into an NvRAM write to SD card with a freshly loaded core.
This could be solved by not using those early writes as a "pending NvRAM state". But I'm not yet sure. In general I hope that this change is not hated.

#

I'm noticing still some after effects of my cold on my work, so maybe I should stop integrating code in that state.pengusip It might have had a bad effect on my latest changes perhaps, I worry.

fervent urchin
strange crater
#

Aside from the games & video playback capabilities (which would also likely add the potential for video at twice the resolution for SAM), the base MPEG2 capabilities would be great as a basis for a lot of other projects - LaserDisc-based systems being a big one.

strange crater
#

As it stands, I’d also be curious if the existing MPEG1 implementation for the CD-i core might be possible to use in a ReelMagic card implementation with ao486. There are some quite neat titles which use that card (most notably the MPEG version of Return to Zork).

restive jay
#

Would be cool to see Homebrew CDi ports of Arcade laserdisc titles

eager pier
#

Though sadly remote itself appears to be dead, it hasen't been updated in like three years 🙁

#

And still has some bugs

fervent urchin
#

just chatting with wizzo about it. support for turning off SAM on core launches is easy, not sure if keyboard detection will work

fervent urchin
#

Thanks to @river idol we now have CD-i commercials playing in SAM. Check it out, it's quite awesome! If you are on test branch, just update and launch MiSTer_SAM_on.sh cdi from ssh

fervent urchin
young grotto
eager pier
#

I forgot, what was the reason it's better to create a core on the FPGA that can decode MPEG2 video instead of just making the ARM CPU do it?

young grotto
#

the arm cpu isn't actually that strong and its basically stuck trying to software render everything too

#

it cant even get help with basic scaling or colorspace ops

eager pier
#

I know it's no monster but surely it would be capapible of SD resolution video? My Pentium3 could easily handle that

young grotto
#

your pentium 3 had a graphics card to help it draw

vagrant shale
#

In the early days of dvd they sold mpeg-2 accelerator cards and some dvd-rom drives were bundled with them. Of course, before long, software decoding was fine because CPUs got faster.

radiant minnow
restive jay
eager pier
restive jay
# eager pier I remember many early CD drives having a headphone jack...

You thought they were only for Pentiums! Creative disagreed.

Support me on Patreon: https://www.patreon.com/cathoderaydude
Tip me: https://ko-fi.com/cathoderaydude

Chapters:
00:00 Intro
06:00 The Infra product line
07:25 Hardware overview
13:00 The remote control issue
20:30 Feature demo
29:37 Bad feature demo
37:22 Complaints
39:05 The turbo ...

▶ Play video
valid onyx
terse flare
#

This project is an example for the importance of automated integration tests, or their lack of, to be more exact. The most recent core is not even able to play Addams Family without issues. I've noticed that pausing our "Rick Roll Joke Video" is causing audio video desyncing. Wasn't really sure what to expect or if it worked at some point at all and tried Addams Family. Then I've noticed that chapter 3 (Thorny Issues) is having random corruption on the macroblock level directly at the start of said chapter.pengusip It's almost we are running in circles around a good solution. A frequent side step. I just wanted to let you know this. I'm not sure which of the recent core releases had the least amount of problems. This reminds me a bit of that time when we had a debug setting for deactivating the MODE2 filter in the CDIC because it's function wasn't understood by me.

fervent urchin
young grotto
wintry dust
#

jotego kinda has one where he runs a simulation and captures some outputs/samples from it

eager pier
terse flare
restive jay
#

What's the state of CDi Homebrew? I think it'd be cool to make ports of other FMV games

spring gate
#

I think it is basically non existent. I don't think there are the tools to do really do it

mossy steppe
#

there was an independent fmv game on cdi 2 years ago lol i think

#

by this Johnny depp impersonator?

spring gate
#

Hah, well fair enough, this I did not know about!

mossy steppe
#

i'm not saying that makes it a "thing" but someone out there knows how evidently

#

there's two others i know, that zeldalike one and uhhh the one that's like the 3d racing levels from old snes platformers

terse flare
# restive jay What's the state of CDi Homebrew? I think it'd be cool to make ports of other FM...

The original tools for authoring discs on MS-DOS still exist and were uploaded by TwBurn once, the author of the CD-i homebrew title Nobelia. So, you need dosbox to generate disc images. A C compiler for targeting Microware OS9 is available as Win32 binary. They work on Windows, but also work on Wine for development on Linux. This is my way of developing for the CD-i. Tools for converting image and audio data to Green Book standard (ICUshell and ACUshell) are still available, run horribly on Wine, but are required to get XA audio tracks. Image conversion should be done by modern tools, written in Python (or something that you like). The CD-i is happy with chunky bitmaps and a color lookup table.

#

If you are a programmer and fluent in C, you will hate the original C compilers for the CD-i. It is K&R style. Very archaic.

#

Compared to the Amiga and C64 development scene, the CD-i tooling landscape was never upgraded to the modern era. Not enough developers. It might be possible that it is one of the smallest homebrew scenes out there.

wintry dust
#

holy K&R

restive jay
#

I wonder how easy it'd be to make an FMV engine sort of deal

terse flare
strange crater
#

Believe TWBurn made Nobelia and started work on a port of Skyroads using the MPEG-1 card. There’s also a pretty simple game called Frog Feast, and a SupraKillMinds clone called Super Quartet - believe that’s currently the extent of the homebrew scene.

mossy steppe
#

skyroads, exactly the one i was thinking of

#

and yes, frog feast is epic

#

i forgot not everyone knows and loves frog feast

#

and yes perhaps that is true, i'm unsure of the true nature of that pirates thing and it looks lazy

#

frog feast is actually one of the games i've never been able to find a rom for in my life for snes, unrelated to this but it seems like no one has ever ripped it and the copies on ebay are insanely expensive

strange crater
#

And yes, that is as awkward as it sounds like it would be - he didn’t record lines for it; it’s just generic congratulations messages that they cut out of Cameos.

mossy steppe
#

i'm glad you know things about this i just only know the bare minimum and it sounds ridiculous

#

ever since the tim and eric movie i have to assume johnny depp looking guys are impersonators

#

i've wanted to try skyroads on cdi and couldn't remember the name of the game

strange crater
#

There’s also a pair of 0MHz packs for the original release and the Christmas Special version on DOS, if you want to try the original versions.

topaz hamlet
quasi viper
#

I noticed a lack of color depth in one title at least.

#

in 'normal' gfx mode, not video

quasi viper
terse flare
terse flare
# quasi viper I use vmware for stuff that relies on older os'es

I could understand this with tools that require Windows 95,98,ME. But with MS-DOS, Dosbox has a certain advantage. There is no boot up time and it is nicely scriptable. I want my work flow to require only one click to compile and link the application and author a disc. Optionally even an integration of a copy operation to MiSTer.

quasi viper
#

I wanted to reproduce it using cd-i emu (i stupidly sold my real cd-i machines) - but cannot for the love of dog figure out how to enable dvc there

terse flare
quasi viper
#

check. thanks. I will search for those

strange crater
#

I’ve never had luck getting MPEG to work in cdiemu, either.

I got it to detect the VMPEG ROM, and it reported it in the top of the window, but it wouldn’t load any MPEG games, instead just running like a console without the DVC.

restive jay
#

Only two CDi discs use index 02 or higher

Philips CDI Format Test Disc 1 (Europe).cue
Zeneca Pharmaceuticals Group - Experts in Anti-Infectives - Pathogen Pursuit - An Interactive Medical Program (USA).cue
restive jay
#

I also checked the PhotoCD cues just to be safe

eager pier
#

Well, you never know if somebody wants to play CDI Format Test Disk #1 or Zeneca's 30 year old medical program disk

terse flare
# restive jay Only two CDi discs use index 02 or higher ``` Philips CDI Format Test Disc 1 (Eu...

I'm not sure if anyone has experimented with those yet. I've just tried the Format Test Disc and it seems to not do anything at all. The application is not booting. So something is terribly broken here.pengusip
I haven't burned the image yet to try on a real machine but MAME also has troubles booting. The cyan screen never goes away while the MiSTer decided to perform a system reset.
cdiemu even just refuses to load the image because it is "not a CD-i disc".
So I used a hex editor and looked at the image data just to check whether it would make sense to burn the image.
It turns out, the CD sectors are filled with bytes that are counting upwards. So this is NOT a CD-i disc but instead a medium with a probably well defined purpose.

#

Just to avoid any further hassle, I've made a comment in the testing sheet.

restive jay
#

For the test disc

#

WTF is the disc testing then? My patience?

terse flare
restive jay
#

"Some say the disc is older than the CDi itself"

terse flare
#

Maybe it is a time traveling medium. It came from the future, affecting the release of the CD-i

young grotto
#

it was recovered from the crashed alien ship at roswell and all cdrom technology is derived from it

terse flare
terse flare
# young grotto is it actually plausible to have automated integration tests for something like ...

Maybe to further elaborate on this topic of integration tests. A machine can be surprisingly self aware. I do recall that we had a recent event for the NES core which was failing at some automated tests. The same is possible for the CD-i as well. Of course you can't check what is not measurable. So the actual video output would only be testable with a "Hardware in the loop" test harness that records the output and analyzes it using some algorithms. This is not new, at the company where I work, we've done this.

young grotto
#

like capture the hdmi output and verify it?

terse flare
# young grotto like capture the hdmi output and verify it?

yes^^ at our company it was LVDS using an industrial capture card. But yes, that would be possible. A video grabber via USB, a script stimulating the MiSTer to do something and some analysis to compare the output against "ground truth".

young grotto
#

hmm

terse flare
#

On the other hand, we do have more possibilities here. Since the CD-i is implemented inside an FPGA, the analysis algorithms could be embedded inside the same circuit.

young grotto
#

could a testrom transmit it results out the jaglink port or something?

terse flare
#

Over the last days I've checked the accuracy of some registers that have influence on the timing of the MPEG video playback. We know that something is wrong and it seems I've really made a blunder at some point on the last release.
There is a register containing the number of pictures in a FIFO. But it was unclear to me WHICH FIFO it is. The output with the decoded pictures? That was my assumption so far. There is also a register containing the DTS, which is a timestamp from the "system stream pack header". It was not clear to me, when this register is written with WHICH pack header.
Both are very important, because the FMV driver synchronizes the video to the audio based on these values.

#

So, I've created a tool to get a better picture.
To the FPGA community, gtkwave is a nice viewer for visualizing the simulation results from Verilator or other sims.
I've used it differently now. A small CD-i application that plays MPEG streams and records the internal state of both the MPEG Audio and the video driver and reads some registers at the same time.
Whenever some state changes, it is recorded as one entry with all the current values. I think, I've already talked about experiments like these earlier.
Lucky for me, the Audio DSP in the DVC is having a monotonic 45kHz time stamp always readable via register.
The CD-i base case offers no way of reading high precision timers from "user mode applications". Only the OS has access to the timer.
After collecting everything, the output is presented via 19200 baud on the CD-i serial port like this

  0  00000000 00000000 00000020 00000000 00000000 01800118 00000000 000ee54b
  1  00000000 00000000 00000021 00000000 00000000 01800118 00000000 00000153
  2  00000135 0000000a 00000021 00000000 00000000 01800118 00000000 0000499d
  3  00000135 0000000a 00000021 0000c014 00000000 01800118 00000000 000003ca
  4  00000135 0000000a 00000021 00000000 0000b200 01800118 00000000 0000029f
  5  00000135 0000000a 0000000e 00000000 00000000 00100080 00000000 00000052
  6  00000135 00000009 0000000e 00000000 00000000 00100080 00000000 0000016d
  7  00000135 00000008 0000000e 00000000 00000000 00100080 00000000 0000071c

Every column is a value. That goes into a python script which converts this to a VCD for viewing in gtkwave.
And that also is capable of showing real VMPEG data to compare to.

#

For the keen eye, it is noticable that the number of pictures is increased from 0 to 0xa in an instant. So it can't be the output FIFO. It is actually the input. So, the VMPEG driver keeps track on potential pictures to be decoded.

#

My VMPEG implementation is different at one point. I give the MPEG decoder 25 frames of output storage. This is something real hardware seems not to have. MPEG1 requires 3 frame buffers. I assume a real MCD251 only has those 3... and not more.
So, pictures are indeed decoded on the fly only milliseconds before they are displayed. My core doesn't replicate that behavior. It just starts decoding as soon as data arrives.

#

This picture is actually like an MRI. Only a doctor knows what to look for.derpsmile The next topic I totally got wrong is the concept of a "hanging MCD251". So far, the core suffered from weird artifacts whenever an MPEG buffer underflow occurred. This is because I didn't really knew how to proceed here. The MPEG standard has no concept of package lengths in the elementary stream. The CD-i however has one covered. The driver adds a small code into the MPEG data to tell the MPEG decoder that it has reached the end of the stream.
I'm currently trying to add this concept to the pl_mpeg library, so I also get this finally right.

#

@river idol has created some videos using their scripts. And one commercial for Litil Divil has caused problems like these. The MPEG stream had an underflow but just halting the decoding and returning that incomplete frame was the wrong approach. A real VMPEG just hangs in there. In general, feeding broken MPEG streams with artificial bugs has helped a lot.

#

If you look at the waveform again, you might notice B002(picture about to display) and B00E(fresh sequence about to display).
This is an actually malfunctioning MPEG stream that halts the VMPEG card. If it was correctly authored, the distance between those signals would have been 40 ms / 25 Hz for PAL. This is not the case and the CD-i is still happy. Nonetheless, the frame rate became unstable. Future releases of the core will replicate this behavior.

#

Maybe some more context. This is a broken MPEG stream made up from 2 CD sectors. The second sector does come too late, resulting into this underflow condition. Usually, the stream should be crafted to always have some frames in the buffer.
This is why good tools for MPEG authoring are so important and why some of the newly made discs are failing.

valid onyx
#

I can point you to a company that claims to be experts in videocd encoding, and one of our members here worked there:

#

But: another great debugging session there, @terse flare ! Very nicely done!!

terse flare
#

I just wanted to give an update after a long time, so you don't start to think, that I'm no longer working on this xD

valid onyx
valid onyx
terse flare
fervent urchin
#

Thanks for the detailed writeup, super interesting!

restive jay
#

No idea if this is the case on actual hardware or not, but I noticed that PhotoCD behavior is extremely weird

#

IDK how it's supposed to work exactly, but it seems like Photo CDs can save certain settings almost like a bookmark, and it seems like this isn't saving?

spring gate
#

What discs did you try and how did you do the saving?

young grotto
#

thanks for the update slamy!

stiff flare
#

There’s a new update? pengusip

restive jay
# spring gate What discs did you try and how did you do the saving?
  1. The two Patlabor PhotoCDs
  2. I tried saving the "High Quality" flag, and possibly bookmark my location (the menu system on this isn't exactly clear)

If the "high quality" flag isn't actually supposed to save (it keeps reverting on me), perhaps there could be a core-level option to always display high quality for Photo CDs?

spring gate
#

Ah, so I also assumed that setting saved and it seemingly doesn't on real hardware which seems a real product fail

#

Why they didn't let you default to high Res is beyond me

restive jay
#

Also the "autoplay" setting seems to not save

#

Which, I'm pretty sure that should save, seeing as how I'm not sure how it would do anything otherwise

#

(There's an Autoplay setting on PhotoCDs, and I'm pretty sure that just bypasses the pre-system menu)

terse flare
terse flare
#

Note in case someone is experiencing it: There is another regression in the core. Starting with 260222, "The Addams Family - Disc 2" is again crashing when the playback controls are opened.hmm That was something that was fixed back in November with the release CDi_dvc_rc3 but now is occurring again. The problem seems to be the timecode of the GOPs that is handled by the MPEG soft core now, instead of hardware state machines.thisisfinefire
In general 2 additional problems can be experienced with Addams Family (Disc 1) by pausing and continuing frequently.

  1. The movie player hangs and overwrites the OSD graphics with rainbow colors while the movie still plays.
  2. The already known problem that audio is lacking that can be fixed by pausing and playing again.
    I'm not sure when these problems actually appeared. They might have been always there or started to occur at some point.
young grotto
#

is the soft core handling the timecodes wrong?

#

or is it just like, nature of a soft core its not great at timing things

terse flare
# young grotto is the soft core handling the timecodes wrong?

I'm sorry for miscalculating the shift of the hours and minutes by a margin of 4 bits.concernedtoad I've tested it once with a disc but I should have tested it with a timecode later on a medium. This is why it breaks.
Before the change it was extracted directly from the MPEG stream in Verilog. But that was wrong. It should be matched to the pictures. This is why I've added GOP parsing support into pl_mpeg but I've made a blunder. Sorry for having not tested it fully.

young grotto
#

you dont have to apologize, thats awesome !

terse flare
young grotto
#

oh weird

#

so it could fail but only if the video was longer than an hour?

terse flare
#

MPEG1 reserves 5 bits for the hours. That is a lot. 🙂

tame juniper
#

dropping in to say go slamy go your work is awesome 🙌

spring gate
#

God a technical question for Slamy: so on Jag CD various settings for the CD/VLM player are saved on an eeprom (volume set etc.). How is similar settings savings done on CDi consoles?

terse flare
# spring gate God a technical question for Slamy: so on Jag CD various settings for the CD/VLM...

If you go to settings on the system shell, you will notice some options. The volume is probably the most problematic one, because the default is not maximum. All of them are stored on the NvRAM. There are also hidden settings like the number of controllers attached to the machine and whether it is PAL or NTSC. Those hidden settings are only configured by reset. This is why Hardware Config -> NvRAM live update is a problematic setting. You are able to start into a weirdly configured machine. A CD-i always writes the NvRAM during bootup. This is also the reason why the newest unstable MiSTer Main causes a pending NvRAM write, because it always starts at least with the root NvRAM.

spring gate
#

Ah, so there is a ram chip on the board that this stuff is saved to that gets accessed and settings pulled from on boot?

terse flare
spring gate
#

That makes sense, it would need a battery to store that info when powered off. Same battery that saves the RTC time?

terse flare
spring gate
#

Got you

#

Seems odd that they had this functionality and didn't use it to save the Photo CD player settings as well, they really dropped the ball there with that player

terse flare
#

If it was a CD-i 450 you wouldn't even need to press a button to resume. Just give the player power.

spring gate
#

I still just find it baffling you can set thing like high resolution, and it forgets it as soon as you progress to the next photo. From a UX and product perspective, it is either very bad design or a bug they missed (assuming it is like this on all models)

eager pier
#

I've seen people have to literally drill into that chip to replace the battery

terse flare
# eager pier Ah yes, that thing. Can't the battery dying also possibly prevent your system fr...

According to the CD-i hardware specialist rosewood, that is possible. But my Mono I PCB that I use to reverse engineer also no longer has charge. And so far... it is fine? He offered me a repair since we are both German and a delivery via mail would be possible. But I've declined until this core is finished.
Concerning the drill, I've used a dremel on my first model 450 that I bought shortly after the release of the AVGN episodes. The operation is dangerous because of the dust. Eventually it worked, but the laser was weaker afterwards for some reason. 🙁

eager pier
terse flare
eager pier
#

Maybe that has something to do with the laser

#

Ah

young grotto
#

stuff like this is exactly why i'm so glad we have a core now

eager pier
#

Yup, those appear to be the entire chip removed from the package, it's normally a lot bigger

tranquil leaf
eager pier
tranquil leaf
#

That's the same kind of sh...

eager pier
#

Most people appear to call it the "Timekeeper", at least in terms of the CD-I

tranquil leaf
#

Yeah, Dallas RTC is for old PC... It's also a battery and an oscillator soldered to a board and is the cause of problem with old motherboards

eager pier
#

Most of the DIY attempts I see to replace the battery have drilled off just a half of the chip that has the battery instead of the entire casing

tranquil leaf
eager pier
#

SegaCD is slightly unique too. While it is a button cell that is soldered in instead of being embedded in a chip, it's rechargeable unlike nearly every other soldered button cell in a console. Would probably not be a good idea to replace it with a standard lithium battery

terse flare
#

Maybe a core specific question. There are 3 issues that I currently have difficulties to debug:

  • Missing audio after continue from pause with Addams Family (both discs), I really have difficulties to consistently reproduce this to even analyze it. One reason for that is...
  • Playback control module crash with Addams Family. I'm able to reproduce it, but I fail to understand the problem because it seems to be not a single process but a multi tasking one. It also seems this is not a regression. Since November when this title started working, there was always a chance for it to happen.
  • Missing audio with Mad Dog McCree? I don't even know how to reproduce this.

So, the question is: Are there existing issues in the same direction that I'm not aware of that might help? Sometimes a fix of one issue, fixes another.

nimble epoch
terse flare
#

@valid onyx has mentioned it once. But I'm not sure I've yet read about a way for consistent reproduction. There is a randomness to it. Those are the worst problems to debug. Invisible crosshair also should not occur.pengusip If you know how to reproduce this, please tell me.

nimble epoch
#

Just tested with the latest version, the crosshair is visible during practice mode.
There was no crosshair during calibration for the gun on real hw if I remember well, just had to aim with my Mad Dog blue gun attached with 2 cables and just shoot the targets.
Seems to be perfect to me.
I will record a full playthrough to determine if I have any audio issues.

terse flare
#

The hangup of playback controls during pause is also reproducible with "Imagination in Motion". It is interesting though that it fixes itself after 4 minutes. That is curious.... I do wonder if there is a correlation with Lost Ride sometimes not being able to pause itself during the map screen. Hmm... maybe I should construct something with SignalTap to catch this exact case. I have something in the oven that should fix some of the timings. But maybe it is not yet enough.

#

Sometimes I have difficulties to decide when to push out another release. It might make things worse after all.

valid onyx
iron blaze
terse flare
# iron blaze <@328601793565294592> i heard the CD-i core was having trouble streaming from CD...

Since you've put quite some effort into this, I've analyzed the effects of the changes with SignalTap. I'm not sure whether I've ever shared shots like these, so here we go. With current Main ae8e243, the cache levels look like this when playing some CDDA.
From left to right: Raw Screenshot, PS3 Replug, Scaled Screenshot. As one can see, the scaled screenshot is draining the cache to zero. I've also noticed here again how dangerously close we are from underflowing just because of some USB activity.

#

With your changes applied, it is not even possible to see a dent in the cache level. So it works! I assume you have done what was suggested a while ago and solved this with multi threading?

#

Good job! With your work, it should be finally possible to make non-destructive screenshots from the CD-i core.

iron blaze
eager pier
#

By image processing do you mean the disk image, or something like taking a screenshot?

iron blaze
eager pier
#

Nice!

bold dragon
#

So now you have a stronger reason for the commit; it solves a real-world problem and isn't just a technical demo

iron blaze
#

Exactamundo

young grotto
#

thats some good old fashioned optimization work i love it

bold dragon
#

True dat. Good work.

terse flare
#

I may need to get something off my chest, since the last unstable build of this core was about one month ago.
This fact alone seems to be generating pressure inside myself, which - I know - is not very healthy thinking. I'm noticing that my mental health is degrading over the course of the last weeks and my cognitive capabilities are also slightly decreased. This is especially bad at work, where I’m expected to perform for the money I’m given.
I'm not 100% sure what is causing this or if this is even related to this FPGA project or to other parts of my life (e.g. work, the German weather).
Since I've noticed discrepancies with some of the VMPEG registers, as I've mentioned earlier, I've tested and tested but so far those efforts are not giving fruit to an improved core. Only more visible bugs in the already released ones. And that saddens me slightly because I’m constantly afraid of failing.
I think, I should take a break for a few weeks. I might be slightly burned out. But communication is key, I don’t want to ghost the fans of interactive entertainment and I would you to be aware of the current state.
I might advertise myself as a dude in a Turrican suit, but the human inside is actually rather fragile.

iron blaze
#

Take a break - they're invaluable and you've been busting your butt.

young grotto
#

as someone who enjoys watching the process as much as the end result take all the time you need 🙂 we'll be here to cheer you on whenever you feel like coming back to it

#

and yeah the progress already is ridiculous so even if you stopped now you've achieved something incredible

iron blaze
#

@terse flare could make sure my latest changes didn't introduce any regressions to my fix for cd access stalling for screenshots? I'll submit my PR if they're still good.

https://github.com/tonytoon/Main_MiSTer

eager pier
#

Please take a break, it's fine, nobody here will have an issue. You've been working insanely hard on this

clever storm
#

@terse flare look after yourself, we all know only too well nowadays how important our mental health is. ❤️

stiff flare
celest hollow
tribal axle
#

The world is crazy right now. I think we all have a constant impending feeling of doom. Definitely take a break. Take care of yourself.

celest hollow
#

I'll consider myself fortunate then, I don't feel that way at all

#

But if Slamy is feeling undeeded pressure, the dude should take all the time he needs. happiness and life come first

unborn grove
#

Alles Gute, Slamy. Ich weiß deine Arbeit wirklich sehr zu schätzen! Liebe Grüße aus Berlin

spring gate
#

Look after yourself Slamy, and hopefully Spring has finally arrived in the Ruhr Valley. Today feels like the first dry, sunny and not windy day in Edinburgh in about five months. Spirits lifted. 🙂

iron blaze
#

Even if nobody seems to be saying anything about it, know your work is appreciated. For every person who pipes up, there's another ten staying silent.

nocturne vortex
#

but deadly

strange crater
#

Slamy, you’ve taken a platform which was previously tied to a dying piece of hardware and single-handedly made it more accessible than it’s ever been, allowing people to play its games that would have never gotten the chance before. The fact you’ve gone on top of that and implemented a black-box accessory that few people before you even really understood the inner workings of is nothing short of incredible.

Take a breather, man. You’ve earned it.

sterile cedar
#

I had never tried the CDI before your core Slamy, as many others here. Pretty sure no one has gotten so many new people to try CDI games as your project did. Whatever you do going forward, thanks for all the hours you have put into this.

restive jay
#

To add to what Elphive said, the CDi is basically a whole lost technology. It's crazy that the CDi is technically a video playback standard and currently this is the most complete implementation

#

Honestly this is what cinched the MiSTer for me. "Sure I could just fiddle around with software emulators, but can software emulators do Flowers of Robert Mapplethorp? I rest my case"

lavish crow
#

Yeah it’s pretty incredible. I think the CD-i is the first/only console core on MiSTer or any FPGA device that you can say is clearly head and shoulders above what software emulators are available

#

I don’t think there is any implementation of the DVC outside of this core. Thanks for making me a fan of the CD-i Slamy! It’s a fascinating piece of hardware with such a unique and vast software library. It’s better viewed as an experience than a strictly a game console. I can’t think of a better time capsule of 1990s culture

spring gate
#

You also have also gifted us all a way to experience the majesty of the Photo CD format, for which I am eternally grateful. 🙂

bold dragon
#

And I would say that Saturn is now too

spring gate
#

Super Cassette Vision may have an edge on soft emulation still

restive jay
spring gate
#

I don't think any are quite as profound as CDi though, which has eclipsed the software emulators

restive jay
lavish crow
#

I do agree that MiSTer’s Saturn core is probably better than Saturn software emulators, and N64 is about even with Ares (I think they both play every N64 game w/out issue), but CD-i on MiSTer has a significantly higher compatibility than any software emulator afaik

#

For the really obscure stuff like Super Cassette Vision, Casio PV-1000, Bandai Super Vision 8000, Mega Duck, etc. I think MiSTer is king too

spring gate
#

Yeah and CDi software emulation development has slowed to a snails pace as well

iron blaze
#

I will occasionally joke and shitpost about the usefulness of a CD-i core but it's a historically fascinating and important system to be able to replicate - that makes me support it all the more. The games aren't good, but the system itself is the centerpoint of a very interesting time in gaming history which makes it a more than worthy endeavor.

zealous wagon
#

hi all, i'm struggling to get my head around generating a split rom please? i can't get dvc to work

spring gate
#

Everything you need is in the BIOS DB, just select from update all menu

zealous wagon
#

ok great thank you will try now

terse flare
terse flare
zealous wagon
strange crater
harsh ember
rough sable
candid adder
#

Just tested running an audio CD tonight and it hangs at the bios screen. Figured to put it here as I was in the Jaguar section testing all the CD cores on here while I was able to and wanted to see which cores audio CD’s worked in and which didn’t.

#

CD hangs on the CD-i. It’ll loop where you see the cursor, but the orange light will still blink.

#

It works on the NeoGeoCD, MegaCD, PSX, and Saturn cores without issue and on the Jaguar core converted to CDI. It doesn’t work on the 3DO or CD-i cores.

#

So figured I’d let you know so you can look at it when you’re ready.

terse flare
# candid adder CD hangs on the CD-i. It’ll loop where you see the cursor, but the orange light ...

When I first read your report here, I was confused, because I've played an Audio CD only a week ago on the core. It turns out that - for some reason - the Audio CD is only played back when the CD is loaded into an already waiting player shell and no reset is induced by putting in that disc. If a reset was performed, the Audio CD is not correctly played.
Concerning the orange LEDUser LED, this means, the NvRAM was changed and a write to SD card is pending to be executed when the OSD is opened.
This is quite a finding. Thx. These are the symptoms of the CD player application not being able to read the Table of Contents. I'm not sure why this happens and put that onto the TODO list. Nonetheless, a freshly booted core with Debug Options -> CD image live update and Hardware Config -> NvRAM live update should be able to play an Audio CD on your setup too.

candid adder
#

I’m at my first doc of the day so I’ll let you know how it goes when I get home. Got my three month checkup today and then my gel shot injections for my knees in the afternoon so I’ll be busy until then.

candid adder
#

I didn’t see that under debug options but I turned the second thing on. Also turned on SERVO Audio CD under debug options and same issue as before

#

Went right to this core from power on. Didn’t load any other cores before it

#

Using the core from Feb 22

terse flare
candid adder
#

The latest unstable.

#

The one with the 3DO fixes in it as well for the OSD menu

terse flare
# candid adder The latest unstable.

I've now checked with said MiSTer unstable from the nightlies and against the CD-i core 260222. It is working on my machine... huh...
We also had an in-between release designed to fix mostly issues with SAM. #1103404843512631357 message
I don't recall why I haven't made an unstable build from this. I assume I've thought to do that after I've expected to fix some bugs in the video-card-not-to-be-named.
I'm not sure how I can help you. I would expect to work at least once. But the core must not make a reset.
There is one thing, you can do. You can upload the disc image somewhere, so I can analyze it. So far, I've only tested my core against the CDs of my childhood. :3
And those were both working.

candid adder
#

I can put it on my Google Drive

#

Listen, I get the burnout man. I’m dealing with it myself currently (and about to make some major life changes due to it). I’m not expecting immediate results at all. This is one of those me letting you know and when you can get to it, then you get to it.

#

I was just told to report it here and that’s what I did. I apologize if it seems like a little much right now

terse flare
# candid adder Listen, I get the burnout man. I’m dealing with it myself currently (and about t...

One of the biggest issues with this project is the intense complexity of the VMPEG hardware. It is difficult and I don't have any help. At some point I had hope that I could motivate the software emulator devs. One seems to have given up. I can understand that after 10 years of development. I'm not angry, because that person has kickstarted CD-i emulation from zero. One had an emotional breakdown and gave up CD-i entirely because the first one was too mysterious about secrets. And another one is too busy with fixing bugs he doesn't understand, because he is not even willing to invest into CD-i hardware. I think that sums it pretty much up. Maybe I'm too harsh.
When it comes to fixing Audio CDs, I expect this to be a problem one could solve - a german saying - on a single butt cheek.derpsmile

#

When I have the disc image here, It either runs without hassle or it is indeed an issue that needs to be checked. But then I already have it an can analyze it when I feel better.

candid adder
#

Even had it working in the Jaguar core converted to CDI

wintry dust
#

One had an emotional breakdown and gave up CD-i entirely because the first one was too mysterious about secrets. lol/wtf/sadface

terse flare
candid adder
#

No problem. Thank YOU for the core!

#

Though i should thank that one user last night that asked if audio CD worked on the 3DO core which led me to test all the other CD cores out of curiosity.

#

@spring gate since you asked and I tried, you deserve credit for this too.

stiff flare
wintry dust
#

no pressure or anything

gray badge
#

On the bright side, mentioning DVC is no longer taboo

iron blaze
#

I wouldn’t even know where to get started doing fpga dev. I feel like a visiting wizard who’s way out of his element at the Miskatonic Institute of State Machines

quasi viper
tame juniper
#

thank you slamy. the community all very appreciative of everything you’ve done here, and obviously also want what’s best for you. enjoy the break and time away from it, and ty again 👑❤️

nocturne vortex
terse flare
nocturne vortex
#

When building a CD-i core you don’t need the whole chair because you’re always on the edge of your seat in announcer guy voice

west pagoda
#

“You paid for the whole core, but you’ll only need…….the EDGE!”

iron blaze
#

(the screenshot stuff got accepted into main so screenshots shouldn't cause stalls anymore)

young grotto
#

i think zakk knows a bit about it, something to do with the entire like, controller statemachine getting rebuilt on every new device

#

worst case is diconnection of a bluetooth device iirc

#

which is the same issue as usb with some additional bt specific overhead

iron blaze
#

I've actually got most of a fix in place - I'm looking for known scenarios or other possible info beyond what I can replicate on my end just repeatedly wearing out USB ports repeatedly plugging things into and out of them in assorted orders.

#

Hadn't heard of the BT part.

young grotto
#

yeah if you have the like, bt sleep thing turned on in the ini, it sends idle bt devices to sleep

#

and you get a big old stutter

#

happens to me a fair bit since i use a bt pad to get into a game then switch to snac a lot

#

bt_auto_disconnect - Amount of minutes of inactivity before Bluetooth disconnects automatically. Default is 0 (off).

iron blaze
#

I'll look at that part as well and see what I can figure out.

#

I'm not sure how much I can improve it all, but taking a stab at it should be a learning experience at least.

terse flare
# iron blaze <@328601793565294592> I'm taking a stab at the USB devices causing stalls next: ...

I gave up very early on during analysis to avoid creating yet another construction site. I did increase the threshold for the spike profiler from 1ms to 20ms - to avoid noise - and noticed this when plugging in a PS3 controller.

+----- Name -----------------------------------------+ Inc(us) + Exc(us) +
| co_poll                                            |  179568 |       9 |
|   user_io_poll                                     |      12 |      12 |
|   input_poll                                       |  179546 |      18 |
|     input_test                                     |  179528 |  179528 |
+----------------------------------------------------+---------+---------+

I actually didn't knew about bt_auto_disconnect, so I gave that a try with a value of 1 to see how bad it actually is, since users have reported problems when watching a movie

+----- Name -----------------------------------------+ Inc(us) + Exc(us) +
| co_poll                                            | 3719015 |       5 |
|   user_io_poll                                     |      11 |      11 |
|   input_poll                                       | 3718998 |       9 |
|     input_test                                     | 3718988 | 3718988 |
+----------------------------------------------------+---------+---------+

It's awful. Even worse. >.< No wonder, it is an issue.

iron blaze
#

That helps out with stuff to look at, thanks!

terse flare
#

I've just noticed, it is not 371 ms. It is 3.7 seconds!!!!

young grotto
#

that sounds about right

#

thanks for looking into this stuff deepthaw, its the unglamarous side of mister development but its also where you can get wins across all cores

#

i actually dont use a lot of wired usb controllers so i didn't realize that case was so much better

#

3.7 seconds is absolutely crash-town right

bold dragon
#

Yeah BT is a mess of complications and slowdowns

young grotto
#

idk how viable it is to async but that seems the obvious direction

iron blaze
#

That's what I'm going to have to do I suspect. Even if it's just one device, that single device can stall for ever.

terse flare
# candid adder Though i should thank that one user last night that asked if audio CD worked on ...

Your Snatcher image is different to the CUE files I've seen before. There are no entries for INDEX 0, which causes problems with the CUE loader.
Take this. It is the latest MiSTer Main, released yesterday by Sorgelig + these changes for you to test:

CD-i: Fixed Q subcode of every other sector during Lead-In
CD-i: Fixed single bin images without Index 0

It also turns out that I ... broke the same code for subcode data like 5 times by now :-(. The TOC reading was malfunctioning, causing every other Lead-In sector (the area of the table of contents) to be simply zero. This hasn't bothered the CDIC driver for reasons I don't understand. This is also something that I could have never seen in the Verilator simulation, because the Linux side on the MiSTer was the problem. Please combine this with #1103404843512631357 message and I think, It should be fine.

#

To even understand this, I've written a small assembler program as ROM replacement to dump the Lead-In area to the UART and noticed the issue.
Here for technically affine CD experts to compare, to understand what I mean:

Broken:

 01 00 01 00 00 00  00 00 02 00 B1 0B  
 00 00 00 00 00 00  00 00 00 00 00 00
 01 00 01 00 00 01  00 00 02 00 1B 5A
 00 00 00 00 00 00  00 00 00 00 00 00
 01 00 01 00 00 02  00 00 02 00 F5 88
 00 00 00 00 00 00  00 00 00 00 00 00
 01 00 03 00 00 06  00 07 03 60 29 2F
 00 00 00 00 00 00  00 00 00 00 00 00
 01 00 03 00 00 07  00 07 03 60 83 7E
 00 00 00 00 00 00  00 00 00 00 00 00
 01 00 03 00 00 08  00 07 03 60 E6 87
 00 00 00 00 00 00  00 00 00 00 00 00
 01 00 A0 00 00 12  00 01 00 00 61 BA
 00 00 00 00 00 00  00 00 00 00 00 00
 01 00 A0 00 00 13  00 01 00 00 CB EB

Fixed:

 01 00 01 00 00 00  00 00 02 00 B1 0B
 01 00 01 00 00 01  00 00 02 00 1B 5A
 01 00 01 00 00 02  00 00 02 00 F5 88
 01 00 02 00 00 03  00 03 28 45 3F B0
 01 00 02 00 00 04  00 03 28 45 58 64
 01 00 02 00 00 05  00 03 28 45 F2 35
 01 00 03 00 00 06  00 07 03 60 29 2F
 01 00 03 00 00 07  00 07 03 60 83 7E
 01 00 03 00 00 08  00 07 03 60 E6 87
 01 00 04 00 00 09  00 12 12 47 47 9A
 01 00 04 00 00 10  00 12 12 47 EB BC
 01 00 04 00 00 11  00 12 12 47 41 ED
 01 00 A0 00 00 12  00 01 00 00 61 BA
 01 00 A0 00 00 13  00 01 00 00 CB EB

The Table of Contents of the CD has every entry listed 3 times in a row for redundancy. This means, if one entry is broken, it can be reconstructed. The last 2 bytes are a CRC to allow checking for validity.

Seeing these prints, I can also see why it sometimes worked. The values are stretched out and some entries are missing.
That cache is actually not helping with stalls. It's just for reading larger chunks from main storage.

young grotto
#

i kinda love the idea of CRC fixing an error like that

#

no possible way they could of forseen someone running a cd image on a fpga with a bug in it, but it still got the job done

terse flare
young grotto
#

you can't somehow disable crc for testing purposes can you?

terse flare
young grotto
#

i was thinking it would kind of give you "no guardrails" incase there's anything else subtly off getting corrected by crc

terse flare
#

Oh no, the CRC is not "correcting". This is no Forward Error Correction like Reed-Solomon. The CRC is simply there to validate 1 entry of 3. So if 1 of them has a valid CRC, it can be assumed that the entry is good. And even if the CRC itself is broken by comparing all 3 and 2 are equal, things might still turn out alright.

young grotto
#

ah, so no like, parity/healing, just detection

solid quest
candid adder
candid adder
#

Just tested with that file you uploaded and it worked! Volume is low, had to move my soundbar to 60, but it works! Didn’t try with the latest MiSTer main as I’m not sure if that fix was in the latest main or not.

#

Never mind about the volume. Much like the Jaguar, you have to raise the volume manually. I think those are the only two CD systems that do that.

terse flare
# candid adder Just tested with that file you uploaded and it worked! Volume is low, had to mov...

Thanks for testing. Before making a PR to mainline, I wanted at least one user to test that binary. You did, so I guess I can create the PR now.
Concerning volume, I'm not sure how to tackle that. A fresh/corrupted NvRAM starts with the lowest volume. I don't know what Philips was thinking back then. It might be possible do provide a default NvRAM with the volume maxed out, when none was found on the storage. But I'm not sure if this overcomplicates things. Also, it seems, the Volume setting is only affecting the CD player. Applications just overwrite that.

stiff flare
candid adder
stiff flare
#

@terse flare is that feasible to support?

candid adder
#

It’d be nice, but maybe a little too niche and Slamy’s overworked so if he can, great. But if not, it’s no biggie.

eager pier
terse flare
#

@stiff flare @candid adder Hmm.. actually it is totally working right now even on the current core. I've dumped some of my childhood CDs, converted them to CHD and collected them in /media/fat/games/CD-i/AudioCDs. The save file /media/fat/saves/CD-i/AudioCDs.sav is now the NvRAM for all images in that folder. I set the volume once in the system shell and all of them are getting the same treatment.
This experiment was performed with CDi_cdmountreset.rbf, which is the latest core I've uploaded manually here. Maybe I should just push that to main, to cause another unstable build. Without that change, the CD swapping mechanism is slightly broken.

#

There is one behavior that is currently not managed by the core: When an Audio CD is ejected from a real CD-i 210/05 by pressing the Eject button on the front, the machine is not reset as it is performed when running an interactive application. Even that latest rbf is simply doing a core reset. This can be avoided by manually opening the tray using the button on the bottom right. This way one can listen to multiple CDs without a reset.
I recall, I've experimented with properly opening the tray once. But since applications usually totally hate that, I've abandoned the idea. Though it seems to be useful for Audio CDs.... but really not many will swap Audio CDs on the MiSTer... I guess. I think the PSX core also doesn't support that.

#

I've also noticed for the first time that the MiSTer OSD doesn't support UTF8 in the file names. So far all my images had only ASCII characters in them. That might be a problem for international users. But that is very nitpicky.thisisfinefire

terse flare
# candid adder Exactly. I figured that, especially with having to actually turn the volume up, ...

Concerning "Volume up", this core is not ideal for audiophiles, since the lowest bit of the PCM samples is pretty much ignored. You can test this by setting Debug Options -> Disable Audio Att. to Yes. This will directly connect the CDIC DSP to the MiSTer framework without the connection to the AD7528 mixing circuit and your Audio CD will be louder. You won't be able to hear the DVC output and games that perform panning or Stereo to Mono mixing will hurt your ears in case you use headphones.

young grotto
#

psx lets you put a "noreset" file in a games folder that if present suppresses the reset on disc swap

#

this lets people play stuff like vib ribbon where the game expects you to open the lid and swap in audio cds

eager pier
#

Yeah, I remember talking about how that wasn't enough for a game long Monster Rancher and eventually the noreset behavior was changed so it persists until a core reboot rather than is only honored for that one time if the file is in the folder. Not sure which method would be best for CD-I

candid adder
terse flare
# candid adder Could it be because I have mine in a separate folder from the CDi one called Aud...

Hmm... no... I've just tested that. I've created the folder /media/fat/games/AudioCDs and selecting a CHD inside also resulted into the usage of saves/CD-i/AudioCDs.sav. So this should be totally working.
Depending on your knowledge of Linux, I could offer you a MiSTer binary with debugging prints to check what is really happening. But until then, we have other options. When you close SETTINGS, ignoring whether you have changed anything at all, the system shell will write to NvRAM. The User LED on your MiSTer should light up, signaling a pending save write. When you open the OSD, it should say Saving.... Does this occur?

candid adder
#

I’ll have to check that

#

I don’t remember it doing so.

#

I barely know anything about Linux other than using a Steam Deck a while back

#

So that’s kinda hampered me wanting to get away from Windows 11

candid adder
#

Okay, so good news bad news. Good news is that it did save the settings upon power off. Bad news is that I think something changed in the MiSTer main used to fix the Jaguar stuff that broke audio CD loading. Because I’m getting the same issues as before.

#

This is the MiSTer file I was using. This was uploaded yesterday.

#

Not sure what broke in there but something had to. Even did a cold boot because I wanted to make sure the settings stuck upon power off

#

So one foot forward but one back, which is par for the course with beta files.

terse flare
# candid adder This is the MiSTer file I was using. This was uploaded yesterday.

The file you've uploaded here still has the broken TOC problem. I don't know who has uploaded that. I assume some person on the Jaguar side of things? Please don't mix these binaries up. The core devs have no control over the Linux side of the MiSTer. We need to perform a change request on Github in hope that Sorgelig or one of the Maintainers is accepting that change. That takes time. In the past, there was a solution for this that is hated by some here and now by me too. You can do this in the MiSTer.ini file to have a custom Linux binary for a core.

[CD-i]
main=MiSTer_CDi

But pleeeeaaase DON'T. When this core was in its infancy, it was encouraged to do that and users have forgotten they did it. So we constantly had to debug problems resulting from loading outdated files.

remote rapids
#

woah, new build!

candid adder
terse flare
#

Maybe it is not 100% clear. A core consists of 2 components. There is the FPGA side that is 100% in control of the core dev and is isolated for every core. But the Linux side is shared between all cores. And updating that can be a pain and takes time.

gray badge
candid adder
#

New MiSTer nightly fixed it. So audio CD is working on CD-i again. About to check the Jaguar stuff to make sure nothing’s broken there. Gonna be mainly off my feet for the next couple days as every gel shot I get in my knee, I have to limit my movement for the first 48 hours after.

quasi viper
#

The nightlies are always a bad case to test cores against.

#

You can use these only to test the nightlies themselves., not to test other stuff against them

golden axle
#

Basically yea, they're not cross compatible

quasi viper
#

It's bad habit in general.

spring gate
#

We are due a new unstable main soon as 3DO has a custom one for loading the kanji font needed for some games, so if there is an update you have done for CDi then hopefully it can be merged in fairly quickly when 3DO update is also merged

terse flare
candid adder
#

Jaguar’s working so far

spring gate
#

Good stuff. I wonder if 3DO was merged as well...

wintry dust
#

yes

candid adder
#

And the Jaguar’s broke again 🤦🏽‍♀️

The pain of being a tester, I can only imagine the pain of being a developer.

Swapped between CD and cart a few times and boom.

#

But yet I was able to “unstick” it by loading a CD game again, then a cart again. So it’s happening at random it seems. On the bright side, you can switch between cores and STILL have the Audio CD work on the CD-i core now. So there’s another plus

gray badge
#

oh nm, I see it's there

stiff flare
terse flare
still kraken
#

Hi.
Does anyone know how I can make a VideoCD that I can play using the CD-i core?
I have tried almost everything and it just wont play. I see the PLAY CD-I icon in the menu but when I press it the screen flashes a few times for so to go back to the same menu again. I am using this CDi_cdmountreset.rbf core I found here.
I have also executed the update_all script and I see I have these 3 ROM files.
boot0.rom : 2969341396aa61e0143dc2351aaa6ef6
boot1.rom : 3d20cf7550f1b723158b42a1fd5bac62
boot2.rom : 9694c466f9b65c1990a81b7a6280546b

I assume that I am not able to create a valid VCD bin/cue file?

terse flare
# still kraken Hi. Does anyone know how I can make a VideoCD that I can play using the CD-i cor...

For the Philips CD-i community this is like Groundhog Day. Every now and then a user is asking about VideoCD generation in a way to make it compatible with the White Book standard, so we come together to observe whether the DVC is sticking its head (or is it the butt?) out of the player to check for the feasibility of VideoCD generation.
Since it is already spring, most DVCs are already out, building their nest and looking for a mate. But not all hope is lost.
Some users have tried to make the process slightly easier by automating it.
For example this project https://github.com/mrchrisster/mister_cdi_vcd_creator/
At some point before that I've also tried to collect some info on this here: https://github.com/Slamy/MPEG1_Handbook/tree/main
Please keep in mind that you might enter a world of pain with this topic and there are multiple approaches to this. We also have one user on the Philips CD-i discord that tries to use the original VideoCD Toolkit back from the 90s.

terse flare
stiff flare
#

What if we used the CDi core to play CDi games? bowserthink

gray badge
#

But I have all this multimedia

eager pier
still kraken
# terse flare Also, please start with already existing VCDs to check if your setup is working....

I don't have any VCD's any more. They all went to the bin many many years ago. But now (obviously) I want them back and play them on my 1084S PAL monitor. Somehow (I don't know why) I want to watch some old moves in 4:3 on a CRT screen.

The reason I thought it was possible to play VCD's using the CD-i core was that I found this YT link: "MiSTer FPGA Philips CDi RC3 VCD Test - Terminator 2"
And this directed me here: https://kinworx.com/video/yt/
It looks like the CD-i core is used (unless a real Philips CD-i drive is used) and that VCD's are playing just fine.

still kraken
terse flare
# still kraken I don't have any VCD's any more. They all went to the bin many many years ago. B...

Playing just fine...NotLikeThis I wouldn't call it that. It is the best we have right now, would be more accurate. I'm also not 100% sure about the state of the mister_cdi_vcd_creator. At some point there were still issues with scanning through the movie. This is more or less caused by the CD-i bridge application. Usually, when authoring a disc you want to have chapters and the ability to fast forward.

fervent urchin
#

I don't use seeking and right now it uses your custom bridge as a default. So not sure if FF would work...

tranquil leaf
#

Honnestly, the mrchrister script is far above everything we could have hoped in such short time... Thanks to both of you for making this happen.

fair obsidian
#

i just tested the core again with a movie,it plays it well.

#

think the movie quality is between vhs and a svcd

still kraken
fair obsidian
#

no,dl a vcd,but probably you just can convert a xvid to cdi vcd format

#

and most aren't preserved,searched enough

restive jay
#

Besides the well-known MPEG module incompatibility, are there any known examples of the CDi having hardware variance that actually impacts the experience of using the system?

fair obsidian
terse flare
# restive jay Besides the well-known MPEG module incompatibility, are there any known examples...

Your question is important and valid. But I think, the majority of users here - me included -, don't have the experience to answer it. This is best asked in the CD-i community directly where you fill find the veterans that hoard 20 different players in their closet.
If there is one thing, that is broken with the Mono I based CD-i player (this core is based on it), that would be a design flaw, making it impossible to alter the volume of the MPEG audio via Ir Remote. Philips has fixed that with later revisions.

#

Ok, I've just glazed at my 3 players. The CD-i 450 is garbage. It has no RGB out and no front panel. And the DC adapter uses an RJ45 plug. You know? The one used for Ethernet. The one plug, where the nose can break off. I don't know why they did that...

restive jay
tranquil leaf
fair obsidian
#

i'm testing days with vcd on the cdi MISTer core,works nice,hope this also works nice,never heard of this to be honest

fervent urchin
#

Just wanted to mention thanks to the CD-i core my son is improving his math and German skills with Adi Spielerisch lernen software

restive jay
#

The CDi's library is horribly undocumented. Maybe there should be a group effort to list what everything actually is

candid adder
restive jay
#

Yeah. I see the CDi as a vision into a world that you don't normally see. It's a vertical slice of the world's economy on the local scale

lavish crow
#

The biggest question mark to me is Urban Murderfiles #1. It’s supposedly a game that officially released but it’s undumped and no one has any screenshots of it or physical evidence it exists afaik

candid adder
#

It is a 90’s goldmine as many industries used it for interactive purposes. It pretty much replaced laserdiscs in those sectors.

#

Some of the first “video racks” I helped make had CD-i units for boardrooms along with DVD and VHS. Basically a way to be backwards compatible and forward compatible with various media that may need to be presented

restive jay
lavish crow
#

Has anyone tried the Karaoke discs on MiSTer?

candid adder
restive jay
golden axle
#

I'm sure I at least loaded up a couple

restive jay
#

It would be neat if someone made a list of songs in each one. I'd be very curious to hear what the popular Karaoke songs were

fervent urchin
#

I tried some random German corporate training CD yesterday. A company wanted to hire a product design company for their new office furniture and it showed situations and how to react correctly.

#

It was pretty hilarious actually, mostly because of the 90s outfits and people smoking in offices

tired beacon
#

As a former Burger King employee from 30 years ago I was disappointed by that training CD.

#

Very boring. I was hoping it would have some terrible videos.

gray badge
#

A slamy patreon post?!

#

very cool stuff, Slamy. I thought you were taking a break, and yet, here you are dropping more cool shit

terse flare
# gray badge A slamy patreon post?!

I'm probably the worst Patreon creator out there. Users are already leaving. But I guess it is fine. No one is forced. 🥴 There wasn't an update in a while, so I can understand that.
Compared to developing FPGA stuff, this indeed was a break. For 2 weeks I did nothing at all. But then I decided to give it a try and it didn't take too long to build this. I'm slightly worried to even talk about this because some users might expect me to go full time on the CD-i core but I just wanted to do something different. Something refreshing.

gray badge
#

i'm here for your cd32 core. no pressure :p

terse flare
#

As you might know, I'm a full time embedded software engineer and no professional FPGA designer. This is why this is so much easier for me and not exhausting.

#

Since some people reading this might be confused now, here is the video. So you know what this is about.
https://youtu.be/vv5txHDCZd8

This is a tech demo I wanted to do for quite some time now.
"Bad Apple!!" is a popular monochrome music video, which I found perfect for the hardware accelerated Run-Length image decoder, the CD-i offers.

This demo works similar to the full motion video sequences of Burn:Cycle, but with less colors and higher resolution.

In this case, the vide...

▶ Play video
young grotto
#

if a core doesn't run bad apple is it even really a core? this is vital validation imo

#

i wouldn't read toooo much into what patreon users do, there's a few different ways people tend to use it

#

and there's a lot going on in the world that might make someone reconsider any luxury expenses

maiden wigeon
#

patreon is the onlyfans of FPGA developers, maybe add feet pics

terse flare
lavish crow
young grotto
#

i personally think of my patreon as supporting the creator, not the project neccesarily

stray plank
#

Awesome! This could have been a competition entry at the Revision demoparty last weekend.

gray badge
terse flare
terse flare
stray plank
#

I won the wild competition at the Outline demoparty two times with demos for my holographic display (Looking Glass Portrait)

#

Well, one was a game, a holographic version of Vectrex Mine Storm and the other was a real-time holographic recreation of the Amiga Juggler demo.

valid onyx
#

This is very cool @terse flare ! It also helped me fix an issue I've had for forever; on some cd-i content, on my 1600x1200 hdmi display, I kept seeing little squares in the background of large similar colored areas. Turned out this was because I had a Triniton filter on it, when switching to PVM CD-i just looked so much better 🙂 This great demo suddenly made me realize this might be the thing to change 🙂

still kraken
#

Rambo2 VCD playing using the CD-i core 🙂
Quality when displaying on the 1084S PAL monitor is just superb. I love it.
Thank you for the great work making this possible.

terse flare
terse flare
tawny kestrel
#

VCD = Lego Vision movies. The macroblocking is hillariously bad on some movies. But 1150 kbit/s wasn't good enough for any useful compression back then.

unborn grove
unborn grove
stray plank
#

Where I was an intern, we were not impressed seeing CD-i 'full motion video' for the first time ever. They had encoded it with their Silicon Graphics Onyx computer. We didn't care for the macro blocks, how someone's head suddenly snapped into motion and the weird effects going on with the leaves of a bush in the background. We also preferred VHS at the time.

still kraken
candid adder
gleaming nimbus
#

the Update All CD-i core is from 20250626. i need more recent unstable for DVC, i take it?

gray badge
#

yeah, you need the unstable core. should be in the pins

gray badge
jolly badge
#

May I ask why not? Is there something illegal in that script or because it's not really CDi discussion even though the VCD playback is a great feature of the core. If I may not ask, just ignore this post.

karmic bramble
#

Movies also have copyrighted content.

wintry dust
#

I think they wanted the script, not the rip

gray badge
wintry dust
#

mods, always screwing it up

gray badge
#

with great power comes poor reading comprehension

jolly badge
gray badge
#

I should drink coffee before I start typing. But here I am, typing without my coffee

#

Friday funday

wintry dust
#

casual friday, hope you're all wearing jeans and your polo (tie optional)

gray badge
#

cargo shorts and crocs

stiff osprey
#

I always wear a tie with my polo shirt. It's casual friday, not slob friday

gray badge
#

you are such a company man

#

dress for the job you want

remote rapids
gray badge
#

there is always a dril tweet

nimble epoch
eager pier
odd trout
#

I made Slamys Bad Apple demo my CD-i autoboot rom, plays everytime I load the core now chefkiss

deep roost
#

I didn't even know that CD-i didn't have Bad Apple.

#

Slamy continues to be based.

terse flare
#

Before starting, I've actually searched for this, in hope to find an existing implementation. Bad Apple existed for so long and many creative ports have been made. Though I guess, the CD-i is just too obscure. So the only users that could have made a port are the ones that already know the development process in and out. This Japanese post calls it a "marvel of technology". But it really isn't, I think, because the idea is derived from Burn:Cycle. I've just reinvented the wheel, because I knew the hardware could pull it off. The remaining question was "how?".

#

The most complex part was probably the video encoder, I've written for it. The video file was first converted to a collection of PNGs using FFMPEG and then a tool I've written in Rust, converted those PNGs into the native framebuffer format of the RL3 video mode. Then it writes a Green Book CD track while simulating the "consumption of frames" during playback to derive the buffer fullness during execution. After all, the CD is always the same data rate, so the video encoder had to insert empty sectors now and then to match the playback speed when actually running. That was really the most complex part during video encoding. On the other hand, the encoder needs to make sure that, during playback, there is never an underrun, so the analysis goes both ways.

#

On the CD-i itself I first went with the route of having framebuffers and copied the video data into them. It turns out, the CD-i is too slow for this, so I've consulted the experts on the CD-i discord and the final solution has no framebuffer at all. Instead the CD sectors are - as usual - written to system memory via DMA on their arrival and the video encoder was altered to always have atomic lines. Then, the DCA/LCT (SNES users know it as HDMA, Amiga users as Copper) was used to reposition the video pointer during raster scan. This way, the CPU is only busy with reading out the meta data to know when a new frame has arrived and converts this info into a display list.

#

The audio part is actually fully automated by the CD-i SDK. The ACUShell ADPCM encoder was used here to create the stream from an AIFF file and the playback on the CD-i doesn't consume any CPU power at all, because the DSP inside the CDIC does it all.
The biggest surprise for me was the high quality even with just 4 Bit samples.

spring gate
#

Well done making that Slamy, that is a real achievement, and useful to the wider CDi community. It is funny though that nobody did Bad Apple CDi before and even CD+G got it before CDi 🙂

rough sable
terse flare
# rough sable You are an amazing developer and many of us appreciate your hard efforts for suc...

This might be the fate of all CD based machines. Maybe you can still fix it somehow in case you are motivated enough to investigate the cause of the issue. On the CD-i discord there are still purist users that frown upon emulation and are educated in fixing these machines. Philips also did its part with adding service menus to the players. But I'm not sure how they work. xD I probably would replace the drive with an ODE as soon as it exists.

vernal crater
#

quick question on the core hardware. im trying out a few apps and games. I loaded Dragons Lair as i heard its a good port and i got this error. Is there a setting i can change or do games that require hardware expansions not yet supported?

wintry dust
#

you need unstable/wip core, see channel pins

vernal crater
vernal crater
kindred cosmos
terse flare
kindred cosmos
stiff flare
#

If the CD-i was so good then where’s the DVD-i?

gray badge
#

They skipped all the way to DVD-R

pulsar moth
eager pier
iron blaze
#

DivX-i

candid adder
#

It had VLM and sequels to Tempest and Iron Soldier

unborn grove
#

Really???

stiff flare
#

And also a spiritual sequel to Atari Karts

#

sort of

eager pier
#

To build a Nuon emulator thjough, you must first build a DVD and CD player

deep roost
#

But, there already exists a Nuon emulator called "Nuance".

quartz crest
#

Technically mame as well

#

Wow, sad

#

Cool that people picked it up and continued. Awesome.

restive jay
#

Fun CD trivia:
The Redbook CD format doesn't support mono

gray badge
#

Dream Odyssey fans in shambles

strange crater
restive jay
#

Really weird to think that CDs were ever expensive enough that it would be easier to bundle a switcher with every CD than do 2 CDs

strange crater
#

It took them a while to figure out how to get the glue layers right. From what I understand, early on there were a lot of rejects, which drove up the cost (that and new expenses related to digital encoding/mastering/etc.)

Once they figured all that out reliably by the early 1990s, CDs quickly dropped dramatically in price for manufacturing.

valid cairn
#

I'm worried
About the sheer density of 90s content packed into such a tiny space
Which is enabled by this core on the Mister

#

It could create a tear in the very fabric of time and space

strange crater
#

Agreed. We should stockpile JNCOs & Beanie Babies just to be safe

valid cairn
#

Played some cd-i Tetris last night, came to a conclusion. Everybody on earth just needs to cool out a bit.

stiff flare
#

being mad is easier than being happy

iron blaze
stiff flare
#

like where you put your beef jerky?

iron blaze
#

i don't even know. i assume beavis and butt-head said it once

#

Beavis & Butt-Head are great because you like them when you're stupid, and then when you're smart, you like them even more.

kindred cosmos
#

Lets all chill out to some Star Trek VCDs. maddyhappy

gray badge
valid onyx
#

I mean, I knew it, but I never realized it.

west pagoda
#

pretty sure it can also mean very

#

as in “that’s mad crazy, yo!”

valid onyx
west pagoda
#

so, translating, “being very is easier than being happy”

valid onyx
west pagoda
#

I guess this is another situation where I just can’t understand what @stiff flare is talking about

valid onyx
west pagoda
#

oh, I thought he was a mod because he was the preeminent train scholar on the server

valid onyx
#

That probably helped too

eager pier
#

Well all I have to say about that is "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo"

strange crater
strange zephyr
valid onyx
#

So, what'yall playing on cd-i?

gray badge
#

I still need to finish burn cycle. make good on my childhood

stiff flare
#

No major mpeg artifacting

glacial herald
#

Name That Tune with Bob Goen to fill out my lexicon of obscure 1-hit Wonders

valid onyx
#

I myself want to give Chaos Control a go; remember it from.......well, the fact that I remember it at all should betray my age, let's not make it even more compromising. Wondering what it'll look like now 🙂

little light
#

for the DVC-flavoured core, I need the linked unstable MiSTer main, but would i rename it to MiSTer_CDi and enter this line in the Mister.ini?

[CD-i]
main=MiSTer_CDi

spring gate
little light
#

okay, I tested it all out, just to be sure:

update_all core with update_all Mister_main = no DVC
update_all core with unstable Mister_main = no DVC
pinned core with update_all Mister_Main = DVC!
pinned core with unstable Mister_Main = DVC!

#

I don't see any flashing indicators when I play Dragon's Lair, so I've enjoyed the last 10 minutes of the knight dying immediately after the bridge, lol

golden axle
#

Try brain dead 13 next

stiff flare
strange crater
valid onyx
valid cairn
#

I adore cd-i tetris. The last time I played it, before slamy's wonder core, was on a pre-release dev kit in the penthouse of a skyscraper, surrounded by supermodels and coked up executives.

#

(Disclaimer: this comment is made up)

valid onyx
#

I wanted it to be true, though. Dream shattered

valid onyx
#

I returned to a game of Tetris (Rosy Retrospection) on the GB, and I fared much better there. 🙂

valid cairn
terse flare
terse flare
# little light I don't see any flashing indicators when I play Dragon's Lair, so I've enjoyed t...

This is one of the many issues, the CD-i version has. Dragon's Lair really needs a fan based version to fix this.
Considering the many versions of the core, it is true that DVC support is merged into Main for quite some time now, but the last official stable release for download by update_all is from June 2025. I don't know when the right time for a new stable release would be. There are too many known problems with the current VMPEG approach to call it stable.

#

On the other hand I'm against the usage of the current release from update_all, because it is lacking some smaller fixes. In general one cannot go wrong with the core pinned in this channel as long as expectations for VMPEG accuracy are not high.

nocturne vortex
stray plank
sterile cedar
spring gate
#

-one caveat being it isn't good to have a core in Main that requires an unstable Main to run. Fine if it is needed for some features, but not to do things the previous version does fine on the current stable

#

Although I don't think this is the case currently with the CDi core

strange crater
terse flare
# spring gate There is no rule, or really right or wrong way to do releases, but if there is n...

I think you are right. Since the pinned core CDi_cdmountreset.rbf didn't introduce any troubles (I guess) and I've counted at least 2 users that accidentally have used the update_all core in expectation that everything is there, we should declare a new stable release. The latest pinned core should have no negative down sides to base case CD-i software. It does however still have a regression since unstable 260222 that causes Addams Family to fail when opening the controls on Disc 2. I will extract the fix from my current messy work in progress and add it to the latest pinned state. It is not the best DVC core maybe but it should at least play everything. And who wants to have a core without "MAMUSHKA!!" ?

terse flare
quasi viper
#

Anyone wants to buy a CD-i trackball?

strange crater
quasi viper
#

I'll try and dig it up this weekend

strange crater
# terse flare The original arcade should have, doesn't it?

The original arcade version of Dragon's Lair actually doesn't do any video mixing at all. The score handling is entirely done with a set of 7-segment displays above the video monitor, and all the program outputs on-screen is the LaserDisc player output.

#

There are audio indicators when you make a valid or invalid move, though (which don't exist on many ports)

#

(This latter point is why I find a lot of the ports quite difficult to play, especially since the move timing on arcade is completely different to CD-i & 3DO. I've memorized the arcade version to the point I can beat it 1cc, and I don't think I've gotten past the second screen on many of these ports.)

river idol
# terse flare The original arcade should have, doesn't it?

The CD-i (and Sega CD and 3DO) match the arcade in that there are a limited number of flashes baked into the animation to indicate player moves. Some laserdisc games of the era would literally tell you the exact move if you failed (Cliffhanger would put up text like "You should have gone left") but Dragon's Lair (until the DVD era) didn't have overlays telling you explicitly every move.
One thing to understand is Dragon's Lair was the first game of this kind. Also, the QTE (as it would be known as much later) style wasn't its original design. The original version was a turn-based RPG where you could explore the castle somewhat freely. The change to quick reactions was after feedback from a trade show to arcade operators who thought it was too aimless and they also wanted a game people couldn't just wander from room-to-room on a single quarter. Bluth and Dyer didn't have time to reanimate the whole game, so the hint of flashes were added to the scenes where they felt what the player should do was the least obvious. The first sequel, Space Ace, has many more flashes and also more branching options. The power-up mechanic let's the player pick an easy route or a "Space Ace" difficulty path on a scene- by-scene basis. If they're aren't any flashes for a move, it's because they thought it was "obvious" (e.g. Dexter is surrounded in three directions by hazards and only one direction is clear, go that way). When you get to Dragon's Lair 2, almost every move has a flash indicator because they realized people want to see as much of the animation as possible, but to compensate they also upped the number of moves significantly. Remember, these were still arcade games that they want to churn an average play through in a few minutes at most.

#

An interesting bit of history, Rick Dyer didn't give up on the idea of a turn-based RPG laserdisc game. The game Thayer's Quest (made without Don Bluth) was basically the original Dragon's Lair design and it flopped in the arcades. Dyer also tried to use it to launch his Halcyon home laserdisc game console but that didn't work out. So 10 years later, he took the animation from Thayer's Quest and re-dubbed it and changed the plot and released it on CD-i (and 3DO and PC) as Kingdom: The Far Reaches. That did well enough to have a sequel, Shadoan.

eager pier
#

Huh, interesting. I remember seeing Thayer's Quest demoed with the Halycon. Didn't know it was re-released as a different game

terse flare
#

Well that was certainly faster than I've expected. It might be true that a new unstable build is available. But you don't need to download that. It is very similar to the previously pinned core + a fix for Addams Family Disc 2. More important is that by this minute CDi_20260502.rbf is now part of update_all. Here the changelog when compared against the previously stable release 20250626:

Release 20260502 (changes since 20250626)
- Unstable DVC now integrated into a stable release
  - DVC implementation equals CDi_cdmountreset.rbf + GOP fix for Addams Family Disc 2
- CDIC: Added CD sector cache
  - Catches problems caused by short HPS stalls
- CDIC: Fixed reading offset of ADPCM sound parameters
  - Fixes menu sound effect of "Golf Tips"
- MCD212: Fixed switch from CLUT to DYUV without VSR reload
  - Fixes graphical corruption during fade transition in "Lost Eden"
- MCD212: Fixes OFF coding
  - Fixes graphical corruption in "David and Goliath"
- SERVO: Fixed disc type according to actual hardware (210/05)
  - Required for the vcd module to even attempt detecting a VCD medium
- MCD212: Increased ROM bus bandwidth
  - Was slightly slower than real hardware. Now slightly faster than real hardware.
  - Fixes black flicker during the intro of "The Ultimate Noah’s Ark", when running in 60 Hz mode
#

While an unstable Main is not required, I highly recommend one equal or newer than 20260330 for the TOC fixes, which are required for Red Book Audio to work properly.

gray badge
#

will you be pushing an official build as well?

#

nevermind

#

I see you did 🙂

rugged panther
golden axle
#

Brain dead 13doesn't have any indicators but it at least makes a sound for when you press an input and another for when its the correct input but after a while it stops making sounds all together, not sure if that's accurate or an issue with the core. If you save, quit and reload at least the sounds come back

restive jay
#

Imagine if Retroachievements started supporting the CD-i

#

"Watch the entirety of Flowers of Robert Mapplethorp"

radiant minnow
#

@terse flare I am VERY glad you're back to this! The core is almost there... and this core gives me IMMENSE amounts of fun!

terse flare
radiant minnow
#

In fact it's WAY better than a real CD-i in many ways

#

(Controls, battery, display, disc access, and others!)

river idol
# rugged panther Holy shit this explains why I hated it so much absolutely bonkers you'd put in ...

That said the arcade version is way easier and more forgiving than the CD-i (and 3DO) versions for a few reasons. 1) In the arcade you get an audible cue for when input is allowed and accepted. Non-accepted moves give a buzz sound, so you know it wasn't yet time to input a move. Registered moves give a positive "boop" sound so you know a move was recorded, and more importantly you can get ready to enter the next move. 2) The arcade game skipped the tricky drawbridge intro which requires multiple moves with no flashes to hint the player. The arcade version instead went to the room with the wall trap that requires a only single move and a helpful flash. The drawbridge scene was discouraging players to try again during play-testing, so they skipped it before the wide release. 3) The home versions changed many moves, added moves, and narrowed the timing windows for...REASONS. Add in the lack of audio feedback for when it's okay to move and which moves counted and you have an unplayable mess compared to the arcade (which I have finished many time on a single credit). It makes me wonder if the company doing the port merely got the video and a description of how the game played rather than access to the arcade machine let alone the source code. If you want an authenticate Dragon's Lair (and its brethren) experience, check out the Daphne emulator. With that you can even play the prototype version which allowed more exploration of the castle and problem solving before they switched to the pure QTE gameplay.

rugged panther
dapper kettle
#

How is the switch port of dragon's lair? More like the arcade or the CDI/3do version ?

gray badge
#

ignore me. need to do some more looking

quasi viper
#

noted

valid onyx
chilly flax
#

At least space ace on CD-i got the flashing and audio cues

strange crater
# valid onyx Super interesting info! And I just watched ben heck playing around with one for ...

Kingdom, itself, is worth going into in a bit more depth - it’s sort of a complete reimagining of Thayer’s Quest. It uses all the original animation created for the RDI project, alongside a newly animated intro, a new ending, and two new additional areas.

However, every animation in the game has been redubbed and recontextualized, changing most of the game’s puzzles to give them different solutions. Dyer also changed most character and item names, and added more hints throughout to generally give the player more clear directions on where to go next. (There’s also an in-game map system, which the original game lacked - you’d actually have to navigate from a tiny map on a pamphlet they had in a holder on the side of the machine.)

As such, while I do think Kingdom is the definitive version, I’d also recommend trying the direct remaster of Thayer’s Quest done by Digital Leisure as an Interactive DVD. This will give you something a lot closer to the 1984 arcade experience, with a lot of Kingdom’s quality-of-life features.

I will add that I wouldn’t recommend emulating the arcade version of this one on DAPHNE - while it does work, the arcade version relies on an absurdly complex bespoke control panel, and as such it’s just not worth rebinding to a keyboard.

rugged panther
#

Jokes on you I won't play any version!

eager pier
#

Huh, the sequel was also released on CD-I, but only in Europe, but not on the 3DO, only the orioginal was on that

strange crater
#

Quite a lot of CD-i software only released in Europe - same goes for Myst, Micro Machines, Pac-Panic, and Lost Eden, among others.

eager pier
#

Yeah but the first game did release the us, and the sequel released in the US on DOS

strange crater
#

Kingdom II got an Interactive DVD release in the U.S., as well.

It’s unconfirmed if a DVD version of Kingdom: The Far Reaches was ever available. Instead, most people got the DVD release of Thayer’s Quest, which used the original Halcyon/arcade audio tracks & sequencing but kept most of the quality of life features from Kingdom.

radiant minnow
terse flare
#

It is CD-Friday, so I guess an update might be interesting. As you might know, the DVC still has certain instabilities. Sometimes Audio is missing after resuming a VCD. And the Slow Motion function causes a permanent audio video desync until the MPEG decoder is fully restarted by fast forwarding or a chapter change. I wanted to find the root cause of both issues. So I've started with Slow Motion.
Whenever a "audio & video synchronized MPEG playback" occurs (keep in mind that the DVC does decode audio and video separately and the ROM driver software needs to sync them) and slow motion mode is entered, the audio is stopped and the video continues with a slow playback. But the CD keeps spinning, resulting into a build up of MPEG video data in the base case system memory. The movie player application is responsible for pausing disc reading to avoid this. When slow motion is changed again to normal speed, audio is restarted at the current position that is freshly read from disc. So audio is in sync. But video has multiple frames of superfluous material to discard. A CD-i seems to be not capable of just throwing away MPEG data and that makes sense, because a video frame can depend on the data before that. After all, that is how MPEG compression works.
So, a real VMPEG based DVC seems to be going into panic mode and decoding as fast as it can. It almost looks like a soap opera effect.
The issue is, that I still don't understand how the real hardware is instructed to do this. I'm unable to find it in the driver code. I've asked CD-i Fan for guidance and he also doesn't know.
According to the Technical Summary of the MCD251, there is some hardware circuit mentioned and I have to assume now that this is how it is done. If you don't know already, the MPEG Audio is the time keeper of the whole DVC software side and the system clock reference is frequently sent to the video side to keep it in sync. So far, this core hasn't made use of that.

#

If all goes well, starting with the next release, my implementation of VMPEG will detect that case and goes into overdrive as well to fix the Slow Motion audio video desync. Paired to that, the next release will also finally use this info to slightly nudge the frame rate to fit the MPEG timestamp. So far, only the frame rate of the MPEG stream was utilized for this and I think that might be an issue. I've tried to find a place in the driver code where the software does speed up or slow down the video playback but I was unable to. Therefore I assume that MCD251 is also responsible for this.

#

The next issue is the pausing and resuming. Sometimes after resuming a video playback from VCD, the audio is missing. And I think I do know why since this morning.
This is an analysis of the MPEG Audio input stream FIFO fullness attached to the input of the MP2 decoder. It also lists the occurence of FMA and FMV data as small spikes. It is noticable that Audio data is much less frequent than video data, because the bit rate is much lower.
The FIFO quickly ramping up when sectors are DMAed in and slowly consumed because the decoder is reading from it. When performing a though experiment, one might notice that an underflow can be reproduced by starting at the wrong time.

#

This is an error case after resuming from a pause. There is a clear distance between FMA data insert and the start of the playback. Still an underflow occurs. I'm not yet sure what this means. The next FMA data occurs at quite a distance in the future, so I would have expected that the playback also would have started later to avoid underflows. There is a fast fix for this by just allowing the decoder to simply continue after such an event. But that would cause a small plop in the audio output.

#

We hadn't a story like this for quite some time and I had more energy this week and a little bit more time. So thought it made sense to give you an update that something is happening. Still not sure whether this fixes all remaining issues bit I can at least try.

valid cairn
#

Absolutely awesome!!!

gray badge
#

Slamy just casually conquering MPEG decoding. Nice work, man

terse flare
gray badge
quasi viper
terse flare
quasi viper
#

o. hahaha 🙂

#

well. could be!

#

Never could get past the demo, it seemed like work to me

terse flare
quasi viper
#

I am mentally unstable enough to never startnplaying it I suppose 🙂

eager pier
#

Never played Factorio, I did play TIS-100 though

quartz crest
#

she plays factorio and others like it too

young grotto
#

about pops, something interesting we found out about n64 is that the real hardware actually has a pop suppresor

stray plank
young grotto
#

factorio is an unparllelled timehole, i think i could play it forever

eager pier
stray plank
upbeat egret
#

How

stiff flare
gray badge
#

some help you are

terse flare
#

A small update: I've finally decided to get some physical CD+G mediums from eBay, since there is not really a chance to burn one from image (or is there?). Not really my choice of music. However, 6€ for both discs is fine. They were brand new and still shrink-wrapped since 2005. I plan to use these to analyse how a real CDIC provides the subchannel data. The core actually seems to have a bug somewhere in that regard. Sometimes, the CD player is forced into CD+G mode. I'm not sure why. But I think when correctly implementing CD+G support, that problem should go away too.
I'm not yet sure if the DVD drive on my PC is capable of extracting the subchannel information as sbi file, but I guess I will have to figure it out. It would be nice to have an image of these exact CDs to compare against the real reference.

gray badge
#

Oh man, Moondandy stocks at an all time high

terse flare
gray badge
#

lol

terse flare
#

I don't know how long it will take to implement this. This is again new territory which requires analysis at first, some extensions to MiSTer main to utilize the sbi file (I assume sbi is fine?) and then the required changes to the core.

#

The DVC stuff in the oven is not looking too bad but I'm still unsure about the Addams Family glitch...hmm So, digging into CD+G is a nice distraction with a possible sense of achievement.

young grotto
#

psx core loads subchannel data might be worth looking at

tawny haven
#

I have some scripts from translating a few different formats of the sub channel data if you need them (.sub, .cdi, raw both interleaved and deinterleaved)

#

There are also things like this available

west pagoda
tawny haven
#

I wanna know...what you're thinking.

west pagoda
#

Yeah, that and “PURE ENERGY!”

bold dragon
#

Tell me what's on your mind

terse flare
#

This evening I've implemented a first experimental version of CD+G support based on "CloneCD subchannel images" (.sub) to have the subchannels R..W together with the already existing subchannel Q that one usually derives from the CUE file. Might be copyright problematic to post this, but I guess, it's fine. This is ripped from a German Karaoke CD I had recently bought from eBay.
I'm not yet sure about synchronisation between Audio and Subchannel data. The CUE file derived Q is matching the Q channel from the subchannel image but of course that doesn't mean that the raw sector data is also matching.

bold dragon
#

I don't know of anything where the synchronization has to be perfect. Just close

#

Or rather, I've never seen synchronization bad enough to be noticeable in any way

tawny haven
valid cairn
#

The Flowers and MiSTers of Robert Mapplebutt...

terse flare
# tawny haven Box successfully checked. Did it lead to any insight on the game that was accide...

I think I've not said that it was a game that was forced into CD+G. It was a random occurence of having a normal Audio CD switching to CD+G that left me confused. The CD-i software does that as soon as Subchannel RW data is detected when playing a track for the first time after inserting the disc. And, yes, I now know why. When requesting a read operation from the CDIC in data mode, those CD sectors are written to the shared 8kB SRAM into one of 2 data buffers. The CPU can DMA these to system memory after completion. The subcode Q data is presented as 12 words, following those data buffers in deinterleaved and already CRC checked form. When reading and playing CDDA, the data buffers are abused for storing subchannel data from RW in interleaved form. The format is quite weird because it is not stored as bytes. 96 words of 16 bit with the upper 10 bits always 1 and the lower 6 bits the actual data one can deinterleave using software. I assume that residual data from previous read operations, which is not reset to 0 of 0xff by my CDIC implementation, causes a wrong interpretation of the CD player that this must be valid subcode.
TLDR: Shared buffers. I'm typing too much when at the keykoard.

#

This also means that a CDIC is not capable of reading subchannel RW in normal Green Book operation. At least I wouldn't know how that would be possible. With this chip there might still be features around that I haven't yet implemented, because they were never used by a commercial CD-i application. So far I've mostly implemented features when I or a user has noticed an issue. Like that one time when someone has noticed that both Christmas games were not working and it turned out that the disc needs to spin down once for whatever reason.

restive jay
#

It's fascinating to me how little documentation there is on CDs in general

#

Or at least the edge cases of CDs

bold dragon
#

It exists, but it was locked behind paid technical tomes that were under NDA. So really you're just saying that you're surprised that people in the 1980s didn't breach their contracts when their now-mature pensions were at stake, once the internet was sharing this kind of stuff (20+ years later)...

radiant minnow
bold dragon
#

Not sure what your country is, but most of the development of CDs was in the Netherlands (Philips) and Japan (Sony). The people who signed up for the documentation were also in large companies, from various countries around the world - but ones with quite a bit of money. Of course, at the time, all parties would have attacked a leaker, if one was found (and all had sufficient money to make life painful).

#

But people today may have difficulty envisioning the wolrd how it was.

#

So clearly you would not know that the "fixed-benefit" pensions of the past - which are in some cases, still paying out - were definitiely driven by companies. Only Old Age Security benefits (enough for food) were government.

#

Even in Europe, this is before the union

terse flare
#

With #test-builds message you will find a test core with a fitting MiSTer Main to support Subchannel RW data and by that extent CD+G. This build does not support .cdi or .cdg. Only .cue/.bin/.sub and .chd files are supported for now. The reason for that is because those were the image formats that worked before and I hope this is sufficient for a first test.
The MiSTer Main uploaded there is the latest unstable with the CD-i changes in question. So you could replace your current MiSTer Main with that if you want to.

#

The new MiSTer Main is compatible with older cores by sheer luck. On pre-Sub-RW cores, the CDIC will continue to write to the SRAM and miss the next buffer by a margin of 6 bytes. So, the data is still written but at a position where it should not hurt since those CDIC RAM adresses are not used by the driver.
The old MiSTer Main is compatible with the new core, because the CDIC will just data starve without being angry.
During the design phase of the CD sector cache, I made the well thought move of making it adaptive. The first delivered sector from Main calibrates the data size. It probably wastes some cells in the FPGA but makes this compatibility possible in the first place.

stiff flare
#

What games can I play on CD+G

golden axle
#

I thought was like some photo cd format or something

wintry dust
#

it's so moondandy can put in his information society CD into yet another core

nocturne vortex
#

CD+G has just as many playable games as 3DO

spring gate
#

Unironically I have had that Information Society album for about twenty years, but alas on vinyl and not on the superior CD+G format.

#

I actually forgot I had it until the other day

terse flare
#

Something tells me that there is only one user on the northern hemisphere that will actually use the CD-i core to play CD+G.

restive jay
tawny haven
#

Nah. It is easy. At least from linux.

restive jay
tawny haven
#

I would suspect most cd/dvd/blu-ray drives would work

wintry dust
#

it's not a matter of 'can't rip it' it's 'can't rip it correctly'. you'll get something that works but may or may not be correct. but this is conflating redump levels of data paranoia with "can't be done"

#

most normal drives are garbage for the paranoia level most dumping groups desire, but you as a random user probably don't care

tawny haven
#

Correct that there is no error detection/correction. It will play exactly the same as if played from a cdg supported device though, as it would have the same chance of errors occuring.

wintry dust
#

at least once you rip it your errors are static!

tawny haven
#

In my case I actually thought I might have a few errors in my rip as I was seeing glitches. But it turns out there is a bug in the official cd bios of the jaguar for processing one of the cdg commands. (We built our own version that fixes it)

#

(We also found what appears to be an actual read error in one bit of the copy of the Information Society cd found on the internet. Whether it is a read error or a mastering error would need to be checked. It affects the word grandmother if anyone wants to check) #1055574003810578503 message #1055574003810578503 message

unkempt dragon
#

@fervent urchin is there a SAM specific thread in here to ask questions? I just got it all set up to play commercials but I can't figure out why the videos only play in black and white on my CRT over composite cables (all games run and display normally). This is on a SuperStation One if that matters

fervent urchin
#

Besides the forum there is no specific SAM channel

#

Here are the instructions to change to test

unkempt dragon
fervent urchin
#

It should actually work with the stable CDi core since slamy has pushed it to main a couple weeks ago

#

Let me update this, no need for unstable cores

somber kettle
unkempt dragon
fervent urchin
#

did it download the unstable release?

unkempt dragon
#

ha! I have no CDi core 😂 I was also messing with downloader filters tonight and apparently removed it before realizing SAM needed it lol

#

aaaand it's still not working 🤔 i was able to load the CDi core fine on it's own. Maybe i just need to update/configure SAM again since the core was missing before

fervent urchin
#

it should now jusy use the regular cdi core

unkempt dragon
# fervent urchin Any luck?

Ran update from the SAM script and still wasn't working. I should be asleep though so I'll do more troubleshooting tomorrow lol

#

When SAM started it just went black and I couldn't open the OSD or close out of SAM at all

fervent urchin
#

Sounds like it has issues loading CDi. A reboot might help as well

unkempt dragon
#

The videos are in a new format right? Where does it save them to so I can check that they downloaded

unkempt dragon
#

when it plays video for nintendo consoles it is usually able to load the appropriate game without issue

fervent urchin
#

You might need to reset game lists to get your disc based games working

#

You can do that in the menu under reset

#

Subfolder structure should be fine

#

I suggest just letting it run for a bit without interrupting so it can build the game lists

unkempt dragon
#

i generated the lists from reset menu and now its doing the same "stuck on black screen" as before. idk what's going on 🙃

fervent urchin
#

Not sure why it would have worked before though

stray plank
unkempt dragon
#

yeah i fixed that before. It's working now 🤷‍♂️ Maybe somehow loading he CD-i core manually first makes it work somehow? I'm just gonna let it run for a while and monitor it with SSH output

#

Is there a way to limit the commercials only to games found in the game lists? It's still trying to play a lot of games I don't have

unkempt dragon
unkempt dragon
fervent urchin
unkempt dragon
#

i got it from update_all, and I can open the core directly with no issue. Are you still using the unstable version of CD-i?

fervent urchin
#

yeah i deleted all other versions i had to make sure

#
Now playing: PSX Commercial - Final Fantasy IX
Starting now on the Sony Playstation: Final Fantasy IX (USA) (Disc 1) (v1.1)
Local file exists: /media/fat/video/PSX-WWF_SmackDown.chd
Now playing: PSX Commercial - WWF SmackDown
Starting now on the Sony Playstation: WWF SmackDown! (USA)
Local file exists: /media/fat/video/TurboDuo-Promotional_Video_-_Super_System_Card.chd
Now playing: TurboDuo Commercial - Promotional Video - Super System Card
Starting now on the NEC TurboGrafx-16 : Super Volleyball (USA)
Local file exists: /media/fat/video/PSX-Cool_Boarders_2___1.chd
Now playing: PSX Commercial - Cool Boarders 2   1
Starting now on the Sony Playstation: Cool Boarders 2 (USA)
Local file exists: /media/fat/video/arcade_JUNO_FIRST_starcade.chd
Now playing: arcade JUNO FIRST starcade.chd Commercial - arcade JUNO FIRST starcade
Starting now on the MiSTer Arcade: Juno First
Local file exists: /media/fat/video/PSX-FIFA_98_Road_to_World_Cup.chd
Now playing: PSX Commercial - FIFA 98 Road to World Cup
Starting now on the Sony Playstation: FIFA - Road to World Cup 98 (USA) (En,Fr,De,Es,Nl,Sv)
Local file exists: /media/fat/video/SNES-Looney_Tunes_Sunsoft_Collection.chd
#

I've had the issue with the black screen before as well though

#

let me think about what could be wrong with your setup

unkempt dragon
#

okay so if I wanted to completely start over, I'd uninstall SAM then get it from update_all, then disable it from updating again, then change it to the test branch and update from within SAM?

fervent urchin
#

what would be super helpful in squashing that bug is if you can activate debug and send me the monitor output

#

also, we should probably move this to the help channel or dm me if you like

unkempt dragon
#

i'll DM you once I get re-setup and have a debug log

fervent urchin
#

before you reset everything let's try one thing

#

i have an idea what could be causing it

unkempt dragon
#

ok

fervent urchin
#

echo "0000 0000 0000 0000 0000 0000 0000 0000" | xxd -r -p > /media/fat/config/cdi_sam.cfg

#

sorry just edited it

#

can you try this command and run sam again?

unkempt dragon
#

I'll have to get back to you later. I just fucked my setup cause I'm still tweking download filters and I accidently left out a "!" which means it deleted most everything off my card that wasn't explicitly a positive tag 🤦‍♂️

fervent urchin
#

no worries. that happens 😉

unkempt dragon
fervent urchin
#

good idea, but i don't think i can set up a channel myslef

unkempt dragon
#

Ope, nevermind

#

they got it set up different in this server apparently

#

I wonder who we can ask about that lol

unkempt dragon
unkempt dragon
#

@spring gate what's the protocol for getting permission to post on #1049874847330738286 ? Could we get a dedicated MiSTer Super Attract Mode (SAM) post in there?

gray badge
#

You could totally make one of you want.

stiff flare
unkempt dragon
stiff flare
#

MiSTer Super Attract Mode (SAM)

gray badge
#

weird, I thought anyone could make one

stiff flare
#

IMMA DO IT

#

So I can add a nice photo

austere kernel
#

I'm a little out of the loop here folks, what is the cdi_cdmountreset.rbf that's being pulled down by update_all? I assume it is anyway as I don't remember what the name refers to...

terse flare
austere kernel
#

Super. I'm going through all my Mister stuff here now as I haven't updated in a while. Many thanks Slamy 🧙‍♂️

stiff flare
#

@terse flare is a goddamn hero

#

legitimately turned me into a CD-I fan

valid cairn
#

The CD-I core is a beautiful thing.

#

This is me when I think about it

terse flare
#

Negativity is a thing with German Engineers. This is why German engineering is the best in the world according to Jojo's Bizarre Adventure.

nimble epoch
terse flare
terse flare
#

I'm actually totally unsure if I have ever talked about the issue with "The Apprentice" on this channel. I wasn't able to find evidence, so here is the issue explained to the point I know: Sometimes the title theme has crackles.
To your information, it is one of the music pieces that is always played as Red Book Audio. If no DVC is present, the ingame music is also Red Book. If a DVC is present, it uses Green Book Audio to be able to mix it with sound effects. This also means, when one leaves this game alone on the title screen it will play itself and constantly switch between Green Book and Red Book since it shows the Title Screen, the Highscores and some demo gameplay. At some day I forgot to turn the MiSTer off and there I had it.
I've decided to finally take a closer look and make a recording. Here some samples.

#

I'm not yet sure where it comes from. But I do know certain things. The crackles are spikes that repeat ever 589 samples. This number is not random. 589*2 is 1178. And 1178*2 is 2356. That is very close to the sector size of Red Book Audio. I assume a correlation. As the frequency of the issue is 2 sectors, there has to be a pattern. How a real CDIC does CDDA is unknown to me because the sample data is not viewable by the CPU as far as I know. You just tell it to play at a time code. So this issue should be very isolated and have nothing to do with CD-i stuff since it is just a data shovel. I'm using a double buffering concept with 2 buffers and my first idea was that the wrong buffer is played and the data is replaced during playback. But I was yet unable to prove this.

#

Here a screenshot for the interested reader, so you know how it looks like

terse flare
#

Ah, I'm so dumb and needed an AI to remind me. 🙁 588 samples is one sector. This is not mono after all, but stereo. So there is one crackle per CD sector. I've also now overlayed the raw CD image with my recordings and it turns out that the crackle is always on the boundary of a sector. Huh.. Hopefully I haven't spammed here. This helps me to reflect.

tawny haven
#

Is this while playing red or green?

terse flare
#

So far I was only able to reproduce this problem during the Title Theme. And that is red.

tawny haven
#

oh. was about to suggest if green I might guess there is an issue with not restarting at 0. If green uses adpcm there is a chance of overflow happening if the starting value has not been reset at the start of playback.

terse flare
tawny haven
#

No. Red only. Google red vs green book audio says green does adpcm

#

I did do some adpcm stuff when fixing neo geo sound.

#

A message from back then found an issue that was made by the fan-hack for kof. The behavior for adpcm clipping vs wrapping was actually wrong so they encoded a sample incorrectly which would produce bad crackling on real hardware when it overflowed (emulators at the time used the wrong algorithm so it sounded correct there). A found a way to uncompress using the reverse of the bad algorithm, recompress with the correct one, then replace in the rom to fix the issue.

#

Just did a little experiment. After Rysha confirmed on real hardware that KOF2004SE has broken sound for Athena Down+Forward+B, I made a quick experiment. If you grab this: http://www.smspower.org/forums/11965-VGMLoggingWithOtherEmulators?start=200#67173 , you can convert broken samples to wav files. Then you can use this code: https://wiki.neogeodev.org/index.php?title=ADPCM_codecs#ADPCM-A , to convert it into correctly encoded adpcm files. The Athena sound effect is at 0x55f600-5613ff. So if you convert that to wav, then to correct adpcm and paste it back, it will play correctly without distortion. Just tried it, and it seemed to work. Obviously it would be better if the original hackers fixed it, but if you're desperate, you can do it yourself.

nocturne vortex
nocturne vortex
stiff flare
#

I don’t want to be a weeb! linknoo

nocturne vortex
#

Too late, dust off your miku body pillow and girl using the toilet resin statue

strange crater
#

I think I’m also able to recreate the Apprentice menu crackling on original hardware on my NTSC 220/37 (just a phone recording; excuse the CRT 60Hz hum):

terse flare
terse flare
strange crater
# terse flare What? Am I chasing a white rabbit? Too be honest, I haven't tried to reproduce t...

I’m not sure - it could just be that the CD-i outputs its audio signal hot, especially for The Apprentice. I’ve never noticed crackling with that setup, and was unable to replicate any crackling with an audio CD with the same configuration, but it is running under RF on my setup with the 220/37 and that could potentially be a factor.

I’m getting distortion instead of crackling during those sequences on the 910 - again, it could be error correction or just the audio level being high.

terse flare
# strange crater I’m not sure - it could just be that the CD-i outputs its audio signal hot, espe...

Ah ok. I have to assume that this is a different problem. What this core is currently facing is rather rare but reproducible when tried often enough. I do have to say that manual testing this tedious. So it would be good if there was a scripting interface with the MiSTer to auto play controller inputs. This way I think I could fabricate a trigger on the bug. Continuously switching Highscore and title screen reproduces the problem at some point.

#

Is there a way using some bash scripts to control the gamepad?

marble comet
nimble epoch
terse flare
# nimble epoch I've tried this one with the pinned core and Latest MiSTer main (CDi fixes) but ...

Hmm.. I'm noticing now that I also have a regression for that title on my TODO list. Sorry that it seems to not work correctly right now. I will get in contact with you when I think it is fixed. It will take some time, because I've decided that the current style of replicating VMPEG is not ideal. It doesn't make sense to debug it how it is and I will look at this again with the current work in progress approach. But right now, I really want to understand what is wrong with the rather primitive function of playing Red Book Audio.

terse flare
marble comet
eager pier
marble comet
wintry dust
#

just use some uinput based thing and create a virtual controller and a mechanism to send it commands. there's probably something out there

eager pier
#

To be fair, it hasen't been updated in like 3 years, and I noticed several bugs with the way it displays files, which someone attempted to but ultimately failed to fix

marble comet
#

Ok, yeah. On main, I used mapped Joystick Buttons using the remote to input the keys to be mapped. Now, the mister remote is sending to the CDI for arrows and "A button". Defining withig the core worked too, for arrows and "B1". Its cumbersome and there's probably better ways, but its working technically. (Edit: Arrows were recieved, but not buttons)

eager pier
#

Honestly, I think a better way would be to just use some kind of controller emulator that you can scrpt, the kind used for TASes, you can likely make one out of somethign cheap like an ESP32, likely plenty of pre-made guides and software to do so, to simulate a usb controller

marble comet
#

But yeah, its probably pretty cumbersome

eager pier
#

Though AFAIK there is no real way to time it so you would just be running an input macro on loop hoping it dosen't go out of sync

marble comet
#

Eh, no. Arrows are working, but not buttons. Ima call my remote idea a failure 🙂

eager pier
#

I guess Slamy might be able to do a debug build that sends some sort of debug commands to help keep it in sync?

#

Dunno if that can have any impact on the issue though

terse flare
#

Please do not listen to this in public or with headphones. The noise is unpleasant. The problem is understood and I'm an idiot. This file was produced with a bare metal test ROM that delays the playback start command for CDDA for 30 video lines. That is also the reason, why the problem was not reproducible using the Audio CD player that comes with the machine. It requires a latency of handling the "Got Audio Sector" IRQ coming from the CDIC to reproduce the problem. After the CD Sector Cache was added, I should have implemented a certain rate to feed the data into the CDIC RAM. That never happened because I would have guessed it is not required. Sadly, it is required....
Here are the events

  1. "CDIC, play from time code by reading raw data"
  2. CDIC fills buffer A and causes IRQ when filled
  3. The CDIC driver in the ROM will start playback with buffer A
  4. Buffer B is getting filled while Buffer A is now starting to play.
    Since the playback of Buffer A is started during the reading of Buffer B, Buffer B is filled while Buffer A is still playing.
    On a real CD-i, the incoming data rate is equal to the sample rate, so both "pointers" have equal speed and don't play catchup.
    In case of the current CD-i core, a whole CDIC buffer is filled within 8 audio samples. So there is a chance of overwriting data that is currently played. It's a desaster with an easy fix.
    Hopefully I was able to explain it well. I've already thought about making a video to explain.