Sonic and Sega Retro Message Board: Valley Bell's SMPS Research - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 5 Pages +
  • ◄ First
  • 3
  • 4
  • 5
    Locked
    Locked Forum

Valley Bell's SMPS Research includes lots of rips, disassemblies and hacking information

#61 User is offline ValleyBell 

Posted 04 August 2015 - 01:43 AM

  • Posts: 228
  • Joined: 08-September 10
  • Gender:Male
  • Project:researching SMPS sound drivers
  • Wiki edits:10
As the readme says, you need to press 'V' to turn VGM logging on/off. It doesn't start logging immediately though, but it begins when you play the next song.
Each VGM will be named after the SMPS file that is logged.

#62 User is offline Herm the Germ 

Posted 06 August 2015 - 12:47 PM

  • Hmm, not bad. Well done, doctor!
  • Posts: 1471
  • Joined: 22-April 09
  • Gender:Male
  • Location:Dresden, Saxony, Germany
  • Project:MIDI-to-SMPS-conversions, mostly. Takin' requests, too.
  • Wiki edits:5
So here's a bit of an odd question - after the advent of Z80-exclusive SMPS being run, was there any reason why some games opted to use 68k SMPS, anyhow? (even some 32X games) Far as my limited understanding goes, leaving the audio processing to the audio co-processor would free up cycles for the main to do other fancy stuff, wouldn't it?

#63 User is offline Clownacy 

Posted 06 August 2015 - 04:52 PM

  • Layin' the Wax and Spinnin' the Sounds
  • Posts: 668
  • Joined: 06-July 13
  • Gender:Male
  • Location:Englandland
Why'd Sonic 1 opt for SMPS 68k? Ristar had a pretty good reason: freeing the Z80 so it can do some advanced DAC work, but Sonic 2 showed that Sonic 1 had nothing to lose but DAC playback quality, which it didn't seem to prioritise in the first place.
This post has been edited by Clownacy: 06 August 2015 - 04:56 PM

#64 User is offline ValleyBell 

Posted 08 August 2015 - 02:48 AM

  • Posts: 228
  • Joined: 08-September 10
  • Gender:Male
  • Project:researching SMPS sound drivers
  • Wiki edits:10
Back when Sonic 1 was developed, SMPS 68k was the only way to have SMPS with DAC drums.
Sonic 1 was released 1991-06-23, the first SMPS Z80 game with support for DAC drums was Alien Storm, released 1991-06-28. (Though "Mercs" actually looks like it uses an earlier version of SMPS Z80 DAC code-wise.)

For the later games, I'd say SMPS 68k vs. Z80 is a pure design choice.
SMPS 68k has the advantage of cleaner DAC samples though. Most SMPS 68k drivers are programmed so that they have minimal Z80 stops. (Stopping the Z80 during DMA operations makes up for it though, I guess.)
The DAC driver that is used with most SMPS 68k games also allows you to have tons of samples using a few simple tricks. Games like Crayon Shin-Chan used those a lot. (97 voice samples, about 700 KB, and they sound pretty clean during the cutscenes)

#65 User is offline ICEknight 

Posted 12 July 2016 - 01:56 PM

  • Posts: 10553
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
I have a few questions regarding the current SMPS releases and SMPSPlay:

-Any clues on why some of the ESWAT music tracks don't make the loop count go up even when they're clearly looping? Do they have a hidden Totaka-ish easter egg play at a certain crazy number of loops or something?
-Why do a few games like Moonwalker not play the digitized samples? Is it just a bug in the current version of SMPSPlay?
-Are there any plans for making any "full" releases with the sound effects included as well?
-Is there a way to prevent the "dumps" folder from being created when SMPSPlay is run?
-The "automatic progressing" option is a pretty neat thing as it sometimes seems to create a "Sonic-esque" seamless medley of songs. Would it be possible to have an option for automatically activating it from the ini file?
-Also, having an ini option (and in-program key toggle) for fading out right when the "automatic progressing" kicks in would be a cool addition for "regular" listenings, I guess. Okay, that wasn't a question. =|
-I was wondering, since the SGC music dumps are also direct rips, would it be technically possible to convert them to a format that could be played in SMPSPlay and vice versa?

I think Kevtris said he ripped the music in all of those 300+ SMS/GG/Coleco games automatically so he may have used a similar tool to yours, perhaps you guys could join forces on this or something. =P
This post has been edited by ICEknight: 12 July 2016 - 04:10 PM

#66 User is offline ValleyBell 

Posted 13 July 2016 - 12:01 PM

  • Posts: 228
  • Joined: 08-September 10
  • Gender:Male
  • Project:researching SMPS sound drivers
  • Wiki edits:10

View PostICEknight, on 12 July 2016 - 01:56 PM, said:

-Any clues on why some of the ESWAT music tracks don't make the loop count go up even when they're clearly looping? Do they have a hidden Totaka-ish easter egg play at a certain crazy number of loops or something?
I think the drum track has a weird loop that doesn't match the other tracks. This is the case for BGM2.
Because there is no explicit "loop start" flag, the loop detection can sometimes go wrong, especially when the F6 jump ends up at a byte that's also used by F7 loops.

