LaserDisc - the state of the art

From Citylan
Revision as of 09:41, 17 July 2017 by WikiSysop (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

LaserDisc - the state of the art
By Ryan Holtz, as posted on "The Dumping Union" private mailing list on 10th July, 2017

--- THE GAMES & THEIR DATA ---

The vast majority of LD games were not as simple as having the LD player operating as a dumb playback mechanism, receiving commands one-way from the arcade board. LD games used a variety of methods for encoding data onto the disc and then retrieving the data in such a fashion that the game can use it. In some cases, this data was encoded into one of the audio tracks (I believe). If I recall correctly, M.A.C.H. 3 and Us vs. Them used that, and in fact it's why the games eventually die in MAME due to a data error. I seem to recall that someone has gone to the effort to remaster the audio tracks and re-inject them into the CHD so that those two games are fully playable, but since the data was never sent directly to a MAME dev and was simply hosted on some obscure site, that fixed data may have since been lost. I'm not sure.

Other games - the majority of them, as I understand it - make use of the fact that while there are well-defined broadcast standards for splicing auxiliary digital data into certain "lines" beyond the normal visible area of a given video field - in fact, this is how things like subtitles and other information were encoded, for years - there are some lines that never ended up being used. It is there that these LD games can and do store various data there, things like frame indices, and other things.

To that end, in order to capture a Laserdisc in the one format that's currently accepted by MAME, "all" you need to do is find some sort of capture card that lets you capture the full frame, rather than one which crops the output to the normally-visible area of the signal. This is easier said than done, obviously, but I imagine that it wouldn't be too difficult for someone savvy with pro-grade (as opposed to consumer-grade) hardware to make short work of.

--- THE CONTAINER FORMAT ---

MAME currently only supports using uncompressed AVI as the container format that gets turned into a CHD for a couple of reasons, and I'll outline them here:

1A. As a project focused mainly on documentation, all data in MAME is *supposed* to be able to be "round-tripped". A CHD of a hard drive can be uncompressed and then dd'd back onto a real drive, and it should work just as well as the original drive. You can turn right around and burn just about any ROM in MAME back to an actual chip and use it on real hardware, and you could conceivably then stick that ROM back in a ROM reader and wind up with a file that has identical contents to the file. While that standard is definitely NOT yet the case for all optical media, it is for the vast majority of the ones that we currently support, and we would absolutely not say 'no' to anyone who was willing to add support for copy-protected optical media that would allow CHDMAN to output a standard mastering image that could be shipped off to a place like Philips and pressed onto an actual disc.

1B. Thus we turn to Laserdiscs: Uncompressed AVI is really the only way to go here, barring certain relatively obscure lossless formats that, for reasons associated with licensing (more on that in point #2), have not been available to MAME up until very recently. With lossy compression, the concept of "generational loss" is a very real thing, and very insidious. After a sufficient number of trips through the system, you could wind up with an image that's lossy enough to stop working in an actual machine or in MAME, but it's entirely random as to how many trips that could be. Therefore, we go with uncompressed AVI.

2. Until recently, MAME has not been able to use libraries that are licensed under the GNU Public License (GPL). Now, at least, we can use GPLv2-licensed code, but if I recall correctly, not GPLv3-licensed code. So this does in fact open up some new options for lossless codecs that we have not yet explored, but it's something that - if we can come up with a way of dumping Laserdiscs again - MAME devs would likely be quite interested in looking into.

--- THE HARDWARE NITTY-GRITTY (what I'm sure some of you are looking for) ---

Other than the above-mentioned option of finding capture hardware that will also capture the VBI data, there has been a lot of talk about more accurate ways of dumping, which cut a capture card out of the equation, and could result in vastly better dumps than anything anyone's ever seen before. However, it would absolutely require the support of one or more experienced hardware persons who are as passionate about preserving LD games as we are about emulating them (no, really!). I figure the DU is probably the best bet for putting out a call for help in that regard, given the amazing things you all have done with hardware reverse-engineering, so I'm kind of shocked on behalf of the MAME team that nobody has done so yet. Again, this is a situation where there are various options on the table, all with their own trade-offs of quality versus ease of implementation. I'll get into them in a second, but let me give some background information on Laserdisc itself.

Laserdisc, all other things being equal, is very much an analog format and not digital. It might be optical media, but it has far more in common with RCA's "CED" (Capacitance Electronic Disc) system, which incidentally was *also* used for a very small number of arcade games that wanted to incorporate video. Rather than the pattern of "pits" and "lands" on the disc being translated directly into digital data, it is the *lengths* of these pits and lands that encodes the actual signal. Hand-waving away certain details that I'm not confident enough to speak on, it effectively encodes into analog media the analog signal of the video itself, at roughly the same bandwidth as broadcast NTSC or PAL video (roughly 6MHz).

Having clarified that, here are the options that I'm aware of:

1. Some MAME developers, myself included, have heard rumors of a specific model of LD player, late in the life-cycle of the LD medium itself, which helpfully has a digital signal fairly close to the laser pickup which indicates whether or not a given sample is "good" or not. This would obviously be the ultimate ideal player around which to design dumping hardware, because it means being able to come up with a bit-perfect dump by repeatedly re-reading one or more examples of the same disc, which would presumably have different areas of the disc affected by bit-rot. And make no mistake, there's probably not an LD in existence right now that doesn't have at least *some* amount of bit-rot.

This would effectively require tracking down a Laserdisc player with the relevant capabilities, and designing custom hardware to tap directly into the signals on the laser pickup directly after it's been sampled by the ADC and the good/no-good bit has been set or unset.

2+. Other MAME developers, and contributors, have theorized that it should be possible to take an earlier model of LD player and sample the output signal directly, at various points in the process - just off the laser pickup, just before the carrier is taken out and any signal clean-up is done, just after any signal clean-up is done, or worst-case, directly before any kind of RF modulation. Each of these is considered less desirable than solution #1, as they naturally all involve some measure of signal degradation simply by passing through more circuitry before we can get at it. Along with solution #1, they share one major issue, which is finding someone who is both able and willing to design a rig - most likely one-off, but possibly turnkey - that can actually *do* this, *and* who has the necessary logic analyzer with sufficient bandwidth and sufficient bit-width to actually capture data at a workable level of quality.

This, too, would require tracking down a Laserdisc player with a circuitry design or capabilities that make it easier to do so, and also involves designing custom hardware to tap directly into the signals *somewhere* in the player.

--- THE CONCLUSION ---

At the end of the day, this isn't something that can be done solo, or even by only a couple of people. Even Aaron's work required the assistance of someone on the hardware end of things, and someone willing to come up with custom drivers for his preferred video capture card. It's not even something that can be done just by hardware people, or just by software people. But *especially* not just by software people.

Given that Daphne already has a huge amount of mind-share among users, and the fact that it already uses the interim solution that you propose, Ed - frame files - I hope you can all understand a little bit better why there is no interest among MAME developers to trudge down an already-beaten path that will ultimately be "good enough" for the majority of users. We want something that results in an objectively superior solution in MAME. We already fail to meet the self-stated bar of quality in terms of serving as documentation, rather than free games, and I don't think it's unreasonable for us to want to hold ourselves to a high standard when and where we can.

The argument that we can come up with something that's good enough "for now" is objectively wrong: The fact is, we're having a hard enough time finding people who share the same vision as us, and who are willing to help bring up the hardware side of things while we take care of the software side of things. It beggars belief that anyone would think that that situation would somehow become *better* by just giving in and saying "Screw it, let's go with MPEG rips". That we haven't done so yet is *exactly* why we're currently having this discussion right now, and I hope that this extremely long e-mail has helped to illuminate many of the concerns that we have about going with a less-than-ideal solution, has helped to illustrate the technical challenges that are involved in accurately dumping Laserdiscs, and, with my last bit of hope, I hope that it will inspire some - any - of you who are hardware-inclined to help us in realizing this goal.

Mog out.