Loxrie / genplus-gx

Automatically exported from code.google.com/p/genplus-gx
Other
0 stars 0 forks source link

Updated libtremor in DevKitPPC #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Grab latest revision of genplus-gx
2. Grab latest stable version of devkitppc
3. Attempt to compile.

What is the expected output? What do you see instead?
I expected a binary. I got errors from gcc.

What version of the emulator are you using?
r355

Please provide any additional information below (video settings, console
region,...)
Not being the kind of person to sit on my ass and whine (at least, not
anymore), I decided to find out why it didn't work. Turns out genplus-gx's
ogg-related code wasn't updated for the newer version of libtremor. I spent
some time diffing the code between this and vba-wii, which revealed the
culprit code. Attached is a diff that can be applied to r355 that causes it
to compile without error, although I haven't tested it yet. Since it's also
only slightly better than a copy-and-paste from vba-wii, there's possible
issues dealing with threading that would need to be ironed out before
inclusion, if the patch even works.

The code taken from vba-wii's oggplayer.c has the same license as
genplus-gx's, with two additional lines in the header:

 Proper (standard) vorbis usage by Tantric, 2009
 Threading modifications/corrections by Tantric, 2009

Additionally, the single changed line in gx_audio.c comes from
gui_sound.cpp from vba-wii, which has this near the top:

 * Tantric 2009

Hopefully this will be useful to anyone else, including the maintainer(s)
of genplus_gx.

Original issue reported on code.google.com by ccfrea...@gmail.com on 14 Oct 2009 at 4:34

Attachments:

GoogleCodeExporter commented 9 years ago
Well, I didn't have the time to test the new libtremor and the libs package in 
the
dowload page still use the older compiled one, hence why the code wouldn't need 
to be
modified so far.

Anyway, thanks for the patch, at first sight, it seems it only re-implement 
functions
that were originally in libtremor and probably was removed (memopen, ...)  as 
well as
taking in account the fact the name of the libray changed.
 I didn't even noticed there were PORTLIBS now, I should maybe took a look at it, the
emulator seems to crash everytime I try to write a file with libfat since I've
updated to last devkitPPC btw... very weird

Btw, what are the differences/improvments with the new libtremor? There wasn't 
any
issue with the current one, as far as I tested it, ogg support worked perfectly 
in
this emulator...

Original comment by ekeeke31@gmail.com on 14 Oct 2009 at 7:11

GoogleCodeExporter commented 9 years ago
About portlibs, the compiled libpng is now 450 KB bigger than the old one, 
which is
not really neglegctable. I think I will stick with the old versions that 
already do
the job perfectly, at least for a while...

Now, if anyone has any idea why writing savestate files to SD now crash with 
the new
devkitPPC, please tell me....
It seems the size of the file does matter (SRM and config files are fine).
I guess the fact that IO are now unbuffered means I can't read file in one pass
anymore, like this fread(buffer, 1, 1048576, sdfile) ?

But what is the maximal chunk size ? Any help would be appreciated...

Original comment by ekeeke31@gmail.com on 14 Oct 2009 at 8:15

GoogleCodeExporter commented 9 years ago
You're probably right about the re-implementation. mem_open() and mem_close() 
were
unresolved at link time if the new libtremor was used, which is probably why 
they
were added.

I'm not sure when PORTLIBs were added, but vba-wii and snes9x-gc both use them, 
and
the emulator seems to at least run when using them, so using them from now on 
seems
the best choice to me.

Also, I did get an opportunity to test the patched code briefly last night. The
emulator seems to run fine, but for some reason pad 1 was inputting for Genesis
controllers 1 AND 2. I'm not sure if it was a configuration error or not (I 
didn't
have the presence of mind to check), but I have my doubts it has anything to do 
with
sound, heh.

Original comment by ccfrea...@gmail.com on 14 Oct 2009 at 6:05

GoogleCodeExporter commented 9 years ago
The libtremor from devkitpro portlibs in a stock copy from 
http://svn.xiph.org/branches/lowmem-branch/Tremor/. The libtremor eke-eke is 
using 
is a modified version that Hermes did. I'm unsure why Hermes chose to hack up 
tremor, but my modified oggplayer.c uses the built-in callback hooks for 
tremor, so 
that we can use a stock tremor. It doesn't work any better really, but removes 
the 
reliance on the hacked tremor.

You should be deleting all compiled libs (png, tremor, jpeg, etc) located in 
/libogc 
and downloading the portlibs and placing them in /portlibs. Those older libs 
were 
compiled on an older gcc, so can have unpredictable results. Wintermute intends 
to 
update the devkitpro installer to also offer installing the portlibs.

Also, eke-eke - there's no need now to offer libogc, libpng, etc for download 
here, 
now that it's all compileable from devkitpro :)

Original comment by dborth@gmail.com on 15 Oct 2009 at 12:44

GoogleCodeExporter commented 9 years ago
As for libfat, any chunk size is *supposed* to work, but for your reference I 
use 
4kb chunks.

Original comment by dborth@gmail.com on 15 Oct 2009 at 12:46

GoogleCodeExporter commented 9 years ago
yeah, I fixed it by using 2KB as generic chunk size (and I was inverting 
blocksize
and blockcnt in fread/fwrite functions)

Thanks for the clarifications, I fully agree there is no more need to store
precompiled libs here and that it's better to use up-to-date & gcc compliant
libraries, this should be fixed soon.

Original comment by ekeeke31@gmail.com on 15 Oct 2009 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by ekeeke31@gmail.com on 17 Oct 2009 at 12:43

GoogleCodeExporter commented 9 years ago
Looks like the patch made its way into the main trunk. Might as well close this 
as
fixed or something.

Original comment by ccfrea...@gmail.com on 17 Oct 2009 at 3:47

GoogleCodeExporter commented 9 years ago
It is indeed closed (verified means it has been confirmed to be fixed);-)

Original comment by ekeeke31@gmail.com on 17 Oct 2009 at 6:13