runs code in 1M wram, cell arrange, decode (untested)

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@54 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-02-21 22:23:37 +00:00
parent 3a81ecde1c
commit fa1e5e2948
16 changed files with 787 additions and 551 deletions

View file

@ -764,6 +764,12 @@ static int check_save_file(void)
return 0;
}
static void emu_state_cb(const char *str)
{
clearArea(0);
blit("", str);
}
static void RunEvents(unsigned int which)
{
if(which & 0x1800) { // save or load (but not both)
@ -778,7 +784,10 @@ static void RunEvents(unsigned int which)
}
if (do_it) {
osd_text(4, 232, (which & 0x1000) ? "LOADING GAME" : "SAVING GAME");
PicoStateProgressCB = emu_state_cb;
gp2x_memcpy_all_buffers(gp2x_screen, 0, 320*240*2);
emu_SaveLoadGame((which & 0x1000) >> 12, 0);
PicoStateProgressCB = NULL;
}
reset_timing = 1;
@ -1263,20 +1272,11 @@ size_t gzWrite2(void *p, size_t _size, size_t _n, void *file)
}
static void emu_state_cb(const char *str)
{
clearArea(0);
blit("", str);
}
int emu_SaveLoadGame(int load, int sram)
{
int ret = 0;
char saveFname[512];
PicoStateProgressCB = emu_state_cb;
gp2x_memcpy_all_buffers(gp2x_screen, 0, 320*240*2);
// make save filename
romfname_ext(saveFname, "");
if(sram) strcat(saveFname, (PicoMCD&1) ? ".brm" : ".srm");