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

Author Topic: Custom SMB1 Music \"glitching\"  (Read 2703 times)

darklighter

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Custom SMB1 Music \"glitching\"
« on: April 12, 2017, 07:18:43 am »
I'm working on a Super Mario Bros. Romhack called "Angel's Quest".
Levels are finished, Sprites, Palettes etc.

Now I'm working on custom music. Unfortunately I get "music glitches" or sounds that seem to appear randomly.

See and hear it: https://youtu.be/wYVLCPkJihY

I'm using the Underwater Theme for my Levels whose data I overwrite
Pointer: $7926: 5E
The header is located at $797B: 20 52 FD 42 83

My audio data begins at $7D62



It contains a SQ2 and a TRI for the main melody and baseline.
SQ1 contains only 4 quarter notes of "silence".
NOI contains only a basic rhythm pattern of quarterly playing "drum" and "snare".


Now where do these other noises and sounds come from that mess up my music??

April 12, 2017, 09:03:49 am - (Auto Merged - Double Posts are not allowed before 7 days.)
When I watch the NES Memory RAM in Realtime, I see that at addresses $4000 (SQ1_VOL), $4001 (SQ1_SWEEP), $4002 (SQ1_LO) and $4003 (SQ1_HI) "random" values appear just at the moments when those strange sounds are played.

https://youtu.be/yYJn00tmcrQ
« Last Edit: April 12, 2017, 09:03:49 am by darklighter »

Eden.GT

  • Full Member
  • ***
  • Posts: 106
  • Hardcore SMB1 Player and Hacker
    • View Profile
Re: Custom SMB1 Music \"glitching\"
« Reply #1 on: April 13, 2017, 08:55:12 am »
You are not alone. Often I struggle to change the music too. But sometimes, you might make the smallest mistake and not even realizing it.
Anyway, sorry for being useless (I guess...), but did you move the pointer location? And is it w7n's music hacking document that you are reading? If not, take a look at that.

>>SQ1 contains only 4 quarter notes of "silence".: Hmm. Maybe there's something wrong there.
« Last Edit: April 13, 2017, 09:08:48 am by Eden.GT »
Is the pool clean?

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Custom SMB1 Music \"glitching\"
« Reply #2 on: April 13, 2017, 10:58:49 am »
Stab in the dark:

Each channel must have a pointer to the start of its data, right?  Maybe your Sq1 pointer is pointing to the wrong spot so it's playing random garbage.

darklighter

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Custom SMB1 Music \"glitching\"
« Reply #3 on: April 13, 2017, 04:26:34 pm »
I just found and fixed the problem.
I will provide a detailed explanation in the next days.

https://youtu.be/di39wTvWCPs

Eden.GT

  • Full Member
  • ***
  • Posts: 106
  • Hardcore SMB1 Player and Hacker
    • View Profile
Re: Custom SMB1 Music \"glitching\"
« Reply #4 on: April 13, 2017, 06:13:18 pm »
An explanation on how you found what caused the glitched music? A good way to express why you have made this error.
Hey, I would like to provide some good SMB resources to improve your hack even further. Contact me if you want them and I shall send you the zip file containing the files. (And perhaps even fixing the fire flower sprite as in the video.)
« Last Edit: April 13, 2017, 06:24:23 pm by Eden.GT »
Is the pool clean?

darklighter

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Custom SMB1 Music \"glitching\"
« Reply #5 on: October 10, 2017, 11:12:53 am »
After having not done much in the last months I want to finish my romhack now.

Levels are all done now, nearly all enemy sprites are done and only some bg music and SFX are missing.

But I wonder how to find the ROM adresses for the various SFX.
I found some addresses like "1 UP", "Get Power Up" but not all of them.
How and where do I find all the addresses for "Enter Pipe / damage", "Hit Block" etc. ?


Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Custom SMB1 Music \"glitching\"
« Reply #6 on: October 10, 2017, 06:51:22 pm »
The "bump" sound effect is controlled by the values at $$7410, $$7412 and $$7414. (The last value also influences the fireball sound effect.)

The "pipedown/injury" sound effect is a bit more complicated. The duration of the effect is controlled by the value at $$74C7. The sounds themselves are controlled by the values at $$74D9, $$74DB and $$74DD.

darklighter

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Custom SMB1 Music \"glitching\"
« Reply #7 on: October 12, 2017, 03:47:59 am »
Thank you Dr. Floppy - I will have a look at these addresses =)

The SFX addresses I also don't know are: "Bowser dead", "Bowser's Flame", "Fireball kills / Kick shell", "Flagpole reached"
Can you provide these?

Or tell me how I can find them out :)
I always love to learn...

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Custom SMB1 Music \"glitching\"
« Reply #8 on: October 14, 2017, 04:48:42 pm »
Bowser Dead: $$75D9 (length), $$75DE, $$75E0, $$75EB, $$75ED, $$75EF (shared with gunfire sound).

Bowser's Flame: $$7691 (length), $$769B, $$7FDA-7FF9.

Fireballkill/Shellkick: $$748E (length), $$7490, $$7492, $$7497, $$74A1 (should be ~ [half of length, + 1]), $$74A5, $$74AA, $$74AE.

Flagpole Shitta: $$73D0 (length), $$73D5, $$73DA, $$73DE.