From: notaz Date: Fri, 4 Jul 2008 22:20:48 +0000 (+0000) Subject: bugfix, sprites adjustment X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84e21f25e41b90d9729088dba5991a84330964ea;p=libpicofe.git bugfix, sprites adjustment git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@521 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/common/emu.h b/common/emu.h index d118e5b..922633a 100644 --- a/common/emu.h +++ b/common/emu.h @@ -52,6 +52,7 @@ void emu_textOut8 (int x, int y, const char *text); void emu_textOut16(int x, int y, const char *text); char *emu_makeRomId(void); void emu_findKeyBindCombos(void); +void emu_forcedFrame(int opts); extern const char * const keyNames[]; void emu_prepareDefaultConfig(void); diff --git a/gp2x/emu.c b/gp2x/emu.c index 5f4a0e2..92a1831 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -141,7 +141,7 @@ void emu_prepareDefaultConfig(void) { memset(&defaultConfig, 0, sizeof(defaultConfig)); defaultConfig.EmuOpt = 0x1d | 0x00700; // | <- ram_tmng, confirm_save, cd_leds - defaultConfig.s_PicoOpt = 0x0f | 0x20e00; // | <- use_940, cd_pcm, cd_cdda, svp drc + defaultConfig.s_PicoOpt = 0x0f | POPT_EXT_FM|POPT_EN_MCD_PCM|POPT_EN_MCD_CDDA|POPT_EN_SVP_DRC|POPT_ACC_SPRITES; defaultConfig.s_PsndRate = 44100; defaultConfig.s_PicoRegion = 0; // auto defaultConfig.s_PicoAutoRgnOrder = 0x184; // US, EU, JP @@ -701,13 +701,13 @@ static void SkipFrame(int do_audio) } -void emu_forcedFrame(void) +void emu_forcedFrame(int opts) { int po_old = PicoOpt; int eo_old = currentConfig.EmuOpt; - PicoOpt &= ~0x0010; - PicoOpt |= 0x4080; // soft_scale | acc_sprites + PicoOpt &= ~0x10; + PicoOpt |= opts|POPT_ACC_SPRITES; // acc_sprites currentConfig.EmuOpt |= 0x80; //vidResetMode(); @@ -1057,7 +1057,7 @@ void emu_Loop(void) // if in 8bit mode, generate 16bit image for menu background if ((PicoOpt&0x10) || !(currentConfig.EmuOpt&0x80)) - emu_forcedFrame(); + emu_forcedFrame(POPT_EN_SOFTSCALE); } diff --git a/gp2x/emu.h b/gp2x/emu.h index 8eddd1f..88947b5 100644 --- a/gp2x/emu.h +++ b/gp2x/emu.h @@ -24,7 +24,6 @@ void emu_Init(void); void emu_Deinit(void); void emu_Loop(void); void emu_ResetGame(void); -void emu_forcedFrame(void); void osd_text(int x, int y, const char *text); diff --git a/gp2x/menu.c b/gp2x/menu.c index b7c926f..76eb73e 100644 --- a/gp2x/menu.c +++ b/gp2x/menu.c @@ -463,7 +463,7 @@ static void draw_frame_debug(void) if (PicoDrawMask & PDRAW_SPRITES_HI_ON) memcpy(layer_str + 19, "spr_hi", 6); memset(gp2x_screen, 0, 320*240*2); - emu_forcedFrame(); + emu_forcedFrame(0); smalltext_out16(4, 232, layer_str, 0xffff); } @@ -605,7 +605,7 @@ static void draw_savestate_bg(int slot) areaClose(file); } - emu_forcedFrame(); + emu_forcedFrame(POPT_EN_SOFTSCALE); menu_prepare_bg(1); memcpy(Pico.vram, tmp_vram, sizeof(Pico.vram)); diff --git a/psp/emu.c b/psp/emu.c index 4857371..09b5d46 100644 --- a/psp/emu.c +++ b/psp/emu.c @@ -687,13 +687,13 @@ static void SkipFrame(void) PicoSkipFrame=0; } -void emu_forcedFrame(void) +void emu_forcedFrame(int opts) { int po_old = PicoOpt; int eo_old = currentConfig.EmuOpt; - PicoOpt &= ~0x0010; - PicoOpt |= 0x4080; // soft_scale | acc_sprites + PicoOpt &= ~0x10; + PicoOpt |= opts|POPT_ACC_SPRITES currentConfig.EmuOpt |= 0x80; vidResetMode(); diff --git a/psp/emu.h b/psp/emu.h index 17b20e7..61e4e7a 100644 --- a/psp/emu.h +++ b/psp/emu.h @@ -25,7 +25,6 @@ void emu_Init(void); void emu_Deinit(void); void emu_Loop(void); void emu_ResetGame(void); -void emu_forcedFrame(void); void emu_HandleResume(void); void emu_msg_cb(const char *msg);