Closed GoogleCodeExporter closed 9 years ago
"some" assumptions is an understatement. Pretty much the entire jma decoder
takes
advantage of the "fact" that unsigned integers are 32 bits. It would take a lot
of
work to fix this, so I really don't see it happening in the near-future.
Original comment by bear...@gmail.com
on 7 Feb 2010 at 9:12
That's understandable.
Maybe someone else will fix it before then, since zsnes and bsnes seem to be
using
the same code as well.
Thanks for all the great work though.
Original comment by friedric...@gmail.com
on 7 Feb 2010 at 9:19
[deleted comment]
[deleted comment]
> Maybe someone else will fix it before then, since zsnes and bsnes seem to be
using
the same code as well.
bsnes 64 bits fails to load JMA as well.
ZSNES, it seems, runs in 32 bits mode.
Quote from Byuu
"Okay, JMA ... the thing is there's bugs in the libjma library. If you try and
load a
JMA file with it, it throws an "invalid file" exception or something. Which of
course
I catch, and it ends up just not loading the file at all. Nach knows his library
isn't compatible with 64-bit systems, but I think he's busy to fix it at the
moment,
so I just avoid listing it on the 64-bit systems.
It's okay with ZSNES because ZSNES runs in 32-bit mode even on 64-bit systems."
Original comment by tsukuyom...@gmail.com
on 10 Mar 2010 at 7:09
Hum... some news from kode54 :)
http://board.byuu.org/viewtopic.php?p=12112#p12112
Original comment by tsukuyom...@gmail.com
on 11 Mar 2010 at 8:00
Great, it works.
I've integrated this into snes9x and made a patch against the svn HEAD.
The second patch additionally changes the type defines in jma/portable.h to C99
types, which probably makes it less portable but also makes a lot more sense
then
guessing the type sizes, in my mind.
Original comment by friedric...@gmail.com
on 13 Mar 2010 at 2:31
Attachments:
For some reason subversion didn't notice that lzmadec.cpp was deleted and left
it
out of the patch, so here's a patch made with git that includes that.
Original comment by friedric...@gmail.com
on 13 Mar 2010 at 2:48
Attachments:
Apparently the added files were ignored as well, so here's a patch that's been
actually tested. ;)
Original comment by friedric...@gmail.com
on 13 Mar 2010 at 11:27
Attachments:
And here's a new, less invasive patch based on the work of kode54 and Nach in
the
thread on byuu's board.
It should also retain, if not improve, portability.
I think this could actually be applied to svn.
Original comment by friedric...@gmail.com
on 26 Mar 2010 at 4:47
Attachments:
I've committed the new fix to this SVN and forwarded the info to the Snes9x
boards.
Original comment by bear...@gmail.com
on 27 Mar 2010 at 5:43
Great, thanks!
Original comment by friedric...@gmail.com
on 27 Mar 2010 at 8:47
I just noticed that the fix actually seems to break jma support on 32 bit.
Aparrently the return of sizeof being unsigned long triggers some sign
extension or
integer promotion it shouldn't, resulting in an endless loop.
So it needs this cast to int to work for both 32 and 64 bit.
I didn't retest that little change, since I didn't think that could break
anything.
Sorry about that.
Original comment by friedric...@gmail.com
on 2 Apr 2010 at 3:09
Attachments:
Ok, I committed the fix for the fix. I'm also going to mark this bug fixed, too.
Original comment by bear...@gmail.com
on 4 Apr 2010 at 10:37
Original issue reported on code.google.com by
friedric...@gmail.com
on 7 Feb 2010 at 5:29