This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11945 - New HES (Hudson Entertainment System) sound codec ;)
Attached to Project:
Rockbox
Opened by Mauricio Garrido (gama) - Tuesday, 15 February 2011, 21:55 GMT+2
Last edited by Andree Buschmann (Buschel) - Monday, 04 July 2011, 07:53 GMT+2
Opened by Mauricio Garrido (gama) - Tuesday, 15 February 2011, 21:55 GMT+2
Last edited by Andree Buschmann (Buschel) - Monday, 04 July 2011, 07:53 GMT+2
|
DetailsHi, this is a new codec that plays HES music files. It is based on gme-0.5.2 by blargg http://slack.net/~ant/libs/audio.html
The patch was made from r29307 Features: - 44Khz stereo sound. - M3u Playlist support for additional metadata. - Fade support. - Subtrack selection using the seek function. - Support adpcm samples. - Based on the great game_music_emu library by blargg, so you can expect nice sound quality. Note 1: This version is for testing, if you find any bug please let me know. Note 2: The codec uses the file open, read, seek functions that are only defined in players that support recording, so we must find a solution for the players that doesn't support that. For a nice collection of HES music you can visit http://namida.com/kaminarimon/ |
This task depends upon
Closed by Andree Buschmann (Buschel)
Monday, 04 July 2011, 07:53 GMT+2
Reason for closing: Duplicate
Additional comments about closing: Replaced by FS#12176.
Monday, 04 July 2011, 07:53 GMT+2
Reason for closing: Duplicate
Additional comments about closing: Replaced by FS#12176.
Got latest rockbox 29317 from SVN
Made directory "D2build" near rockbox folder then changed to it
Then "../rockbox/tools/configure" selected D2 normal build and then "make -j4" got this
http://pastebin.com/raw.php?i=SQK37KKk
What am i doing wrong again? or maybe some additional patches requed?
PS this all was made under cygwin with arm-elf-eabi-gcc (GCC) 4.4.4 and GNU ar (GNU Binutils) 2.20.1.20100303
targets that supports recording, you can check that in the codecs.h file, i'm still looking how to solve that.
> i modified codec.c/h to make this patch work on non-recording device, but seems it failed to load hes-m3u?
That's strange, i have tested it on a sansa and on the uisimulator and it works fine. But the sansa supports
recording so the file api is already available. I guess i will try with another target in the simulator, could you please
paste your changes Joshua?
By the way, you can tell the m3u is loaded correctly because the codec will display additional info about
author, game and title and it will set the correct number of tracks. But t will not display the track title.
btw i commented:
char * (*strrchr)(const char *s, int c);
int (*strcasecmp)(const char *, const char *);
in codecs.h and
strrchr,
strcasecmp,
in codecs.c because it caused some errors (this strings was doubled somewhere)
PS Switching track then loop enabled doesn't work like with nsf files (for both gbs and hes)
PPS Can you amplify pce's sound a bit?
> Switching track then loop enabled doesn't work like with nsf files (for both gbs and hes)
Yes, i have to take a look at that. What should be the correct behavior?
> Can you amplify pce's sound a bit?
That is no problem, the volume gain value is located in the Hes_init function in hes_emu.c.
I reduced those values because it was a bit high compared to other formats like spc. But
i still have to find a good value for it.
I compared loudness to standard mp3s and it's much lower compared to them (SPC too but I didn't thought about editing source).
Sigh. why there are no external config files for codecs like in winamp? ~_~
PS is it real to get track title and length from m3u files or make them to work like CUEs?
I believe you mean loop current sub-track not the whole file, right?
> is it real to get track title and length from m3u files or make them to work like CUEs
I guess that could be done but someone would have to change the main rockbox app to achieve that.
The track title can be obtained in the codec but rockbox takes around 15 seconds to update metadata changes,
so i decided to keep the game, artist and album info only. And even if track length is not displayed, it is used
internally by the codec.
And i also think that a codec config file like winamp's ini file would be nice. By the way i have finished a beta
of the atari SC68 plugin it is based on the sc68 library by Benjamin Gerard. There are some really nice
songs in his archive. Will upload the patch next week, though i'm not sure if anyone is interested in that format ;).
and.. will that sc68 plugin support sndh files? (original one was pretty buggy)
Ok I don't think that would be difficult to do ;).
The sc68 codec supports both sc68 and sndh files, big sndh tunes (~450 Kb) are not supported yet, but i'm trying to fix that.
I have tested a lot of songs from the sc68.org archive and it seems they play fine.
By the way there are still some formats from game_music_emu that can be ported: kss (msx, sms),
ay, nsf, vgm (gg, sms, genesis) and maybe sgc (sms, gg).
I know there is already a nsf codec but i believe gme's nsf emu has better sound quality so it might be worth to make a new codec.
The ay emu would be easier to port but i haven't found any songs in that format.
And i'm not sure the kss and vgm codecs would work in rockbox, since they need a lot of cpu, but they may work without
the ym2413 chip (just maybe).
And does NSF emulation in blargg's supports vrc7 expansion?
And future idea: why not to use one path for same components? (blargg_common, blargg_config, m3u_playlist etc)
it should compile fine on all targets.
Changelog:
- Merged Joshua's patch to make the codec compile fine on all targets.
- Fixed some internal stuff.
- Increased sound gain (a bit).
updated as well.
was added, it is used by several HES rips especially for drums.
NOTE: this is a very rough patch which contains some hacks in metadata stage, use at your own risk
And maybe subsongs info (remap and lengths) can be 'passed' to the codec through the ide3v2 buffer. Also i will try to remove the
Emu dependency from the m3u parser that way all the gme codecs could use the extended m3u support.
Anyway, the only codec that actually needs the extended m3u is the HES, since it doesn't contain an standarized metadata info. So for
now i removed the m3u support from the rest of the gme codecs and will upload the updated patches next week.
P.S. I have been working on a plugin based on the UADE (Unix Amiga Delitracker Emulator) library, it's working fine on the sansa, but i haven't
decided to upload if yet, maybe it would be better to do some private beta testing first. So if someone is interested please let me know :).
Oh, that's nice ;).
> also, the multitrack sc68's length is wrong after modification, could you fix it?
Ok, will take a look at it.
when build all multi-track codecs(hes,nsf,gbs)with m3u support, the new patch only need additional 50k memory
compare to previous one, we have 350k memory saved!
.
- Removed the Gme_emu structure dependency in the gme_m3u code,
- Store the entries data in the id3v2 buffer to make it available inside the codec.
- Stripped down the entry_t structure to hold only the track and length data, in order to reduce the size of the data
passed to the codec through the id3v2 buffer.
- Removed the m3u_playlist.c file from libhes since it is no longer needed and changed the m3u_playlist.h file to 'load' the m3u playlist
from the id3v2 buffer.
- Reduced the max m3u data to 16384 bytes, is there any hes m3u playlist bigger than that?
Can you help test this patch and tell me your thoughts about the changes?
P.S. I guess the strrchr and strcasecmp functions can now be removed from the codec structure as well.
ps: the biggest hes m3u as far as i know is Tokimeki Memorial.m3u, 12756 bytes
why use "ci->set_elapsed(t*1000)" instead of "ci->id3->elapsed = t*1000" in codecs/hes.c?
in this way, i can't change sub-track using 1 second skip length, the official nsf.c also has the same problem.
Well because i thought it was the correct way of doing it ;). I was just looking at some related bug,
the wps time doesn't get updated automatically with the new playback engine, when a subsong changes it stays in zero,
but if i skip forward to manually change subsong it starts to work fine. Looking at the playback.c file it has to do something
with the pcm latency (see playback.c ~ void audio_codec_update_elapsed(unsigned long value)), but i don't understand quite well
that part.
Unfortunately, setting ci->id3->elapsed directly doesn't help either 8(.
BTW, i have updated the other codecs as well, will upload them ASAP. Also i finished porting the AY and SGC codecs too ;).
Mmm, no i don't use that option. Some findings, if i use ci->set_elapsed() the WPS time gets updated until subtrack 3 is reached,
and the reason for this is that the function audio_codec_update_elapsed(unsigned long value) rejects the value if it is lower than the pcm buffer latency,
in the sansa fuze the 'latency' is around 2500.
If i use ci->id3->elapsed directly, it is easier to change subtrack but the WPS time doesn't get updated at all, and i haven't been able
to find the reason for this. Hope some dev can help us with this ;).
but there is still pending the elapsed time issue. Here is the latest full patch: