Are not enough CPU cycles caused by high engine sampling rate causing distortion sounds in my rom hack?

biolizardshadow

Well-Known Member
OP
Member
Joined
May 4, 2020
Messages
121
Trophies
0
Age
22
XP
298
Country
United States
I increased the engine sampling rate from 10512 Hz to 42048 Hz in Megaman Battle Network 1 to enhance a song I made to replace the title screen music with and now some sounds have become distorted as a result. Is this caused by me using too many CPU cycles, or is something else going on? Decreasing the engine sample rate to something like 21024 Hz seems to make the distortion go away. What's even more interesting is that I used two samples from battle network 3 and a sample I made myself and the two samples from battle network 3 are the only ones to have the distortion problem as of now. Those sounds have a really low sample rate while the sample I created is sampled at 44100 Hz.

Bad looping isn't the problem either as some un-looped samples are also experiencing the same distortion. The distortion sounds like brief stuttering.

Is this why a lot of game devs used really low sample rates on GBA games that use the MP2K sound engine? Could the problem be that information is not getting to the CPU fast enough since it has to be read directly from the cartridge? Could this also be caused by slow or inefficient game code? I am very curious as to what's going on and would like to know more about this from someone who has more knowledge on the subject.
 
Last edited by biolizardshadow,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,405
Country
United Kingdom
I don't know how many people floating around here will have specific knowledge on the matter. But yeah I can well see some limit, whether CPU cycles or throughput I don't know, being brushed up against by trying to ram twice as many samples (or twice as much data throughput, give or take what little compression PCM affords if your increase in sample rate is effectively empty magnification/no real information added).

Poorly optimised code (though how poorly optimised it is if the base game "had one job" as it were is potentially up for debate) or what passes for priorities on the GBA (it is not exactly a multi thread/process device). It would also not be the first time a hacker has improved existing code to squeak out a little bit more CPU time/resources for their fiddling.

no$gba debug last I looked did have a CPU usage bar. You could try comparing those.

It could still be that changing the engine however you did it had knock on effects if upsampling or whatever failed for the existing stuff. That said if you are mostly concerned with the title screen music, or maybe standalone aspects, it could be possible to alter the sample rates for those purposes but drop it back down other times.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, you played that Mario flash game called Mario 63?
  • SylverReZ @ SylverReZ:
    @Xdqwerty, No, but I've seen it on Vinesauce's stream.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, that game is one of the reasons i met newgrounds bc the full versión of it is in that site
  • Xdqwerty @ Xdqwerty:
    Also somebody is remaking it
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, the other game where I found newgrounds is new york shark
    +1
  • SylverReZ @ SylverReZ:
    Spoke to Tom Fulp the other day, if he can find his old Newgrounds site content like the mini Flash animations from the 2000's that played on the portal.
  • SylverReZ @ SylverReZ:
    So far no response, but he did say that he'll find them. Wayback Machine doesn't have em.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, atleast the 1999 versión of pico's school is avaliable (the difference between it, the 2006 versión and the 2016 versión is that the speed of the game depends of the speed of your computer and that it had the og soundtrack)
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Another being Pico VS Bear, the original 1999 version before Jim Henson filed a DMCA takedown.
    +1
  • Xdqwerty @ Xdqwerty:
    The 2006 versión was made when the flash portal was made
  • SylverReZ @ SylverReZ:
    Many people thought it was lost, but was discovered that he hid it on the same page.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, although the "secrets" system where the game was has been removed. Also pico vs uberkids had a netplay versión that was shutdown, although the swf file has been found
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Nope. There are two download buttons on the same page, where you can download the original under a file called "bear.exe". "bear2.exe", however, is the updated game in a Flash projector. P.s. this was on the archived Pico page from 2000.
  • SylverReZ @ SylverReZ:
    @Xdqwerty, That's been there for a long time, too. People who search for lost media don't look hard enough lmao.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, also the pico 2 demos used to be only for the newgrounds patrons but they are on internet archive too (https://archive.org/download/picos_school_2)
    +1
  • Xdqwerty @ Xdqwerty:
    Iirc the demos were removed from newgrounds in 2022
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, or well only the demo with mindchamber's style was on newgrounds
    +1
  • Xdqwerty @ Xdqwerty:
    Fun fact @SylverReZ: iirc one of the goals on the fnf Kickstarter stated that pico 2 would be finished but the Kickstarter didnt get enough money for that goal to be fullfiled
  • SylverReZ @ SylverReZ:
    @Xdqwerty, FNF sucks, their community is toxic as hell.
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ its a single player game
  • Xdqwerty @ Xdqwerty:
    @The Real Jdbye, Yea but it has a shitton of mods with their own songs and stuff
  • Xdqwerty @ Xdqwerty:
    @The Real Jdbye, and quite a lot of people involved in those mods get cancelled
  • SylverReZ @ SylverReZ:
    Newgrounds wasn't the birth of FNF; rather, it was games where you beat up celebrities and parodies.
    SylverReZ @ SylverReZ: Newgrounds wasn't the birth of FNF; rather, it was games where you beat up celebrities and parodies.