[ オリジナルレポート ]

BugID: #05809

カテゴリ 重要度 ステータス 解決状況 登録日時 最終更新
システムコア仮承認未処理2014-12-28 02:072014-12-30 03:54
 
テスターTafoid担当者 ソース
バージョン0.156発生バージョン修正バージョン
修正コミットプルリク
フラグ
セット -wavwrite (core)
セット詳細
 
概 要-wavwriteによるデータ出力の問題。
詳 細When recording -wavwrite, there is a 4 byte area which is written as 00 and not part of the header. It is shown in the 4 bytes direct AFTER the header.
I made this discovery when I started testing save state fitness - running -str 20 runs with save states/resumed -str 20 runs being started and stopped 5 times (Every 4 seconds)
再現手順The best test case I could find was to use the NES where there are games which produce audio very shortly after booting and for a long period.

My procedure was as follows:

1. Create a reference -wavwrite from the command-line:
"mess nes siliusu -str 20 -wavwrite full.wav"
This will create the baseline comparison.

2. Run 5 instances of the same game, with a different -wavwrite filename for each, such as
"mess nes siliusu -autosave -str 4 -wavwrite 4.wav"
"mess nes siliusu -autosave -str 8 -wavwrite 8.wav"
"mess nes siliusu -autosave -str 12 -wavwrite 12.wav"
"mess nes siliusu -autosave -str 16 -wavwrite 16.wav"
"mess nes siliusu -autosave -str 20 -wavwrite 20.wav"
This will create 5 .wav files which when the data of those is combined will (or should) match the data of the original recording.

3. With a hex editor or some other means, retain the original -str 20 "full.wav" header and save to a separate file (header.dat). The header is the first 44 (0x2c) bytes at the beginning of each .wav file.

4. Combine the 5 'staggered' wavwrite recordings by deleting entirely the first 44 bytes of each file (4,8,12,16,20.wav) and then merge all the data together as one file.

5. Create a new file which contains the header from the full.wav (header.dat) and the data from 5 recordings. In practice, if everything is working correctly, this result in a file which is identical to the original recording which we'll call "merged.wav"

6. Run a file comparison between the two produced files "full.wav" and "merged.wav"

c:\mamesvn runk\WAV_RECORD>fc /b full.wav merged.wav
Comparing files full.wav and MERGED.WAV
000BB82C: DE 00
000BB82D: 12 00
000BB82E: DE 00
000BB82F: 12 00
0017702C: CC 00
0017702D: 01 00
0017702E: CC 00
0017702F: 01 00
0023282C: 5A 00
0023282D: 11 00
0023282E: 5A 00
0023282F: 11 00
002EE02C: 8A 00
002EE02D: E9 00
002EE02E: 8A 00
002EE02F: E9 00


Note that there are 4 bytes which the first sample is supposed to be written (as is filled in the file "full.wav") which when running the staggered autosave recording "merged.wav", the first sample of the 'session' is 4 bytes of "00" instead.
追加情報 
 
添付ファイル7z filenes_siliusu_wavwrite_compare.7z (2014-12-28 02:07)