vgmrips

The forum about vgm files
It is currently 2020-04-05, 5:39:38

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 2018-08-30, 23:38:23 
Offline

Joined: 2015-12-08, 3:01:17
Posts: 15
Once again, I'm here to report some issues with GEMS2MID and GEMSPlay and a request to get them fixed. I apologize for doing this repeatedly in the past, but this might be the last time.
While I have found that both GEMSPlay and the latest GEMS2MID for the most part work perfectly, I've managed to find two (just two) games that are problematic in both of these programs, and only with specific tracks. These few tracks sound so "messed up" that they hardly sound anything like the actual music in-game. What I find odd is that most of these don't show "Invalid command" like it usually does with incorrectly ripped music.

The two ROMs of the games that are problematic are as follows:

WWF Super Wrestlemania (W) [!] = track 21, which seems to be the title theme (it does sound a little bit like the actual music). Since I looked through the ROM and I could only find one bank of sequence data, I am pretty sure that this is the music I was looking for. For reference, here is a recording of what the music should sound like:
https://drive.google.com/open?id=1fw2PT ... WWlJa2Ekvy

Great Waldo Search, The (U) [!] = tracks 02, 03, and 05 (the last of these actually does report "Invalid command 127 found on Channel 1!" multiple times. Trying to convert the sequence data to MIDI with GEMS2MID crashes the program at track 02.)


I am very confused about why these two games have problems in the tools in both of these tools, considering the rest of the songs work fine. I also believe that the cause of the issues in both games are related. Something I did notice about both these two games is that they seem to be using an early version of the driver, so it may be a problem with how the older version of the driver works compared to the newer ones.

I have attached the extracted data from both ROMs to this post. Hopefully these issues can be fixed.


Attachments:
My GEMS Rips Problematic.7z [133 KiB]
Downloaded 90 times
Top
 Profile  
 
 Post subject:
PostPosted: 2018-09-17, 22:26:41 

Staff Staff
Programmers Programmers
Musicians Musicians
Contributors Contributors
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2011-12-01, 20:20:07
Posts: 3210
Location: Germany
Sorry for the late response. I haven't forgotten about it, but I didn't have time to investigate it yet.


Top
 Profile  
 
 Post subject:
PostPosted: 2019-06-16, 19:00:21 

Staff Staff
Programmers Programmers
Musicians Musicians
Contributors Contributors
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2011-12-01, 20:20:07
Posts: 3210
Location: Germany
Okay, I did forget about it ... until just now.

Great Waldo Search didn't play properly in GemsPlay, because I had a typo in the code that handles the "goto" sequence command. (Apparently I fixed that in 2017 in the source code, but I didn't release the fixed version.)
And DAC sounds were missing due to another typo. (I fixed that just now.)
You can download an updated version here: GEMSPlay 2019-06 (fixed)

WWF Super Wrestlemania was broken due to the same bug.

The 2017 version of gems2mid seems to convert data from those games properly. (The one I linked in this post)

EDIT: If you wonder what's weird about the WWF Super Wrestlemania title song: You need to combine the MIDIs of song 21, 22 and 23. Right at the beginning, song 21 asks the sound driver to play sequences 22 and 23 as well. So they play all simultaneously.
X-Men 2 does this as well and takes it to a totally new level.


Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-25, 17:30:31 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
is any way to fix modulation playing for GEMSPlay? by theory modulation bank have this structure:
offset to first modulation (2bytes)
offset to second...
offset to third...
etc
modulation 1: start pitch 2bytes, pitch value 2bytes, counter 1byte. repeat pitch and counter until triple 0 values
modulation 2...
modulation 3...

but this GEMSPlayers play something another thing.


another problem with driver it self - modulation buffer is not rewriteble. it have... i dont remember sure - 128 bytes per 4 "at once" modulations. per 32 bytes per each. it means modulations is need to be shorter, than 9 instructions. 32 bytes - 2 for start pitch, 9*3 = 27 for pitch and counter, and last 3 bytes per 00 00 00 - for end envelope. when modulation is bigger - it is a little hung. but not very critical. so when modulation is starts - it write into that 32b modulation info and thats all. no any rewrite, when poiter comes to last bytes and no reset pointer to begin and no rewrite all data, that is over first 32bytes inside that modulation. i mean like samples buffer work - when it comes to finish - it rewrite buffer to new data, that left to play. modulation is cant do this. or it is for 2.8 version. maybe old one can play it, becase Dune have at once 20 instructions modulation. probably it can be just encrease buffer size of driver, or decrease 4 modulation at once to 2 for example, but at twice bigger. but it is not main problem. main is - GEMSPlay not plays modulations :) i mean correct play.

where can be find that problem in a code? and can it be fixed?


