Closed khelkun closed 2 years ago
We'd really be grateful if you could share though, experience, and documentation you might have on those 3 possible actions because:
* We're still not sure what changing the game layout will imply.
So I think there a couple of things to consider to answer that question..
So my bottom line would be: pick a name with bigger ROM layout, but if you don't need it, don't jump yet on the very latest ROM that use tricks to optimize every piece of the hardware. First because it might change the way you access the data, second because the emulator might not support all those tricks.
As far as sound ROMs are concerned, any official game name with a bigger sound ROM layout should do the trick.
* I'm still trying to figure out what's really going on in `adpcmtool.py` in terms of format conversion.
Quick aside on ADPCM-A: such channels in the YM2610 can only play samples which are roughly 12bits dynamics (due to lossy compression), at a fixed 18.5KHz. There's no way around unfortunately.
Now, adpcmtool is rather crude yet, so it expects that the input .wav it receives is a mono, 16bits (little endian), 18.5Khz sound file. It will encode it in the equivalent ADPCM-A representation (4bits per sample). It cannot yet handle ADPCM-B.
* I have no idea what would be necessary to do to handle ADPMC-B instead of ADPMC-1 with ngdevkit.
It would require me to understand and implement the ADPCM-B codec in python, and a ADPCM-B playback in the sound driver that comes with ngdevkit (nullsound), if you use it. Since neogeodev's wiki already has some info on ADPCM-B [2], I think this is totally doable. But again, there is nothing yet in the devkit, and I confess ADPCM-B is a bit in the back-burner...
* It's may be unexpected a 1 minute music mp3 gets converted to an`music.adpcma` of 605.4 kB, should it be smaller?
No unfortunately that's the way it is, because ADPCM-A is a fixed-length encoding: every sample takes 4bits, and the playback being always set to 18.5KHz, you can't cheat/tweak to get a packed size in this format.
And thanks for this really great work on
ngdevkit
!
Thanks for your interest :)
[1] https://wiki.neogeodev.org/index.php?title=Fix_bankswitching [2] https://wiki.neogeodev.org/index.php?title=ADPCM_codecs
@dciabrin Thanks a lot for the fast and detailed answer. That's very helpful!
Using a game layout vith bigger VROM is fine so far so closing
Hello @dciabrin
A friend and I are working on a game prototype with ngdevkit.
Starting from your great work and the
06-sound-adpcma
example, I'm a bit stuck and looking for help about how I could play longer sound.I'll try to be the most accurate that I can considering my actual knowledge on the neogeo hardware and ngdevkit.
So I have a 2.8 MB stereo
music.mp3
file with a 1 minute duration.sox
down samples it to 18,5k sample rate mono into a WAV file. Then it's processed by youradpcmtool.py
to generate the ADPMC-A raw file. The resultingmusic.adpcma
file has a size of 605.4 kB which is greater than the202-v1.v1
rom of the puzzledp game layout used by the examples.So we consider 3 actions to solve the issue:
adpcmtool.py
to accept WAV with a bit depth of 8bits (unsigned int) and may be a lower sample rate.adpcmtool.py
to generate ADPMC-B raw file which have a max size of 16MB against 1MB for ADPMC-A according to the neogeodev wiki.We'd really be grateful if you could share though, experience, and documentation you might have on those 3 possible actions because:
adpcmtool.py
in terms of format conversion.music.adpcma
of 605.4 kB, should it be smaller?And thanks for this really great work on
ngdevkit
!