Skip to content

GEMS Driver Discussion

Technical discussion which is not directly related to VGM files. Talk about Hardware and Software.

Moderator: Staff

GEMS Driver Discussion

Post by JeffCharizardFlame »

Now, I know that I've only been on here a few days, but I just thought I'd share some info on the progress ValleyBell and I have made with getting data from various GEMS driver games. Over the past day or so, ValleyBell was able to get the Bonkers and Pink Goes to Hollywood GEMS data, and I supplemented that with a multitude of rips, the amount being so large I've opted not to post what games I went through via a list and rather just post the links to the archives of the new dumps ValleyBell and I have made. These dumps can be used in GEMSPlay and GEMS2MID. Note, however, that in my dumps, some of the games only extracted the drivers, and other games may have garbage data still lingering inside. ValleyBell has taken to fixing that, but I just thought I'd post what we've done so far.

http://vgmrips.net/misc/GEMS_NewDumps.7z
https://drive.google.com/file/d/0B5CSxr ... sp=sharing

Post by vampirefrog »

I was trying to rip A Dinosaur's Tale, but the instruments have some sort of decaying going on, the more the song plays, the worse the sound gets. Can you take a look at that one as well?

Post by JeffCharizardFlame »

I'm not sure if that'd be because of the sound driver or not, so I doubt I'd be able to do anything with it. Perhaps you could ask ValleyBell? I only extracted the data from the games in my archive (the google drive link) using GemsScan and gave ValleyBell the pointers in the text file included. I was able to extract Normy's Beach Babe-O-Rama, but I'm going to wait on releasing that until we get more done.
  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

JeffCharizardFlame, can you give a little consultation about this GEMS?

according r57shell instrument for gems have this structure:
|??????tt| - type
|????ovvv| - LFO on, LFO value (register 22 LFO bits)
|mm??????| - Channel 3 mode (register 27 channel 3 bits)
|??fffaaa| - Feedback, Algorithm (raw register B0)
|lraa?fff| - Left/Right, AMS, FMS (raw register B4)
4 operators: (4 times) in order 1,3,2,4
|?dddmmmm| - Detune, Multiply (raw register 30)
|?ttttttt| - TLevel (raw register 40)
|rr?aaaaa| - Rate Scale, Attack (raw register 50)
|a??ddddd| - AM, Decay (raw register 60)
|???sssss| - Sustain (raw register 70)
|ssssrrrr| - Sustain Level, Release (raw register 80)

|??ffffffffffffff| - 14-bit frequency channel 3 mode operator 4 (A6, A2)
|??ffffffffffffff| - 14-bit frequency channel 3 mode operator 3 (AC, A8)
|??ffffffffffffff| - 14-bit frequency channel 3 mode operator 1 (AD, A9)
|??ffffffffffffff| - 14-bit frequency channel 3 mode operator 2 (AE, AA)

|????kkkk| - Operator On ("Key") - bit for each operator in 4,3,2,1 order
|????????|

i am make a bold that parametres, what can be found in VGM Music Maker for instrument. then i try to convert VGM instrument to GEMS - where to get:
type
LFO on, LFO value
Channel 3 mode
Left/Right - i think i am understand it - used for stereo effect. one chanal can play one, second can play other.
14-bit frequency channel 3 mode operator 4
Operator On ("Key")

where to get this? i am already convert this instrument, but sounds in a game and sound in instrument tab in VGM MM is very difference. first time i make as r57shell says: 4 operators: (4 times) in order 1,3,2,4 - but when i get instruments from Dunes VGM files and compare them - this path is wrong :) not 1,3,2,4 - but 1,2,3,4. but anyway sounds is a little difference. so i think probably this empty parametres is important too for sound. so where to get this? i have a dream, where my instruments sounds in a game same, as midi sounds on PC :)
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Actually you can leave most of those values not present in VGM Music Maker at 0. But aren't important for most instruments.

The LFO is global to the whole FM chip and controls the vibrato speed. I'd either set it to the same value for all instruments or leave it at 0 (off).
Channel 3 mode register/frequencies - leave at 0. This is pretty complicated to use, so leave it at 0. That's the default behaviour.
Operator On - set all of the k-bits to 1. (final value should be 0F) You usually want all 4 operators to be active and this is what >90% of the games on the MD do, too.

Operator order: There is some confusion in general regarding operator order. This is due to the register order for operator 1, 2, 3, 4 being x0, x8, x4, xC.
If you find an order to work properly, just keep it that way.
  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

two more question:
what format of audio must be used with this GEMS? i am use ACM Waveform 11 025 kGz; 8 bit; Mono 10 kb/s - it is work, but quality is very ugly. if it is man vioce - it is ok, but woman... or if you want make percussian sample - it eat high equalizer.

second one:
how system is used channels? one note per channel (6 sounds per one time), or one instrument per channel (playing accords eat one channel, not 2-3 channels as one note per channel)?
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

The DAC sample rate is between 5 327 Hz and 10 653 Hz. (The exact formula is 7670454 / (144*x) where x can be 5..10.)

Channels: GEMS is very MIDI-like, so unlike the real hardware it supports chords and polyphony on a single channel.
In total it can play 6xFM at the same time (or 5xFM + 1xDAC) plus 3 PSG tones plus 1x PSG noise.
If you violate one of those limits, notes will get cut.

(Usually you have 1 note per channel, but GEMS dynamically distributes the notes over all channels. With limitations of course - i.e. FM instruments will use FM channels only and PSG notes will only play on PSG channels.)
  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

it will be some GEMSscan update? for example Aero Acrobat 1 and 2 can find only driver part.

and can GEMSscan get second banks too? from that archive for example:
Garfield - Caught in the Act (UE)
Driver 00585A (GEMS 2.6?)
Instruments #1 03C0BE
Envelopes #1 03D1B9
Sequences #1 03D490
Samples #1 0453A7

Instruments #2 085022
Envelopes #2 08623D
Sequences #2 086403
Samples #2 0453A7
Note: GemsScan will find only the first set.
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Nope, there won't be an update too soon. I'm doing SMPS research again and my small amount of spare time I spend doing that.

Also, finding multiple banks is incredibly difficult because the way those are done depends on how the programmer felt.
When finding them manually I often go to the end of the data that was automatically found in the ROM and look what follows. And if it looks like more music data, I do a backwards-search for the pointer.
And checking for something to "look like" something else is incredibly difficult to program.
  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

http://elektropage.ru/forum/7-68-3#2624 many games GEMS adresses under spoiler, that GEMSScan cant detect. but anyway some games probably have 2 banks, becouse not all samples is unpack. WWF Arcade for example - no Hitman's song and no samples with names of fighters. but physicaly this samples is lay in samples file, but sequence probably lays in second bank. same with Zero Tolerance - it unpack only 8 tracks - songs, without sfx. but file of samples is have woman's voises and some shoots sounds too.
Post Reply