ericmckean / game-music-emu

Automatically exported from code.google.com/p/game-music-emu
GNU Lesser General Public License v2.1
0 stars 0 forks source link

GBS noise timing problems #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load attached "pokered.gbs".
2. Start track 0
3. Noise channel plays to fast without pause.

What is the expected output?
Noise channel used as drums with pause between playing.
See this video how it should sound: https://www.youtube.com/watch?v=oaaFap2G1-4
The file itself is ok, I checked with netzplug++ player. Works good there.

What do you see instead?
Noise channel plays as fast as possible at the begin of track without pause.

What version of the product are you using? On what operating system?
Any GME version.

Please provide any additional information below.
I begun to try to understand GBS files and the Gameboy itself. So far this is 
my results:

* First thing I checked where the values written into Registers 0xFF20 - 
0xFF23. Thought there was missing some sound OFF pattern or something. But 
think here is not the problem anymore.
* I saw the speed how fast the CPU writes to this registers (at nearly every 
call to the play routine). So I think it has something to do with the play 
routine and the CPU. It writes the entire noise values within the first few 
seconds of the track to the noise registers. 
* I checked the play routine, it does not write to any other registers besides 
the sound registers.
* Somehow the pause in the play routine for the noise registers is not executed 
as it should.
* I don't seem to recognize the trick which the play routine uses to determine 
the pause interval for the noise registers and where to hook in the CPU 
emulation to correct the problem.
* If this corrected many more tracks within the file should play correctly.

I am currently at the limit of my skills. I don't know how to continue.

I know its quiet here, but Blaarg if you read this, maybe you can give me a 
pointer where to look closer. Thank you. I am impressed of GME, so much 
knowledge went into it.

Original issue reported on code.google.com by wbb1...@gmail.com on 29 Nov 2013 at 4:29

Attachments:

GoogleCodeExporter commented 9 years ago
I believe this is a duplicate of Issue 7, though I'm sure your debugging 
efforts would go a long way toward a fix. Unfortunately implementing sound 
emulation is also over *my* head, but until blargg gets more time for 
development on this I'm holding the reins, so to speak.

Original comment by michael....@gmail.com on 23 Jun 2014 at 4:47