主题 : 【新闻】Mame将支持街机LaserDisc的模拟
级别: 论坛版主
UID: 6498
精华: 1
发帖: 9748
威望: 49 星
金钱: 403165 浮游币
贡献值: 9718 点
好评度: 53307 点
人气: 3105 点
在线时间: 4576(时)
注册时间: 2004-06-07
最后登录: 2024-12-25
楼主  发表于: 2006-12-07 22:43

【新闻】Mame将支持街机LaserDisc的模拟

http://www.aarongiles.com/

It should be pretty obvious with the update to the Dragon’s Lair driver in 0.110u4 that something is brewing on the laserdisc front. There has been a lot of discussion over the years about how to make it happen, what video formats to use, etc, etc. In the end, it seemed that nobody was ever happy enough with the proposed ideas to actually take them and run. But with the discs and equipment getting older and older, and my (relatively) recent success in reading an NFL Football CED (thanks to Tim’s help), I figured it was finally time to just pick a direction and move forward.

One of the big stumbling blocks is that pretty much all existing video compression algorithms are heavily patented. Which means that for freely developed and freely available software, there isn’t really a good way of utilizing standards such as MPEG. Plus, MPEG hardly qualifies as “archival” quality. For this reason, MAME will be going its own way, but it won’t be straying too far from the usual paths.

The container format for the data will be CHD (which originally stood for Compressed Hard Drive, but has since been redubbed as Compressed Hunks of Data). Each frame, including audio and video data, will be a fixed length (some frames will have one fewer audio sample due to rounding, but this is easy to compute). The video frame rate, height, width, audio sample rate, and number of channels will be encoded in the CHD metadata. Each frame is independently compressed.

Audio data is stored as multiple 16-bit channels at an arbitrary sample rate (we will be shooting for 44.1kHz stereo during sampling). The audio data is compressed losslessly using Huffman-compressed deltas. This gives a nice compromise between storing the data raw and doing something more complex and aggressive like FLAC. Audio data is just a drop in the bucket anyway from a data rate perspective, so why skimp? This compression may also be used in the future for CHD-CD’s with audio tracks, and for systems that read/playback tape-based data.

Video data compression is still being fine-tuned, and is waiting some good quality source data to experiment with, both animated and filmed. At a minimum, a lossless compression based on Huffman-compressed per-channel (Y,Cb,Cr) deltas will be available. This is essentially what HuffYUV does. I have also written a lossy DCT-based compressor that is tuned for archival purposes rather than bit rate limiting. That is, with an MPEG compressor you specify your data rate, and the compressor quantizes the DCT coefficients to fit the data rate. With our video compression, you specify a maximum error and a maximum average error for each channel, and the compressor tweaks the quantization on each 8×8 block indepedently to ensure that those criteria are met.

The source material will be sampled at DVD resolutions (720×486 for NTSC video) in “uncompressed” form — which is actually slightly compressed in that it is 4:2:2 subsampled, so each Cr and Cb sample covers two pixels horizontally. This is oversampling for laserdisc video, but it’s better to have more data than not enough data. This effectively gives you 16 bits per pixel uncompressed, or 720 x 486 x 2 = 699,840 bytes per frame. Add in a frames’ worth of audio data (assuming 29.97fps) at 44100Hz gives an extra 5886 bytes, for a total per-frame average of 705,726 bytes (5.4 MBits) per frame.

Once you start multiplying that out, it’s a lot of data: 20.6 MB/second, 1.18 GB/minute, or 70.9 GB/hour. Most video game laserdiscs are CAV, which maxes out at 54000 frames, or just over 30 minutes. Lossless tends to give you between 2:1 and 3:1 compression. Going up to lossy with medium deltas (up to 4/256 per component) gets you closer to 4:1 and 5:1 compression with almost no visible difference. Increasing the max deltas beyond that helps further with compression, but it definitely starts to become visible.

Not everything is nailed down yet, and it will probably take a couple of months to materialize, but those are the basics. The first game I’m looking at is obviously Dragon’s Lair, but coincidentally, I just received in the mail a driver for the American Laser Games series of shooters as well, which were all run on an Amiga 500 with a genlock. Fortunately, the Amiga emulation is pretty decent these days, so things are progressing well there.

Now that the basic system is up and running, I’m hoping others can help get the rest of the laser games moving forward. In 0.110u4 I included support for a couple of common laserdisc players. Even though you can’t see any video yet, you can at least watch their operation to see if things are working properly. In 0.110u5 I’ll have support for the Sony LDP-1450 laserdisc player and the ability to display dummy frames (each frame is solid color and gets a unique Cb/Cr value) so that you get a little better sense of the operation. And hopefully in the next month or so, I’ll have the first video running at last….

LaserDisc即镭射光碟机,采用LD这种特殊存储介质。在当年由于容量上的优势,使得游戏画面和音效非常出色,并带有大量精致过场动画,只有sega、data east等街机巨头才有能力开发出LD游戏,同时其售价非常昂贵,因此游戏数量相对较少,其中最有名的当属龙穴

目前只有daphne支持了LD机的模拟,由于LD的特殊性,结合关于如何压缩成chd的这段话,看样子mame应该和daphne一样采用的是数据剥离的方法,然后打包成chd,而非直接dump出来,因此会有压缩损失,貌似mame这次没法追求其一贯的“精确模拟”了
绿坝娘美...
YZB
级别: 超级版主

UID: 12451
精华: 6
发帖: 19106
威望: 173 星
金钱: 2058 浮游币
贡献值: 10280 点
好评度: 54894 点
人气: 4322 点
在线时间: 19817(时)
注册时间: 2004-10-02
最后登录: 2024-12-25
沙发  发表于: 2006-12-08 01:03

等着瞧吧
级别: 模拟小生
UID: 6844
精华: 0
发帖: 26
威望: 0 星
金钱: 2654 浮游币
贡献值: 0 点
好评度: 60 点
人气: 0 点
在线时间: 0(时)
注册时间: 2004-06-12
最后登录: 2024-10-16
板凳  发表于: 2006-12-08 10:55

期待中
希望早點出現