News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Secret of Mana, Turbo - Beta 201019  (Read 355648 times)

Queue

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1580 on: October 12, 2020, 08:23:32 pm »
Trying to track down which versions of Snes9x have sound problems when FastROM is enabled resulted in... well, there are way too many versions with variations of the problem (it's not always the same! sometimes the audio is more ear-destroying than others). I tested versions ranging from 1.37 to 1.51, and they all had problems, except the Geiger's debugging build of 1.51 (and I don't actually know why it doesn't have the problem).

Versions 1.52 and newer don't have the problem, likely because the sound engine was replaced in 1.52.

I'll update the Technical\Enable_FastROM description to mention the issue with Snes9x 1.51 and older (rather than the vague "Warning: Causes issues on buggy old versions of Snes9x." I have now), but not sure how to make the info reasonable to find. Obviously I don't expect everyone to read all text of every feature description seeing as there are so many.

ManaRedux

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Secret of Mana Redux
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1581 on: October 12, 2020, 09:23:29 pm »
Trying to track down which versions of Snes9x have sound problems when FastROM is enabled resulted in... well, there are way too many versions with variations of the problem (it's not always the same! sometimes the audio is more ear-destroying than others). I tested versions ranging from 1.37 to 1.51, and they all had problems, except the Geiger's debugging build of 1.51 (and I don't actually know why it doesn't have the problem).

Versions 1.52 and newer don't have the problem, likely because the sound engine was replaced in 1.52.

I'll update the Technical\Enable_FastROM description to mention the issue with Snes9x 1.51 and older (rather than the vague "Warning: Causes issues on buggy old versions of Snes9x." I have now), but not sure how to make the info reasonable to find. Obviously I don't expect everyone to read all text of every feature description seeing as there are so many.

I hope I'm not hijacking your thread, but when I played the SAP today on Snes9X, I had some annoying audio clicks/drop outs coming in and out that were not there on previous releases.  I switches over to bsnes.  The problem there is that when I hit Pause, I can't unpause.  I think that's a problem you had on Turbo before?

Queue

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1582 on: October 12, 2020, 09:58:03 pm »
It's no big deal, you could always use the SAP thread as well, but contact me wherever. Here obviously works.

Nothing in SAP would affect audio, period; if you were getting audio pops, my first guess is your computer was chugging more (e.g. too many programs open, blown out RAM, too many possibilities to guess) than the last time you played, and whatever emulator you were on was coping poorly with dropped audio frames.

The pause feature isn't intended to be a permanent fixture of SAP, just to help during development (it lets me safely use save states when repatching and changing the ROM). Regardless, the version of BSNES I have / test on does unpause successfully, so have never narrowed down the issue. I'm pretty sure it unpauses on real hardware, but it's been over a year since I've had any real hardware testing for Turbo. If you can specify exactly which BSNES version you're on and I can reproduce the issue, then I could finally resolve it (probably).

The audio problem brought up for old Snes9x is pretty catastrophic: warbling, static, screeching, sword swings sound like NES, etc.



Grr, if I could detect Snes9x <= 1.51 with no meaningful false positives, I could have the game's code automatically accommodate the issue, but I haven't figured out any reliable detection scheme for that. I found a possible means of detecting Snes9x <= 1.43, but I'd rather it be better than that if I'm going to add this.

If by some crazy chance someone with the niche expertise of emulator detection in ROM code happens to read this and has worked out (or can do so) how to specifically detect Snes9x, I'd love to hear from you.



So some notes in response to myself:
addressbit1.391.421.431.501.511.52
$00213E0x1000000?
$00213F0x200~?~????
$0042110x400/10/10/1???
(? indicates some form of open bus, ~ indicates inverted)

Reading bit 6 (0x40) of $004211 is probably the best option for detecting Snes9x versions from 1.35 through 1.43 (inclusive), which accounts for 1.39 and 1.43, which seem to be the two most common old versions still in regular use (often out of necessity for performance). Due to a Snes9x hack for Super Robot Wars Ex, this bit is 1 during h-blank and 0 otherwise (it should be open bus and in less accurate emulators is always 0). So if open bus has it at 0, but it reads as 1, then we're running in Snes9x 1.35-1.43.

Identifying various versions of Snes9x using reads of $00213E or $00213F is possible but far more complex and far more likely to get false positives.

Arg, ZSNES has the same hack for Super Robot Wars Ex. Hmm...
« Last Edit: October 13, 2020, 10:31:55 pm by Queue »

lightninghunter

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1583 on: October 13, 2020, 02:10:45 pm »
Greetings, I have been following this thread for a while, and have only recently decided to play through this awesome hack for the first time!  I have a question/request, however. I really like the option for a 50/50 chance of MSU files playing, but is there a way I can configure the hack so that only certain tracks are randomized? Basically, some of the in-game tracks I don't mind replacing permanently, like the intro/outro, etc... I am somewhat comfortable hacking the ROM file myself if someone can point me to the right bit of code with a very brief explanation. Thanks!

Queue

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1584 on: October 15, 2020, 05:48:30 am »
The opposite is easy: deleting (or renaming) a PCM file means it'll play the vanilla SPC version 100% of the time.

Unfortunately, setting up what you want would take a fair bit of work. Probably the easiest, hackiest way would be to search "SoM Turbo.zps" (open it with a good text editor) for "IF _Random_MSU_or_SPC"; 5 lines below that is "JSR   $C03872   ' RNG"

Just before that line, you could put something like:
Code: [Select]
LDA RequestedSong :8
CMP #2B
BEQ *TrackFound
CMP #3A
BEQ *TrackFound
' etc.
So it'd look like:
Code: [Select]
IF _Random_MSU_or_SPC
BNE *TrackNotFound
LDA $7E0100 ' NMI
SEC
SBC #40 ' kludge, title screen = RNG unsafe = force MSU
BEQ *TrackFound
LDA RequestedSong :8
CMP #2B ' SONG_In_the_Dead_of_the_Night
BEQ *TrackFound
CMP #3A ' SONG_Now_Flightless_Wings
BEQ *TrackFound
JSR $C03872 ' RNG
AND #01 ' 50%
DEC ' kludge, invert = bias load screen towards MSU
BEQ *TrackFound
*TrackNotFound
ENDIF _Random_MSU_or_SPC
Then save, patch, and test. I think I got the song numbers right for the intro and ending. You'd specify other songs with more CMP / BEQ pairs. This is a terrible way to do it, but I think this is the briefest way to offer something to try. This is completely untested.

lightninghunter

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1585 on: October 15, 2020, 04:03:20 pm »
Ah, I see. I am simply forcing the MSU files of all tracks specified. Simple enough, thank you for the explanation! The only issue I have now is that the SPC files are far louder than the MSU files.  I can use my SD2SNES to increase the DB of the msu files, but I personally always felt the SOM music was FAR too loud and drowns out the action.  Some of the original SPC music actually hurts my ears with headphones, especially the Dwarf village music and the town music, among a few others. Has anyone ever made a patch to balance the SPC music volume? That might be more difficult than it seems if the music is anything like FF6 music (which is the only game I have hacked to date).

Actually, another solution for the volume would be to have the randomizer select between two MSU files, and one of the two could be the default music converted to MSU format (which is probably easier to balance out than hacking the actual SPC music). I could even compile the original soundtrack in MSU format for people who were interested. Is there a way to modify the code so that if the track is not found, it will play 'som_msu1-xx_ALT.pcm' instead?

Edit: Sorry for multiple edits, but I was doing what you suggested above by adding music track exceptions so the MSU file is forced, but there seems to be some strange limit of 19 tracks before the game freezes on the intro.  Any idea why this is?  I pasted the code I have so far so you can test. If I add back in ANY of those tracks(by removing the ' comment), the game will freeze:

Code: [Select]
'// Check if the track is missing
AND MSU_STATUS_TRACK_MISSING
IF MSU_DEBUG
LDA #00
ENDIF
IFNOT _Random_MSU_or_SPC
BEQ *TrackFound
ENDIF _Random_MSU_or_SPC
IF _Random_MSU_or_SPC
BNE *TrackNotFound
LDA $7E0100 ' NMI
SEC
SBC #40 ' kludge, title screen = RNG unsafe = force MSU
BEQ *TrackFound
LDA RequestedSong :8
CMP #00 ' Secret of the Arid Sands
BEQ *TrackFound
CMP #01 ' Flight into the Unknown
BEQ *TrackFound
CMP #02 ' Star of Darkness
BEQ *TrackFound
CMP #03 ' Prophecy
BEQ *TrackFound
CMP #04 ' Danger
BEQ *TrackFound
CMP #05 ' Distant Thunder
BEQ *TrackFound
CMP #06 ' The Wind Nevere Ceases
BEQ *TrackFound
CMP #07 ' Close your Eyelids
BEQ *TrackFound
CMP #08 ' Spirit of the Night
BEQ *TrackFound
CMP #09 ' The Fairy Child
BEQ *TrackFound
CMP #0A ' What the Forest Taught Me
BEQ *TrackFound
CMP #0B ' Eternal Recurrence
BEQ *TrackFound
CMP #0C ' Oracle
BEQ *TrackFound
CMP #0D ' Tell a Strange Tale
BEQ *TrackFound
CMP #0E ' Into the tick of it
BEQ *TrackFound
CMP #0F ' Rose and Ghost
BEQ *TrackFound
'CMP #10 ' Did you See the Sea
'BEQ *TrackFound
'CMP #11 ' The Color of the Summer Sky
'BEQ *TrackFound
'CMP #12 ' Menu music
'BEQ *TrackFound
'CMP #13 ' The Legend
'BEQ *TrackFound
'CMP #14 ' The Orphan of Storm
'BEQ *TrackFound
'CMP #15 ' Eight Ringing Bells
'BEQ *TrackFound
'CMP #16 ' Dancing Beasts
'BEQ *TrackFound
'CMP #17 ' Victory Jingle
'BEQ *TrackFound
'CMP #18 ' Boss Defeated
'BEQ *TrackFound
'CMP #19 ' Cannon Travel Lunch SFX
'BEQ *TrackFound
'CMP #1A ' Cannon Travel SFX
'BEQ *TrackFound
'CMP #1B ' Ceremony
'BEQ *TrackFound
'CMP #1C ' Always Together
'BEQ *TrackFound
'CMP #1D ' A Prayer and a Whisper
'BEQ *TrackFound
'CMP #1E ' New Contient Rises SFX
'BEQ *TrackFound
CMP #2B ' In the Darkness
BEQ *TrackFound
CMP #2C ' Mysterious Moaning
BEQ *TrackFound
CMP #2D ' Angels Fear
BEQ *TrackFound
JSR $C03872 ' RNG
AND #01 ' 50%
DEC ' kludge, invert = bias load screen towards MSU
BEQ *TrackFound
*TrackNotFound
« Last Edit: October 16, 2020, 03:48:19 pm by lightninghunter »

Queue

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1586 on: October 16, 2020, 03:51:52 pm »
A quick note, the code I posted before was flawed. You'd also need to find the line:
*TrackFound
and add an instruction after it:
LDA   #00
(just before the subsequent XBA)

Under normal circumstances, A is already 0 at this point, but adding the code that checks track numbers meant A was still set to the track number instead of 0.

Edit: Just saw your edit. Too much code added to the spot specified means the relative jumps (BEQ, BRA, BNE, etc.) can no longer jump far enough to get over your newly added code. They can only jump over a max of 127 (0x7F) bytes. Including other code already there, there's room for 76 (0x4C) bytes to wedge in new code where you're putting it.
LDA   RequestedSong   :8 = 2 bytes
Each CMP / BEQ pair = 4 bytes
That quickly adds up to > 76 bytes.

Since you have so many you want to filter, a lot of those comparisons can be merged. For example:
You seem to be filtering 0 through F, so those could be changed to:
CMP #10
BCC *TrackFound
Which means compare to #10, and BCC means if less than compared value, jump.



As far as I know, no one has ever messed with SoM's music data. My "Turbo_Song" alternate title screen music is probably the closest, but all that actually is is an unmodified vanilla song with a custom instrument set.

No wait, that's wrong. Mop, who makes the SoM Randomizer (http://secretofmanaancientcave.blogspot.com/) has inserted new songs. As far as I know, SoM's music format is related to but not exactly the same as other Square titles of the era.



Regarding multiple MSU tracks, that was actually something I had considered, but never got around to it because I figured no one would ever use it. The way it'd actually work would be track number + offset, so to have two tracks for track 1, they'd be named:
som_msu1-1.pcm
som_msu1-101.pcm
For track 2:
som_msu1-2.pcm
som_msu1-102.pcm
(etc., or something similar).

However, I don't know when I'd get around to this. It's not super difficult to implement, but I'm stretched thin at the moment.

Also, see the MSU download in the first post of this thread, it has an option for converting the vanilla SoM music that's included with the 2018 remake.



Aside from altering the SPC music data to adjust volume, it would also be possible to adjust music volume in the gave event scripts that cause them to play. If you search the Turbo ZPS file for "\music===" you'll find hundreds of results. Each is followed by 3 bytes, example:
\music=== 2D 8B FF
2D = track number (in this case the Whalesong)
8B = settings regarding echo, fade time, etc.
FF = first F is initial volume before fade, second F is final volume after fade

Most songs have F (max) as their final volume (though there are exceptions), and many have F as their initial volume as well. You could, theoretically, go through and change all song volumes by changing those. I don't advise it though.

A third option would be to change the code that plays music to reduce or cap the volume level. This wouldn't allow differing volume control per song but would be the most practical to implement.



Edit: Hey, your later edit removed the Day_Night_Cycle question, now my response looks like a non sequitur.

Day_Night_Cycle works by timing how long you stay on one screen. If you stay on one screen long enough (roughly 20 seconds: 255 / 12), when you change screens, time will advance by 1 hour. If you change screens sooner than that threshold, the time counter resets, so rapidly changing screens means time won't advance. Other than when sleeping, time only advances by 1 hour when it does. Most game events don't explicitly mess with the time; if time advances it's because the 20 second timer was tripped before a screen change.

There are also time zones, but there's a safety mechanism in place so that if a screen change would cause a time of day change from later to earlier (e.g. morning to night), it won't (time will advance so that it remains morning). Time zones' practical effect is that going east will make time seem to advance faster (fewer consecutive screens at a given time of day) and going west will make time seem slower (more screens of the same time of day). You can witness the time zones clearly when flying (and time doesn't pass when flying).



Upcoming feature, FastROM indicator at the title screen menu.

Typically, it will look like this to indicate it's on as expected (upper right corner, the orange thing):


If FastROM is enabled, but the emulator compatibility detection finds Snes9x 1.36 - 1.43, it will look like this (and sound shouldn't be jacked up):


And just to be thorough, it'll look like this if something went wrong (no one will ever see this unless they do something dumb):
« Last Edit: October 16, 2020, 07:17:19 pm by Queue »

lightninghunter

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1587 on: October 16, 2020, 07:27:51 pm »
Thank you for the quick, detailed response!

Edit: Just saw your edit. Too much code added to the spot specified means the relative jumps (BEQ, BRA, BNE, etc.) can no longer jump far enough to get over your newly added code. They can only jump over a max of 0x7F bytes. Including other code already there, there's room for 76 bytes to wedge in new code where you're putting it.
LDA   RequestedSong   :8 = 2 bytes
Each CMP / BEQ pair = 4 bytes
That quickly adds up to > 76 bytes.

Since you have so many you want to filter, a lot of those comparisons can be merged. For example:
You seem to be filtering 0 through F, so those could be changed to:
CMP #10
BCC *TrackFound
Which means compare to #10, and BCC means if less than compared value, jump.

I see, I will try that out! Is there a way to also filter out a range of tracks?  For example, if I want #11 through #19 filtered but keep track #10?

Quote
Regarding multiple MSU tracks, that was actually something I had considered, but never got around to it because I figured no one would ever use it. The way it'd actually work would be track number + offset, so to have two tracks for track 1, they'd be named:
som_msu1-1.pcm
som_msu1-101.pcm
For track 2:
som_msu1-2.pcm
som_msu1-102.pcm
(etc., or something similar).

However, I don't know when I'd get around to this. It's not super difficult to implement, but I'm stretched thin at the moment.

Also, see the MSU download in the first post of this thread, it has an option for converting the vanilla SoM music that's included with the 2018 remake.

That would be awesome, but I completely understand how much time it takes to do this stuff.  My FF6 hack took forever (and is still not released, as a matter of fact).

Quote
Aside from altering the SPC music data to adjust volume, it would also be possible to adjust music volume in the gave event scripts that cause them to play. If you search the Turbo ZPS file for "\music===" you'll find hundreds of results. Each is followed by 3 bytes, example:
\music=== 2D 8B FF
2D = track number (in this case the Whalesong)
8B = settings regarding echo, fade time, etc.
FF = first F is initial volume before fade, second F is final volume after fade

Most songs have F (max) as their final volume (though there are exceptions), and many have F as their initial volume as well. You could, theoretically, go through and change all song volumes by changing those. I don't advise it though.

Are you advising against this because I would have to modify it again each time you release an update, or is there another possible side effect of doing it this way?

Quote
A third option would be to change the code that plays music to reduce or cap the volume level. This wouldn't allow differing volume control per song but would be the most practical to implement.

I am guessing this is something that would involve a bit more coding on your behalf!

Quote
Edit: Hey, your later edit removed the Day_Night_Cycle question, now my response looks like a non sequitur.

Sorry about that! I had figured it out on my own, and my post was becoming a mess, so I deleted that part.  I was hoping you had not read it yet... Thanks for answering my question anyway!

Edit:  One more quick question. If I combine "Enemy Stat Changes" and "Monster Modifiers", which one takes priority? For example, If I set the modifier to x2 and combine both hacks, will the Terminator have 500HP (the Enemy Stat Change number), 600HP (The default HP x2), or 1,000HP (Enemy Stat HP x2)? I saw this talked about around page 48, but I didn't see a definitive answer on the order/priority of the hacks.  Thanks!
« Last Edit: October 17, 2020, 02:09:30 pm by lightninghunter »

Yos

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1588 on: October 17, 2020, 10:06:39 pm »
Hi

Absolutely love this and so I happy I found when I was just about to start playing it.

Just wondering if anyone has gotten save states to work with a SD2SNES PRO/FXPAK PRO? I have tried unticking fast rom and MSU1 as save states won't work with games that use additional chips.

Thanks for all your hard work!

Queue

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Secret of Mana, Turbo - Beta 201017
« Reply #1589 on: October 17, 2020, 11:12:21 pm »
Version 2020-10-17:
https://filebin.net/7spaiz2xfys6b2i1/SoM_Turbo.201017.zip

Changes:
- Implemented Graphics\Menu_Controller_Icon to fix some sloppy pixels in the controller inverted indicator on the Controller Edit screen
- Implemented Bug_Fixes\Ring_Menu_Loader to fix a rare and harmless (but ugly) graphical corruption bug when opening the ring menu
- Feature addition to Technical\Enable_FastROM to detect Snes9x 1.36 - 1.43 at runtime to not enable FastROM to avoid emulation flaws (Disable_Snes9x_Workaround removes the emulator detection)
- Feature addition to Technical\Enable_FastROM to show a little FastROM status light in the upper right corner of the title screen menu (the screen where you choose New Game / Load Game)
- Removed dialog abort capability from Event1F5 (part of Elinee's concession text) for Text\Abortable_Dialog
- Tiny code correctness improvements to Enable_MSU-1 (and ZSNES_MSU-1)
- Optimized Relocalized's intro text crawl hook method (based on work done for SAP)
- Added symbols for intro text crawl (which mostly coincide with lowercase ascii) and used them where applicable, prep work for SAP
- Documented unused map numbers

Here's a picture of what Bug_Fixes\Ring_Menu_Loader fixes (note the Chocolate and Royal Jam icons):


The improvements to Technical\Enable_FastROM to detect Snes9x are especially for platforms where Snes9x 1.39 or 1.43 are the best (or only) choices for performance reasons: it should allow Enable_FastROM to be left enabled without causing nightmare garbage audio.

I hope to hear from someone who can test on say, PSP, or Raspberry Pi, or something of that nature, where you're stuck with a build based on old Snes9x. I only tested on Windows builds (of Snes9x versions back to 1.37).



lightninghunter, to filter a range, the code could be something like, add a new branch target at the randomizer code (*TrackRandom in the code below), then do track number comparisons low to high (or high to low), to decide based on groups of track numbers:
Code: [Select]
IF _Random_MSU_or_SPC
BNE *TrackNotFound
LDA $7E0100 ' NMI
SEC
SBC #40 ' kludge, title screen = RNG unsafe = force MSU
BEQ *TrackFound
LDA RequestedSong :8
CMP #10
BCC *TrackFound ' < #10 (#00 to #0F)
CMP #11
BCC *TrackRandom ' < #11 (#10)
CMP #1A
BCC *TrackFound ' < #1A (#11 to #19)
*TrackRandom
JSR $C03872 ' RNG
AND #01 ' 50%
DEC ' kludge, invert = bias load screen towards MSU
BEQ *TrackFound
*TrackNotFound
ENDIF _Random_MSU_or_SPC

Quote from: lightninghunter
Are you advising against this because I would have to modify it again each time you release an update, or is there another possible side effect of doing it this way?
It would also affect the volume for MSU tracks because the MSU playing code also uses the event script's music play command volume and crossfade values.

The reason you named is also a fair reason why it wouldn't be a great approach, but an adequate text search and replace would make doing so fairly trivial.

Quote from: lightninghunter
If I combine "Enemy Stat Changes" and "Monster Modifiers"...
1000 HP
Balance\Enemy_Stat_Changes sets explicit values (modifies the enemy stat table).
Balance\Monster_Stat_Modifiers applies multipliers at runtime (modifies the code that loads data from the enemy stat table).

The only exception is settings 0 or 8 for Monster_Stat_Modifiers which will lock the specified enemy stat to minimum or maximum (i.e. 1 or 65535 for HP, etc.) and ignore the data in the enemy stat table.
« Last Edit: October 17, 2020, 11:24:36 pm by Queue »

Pethronos

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Secret of Mana, Turbo - Beta 201017
« Reply #1590 on: October 18, 2020, 02:02:17 pm »
Just tested on PSP. Black light at upper right corner of the Load Game menu screen and no sign of garbage audio  :thumbsup:

lightninghunter

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Secret of Mana, Turbo - Beta 201017
« Reply #1591 on: October 18, 2020, 05:25:37 pm »
Thanks for all your help, Queue! I got the music just the way I want it for the time being (until you eventually add support for more than one MSU file, then it opens another can of worms; lol).

Everything seems good so far on my Sd2snes (real hardware). The new Fastrom light is orange, and no issues yet that I can tell (I believe Sd2snes supports Fastrom as of last year). There are a few other issues I wanted to point out, however:

-The new "Ring Menu Loader" fix crashes the game when you go to the weapon level stats. See my settings below for the combination I'm using for this to happen.

-There is strange behavior when I launch a barrage of attacks on a monster with turbo mode DISABLED. The monster appears to be getting hit far more often than it should, which I assume is not intended behavior with turbo mode off. I recorded a video on SNESGT for you to see, although the issue also happens on my real hardware and SNES9x:
https://www.youtube.com/watch?v=XgEZUmU9L30

-There is WAY too much goblin snoring outside Pandora village at night time. The snoring is so loud, it causes sound distortion in the game and almost hurts my ears with headphones. It would be best if only one or two snoring sounds played at any given time. Either that, or the number of goblins reduced and maybe more bats put in their place.
Edit: Maybe the original game had loud snoring too, but I don't remember that much of it going on all at once... I could be wrong.

Here is the ZPS patch config I am using in case you need help duplicating the issues:

Code: [Select]
[{unknown}]
V200810=1
V200929=1
[Combat]
{Combat}=1
Turbo_Mode=0
Strong_And_Weak_Attacks=1
_Alternate_Attack_Set=1
Faster_Charging=1
Double_Stamina_Regen=0
Full_Percentage_Damage=0
Manual_Block=1
_Blocking_Requires_Full_Stamina=1
_Blocking_Drains_Stamina=1
No_Automatic_Blocking=1
No_Damage_While_Recovering=1
Quick_Recovery=1
Quick_Numbers=1
Faster_Enemies=1
Quicker_Enemies=1
Faster_CPU_Allies=1
Better_CPU_Allies=0
[Magic]
{Magic}=1
Early_Luna=0
Magic_Recharging=1
Default_Spirit_Levels=0
Spell_System_Extensions=1
_Stone_Saber_-_NPC_Version=1
_Blaze_Wall_-_NPC_Version=1
_Evil_Gate_-_NPC_Version=1
_Mud_Saber_-_Replaces_Stone_Saber=1
_Inferno_Barrier_-_Replaces_Blaze_Wall=1
_Shadow_Saber_-_Replaces_Evil_Gate=0
_Speed_Down_-_Hit_And_Evade_Down=1
_Speed_Up_-_Detangle=1
_Lunar_Magic_-_Celestial_Cascade=1
_Burst_-_Health_Cost=1
_Revivifier_-_Turn_Undead=1
_Dispel_Magic_-_Target_Allies=1
_Dust_Flare_-_Replaces_Fire_Bouquet=1
_Black_Hex_-_Replaces_Evil_Gate=0
Comprehensive_Dispel=1
Spell_Power_Tweaks=1
Extend_Buff_Time=1
Acid_Storm_-_Magic_Def_Down=1
Speed_Up_-_Faster_Recharge=1
Lava_Wave_-_Engulf=1
Stone_Saber_-_Icon_Color=1
Thunder_Saber_-_Silence=1
Light_Saber_-_Balloon=1
Lunar_Magic_-_Mana_Cost_Reduction=0
Moon_Energy_-_Mana_Cost_Reduction=0
Revivifier_-_Mana_Cost_Reduction=0
Herbal_Boost_-_Replaces_Moon_Energy=1
Hellfire_-_Replaces_Exploder=1
Evil_Gate_-_More_Useful=1
MP_Absorb_-_Reversible=1
HP_Absorb_-_Reversible=1
Moon_Saber_-_Reversible=1
Sleep_Flower_-_Poison=0
Change_Form_-_Pygmy-Moogle=1
Some_Spells_Bypass_Wall=1
Spell_Balance_Overhaul=1
[Items]
{Items}=1
Unique_Equipment=1
Seven_Items_Max=1
Item_Limit_Increase=0
No_Default_Equipment=1
Farmable_Sword_Orb=1
No_Missing_Orb=1
Weapons_Progression_Balance=0
_No_Free_Lunch=0
Circular_Forging=1
Mana_Fortress_Rarity_Swap=0
Add_Ruby_Armet=1
Earlier_Midge_Mallet=0
Later_Midge_Mallet=0
Magical_Herb=1
Faerie_Coconut=1
Stardust_Herb=0
_Mint_Flavored=0
_Drop_And_Shop_Changes=0
Equipment_Tweaks=1
Elemental_Equipment=1
Energized_Weapons=0
Level_9_Weapon_Perk=1
[Balance]
{Balance}=1
Less_Fragile_Pygmy=1
Defensive_Petrify=1
Dangerous_Poison_And_Engulf=1
Killable_Snowmen=1
Weapon_Status_Chance=1
Double_Saber_Status_Chance=0
Bonus_Weapon_Damage=1
_Element_Match_Defense=1
_Doubled_Bonus_Damage=0
_Strong_Element_Immunity=1
Reduce_Moon_Saber_Healing=1
Persistent_Saber_Buffs=1
No_Neko_Price_Gouging=0
No_Heal_At_Level_Up=1
No_Item_Damage_Canceling=1
Spells_Pause_Gameplay=0
Spells_Cancel_Charging=0
Luna_And_Dryad_Weaknesses=1
Hittable_Vampires=0
Gigas_Bosses_Disassemble_Less=0
Gigas_Bosses_Never_Disassemble=0
Fire_Gigas_-_Flame_Saber=1
Axe_Beak_-_Sonic_Sleep=1
Enemy_Type_And_Element_Changes=1
Enemy_Stat_Changes=1
Enemy_Reward_Changes=0
Enemy_Behavior_Changes=1
Harder_Final_Boss=0
Monster_Stat_Modifiers=1
Run_When_Tired=0
_Only_With_Speed_Up=1
[Quality_of_Life]
{Quality_of_Life}=1
Run_Freely=1
_Gradual_Turns_Only=1
_Run_Requires_D-Pad=0
Run_On_Trigger_Tiles=0
Run_After_Area_Change=0
No_Whip_Tile_Gather=1
Equip_2nd_Weapon=1
_Switch_Requires_R=0
All_Weapons_Destroy_Obstacles=0
QuickSpell_Hotkeys=1
New_Spell_Targeting_Controls=1
MP_Shown_Below_Status_Area=1
CPUs_Dont_Block_Screen=1
Walk_To_Edges_Of_Screen=1
Scroll_Hack=1
Centered_Camera=0
Rearguard_Sprite=1
Personal_Space=0
Faster_Chest_Opening=1
Dont_Despawn_Chests_When_Full=1
ACT_Defaults=1
Faster_Weapon_Grinding=1
Faster_Spell_Grinding=1
Neko_Distribution_Network=1
Watts_In_Haunted_Forest=1
Neko_In_Underground_City=1
Neko_And_Watts_In_Pure_Land=1
Neko_And_Watts_In_Fortress=1
Frosty_the_Friendly_Alchemist=1
Gaias_Navel_Girl=0
Sand_Ship_Guard_Pause=1
Remove_Barrels_On_Run=1
_Barrels_Disable_Attack_Button=1
Boy_Dislikes_Nuts=1
Inverted_Ring_Menu_Rotation=0
Inverted_Shop_Menu_Rotation=0
Reverse_L_and_R_Hotkeys=0
Damage_Feedback=1
[Text]
{Text}=1
VWF_Edition=1
Proper-caser=1
Relocalized=0
Font_-_Menu_Outlines=0
Font_-_Chicago=1
Mixed_Case_Naming=1
_Disable_Auto_Casing=1
Abortable_Dialog=1
Skill_Screen_Spaces=1
True_Monster_Names=1
Logical_Goblin_Names=1
Weapon_Skil_TextFix=1
Cave_In_TextFix=1
Tangled_Up_TextFix=1
Event_Fixes=1
[Graphics]
{Graphics}=1
Turbo_HUD=0
Trim_Portraits=1
Functional_Fashion=1
Retouched_Characters=1
Polished_Weapons=1
Restore_Warp_Tiles=1
Modify_Menu_Icons=1
Japanese_Button_Colors=0
Fancy_Text_Box_Transitions=0
Better_Default_Text_Boxes=1
Alternate_Text_Boxes=0
_Candy_Cane=0
No_Text_Boxes=0
No_Eyeless_Girl=1
Faerie_Coconut_Replacement=1
Alternate_Karon=1
_Wandering_Helmsman=0
Decode_Menu_Icons=1
Encode_Menu_Icons=0
Decode_Combat_Art=1
Encode_Combat_Art=0
Manicured_Monsters=1
[Audio]
{Audio}=1
Enable_MSU-1=1
_ZSNES_MSU-1=0
_Random_MSU_or_SPC=1
_Async_Music_Crossfade=1
Faster_Music_Crossfade=0
Restartable_Attack_Sounds=1
Restore_Unused_Fanfares=1
Different_Fortress_Boss_Music=1
Upbeat_Elinees_Castle=0
Sad_Moogle_Village=1
Echoey_Matango_Caves=1
SFX_Channel_Limit=0
No_Music=0
[Miscellaneous]
{Miscellaneous}=1
New_Game_Plus=1
Day_Night_Cycle=1
_No_Morning_Or_Evening=0
Enhanced_World_Map=1
_Swap_Up_and_Fly_Hotkeys=0
_Slow_Flat_Map=0
Restore_Kettle_Kin=1
Restore_Aegagropilon=1
Sheex_-_Master_Ninja=1
Revisit_Potos=1
Revisit_Goblin_Village=1
Revisit_Kakkara_Desert=1
Revisit_Sunken_Continent=1
Revisit_Pure_Land=1
Accessible_Ramparts=1
Flooded_Staircase=1
Remove_Empire_Castle_Gate=1
_Wandering_Truffle=1
No_Missable_Monsters=1
Turtles_on_Turtle_Shell_Isle=1
Steal_From_Matango_Innkeeper=1
Steal_From_Pecard=1
Mandala_Temple_Treasure=1
Gaias_Navel_Treasure=0
_Navel_Immodesty=0
Northtown_Woods_Treasure=1
Generous_Gold_Chests=0
Centered_Inn_Bed=1
Diverse_Chest_Traps=1
Multiplicative_Change_Form=0
Alternate_Transform_List=0
Alternate_Shape_Shifter_List=1
Mimic_Box_Rewards=0
Wiggly_Balloons=1
Enable_Paralyze_Status=1
No_Drum_Respawn=1
Enable_Kilroy_Door=1
Enable_Matango_Caves_Trap=1
[Title_Screen]
{Title_Screen}=1
Turbo_Logo=1
Turbo_Song=0
Restore_Title_Screen=1
Deblock_Filter=1
Animate_Palette=1
Music_Fade_Fallback=1
Clean_Aesthetic=1
Japanese_Legalese=1
Override_White_Palette=0
[Bug_Fixes]
{Bug_Fixes}=1
Backdoor_Music=1
Tropicy_Music=1
Second_Brambler_Position_Fix=1
Boss_Defeat_Controller_State=1
Text_Box_Overlap=1
Flight_Waits_For_Events=1
Big_Health_And_Mana_Support=1
Far_Western_Todo=1
Dark_Lich_Head_Bang_Fix=1
Deathless_Foe_Fix=1
Final_Saber_Hit=1
Lucid_Barrier_Defense=1
Boss_Loader_Buffer_Overflow=1
Text_Box_Palette_Loader=1
Flakey_Snowflakes=1
Stereo_Panning_Fix=1
Initial_Distance=1
Equipment_Trashing_Fix=1
No_Blats_To_Sell=1
Dialog_Debuffs=1
Boss_Block_Fix=1
Missable_Spear_Fix=1
Barrel_Scramble_Fix=1
Tsunami_Scramble_Fix=1
Hit_Chance_Fix=1
Orb_Overflow_Event=1
Auto_Talk_Fix=1
Whip_Post_Fix=1
Mana_Magic_Endless_Fix=1
Mana_Magic_Unequip_Fix=1
Boss_Rendering_Fix=1
Tidy_Map_Pieces=1
Temple_Fountain=1
Permadeath_Fix=1
Offscreen_Ring_Menu=1
Overcharge_Fix=1
Super_Change_Form=1
Armor_Wisdom_Stat=1
Mode_7_Rendering_Fix=1
Gather_Party_Fix=1
Weapon_Upgrade_BugFix=1
No_Exp_When_Killing_Allies=1
Ghosts_Dont_Block_Projectiles=1
King_Goes_To_Bed=1
Elman_Stops_Stammering=1
Ice_Castle_No_Drum=1
Pandora_Barracks_No_Rope=1
Northtown_Ruins_Better_Rope=1
Wind_Temple_Entrance_Trap=1
Pure_Land_Cave_Trap=1
Ice_Country_Neko_Landing=1
Final_Fight_Graphics=1
Blue_Sky_Blink_Fix=1
Soft_Reset_Reinit=1
[Technical]
{Technical}=1
Safe_Save_State=1
_Pause_Gameplay_Only=1
Disable_Soft_Reset=1
Validate_Items=1
Checksum_Bypass=0
Exception_Handler=1
Overwrite_Unused_Data=1
Internal_SFROM_Header=1
Internal_SFROM_Footer=0
VC_without_PCM=1
SNESCE_Mempatch=0
Enable_FastROM=1
Fake_50Hz=0
Generate_SFROM_File=0
(Helper_Script)=1
[Advanced Options]
Allied_CPU_Reaction_Time=01
Weapon_Status_Chance=21
Party_Follow_Distance=30
Default_ACT_Setting=0
Weapon_Experience_Value=A
Spell_Experience_Value=C
Default_Text_Box_Style=3
Long_Magic_Recharge_Time=00FF
Medium_Magic_Recharge_Time=00DD
Short_Magic_Recharge_Time=00CC
Undine_Default_Level=0
Gnome_Default_Level=0
Sylphid_Default_Level=1
Salamando_Default_Level=1
Shade_Default_Level=2
Lumina_Default_Level=2
Luna_Default_Level=2
Dryad_Default_Level=3
Enemy_HP_Scalar=9
Enemy_MP_Scalar=1
Enemy_XP_Scalar=1
Enemy_GP_Scalar=1
Boss_HP_Scalar=9
Boss_MP_Scalar=1
Boss_XP_Scalar=1
Boss_GP_Scalar=1

Edit:  If My responses take so long, it's because a moderator has to approve EVERY message I make, and it takes about an extra 12 hours. This means I do a LOT of editing to my posts. Very frustrating, and a ridiculous system if I might say so myself.
« Last Edit: Today at 04:50:04 am by lightninghunter »

Queue

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1592 on: October 18, 2020, 08:35:22 pm »
Quote from: Yos
Just wondering if anyone has gotten save states to work with a SD2SNES PRO/FXPAK PRO? I have tried unticking fast rom and MSU1 as save states won't work with games that use additional chips.
While I can't vouch for the MSU / save state compatibility issue, you should be able to leave FastROM enabled with the SD2SNES (and variants); it's not an expansion chip feature, just a basic aspect of typical SNES cartridges: real SoM is HiROM SlowROM, but with some minor programming tweaks, can be HiROM FastROM instead (if the cartridge it runs from supports the FastROM timings, which SD2SNES et al. should).

The benefit to FastROM is the game should have reduced slowdown in some circumstances so it's worth using when possible.

Quote from: Pethronos
Just tested on PSP. Black light at upper right corner of the Load Game menu screen and no sign of garbage audio  :thumbsup:
Excellent. Thanks for checking.



Quote from: lightninghunter
-The new "Ring Menu Loader" fix crashes the game when you go to the weapon level stats.
Yikes, was a dumb programming mistake on my part. Fixed and I'll get an update out later today. Annoyingly, I had been looking at the full screen menus a ton when getting the little FastROM indicator implemented, but made some last minute changes to the Ring Menu Loader after I stopped looking at the full screen menus; so I should've caught that, but only checked ring menus, forgetting that that full screen menu uses the same icon loader code.

Quote from: lightninghunter
-There is strange behavior when I launch a barrage of attacks on a monster with turbo mode DISABLED.
https://www.youtube.com/watch?v=XgEZUmU9L30
Quality_of_Life\Damage_Feedback is making otherwise vanilla behavior more obvious.

Pretty confident the damage that's occurring in that video is normal. Without Damage_Feedback, you'd still be piling up small amounts of damage (and that enemy's hurt animation doesn't provide them with an invulnerability window while they're stunned; some enemies are invulnerable while stunned), you just wouldn't hear the sound (vanilla plays the hurt sound when it shows the damage number, while the actual attack connecting is silent, Damage_Feedback causes the hit sound on any damaging attack). Damage accumulates and shows every so often (unchanged by any Turbo project feature).

If you had lower attack (or the enemy higher defense), those rapid hits would be reduced to 0, the enemy wouldn't flinch or get stunned, there'd be no hit sound (as far as I recall), and so on.

A common complaint against vanilla Secret of Mana is that "hit detection is bad" or similar. The problem is that feedback on hits is bad; the hit detection itself works reliably and as designed, it just doesn't inform you if a hit connected, or if it did but failed because the enemy was invulnerable, or you hit a defensive part of the enemy (e.g. beak), etc.

Quote from: lightninghunter
-There is WAY too much goblin snoring outside Pandora village at night time.
Hm, this one's a bit tough. And probably a few things are going on:
1) Goblins are a nighttime replacement for mushbooms (Day_Night_Cycle only obviously)
2) Stereo_Panning_Fix fixes offscreen audio source panning (in vanilla, offscreen goblin snoring is always panned hard left, if I recall correctly), so you're getting stereo snoring that you wouldn't in vanilla
3) Restartable_Attack_Sounds is letting snoring sounds pile up (if I recall, the snoring sound is triggered repeatedly before it finishes playing)

I don't want to mess with enemy distribution / placement (aside from when enemies are stuck in walls).

I may be able to improve goblin AI so a single goblin doesn't stack up multiple snoring sounds on its own (but this is only a maybe, it may actually be difficult to do this way).

I don't think it's practical to make this sound an exception to Restartable_Attack_Sounds, but that is theoretically a possibility.

Quote from: lightninghunter
...it's because a moderator has to approve EVERY message I make...
This forum does that for your first handful of posts so they can keep spam / bots from showing up at all. After enough of your posts get through moderation, you're cleared for non-moderated posting.

Have you tried the single player pause via Start button (it's a feature of Technical\Safe_Save_State) on real hardware? More specifically, if it successfully unpauses? I've gotten intermittent reports of unpause failing on at least BSNES (known for its accuracy) so I've always been worried that unpausing might not work on real hardware. It should work; I've gone over the code a million times and it should follow documented SNES hardware behavior, but the way that pause (and unpause) works is technically a bit on the unusual side.
« Last Edit: Today at 03:42:21 pm by Queue »

lightninghunter

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: Secret of Mana, Turbo - Beta 200929
« Reply #1593 on: Today at 04:55:37 pm »
Quote from: Queue

Pretty confident the damage that's occurring in that video is normal. Without Damage_Feedback, you'd still be piling up small amounts of damage

I see.  I am still learning each and every feature of the Turbo edition, so it makes sense that the Damage_Feedback fix is merely making a vanilla quirk more evident. Now that I know nothing buggy is going on, it doesn't bother me anymore.

Quote
I may be able to improve goblin AI so a single goblin doesn't stack up multiple snoring sounds on its own (but this is only a maybe, it may actually be difficult to do this way).

I don't think it's practical to make this sound an exception to Restartable_Attack_Sounds, but that is theoretically a possibility.

Either solution sounds good to me. I would pick the one that involves less work!

Quote
Have you tried the single player pause via Start button (it's a feature of Technical\Safe_Save_State) on real hardware? More specifically, if it successfully unpauses? I've gotten intermittent reports of unpause failing on at least BSNES (known for its accuracy) so I've always been worried that unpausing might not work on real hardware. It should work; I've gone over the code a million times and it should follow documented SNES hardware behavior, but the way that pause (and unpause) works is technically a bit on the unusual side.

It does work, but I noticed that unpausing can be finicky. I have to BARELY tap the start button, or the game will unpause then re-pause again. It's almost like I have a turbo controller (which I do not) that is registering more than one press each time. I only figured this out, because I remember this behavior with an NES turbo controller and Ninja Gaiden back in the day. It was hard to use the Turbo start button and unpause without re-pausing the game each time. I got really good at BARELY tapping the start button with that controller to pause/unpause the game... SOM Turbo is pretty much the same way.

Quote
This forum does that for your first handful of posts so they can keep spam / bots from showing up at all. After enough of your posts get through moderation, you're cleared for non-moderated posting.

I figured as much, but I think they need to reduce the number of approved posts down to 2! I just hope 5 posts is the magic number I have to get to...
Edit: Phew, it does appear 5 posts is what I had to get to. Thank goodness the wait time is over!

Queue

  • Sr. Member
  • ****
  • Posts: 433
    • View Profile
Re: Secret of Mana, Turbo - Beta 201019
« Reply #1594 on: Today at 10:15:51 pm »
Version 2020-10-19:
https://filebin.net/7spaiz2xfys6b2i1/SoM_Turbo.201019.zip

Changes:
- Fixed a crash caused by Bug_Fixes\Ring_Menu_Loader, whoops
- Added a technical fix for event 250 to Text\Event_Fixes; the error would never have come into play in vanilla, but fixed for its own sake



lightninghunter, I started messing with the snoring goblins but ran out of time. My preliminary finding though is that it's going to be surprisingly tough to fix. Due to them having an inefficient AI script, I have room to modify their AI, but nothing I tried worked without compromise (I did learn that the AI scripting system seems to have a safety to avoid infinite loops, so that's neat). The sound playing code is pretty inflexible so solving it on that end looks unpleasant as well. Will spend more time on it over morning coffee or something and see if I can puzzle out a solution.

Thanks for elaborating on the pause issue. That gives me some ideas to pursue.