View PostICEknight, on 12 July 2016 - 01:56 PM, said:

-Why do a few games like Moonwalker not play the digitized samples? Is it just a bug in the current version of SMPSPlay?
That's because due to the way it works in SMPS 68k. The SMPS file adds a certain Sound ID to the sound queue (indicated by SMPSPlay showing "Queued Sound ID xx on Channel yy at zzzz"). It's done in the same manner as the game requests the sound driver to play music and sound effects.
In order to make them work, I'd need to create a Sound ID -> song/SFX/DAC map.

View PostICEknight, on 12 July 2016 - 01:56 PM, said:

-Are there any plans for making any "full" releases with the sound effects included as well?
No, I don't have plans to include SFX except for cases where I get requests for them. SFX pointers are included, so ripping the sound effects should be easy.
Also I still haven't added an SFX-mode to SMPSPlay v2.

View PostICEknight, on 12 July 2016 - 01:56 PM, said:

-Is there a way to prevent the "dumps" folder from being created when SMPSPlay is run?
No, there isn't at the moment. I maybe should create it when dumping the first VGM/WAV.

View PostICEknight, on 12 July 2016 - 01:56 PM, said:

-The "automatic progressing" option is a pretty neat thing as it sometimes seems to create a "Sonic-esque" seamless medley of songs. Would it be possible to have an option for automatically activating it from the ini file?
I'll add that.

View PostICEknight, on 12 July 2016 - 01:56 PM, said:

-Also, having an ini option (and in-program key toggle) for fading out right when the "automatic progressing" kicks in would be a cool addition for "regular" listenings, I guess. Okay, that wasn't a question. =|
I might add that.

View PostICEknight, on 12 July 2016 - 01:56 PM, said:

-I was wondering, since the SGC music dumps are also direct rips, would it be technically possible to convert them to a format that could be played in SMPSPlay and vice versa?

I think Kevtris said he ripped the music in all of those 300+ SMS/GG/Coleco games automatically so he may have used a similar tool to yours, perhaps you guys could join forces on this or something. =P
Ripping stuff for SGC is easier than for SMPSPlay, because you just need to identify the 16 KB ROM bank that contains the SMPS driver and all its data and copy that into the SGC. (And you need to find the "UpdateSound" routine, but that should be easy to find.)
SMPSPlay does high level emulation, so I need to analyze the sound driver (the devs loved to change coordination flags) and extract the songs into separate files.

#67 User is offline PsychoMMS 

Posted 17 December 2016 - 07:24 PM

  • Posts: 2
  • Joined: 25-August 16
  • Gender:Male
  • Location:Argentina
  • Project:Sonic 1 Minus and Sonic 1 Plasmatic Emperors
How to use a smpsconv exe?i don't understand why close the exe.
Can you help me how to configure the exe aplication?
And i got a question.Did you know about zyrinx sound driver and gems sound driver?
Thanks for reading and i wait your answer,thanks.
PsychoMMS

#68 User is offline Herm the Germ 

Posted 18 December 2016 - 07:55 AM

  • Hmm, not bad. Well done, doctor!
  • Posts: 1471
  • Joined: 22-April 09
  • Gender:Male
  • Location:Dresden, Saxony, Germany
  • Project:MIDI-to-SMPS-conversions, mostly. Takin' requests, too.
  • Wiki edits:5
Perhaps this randomly grabbed tutorial on the basics of this type of computer usage may be of assistance to you, PsychoMMS.

#69 User is offline PsychoMMS 

Posted 18 December 2016 - 09:26 AM

  • Posts: 2
  • Joined: 25-August 16
  • Gender:Male
  • Location:Argentina
  • Project:Sonic 1 Minus and Sonic 1 Plasmatic Emperors
All right,I'm newbie on the forum,I'm working in a great project in smps music hacking anyway i will try read the link that you left me.
Good Morning and thanks.

#70 User is offline evilhamwizard 

Posted 30 October 2017 - 07:07 PM

  • Posts: 1265
  • Joined: 16-June 04
  • Gender:Male
  • Wiki edits:109
Hey ValleyBell, quick question.

I looked at the early Revenge of Shinobi prototype and noticed that nothing seems to use PSG. Can the sound driver actually interpret the byte code in the sequence data to play it back?

The reason I ask is that despite not using it at all, there are some bytes that go untouched during playback but it seems to be related to the PSG channel. For example:

