notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eliminate texrels (wip)
[picodrive.git]
/
pico
/
cart.c
diff --git
a/pico/cart.c
b/pico/cart.c
index
377ecbc
..
1ce8059
100644
(file)
--- a/
pico/cart.c
+++ b/
pico/cart.c
@@
-8,9
+8,9
@@
*/
\r
\r
#include "pico_int.h"
\r
*/
\r
\r
#include "pico_int.h"
\r
-#include "../zlib/zlib.h"
\r
#include "../cpu/debug.h"
\r
#include "../unzip/unzip.h"
\r
#include "../cpu/debug.h"
\r
#include "../unzip/unzip.h"
\r
+#include <zlib.h>
\r
\r
\r
static int rom_alloc_size;
\r
\r
\r
static int rom_alloc_size;
\r
@@
-49,7
+49,7
@@
typedef struct _cso_struct
}
\r
cso_struct;
\r
\r
}
\r
cso_struct;
\r
\r
-static int uncompress
2
(void *dest, int destLen, void *source, int sourceLen)
\r
+static int uncompress
_buf
(void *dest, int destLen, void *source, int sourceLen)
\r
{
\r
z_stream stream;
\r
int err;
\r
{
\r
z_stream stream;
\r
int err;
\r
@@
-326,7
+326,7
@@
size_t pm_read(void *ptr, size_t bytes, pm_file *stream)
}
\r
cso->block_in_buff = block;
\r
}
\r
}
\r
cso->block_in_buff = block;
\r
}
\r
- rret = uncompress
2
(tmp_dst, 2048, cso->in_buff, read_len);
\r
+ rret = uncompress
_buf
(tmp_dst, 2048, cso->in_buff, read_len);
\r
if (rret != 0) {
\r
elprintf(EL_STATUS, "cso: uncompress failed @ %08x with %i", read_pos, rret);
\r
break;
\r
if (rret != 0) {
\r
elprintf(EL_STATUS, "cso: uncompress failed @ %08x with %i", read_pos, rret);
\r
break;
\r
@@
-569,7
+569,7
@@
int PicoCartLoad(pm_file *f,unsigned char **prom,unsigned int *psize,int is_sms)
bytes_read = pm_read(rom,size,f); // Load up the rom
\r
if (bytes_read <= 0) {
\r
elprintf(EL_STATUS, "read failed");
\r
bytes_read = pm_read(rom,size,f); // Load up the rom
\r
if (bytes_read <= 0) {
\r
elprintf(EL_STATUS, "read failed");
\r
-
free(rom
);
\r
+
plat_munmap(rom, rom_alloc_size
);
\r
return 3;
\r
}
\r
\r
return 3;
\r
}
\r
\r