Attachments:
File comment: problem at begining playing
gemsplay envelope bug demo.zip [64.25 KiB]
Downloaded 3 times
Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-25, 17:32:31 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
and second item: have GEMSPlay some switcher to PAL or NTSC? or it always play with... with wich type it plays?


Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-26, 4:23:15 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
can it be just small problem with a pointer? i mean GEMSPlay read not envelope file as envelope, but by some mistake - read patches file or sequnce file?

and how accurate GEMSPlay plays ch3mode cases? when i test sonic blast sound from Dune - it sounds a little different.


Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-28, 20:48:46 

Staff Staff
Programmers Programmers
Musicians Musicians
Contributors Contributors
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2011-12-01, 20:20:07
Posts: 3210
Location: Germany
As it turns out, there is indeed a bug with modulation in GEMSPlay.
It doesn't reset the modulation when starting a new note due to a typo. (I was checking the wrong bit.)

Here is a .diff for the source code that fixes the bug. (It's in the function VTANDET.)
Code:
--- GemsPlay_2019-06-16.c   2019-06-16 17:35:28.000000000 +0200
+++ GemsPlay.c   2020-03-28 19:37:16.000000000 +0100
@@ -2908,7 +2908,7 @@
    
    DACxME();
    
-   if (ChnCCB[CCBFLAGS] & 0x20)   // envelope retrigger on?
+   if (ChnCCB[CCBFLAGS] & 0x40)   // envelope retrigger on? [BIT #6]
    {
       // yes - trigger the envelope
       TRIGENV(ChnCCB, noteon.ch, ChnCCB[CCBENV]);

After the fix, it plays the same as the ROM.

Modulation data is fixed to 32 bytes by the driver. This is the case for GEMS v2.0, v2.5 and v2.8.
I don't have a rip of Dune's data, so I didn't check the game for differences. I doubt that they changed the modulation size though.

Regarding PAL/NTSC: I'm afraid GEMSPlay is hardcoded to NTSC timings. There is no key or option to switch PAL mode.

The FM3 multi-frequency mode should be emulated accurately. It might sound slightly different with sharp/noisy tones due to the emulation core settings though. But there should be no major differences.


Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-29, 22:53:45 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
thanks. another question - it can show length of song? i am understand, if it set some loop flag to 127 value it is infinity, but maybe it can be passible to get length value for non 127 loops songs?


Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-30, 0:31:03 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
i have problem again :( GEMSPlay is going to infinity loops at begining of track. it is song problem? or player? because rom plays fine with emulator. i am attach unpacked song, GEMS banks and rom for emulator playing.

it can be wrong work loop flag for sample?
LOOP =$0FEF


Attachments:
Nightmare Circus infinity loop.zip [117.32 KiB]
Downloaded 3 times
Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-31, 0:08:34 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
as i can see - it is sample flag problem. sample_5D.sfx have FLAGS =$75. i am still didnt know sure what value - what means... (i mean first part - 7. second is frequency - that is i know) i know this valye is set some 4 bits, some 8 bits... some with 0 - 255 byte's values, some -127 to +127 values... but this game have $75 and another is $65... i am left only one track and left only one sample - and when change $75 to $45 - all plays fine. probably. why they set $75 value? and why GEMS rom plays fine, but GEMSPlay is not?


Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-31, 6:10:29 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
my comrade says - probably it is this place:
Code:
SmplPtr += SmplLeft;         // SAMPLEPTR <- SAMPLEPTR + 128

maybe it need to be changed to this?
Code:
SAMPLECTR += SmplLeft; or SAMPLECTR += 128; ???


Top
 Profile  
 
 Post subject:
PostPosted: 2020-03-31, 6:29:11 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
i am a little cut song, and it start directly from that sample. rom file for emulator launch here too. modifed exe file too, but probably we do something wrong :) it plays not correct.


Attachments:
forum.zip [243.79 KiB]
Downloaded 3 times
Top
 Profile  
 
 Post subject:
PostPosted: 2020-04-01, 20:18:11 
Offline

Joined: 2015-08-08, 13:56:52
Posts: 61
is any "ticket registered"? can i hope any reactions to find how to fix that problem?


Top
 Profile  
 
 Post subject:
PostPosted: 2020-04-01, 21:33:19 

Contributors Contributors
Staff Staff
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2013-07-17, 23:32:39
Posts: 410
You're probably not going to get help faster by constantly bumping.


Top
 Profile  
 
 Post subject:
PostPosted: 2020-04-01, 22:51:06 

Staff Staff
Programmers Programmers
Musicians Musicians
Contributors Contributors
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2011-12-01, 20:20:07
Posts: 3210
Location: Germany
Indeed.
I look at it when 1) I have enough spare time for it and 2) I have the motivation for it.
Asking for a response significantly lowers the chance for point 2. (i.e. it motivates me to make you wait longer)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
[ Time : 29.528s | 20 Queries | GZIP : On ]