Help with ME and zlib

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Help with ME and zlib

Post by phobox »

I'm trying to call zlib functions with media engine.
I'm using the prx by JF. i created a function to compress a buffer. if i run it on SC it works good, when i "load" it with ME it doesn't work.

here you can find the surce code of the app, the src of the prx is the same of displaytest of JF.
http://www.megaupload.com/?d=9XFOO5S0

ps: JF i found into your src of snes9x a folder called zlib. is that zlib converted to be used with ME?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Re: Help with ME and zlib

Post by J.F. »

phobox wrote:I'm trying to call zlib functions with media engine.
I'm using the prx by JF. i created a function to compress a buffer. if i run it on SC it works good, when i "load" it with ME it doesn't work.

here you can find the surce code of the app, the src of the prx is the same of displaytest of JF.
http://www.megaupload.com/?d=9XFOO5S0

ps: JF i found into your src of snes9x a folder called zlib. is that zlib converted to be used with ME?
No. The ME, in general, can't be used for anything that calls sce functions, including things like IO or allocating memory or whatnot. You should be able to use the ME to decompress things as long as it goes from data already loaded into memory to an already allocated output buffer.

Oh, also don't forget about the caches. You need to flush the SC dcache covering the compressed dat, invalidate the ME dcache covering the compressed data, decompress, flush the ME dcache covering the output buffer, then invalidate the SC dcache covering the output buffer.
Post Reply