mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
bugfix, sprites adjustment
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@521 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
2707a9cbaa
commit
84e21f25e4
6 changed files with 11 additions and 12 deletions
|
@ -52,6 +52,7 @@ void emu_textOut8 (int x, int y, const char *text);
|
||||||
void emu_textOut16(int x, int y, const char *text);
|
void emu_textOut16(int x, int y, const char *text);
|
||||||
char *emu_makeRomId(void);
|
char *emu_makeRomId(void);
|
||||||
void emu_findKeyBindCombos(void);
|
void emu_findKeyBindCombos(void);
|
||||||
|
void emu_forcedFrame(int opts);
|
||||||
|
|
||||||
extern const char * const keyNames[];
|
extern const char * const keyNames[];
|
||||||
void emu_prepareDefaultConfig(void);
|
void emu_prepareDefaultConfig(void);
|
||||||
|
|
10
gp2x/emu.c
10
gp2x/emu.c
|
@ -141,7 +141,7 @@ void emu_prepareDefaultConfig(void)
|
||||||
{
|
{
|
||||||
memset(&defaultConfig, 0, sizeof(defaultConfig));
|
memset(&defaultConfig, 0, sizeof(defaultConfig));
|
||||||
defaultConfig.EmuOpt = 0x1d | 0x00700; // | <- ram_tmng, confirm_save, cd_leds
|
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_PsndRate = 44100;
|
||||||
defaultConfig.s_PicoRegion = 0; // auto
|
defaultConfig.s_PicoRegion = 0; // auto
|
||||||
defaultConfig.s_PicoAutoRgnOrder = 0x184; // US, EU, JP
|
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 po_old = PicoOpt;
|
||||||
int eo_old = currentConfig.EmuOpt;
|
int eo_old = currentConfig.EmuOpt;
|
||||||
|
|
||||||
PicoOpt &= ~0x0010;
|
PicoOpt &= ~0x10;
|
||||||
PicoOpt |= 0x4080; // soft_scale | acc_sprites
|
PicoOpt |= opts|POPT_ACC_SPRITES; // acc_sprites
|
||||||
currentConfig.EmuOpt |= 0x80;
|
currentConfig.EmuOpt |= 0x80;
|
||||||
|
|
||||||
//vidResetMode();
|
//vidResetMode();
|
||||||
|
@ -1057,7 +1057,7 @@ void emu_Loop(void)
|
||||||
|
|
||||||
// if in 8bit mode, generate 16bit image for menu background
|
// if in 8bit mode, generate 16bit image for menu background
|
||||||
if ((PicoOpt&0x10) || !(currentConfig.EmuOpt&0x80))
|
if ((PicoOpt&0x10) || !(currentConfig.EmuOpt&0x80))
|
||||||
emu_forcedFrame();
|
emu_forcedFrame(POPT_EN_SOFTSCALE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ void emu_Init(void);
|
||||||
void emu_Deinit(void);
|
void emu_Deinit(void);
|
||||||
void emu_Loop(void);
|
void emu_Loop(void);
|
||||||
void emu_ResetGame(void);
|
void emu_ResetGame(void);
|
||||||
void emu_forcedFrame(void);
|
|
||||||
|
|
||||||
void osd_text(int x, int y, const char *text);
|
void osd_text(int x, int y, const char *text);
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,7 @@ static void draw_frame_debug(void)
|
||||||
if (PicoDrawMask & PDRAW_SPRITES_HI_ON) memcpy(layer_str + 19, "spr_hi", 6);
|
if (PicoDrawMask & PDRAW_SPRITES_HI_ON) memcpy(layer_str + 19, "spr_hi", 6);
|
||||||
|
|
||||||
memset(gp2x_screen, 0, 320*240*2);
|
memset(gp2x_screen, 0, 320*240*2);
|
||||||
emu_forcedFrame();
|
emu_forcedFrame(0);
|
||||||
smalltext_out16(4, 232, layer_str, 0xffff);
|
smalltext_out16(4, 232, layer_str, 0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ static void draw_savestate_bg(int slot)
|
||||||
areaClose(file);
|
areaClose(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
emu_forcedFrame();
|
emu_forcedFrame(POPT_EN_SOFTSCALE);
|
||||||
menu_prepare_bg(1);
|
menu_prepare_bg(1);
|
||||||
|
|
||||||
memcpy(Pico.vram, tmp_vram, sizeof(Pico.vram));
|
memcpy(Pico.vram, tmp_vram, sizeof(Pico.vram));
|
||||||
|
|
|
@ -687,13 +687,13 @@ static void SkipFrame(void)
|
||||||
PicoSkipFrame=0;
|
PicoSkipFrame=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void emu_forcedFrame(void)
|
void emu_forcedFrame(int opts)
|
||||||
{
|
{
|
||||||
int po_old = PicoOpt;
|
int po_old = PicoOpt;
|
||||||
int eo_old = currentConfig.EmuOpt;
|
int eo_old = currentConfig.EmuOpt;
|
||||||
|
|
||||||
PicoOpt &= ~0x0010;
|
PicoOpt &= ~0x10;
|
||||||
PicoOpt |= 0x4080; // soft_scale | acc_sprites
|
PicoOpt |= opts|POPT_ACC_SPRITES
|
||||||
currentConfig.EmuOpt |= 0x80;
|
currentConfig.EmuOpt |= 0x80;
|
||||||
|
|
||||||
vidResetMode();
|
vidResetMode();
|
||||||
|
|
|
@ -25,7 +25,6 @@ void emu_Init(void);
|
||||||
void emu_Deinit(void);
|
void emu_Deinit(void);
|
||||||
void emu_Loop(void);
|
void emu_Loop(void);
|
||||||
void emu_ResetGame(void);
|
void emu_ResetGame(void);
|
||||||
void emu_forcedFrame(void);
|
|
||||||
void emu_HandleResume(void);
|
void emu_HandleResume(void);
|
||||||
|
|
||||||
void emu_msg_cb(const char *msg);
|
void emu_msg_cb(const char *msg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue