Sunday, December 10, 2023

CD-i Emulator 0.6.0 and beyond

Today I have released the seventh and probably last beta release of CD-i Emulator version 0.5.3, which is now in maintenance mode as all development has shifted to version 0.6.0.

Even though it is still called beta, this can be considered a "stable" release. It is only a very small change from the previous beta release of this version which has been out since April 2023 with no major issues reported.

The same cannot be said for the current state of version 0.6.0; many structural changes have been made and it is more than likely that this will result in regression issues relative to version 0.5.3-beta7.

It will probably take some time to get these issues ironed out and in the meantime today’s release can provide the fallback position.

I will try very hard to keep all the configuration files (especially cditypes.rul and the files in the sys directory) compatible with both versions.

I do not want to repeat the 0.5.3 "many betas" pattern with the new version; after the needed stabilization work a formal non-beta release should follow relatively quickly.

Highlights

As hinted above, version 0.6.0 will be a massive update, basically all the work done after the version 0.5.3-beta5 release in March 2019 (which was not intended as a public beta but leaked anyway; it has since been made available on my website).

Here are some highlights of the coming version 0.6.0:

- The three-minute time limit between player resets is gone. Therefore, there are no longer separate "limited" and "unlimited" editions. Consequently, it is no longer needed to activate the program and it will be available free of charge.

- Archived disc image files (zip, 7zip, gzip, bzip2, etc) can now be emulated directly; they will be unarchived to a temporary directory as needed. This features utilizes libarchive for reading the archive files.

- Infrastructure has been put in place for CD-i player and CD-i disc "art" images to be shown at startup, based on hashing the disc label sector. The initial release will ship with a basic collection of art files, in a future version these art images could be downloaded automatically. I am working with “The world of CD-i” to leverage their comprehensive collection of cover art images. This feature uses zlib, jpeglib, giflib and the MAME png code to support various image formats.

- The Philips CD-i 604, Philips FW380i, Grundig CD-i 110E and Bang & Olufsen Beocenter AV5 CD-i player systems are now supported (with some limitations). These are all variations of existing Philips players so the changes for this were relatively small.

- The Philips Model BO Videosynthesizer Prototype system (boproto) is now supported as an OS-9 system; ROM and disc image files for it are already publicly available from Jorne / MrMii6's Coffee Fueled Retro website at https://www.cfretro.net/philips-bo-prototype/. This needed support for some new chips and a SCSI device hack but was very fun to do.

- There is a new ROM version identification system based on ROM tags as described in my previous CD-i ROMs blog post. This replaces the error-prone minor version detection system based on module versions used before and also adds some validation to the detection process.

- There is a new CD-i Type program that can produce ROM information directly from the ROM files that previously could only be produced by CD-i Link. This program is also capable of collating a collection of such ROM information files into various forms, including an HTML table format that will be made accessible via a new “CD-i ROMs” page at the CD-i Emulator website https://www.cdiemu.org/.

Note: Only ROM information files will be made available, not the actual ROM files themselves, comparable to e.g. the redump website http://redump.org/ for disc images.

- The CD-i Type program can also produce a "datfile" for CD-i ROMs called cdiroms.dat which will also be made available via the website. With the availability of this file, it will become possible to use ROM managers such as ClrMamePro, RomCenter and RomVault to check CD-i ROM file collections.

- The above ROM managers will put ROM files inside folders or archives, which is now also supported by CD-i Emulator inside the rom directory.

- ADPCM audio decoding has been improved by keeping intermediate results with bigger precision and changing the rounding. Many technical details can be found on Discord around this message: https://discord.com/channels/675054061665386544/676505089103495187/1094786111408189502

- All sources are now maintained in a git repository, making for easier maintenance, and paving the way for a future source release on GitHub.

- All documentation files now have proper file extensions (e.g. RELNOTES.txt), making it easier for non-technical users to find and open them.

Further work

Some more work that might be done in later 0.6.x releases, not in any particular order or priority:

- Modification of the Help > Report menu option to automatically create a GitHub issue.

- Support for CUE files which would allow disc images to be split into separate files (typically one per track) as often done by disc dumping programs or archive sites. Each track file could have a different format, for example MODE2/2352 for the CD-i track and WAV or MP3 for audio tracks.

- Support for CHD version 5 files (the current version); currently CD-i Emulator only supports up to version 4 CHD files.

- Support for ROM sets (e.g. for specific player configurations or for testing) in subdirectories based on the existing folder and archive support.

