JPEG decoder

Since I recently ported libjpeg and libpng to the 32X I figured I should cook up some Saturn versions as well. The JPEG decoding example is already done and you can get it here: http://jiggawatt.org/badc0de/djpegsat.zip

The above zip includes a test binary that you can run from 0x6004000, as well as its source code and a precompiled libjpeg.a.

The modified libjpeg sources can be found here: http://jiggawatt.org/badc0de/jpeg-7-sat.zip

If you want to build the library, here are the commands you need to perform:

gcc ansi2knr.c

make -f makefile.unix libjpeg.a

I used a custom memory allocator since malloc didn't seem to work (at least on the 32X). I've hardcoded the heap location for the allocator to 0x06080000..0x0608F000 in the Saturn version. If you need to move the heap someplace else, look in MM_Startup in jdapimin.c.

If you're interested in the 32X versions you can find them here: http://jiggawatt.org/badc0de/console.htm#32x
 
Great stuff Mic, you did 3 usefull lib ports on saturn & 32x. They a so many used, i will serly help developers here :) .

Also any plan to port your Gameboy emulator on Saturn ?
 
I figured that there probably are other Gameboy emulators for the Saturn already that works better than mine - the 32X had none so that was the reason I ported it to the 32X. If I ever did a Saturn port I'd probably have to rewrite most of the PPU emulation code to take advantage of the Saturn's tiled BGs and/or sprites. That seems like the only way to achieve good performance.

Though TBH I think it'd be much cooler to use my SH2 Gameboy emulation code to write a GBS player for the 32X :whistling:
 
mic said:
I figured that there probably are other Gameboy emulators for the Saturn already that works better than mine

Rock'in-B did a port of GNUBoy but it wasn't yet optimized so your emu in asm may run better.

mic said:
I've cleaned up the library code a bit so that there's now a single archive for both the 32X and Saturn, with different makefiles depending on your target: http://jiggawatt.org/badc0de/jpeg-7-32x_sat.zip


Use:


make -f makefile.32x libjpeg.a


or


make -f makefile.saturn libjpeg.a


sounds good and easier for everybody :) thanks for the update.:rock:
 
Back
Top