Fixed recently ported code
This commit is contained in:
@@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
//C++ style code in C
|
//C++ style code in C
|
||||||
#define bool unsigned char
|
#define bool unsigned char
|
||||||
@@ -25,32 +25,30 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|||||||
#define false 0
|
#define false 0
|
||||||
|
|
||||||
extern void outofmemory();
|
extern void outofmemory();
|
||||||
extern int *spc7110romptr;
|
extern unsigned char *spc7110romptr;
|
||||||
extern int *StateBackup;
|
extern unsigned char *StateBackup;
|
||||||
extern int *spcBuffera;
|
extern unsigned char *spcBuffera;
|
||||||
extern int *spritetablea;
|
extern unsigned char *spritetablea;
|
||||||
extern int *vbufaptr;
|
extern unsigned char *vbufaptr;
|
||||||
extern int *vbufeptr;
|
extern unsigned char *vbufeptr;
|
||||||
extern int *ngwinptrb;
|
extern unsigned char *ngwinptrb;
|
||||||
extern int *vbufdptr;
|
extern unsigned char *vbufdptr;
|
||||||
extern int *vcache2bs;
|
extern unsigned char *vcache2bs;
|
||||||
extern int *vcache4bs;
|
extern unsigned char *vcache4bs;
|
||||||
extern int *vcache8bs;
|
extern unsigned char *vcache8bs;
|
||||||
extern int *RGBtoYUVPtr;
|
extern unsigned char *RGBtoYUVPtr;
|
||||||
extern int *romaptr;
|
extern unsigned char *romaptr;
|
||||||
|
|
||||||
|
|
||||||
int doMemAlloc(int *ptr, int size)
|
void *doMemAlloc(int size)
|
||||||
{
|
{
|
||||||
int result = 0;
|
void *ptr = NULL;
|
||||||
|
|
||||||
ptr = malloc(size);
|
ptr = malloc(size);
|
||||||
if (ptr) result = 1;
|
if (!ptr) { outofmemory(); }
|
||||||
|
return(ptr);
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void allocspc7110()
|
void allocspc7110()
|
||||||
{
|
{
|
||||||
if (!doMemAlloc(spc7110romptr, 8192*1024+4096)) outofmemory();
|
spc7110romptr = (unsigned char *)doMemAlloc(8192*1024+4096);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user