- Graphical UI version of CD-i Link to make CD-i ROM downloading easier for users unfamiliar with the command line.

- Graphical UI support for more CD-i Emulator settings, esp. the CD-i player model and/or ROMs to use in case you have more than one, again mainly intended for users unfamiliar with the command line.

- Finishing support for CD-i 60x floppy drives; possibly also adding support for CD-i 180 and CD-i 615 floppy drives (they use different controllers).

- Adding disc and audio emulation for the Sony and Kyocera CD-i players, which means handling more variants of the RCHIP disc controller already supported for the Philips CD-i 370 and Goldstar GPI-1200M players.

- Adding proper support for the RTC functions of 32K NVRAM chips as used in more high-end players; currently the date and time is not correctly read from these chips.

- Support for loading and saving of NVRAM files directly from the hard disc (this requires partial high-level emulation of the /nvr driver).

- Completion of OSD support for the B&O Beocenter AV5 player. I have one of those now, so that should make it somewhat easier.

- More support for the various I2m boards, right now they do not even boot.

- Support for save/restore of player state snapshots.

- Creation of a pure command-line version of CD-i Emulator, useful for regression tests and rendering high-quality videos of sessions recorded with the existing input recording/playback functionality. You would not be able to directly control the CD-i player, only control emulation from the debug command prompt.

- Creation of an SDL version of CD-i Emulator, paving the way for future ports to systems other than Windows. This version would not have a GUI to control emulation, you would again need to use the debug interface for that. For more information about SDL, see https://www.libsdl.org/.

- Creation of basic ports to systems other than Windows using SDL. Envisioned target systems include Linux, MacOS, iOS and Android. Especially the latter two present challenges because they do not have an easy way to create a debug interface except via the network.

Basic research and sometimes partial implementation have been done for all of the above.

As you can infer from the above, the primary goal of the version 0.6.x releases is not to improve the core emulation performance or quality, though some enhancements and bugfixes have been and will continue to be made and support for some new supported exotic players might also be added.

Rather, the primary goal will be to improve the user interface and experience, both for emulation (CD-i Emulator) and ROM extraction (CD-i Link) and collation (CD-i Type).

Roadmap

The primary goal of the 0.5.x releases was always to get a basic CD-i emulator working, which I feel has been more then accomplished by now.

In my mind the primary goals for the coming minor releases are:

0.6.x – Improve user interface and experience

0.7.x – Fix Digital Video cartridge emulation issues

0.8.x – Fix as many other emulation issues as possible

0.9.x – Do whatever still needs to be done for a...

1.0.x – Reasonably complete CD-i Emulator!

When the 1.0.0 milestone is reached, I will do a source release on GitHub. It would be nice if that could be done some time in 2025 because that would be twenty years after the first public release in 2005, a nice round number.

Future work

Some things that I would still like to do that might go after that, but also (partially) before if I get the itch:

- Complete ROM-less CD-i emulation, requiring high-level emulation of most of the CD-RTOS operating system, in effect adding a high-level "CD-RTOS coprocessor" to the emulated system.

- Better support for title developers and reverse engineers. A more graphical UI debugger, video DCP and pixel inspection, data tracing, etc.

- Add chip access collation to support better documentation of SLAVE/IKAT command variation between versions.

- Validate processor emulation by producing instruction traces that can be downloaded into and validated on actual hardware, including timing information (cycle counts)

- Enhance CD-i Emulator for use as a hybrid OS-9 development system like “os9exec”, useful for running OS-9 binaries like the C compiler and other tools.

- Finish and release CD-i file conversion programs; right now they are a hodge-podge of just what I personally needed and not functionally or even technically complete in any way.

- Create a CD-i file viewer program. This should allow viewing of the contents of any CD-i related file, from disc images down to disassembly. In many ways this would be a "lite" version of an emulator because it would have all the format decoding (but no exact chip emulation).

- Enhance the existing CD-i File program to support extracting the contents of any CD-i related file, in essence the command-line version of the CD-i file viewer.

- Create a CD-i disc image building program, ideally based on title development support (e.g. partial disc images) integrated into CD-i Emulator.

- Create a CD-i disc image editing program based on both of the above.

And whatever else may come up!

Discussion

If you would like to reach out to discuss features or their priority, the #emulation channel of the Philips CD-i Discord server at https://discord.gg/TKPejTfw6D is the right place.

You can also use the CD-i Emulator issue tracker on GitHub at https://github.com/cdifan/cdiemu/issues to suggest features.

No comments:

Post a Comment