ROM:00075252                 dc.b       $F1,      $34,      $15,      $15; 0
ROM:00075252                 dc.b       $15,       $E,      $15,      $15; 4
ROM:00075252                 dc.b       $F3,        8,      $F5,        7; 8
ROM:00075252                 dc.b         0,      $10,      $40,      $90; $C
ROM:00075252                 dc.b       $F6,      $2F,      $30,        6; $10
ROM:00075252                 dc.b         0,      $F5,      $2B,        0; $14
ROM:00075252                 dc.b       $F5,       $F,        0,      $10; $18
ROM:00075252                 dc.b       $40,      $90,      $10,      $40; $1C
ROM:00075252                 dc.b       $90,      $10,      $40,      $10; $20
ROM:00075252                 dc.b       $40,      $A0,      $F6,        2; $24
ROM:00075252                 dc.b         2,       $E,        0,      $F5; $28
ROM:00075252                 dc.b       $10,        0,        8,      $40; $2C
ROM:00075252                 dc.b       $88,        8,      $40,        8; $30
ROM:00075252                 dc.b       $40,      $90,        8,      $40; $34
ROM:00075252                 dc.b         8,      $40,      $F6,        4; $38
ROM:00075252                 dc.b         4,       $F,        0,      $F6; $3C
ROM:00075252                 dc.b         3,        3,      $2A,        0; $40
ROM:00075252                 dc.b         0,      $F0,       $A,      $F1; $44


This seems to be data for "Terrible Beat". If the byte code is similar to the final, I do see PSG loop starts (F5s) and loop ends (F6s).

There's a ton more like this as well, but most of it seems related to the lack of PSG playback...
This post has been edited by evilhamwizard: 30 October 2017 - 07:07 PM

#71 User is offline Clownacy 

Posted 01 November 2017 - 07:49 PM

  • Layin' the Wax and Spinnin' the Sounds
  • Posts: 668
  • Joined: 06-July 13
  • Gender:Male
  • Location:Englandland
Speaking a little early, since this is my first time digging into this driver (it's a weird one, looks like SMPS 68k Type 1a, but modified), but it seems like the PSG code, while still there, is vestigial. Notably, while the FM and drum code specify that the coordination flags start at $F0 (which is correct), the PSG code still uses the original SMPS standard of $E0, so theoretically PSG coord. flag support is completely broken. The PSG's volume envelope list is also completely empty.

...And I just noticed, in the core PSG bytecode parser, what should be a simple call to TickMultipl_PSG instead branches straight into the middle of the FM bytecode parser (?!), so attempting to play anything on the PSG should make the driver blow up.

Looking at them side by side, this actually looks like a bizarre missing link between SMPS 68k 1a and PreSMPS. I guess I shouldn't be surprised PSG isn't working; the thing's a mess. Even now, I'm noticing dead branches that used to be part of the now-removed pitch sliding mode. DAC support ain't great either: samples seem to be played via the first coord flag rather than by notes.
This post has been edited by Clownacy: 03 November 2017 - 08:02 AM

#72 User is offline ValleyBell 

Posted 05 November 2017 - 03:43 AM

  • Posts: 228
  • Joined: 08-September 10
  • Gender:Male
  • Project:researching SMPS sound drivers
  • Wiki edits:10
I haven't looked at the prototype, but the final version of Revenge of Shinobi was intersting, as it isn't just somewhere between preSMPS and early SMPS 68k, but it was also modified to process Yuzo Koshiro's Mucom88 format (except with SMPS 68k-style header).
That it plays Mucom also explains why the DAC stuff works the way it does. I assume it originates from the way the YM2608's ADPCM B channel is used - you set the sample via a command and the note defines the pitch. Streets of Rage (another SMPS 68k driver patched to play Mucom data) also handles DAC samples that way, btw.

It's pretty interesting that at that time it wasn't too uncommon to hack the SMPS driver to play other formats. The games I know about are: Revenge of Shinobi, Streets of Rage, A Ressha de Ikou MD (uses SoR sound driver), Strider and Ghouls 'n' Ghosts.

#73 User is offline Kurausukun 

Posted 09 November 2017 - 03:01 AM

  • Posts: 10
  • Joined: 09-July 16
  • Gender:Male
Is it possible to use the SMPS Research Pack/SMPSPlay to edit the existing files in the pack? Specifically, I want to edit the file for S&K Sky Sanctuary very slightly--all I want is for the last note before the loop to continue on for a while instead of looping back--would this be feasible? I took a brief look at the SMPS format/commands, but to be honest I had a hard time matching the commands I saw on the page to the hex I was looking at from the .s3k file in the pack. Am I going about this wrong, or would it really be not trivial?

#74 User is online MainMemory 

Posted 09 November 2017 - 09:02 AM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4001
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
It might be easier to edit the song in ASM format, although if you want to use it with SMPSPlay afterward, you'd have to assemble the song to binary format.

#75 User is offline Kurausukun 

Posted 09 November 2017 - 05:36 PM

  • Posts: 10
  • Joined: 09-July 16
  • Gender:Male
Thanks for the suggestion, that definitely looks a lot more friendly than working with hex. Two questions:

1. Is there a guide on how to convert the ASM back to binary so it's usable? Or just a way of playing the audio; I don't actually need this to work ingame, I just need to get an audio dump of it.

2. Is there a reference for SMPS ASM? I don't know what all of the commands mean; some of them seem obvious enough, but I'm not sure what all the hex values are for or what dc.b means for example. It would also be easier to test and find out myself if there were some way to reassemble them to binary.

  • 5 Pages +
  • ◄ First
  • 3
  • 4
  • 5
    Locked
    Locked Forum

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users