loading msgs, bugfixes

git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@69 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-03-16 20:59:11 +00:00
parent 2fb6c38782
commit dfa4c846f4
4 changed files with 28 additions and 2 deletions

View file

@ -563,6 +563,12 @@ void mp3_start_play(FILE *f, int pos) // pos is 0-1023
if (loaded_mp3 != f)
{
// printf("loading mp3... "); fflush(stdout);
if (PicoMessage != NULL)
{
fseek(f, 0, SEEK_END);
if (ftell(f) > 2*1024*1024)
PicoMessage("Loading MP3...");
}
fseek(f, 0, SEEK_SET);
fread(mp3_mem, 1, MP3_SIZE_MAX, f);
// if (feof(f)) printf("done.\n");

View file

@ -8,7 +8,7 @@ CROSS = arm-linux-
dprint = 1
#mz80 = 1
#debug_cyclone = 1
asm_memory = 0 # TODO
asm_memory = 1
asm_render = 1
asm_ym2612 = 1
asm_misc = 1

View file

@ -393,6 +393,8 @@ int emu_ReloadRom(void)
}
static void emu_msg_cb(const char *msg);
void emu_Init(void)
{
// make temp buffer for alt renderer
@ -409,6 +411,7 @@ void emu_Init(void)
mkdir("cfg", 0777);
PicoInit();
PicoMessage = emu_msg_cb;
// logf = fopen("log.txt", "w");
}
@ -771,6 +774,23 @@ static void vidResetMode(void)
}
static void emu_msg_cb(const char *msg)
{
if ((PicoOpt&0x10)||!(currentConfig.EmuOpt&0x80)) {
// 8-bit renderers
gp2x_memset_all_buffers(320*232, 0xe0, 320*8);
osd_text(4, 232, msg);
gp2x_memcpy_all_buffers((char *)gp2x_screen+320*232, 320*232, 320*8);
} else {
// 16bit accurate renderer
gp2x_memset_all_buffers(320*232*2, 0, 320*8*2);
osd_text(4, 232, msg);
gp2x_memcpy_all_buffers((char *)gp2x_screen+320*232*2, 320*232*2, 320*8*2);
}
gettimeofday(&noticeMsgTime, 0);
noticeMsgTime.tv_sec -= 2;
}
static void emu_state_cb(const char *str)
{
clearArea(0);

View file

@ -744,7 +744,7 @@ static void draw_cd_menu_options(int menu_sel, char *b_us, char *b_eu, char *b_j
gp2x_text_out8(tl_x, (y+=10), "CD LEDs %s", (currentConfig.EmuOpt &0x0400)?"ON":"OFF"); // 3
gp2x_text_out8(tl_x, (y+=10), "CDDA audio (using mp3s) %s", (currentConfig.PicoOpt&0x0800)?"ON":"OFF"); // 4
gp2x_text_out8(tl_x, (y+=10), "PCM audio %s", (currentConfig.PicoOpt&0x0400)?"ON":"OFF"); // 5
gp2x_text_out8(tl_x, (y+=10), "Better sync (slow) %s", (currentConfig.PicoOpt&0x2000)?"ON":"OFF"); // 6
gp2x_text_out8(tl_x, (y+=10), "Better sync (slower) %s", (currentConfig.PicoOpt&0x2000)?"ON":"OFF"); // 6
gp2x_text_out8(tl_x, (y+=10), "ReadAhead buffer %s", ra_buff); // 7
gp2x_text_out8(tl_x, (y+=10), "Done");