problems with vgm_stat
solution: install a new zlib1.dll
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff
- RichterEX2 Offline
- Posts: 191
- Joined: 2012-03-30, 9:28:37
- Location: Georgia, USA
problems with vgm_stat
Note by Valley Bell: This was split form the VGM Tool Collection thread on 2012-06-06.
Something I've noticed in vgm_stat. When I load up an M3U playlist, the 2nd and 3rd entries aren't being read properly. Instead just giving the filename, and none of the times.
Something I've noticed in vgm_stat. When I load up an M3U playlist, the 2nd and 3rd entries aren't being read properly. Instead just giving the filename, and none of the times.
The same thing happens to me, but I never reported it publicly since I assumed it happened only to me, so I reported it privately to ValleyBell. This is the test case I shew him:
Is this the same thing that happens to you? Consistency is important in bug reports.Tom wrote:I don't really get what's going on:I even tried to move everything to a first level subdirectory, but it didn't workCode: Select all
X:\Bubble Ghost>vgm_stat.exe "Bubble Ghost.m3u" VGM Statistics -------------- File Path or PlayList: Bubble Ghost.m3u Sample Time File Title Total Loop Total Loop 01 Title Screen.vgz 470603 468563 0:11 0:11 02 Main BGM.vgz 4007 0 0:00 - 03 Ending.vgz 568 0 0:00 - Total Length 475178 943741 0:11 0:21 Song list: Total Loop 01 Title Screen 0:11 0:11 02 02 Main BGM 0:00 - 03 03 Ending 0:00 - Total Length 0:11 0:21 X:\Bubble Ghost>
EDIT: however:It works if I give it the path (".", same directory).Code: Select all
X:\Bubble Ghost>vgm_stat.exe . VGM Statistics -------------- File Path or PlayList: . Sample Time File Title Total Loop Total Loop 01 Title Screen.vgz 470603 468563 0:11 0:11 02 Main BGM.vgz 3748694 3373644 1:25 1:16 03 Ending.vgz 652260 632559 0:15 0:14 Total Length 4871557 9346323 1:50 3:32 Song list: Total Loop Title Screen 0:11 0:11 Main BGM 1:25 1:16 Ending 0:15 0:14 Total Length 1:50 3:32 X:\Bubble Ghost>
Also known as nineko.
- RichterEX2 Offline
- Posts: 191
- Joined: 2012-03-30, 9:28:37
- Location: Georgia, USA
- ValleyBell Offline
- Posts: 4783
- Joined: 2011-12-01, 20:20:07
- Location: Germany
vgm_stat Debug Build
I've prepared a debug build of vgm_stat. If you are one of the people that has issues with running it via m3u files, please download it from here and post the complete console output.
Thanks.
Thanks.
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
Track 0, Header Size 0, Version 161
Samples Total: 470603, Samples Loop: 306
GD3 Offset: 0x199E, EOF Offset: 0x1A54
01 Title Screen.vgz 470603 468563 0:11 0:11
Read Line: 02 Main BGM.vgz
Full File Path: 02 Main BGM.vgz
Track 1, Header Size 128, Version 0
Samples Total: 4007, Samples Loop: 3373644
GD3 Offset: 0x39336A, EOF Offset: 0x165
02 Main BGM.vgz 4007 0 0:00 -
Read Line: 03 Ending.vgz
Full File Path: 03 Ending.vgz
Track 2, Header Size 128, Version 0
Samples Total: 568, Samples Loop: 632559
GD3 Offset: 0x9F3F8, EOF Offset: 0x165
03 Ending.vgz 568 0 0:00 -
Total Length 475178 943741 0:11 0:21
Song list: Total Loop
01 Title Screen 0:11 0:11
02 02 Main BGM 0:00 -
03 03 Ending 0:00 -
Total Length 0:11 0:21
X:\Bubble_Ghost_(Game_Boy)>
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe .
VGM Statistics
--------------
File Path or PlayList: .
Base Path: .\
Sample Time
File Title Total Loop Total Loop
Found File: 01 Title Screen.vgz
Full File Path: .\01 Title Screen.vgz
Track 0, Header Size 0, Version 161
Samples Total: 470603, Samples Loop: 306
GD3 Offset: 0x199E, EOF Offset: 0x1A54
01 Title Screen.vgz 470603 468563 0:11 0:11
Found File: 02 Main BGM.vgz
Full File Path: .\02 Main BGM.vgz
Track 1, Header Size 0, Version 161
Samples Total: 3748694, Samples Loop: 4007
GD3 Offset: 0xF366, EOF Offset: 0xF414
02 Main BGM.vgz 3748694 3373644 1:25 1:16
Found File: 03 Ending.vgz
Full File Path: .\03 Ending.vgz
Track 2, Header Size 0, Version 161
Samples Total: 652260, Samples Loop: 568
GD3 Offset: 0x2D3D, EOF Offset: 0x2DE7
03 Ending.vgz 652260 632559 0:15 0:14
Total Length 4871557 9346323 1:50 3:32
Song list: Total Loop
Title Screen 0:11 0:11
Main BGM 1:25 1:16
Ending 0:15 0:14
Total Length 1:50 3:32
X:\Bubble_Ghost_(Game_Boy)>
Also known as nineko.
- ValleyBell Offline
- Posts: 4783
- Joined: 2011-12-01, 20:20:07
- Location: Germany
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
Track 0, Data Ofs 0xC0, Version 161
Samples Total: 470603, Samples Loop: 306
GD3 Offset: 0x199E, EOF Offset: 0x1A54
01 Title Screen.vgz 470603 468563 0:11 0:11
Read Line: 02 Main BGM.vgz
Full File Path: 02 Main BGM.vgz
Track 1, Data Ofs 0xC0, Version 161
Samples Total: 3748694, Samples Loop: 4007
GD3 Offset: 0xF366, EOF Offset: 0xF414
02 Main BGM.vgz 3748694 3373644 1:25 1:16
Read Line: 03 Ending.vgz
Full File Path: 03 Ending.vgz
Track 2, Data Ofs 0xC0, Version 161
Samples Total: 652260, Samples Loop: 568
GD3 Offset: 0x2D3D, EOF Offset: 0x2DE7
03 Ending.vgz 652260 632559 0:15 0:14
Total Length 4871557 9346323 1:50 3:32
Song list: Total Loop
01 Title Screen 0:11 0:11
02 Main BGM 1:25 1:16
03 Ending 0:15 0:14
Total Length 1:50 3:32
X:\Bubble_Ghost_(Game_Boy)>
Also known as nineko.
- ValleyBell Offline
- Posts: 4783
- Joined: 2011-12-01, 20:20:07
- Location: Germany
Okay, now I'm confused. All I did was changing this:
to this:
But if it works, I'll leave it at that.
Code: Select all
gzread(hFile, &fccHeader, 0x04);
if (fccHeader != FCC_VGM)
goto OpenErr;
gzseek(hFile, 0x00, SEEK_SET);
gzread(hFile, &VGMHead, sizeof(VGM_HEADER));
Code: Select all
gzread(hFile, &fccHeader, 0x04);
if (fccHeader != FCC_VGM)
goto OpenErr;
if (gzseek(hFile, 0x00, SEEK_SET) == -1)
printf("gzseek Error!!\n");
gzread(hFile, &VGMHead, sizeof(VGM_HEADER));
To be honest I was using my laptop from my bed when I tested it the second time, but I assumed that it would have behaved in the same way as my main computer, since their configuration is nearly the same.
I am at work now, but I will check it again from my main computer as soon as I get the chance.
I am at work now, but I will check it again from my main computer as soon as I get the chance.
Also known as nineko.
Indeed, it worked from my laptop, but it doesn't work from my main computer:
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
Track 0, Data Ofs 0xC0, Version 161
Samples Total: 470603, Samples Loop: 306
GD3 Offset: 0x199E, EOF Offset: 0x1A54
01 Title Screen.vgz 470603 468563 0:11 0:11
Read Line: 02 Main BGM.vgz
Full File Path: 02 Main BGM.vgz
Track 1, Data Ofs 0x40, Version 0
Samples Total: 4007, Samples Loop: 3373644
GD3 Offset: 0x39336A, EOF Offset: 0x165
02 Main BGM.vgz 4007 0 0:00 -
Read Line: 03 Ending.vgz
Full File Path: 03 Ending.vgz
gzseek Error!!
Track 2, Data Ofs 0x40, Version 0
Samples Total: 568, Samples Loop: 632559
GD3 Offset: 0x9F3F8, EOF Offset: 0x165
03 Ending.vgz 568 0 0:00 -
Total Length 475178 943741 0:11 0:21
Song list: Total Loop
01 Title Screen 0:11 0:11
02 02 Main BGM 0:00 -
03 03 Ending 0:00 -
Total Length 0:11 0:21
X:\Bubble_Ghost_(Game_Boy)>
Also known as nineko.
- ValleyBell Offline
- Posts: 4783
- Joined: 2011-12-01, 20:20:07
- Location: Germany
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
ZLib Version: 1.2.3
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
Track 0, Data Ofs 0xC0, Version 161
Samples Total: 470603, Samples Loop: 306
GD3 Offset: 0x199E, EOF Offset: 0x1A54
01 Title Screen.vgz 470603 468563 0:11 0:11
Read Line: 02 Main BGM.vgz
Full File Path: 02 Main BGM.vgz
gztell returns invalid offset: 0x4
02 Main BGM.vgz Error opening the file!
Read Line: 03 Ending.vgz
Full File Path: 03 Ending.vgz
gzseek Error!!
Track 1, Data Ofs 0xC0, Version 161
Samples Total: 652260, Samples Loop: 568
GD3 Offset: 0x2D3D, EOF Offset: 0x2DE7
03 Ending.vgz 652260 632559 0:15 0:14
Total Length 1122863 2223985 0:25 0:50
Song list: Total Loop
01 Title Screen 0:11 0:11
02 Ending 0:15 0:14
Total Length 0:25 0:50
X:\Bubble_Ghost_(Game_Boy)>
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
ZLib Version: 1.2.5
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
Also known as nineko.
- ValleyBell Offline
- Posts: 4783
- Joined: 2011-12-01, 20:20:07
- Location: Germany
Oops.. looks like my build of zlib1.dll was invalid. I built a LIB and a DLL and used a LIB a lot. But it seems that I forgot to test the DLL.
But:
But:
andTom wrote:ZLib Version: 1.2.3
I guess this makes it all obvious. Please make sure that zlib1.dll isn't older than 19 July 2010.http://zlib.net/ wrote:Version 1.2.5 fixes bugs in gzseek() and gzeof() that were present in version 1.2.4 (March 2010). All users are encouraged to upgrade immediately.
Actually, from my laptop...
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
ZLib Version: 1.2.3
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
Track 0, Data Ofs 0xC0, Version 161
Samples Total: 470603, Samples Loop: 306
GD3 Offset: 0x199E, EOF Offset: 0x1A54
01 Title Screen.vgz 470603 468563 0:11 0:11
Read Line: 02 Main BGM.vgz
Full File Path: 02 Main BGM.vgz
Track 1, Data Ofs 0xC0, Version 161
Samples Total: 3748694, Samples Loop: 4007
GD3 Offset: 0xF366, EOF Offset: 0xF414
02 Main BGM.vgz 3748694 3373644 1:25 1:16
Read Line: 03 Ending.vgz
Full File Path: 03 Ending.vgz
Track 2, Data Ofs 0xC0, Version 161
Samples Total: 652260, Samples Loop: 568
GD3 Offset: 0x2D3D, EOF Offset: 0x2DE7
03 Ending.vgz 652260 632559 0:15 0:14
Total Length 4871557 9346323 1:50 3:32
Song list: Total Loop
01 Title Screen 0:11 0:11
02 Main BGM 1:25 1:16
03 Ending 0:15 0:14
Total Length 1:50 3:32
X:\Bubble_Ghost_(Game_Boy)>
Also known as nineko.
Ok so, I downloaded zlib 1.2.5 from this website, renamed it to zlib1.dll, placed it in the folder, and...(crash)
So, I decided to run a full hard drive search for "zlib1.dll" on my computer, and I found 6 copies of it: they all claim to be 1.2.3, but 5 of them are 59kB big, and the other one is 74kB. Apparently, the 74kB version doesn't work (produces the wrong output), and the 59kB version works fine even on my main computer:This still doesn't explain why it works without a playlist and it doesn't work with one, but I can live with it, I suppose. I don't why there is a 74kB version of zlib1 1.2.3 which doesn't work, and I don't know why it took priority over the other ones on my computer even though it's not in system32, but I can live with this too, I suppose. I copied one of the 59kB versions to system32, and everything works fine now. Well, good to know it.
By the way, I highly suggest you to split the relevant posts to a separate "problems with zlib" topic, to avoid cluttering up this one which is mainly meant for updates and releases. In my opinion
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
ZLib Version: 1.2.5
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
So, I decided to run a full hard drive search for "zlib1.dll" on my computer, and I found 6 copies of it: they all claim to be 1.2.3, but 5 of them are 59kB big, and the other one is 74kB. Apparently, the 74kB version doesn't work (produces the wrong output), and the 59kB version works fine even on my main computer:
Code: Select all
X:\Bubble_Ghost_(Game_Boy)>vgm_stat_d.exe "Bubble Ghost.m3u"
VGM Statistics
--------------
ZLib Version: 1.2.3
File Path or PlayList: Bubble Ghost.m3u
Base Path:
Sample Time
File Title Total Loop Total Loop
Read Line: 01 Title Screen.vgz
Full File Path: 01 Title Screen.vgz
Track 0, Data Ofs 0xC0, Version 161
Samples Total: 470603, Samples Loop: 306
GD3 Offset: 0x199E, EOF Offset: 0x1A54
01 Title Screen.vgz 470603 468563 0:11 0:11
Read Line: 02 Main BGM.vgz
Full File Path: 02 Main BGM.vgz
Track 1, Data Ofs 0xC0, Version 161
Samples Total: 3748694, Samples Loop: 4007
GD3 Offset: 0xF366, EOF Offset: 0xF414
02 Main BGM.vgz 3748694 3373644 1:25 1:16
Read Line: 03 Ending.vgz
Full File Path: 03 Ending.vgz
Track 2, Data Ofs 0xC0, Version 161
Samples Total: 652260, Samples Loop: 568
GD3 Offset: 0x2D3D, EOF Offset: 0x2DE7
03 Ending.vgz 652260 632559 0:15 0:14
Total Length 4871557 9346323 1:50 3:32
Song list: Total Loop
01 Title Screen 0:11 0:11
02 Main BGM 1:25 1:16
03 Ending 0:15 0:14
Total Length 1:50 3:32
X:\Bubble_Ghost_(Game_Boy)>
By the way, I highly suggest you to split the relevant posts to a separate "problems with zlib" topic, to avoid cluttering up this one which is mainly meant for updates and releases. In my opinion
Also known as nineko.