mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
work on 'vblank on line start' problem, var changes, mask defines
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@408 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
0fb424dbee
commit
dd5fd4778d
10 changed files with 58 additions and 725 deletions
|
@ -611,7 +611,7 @@ int mp3_get_offset(void)
|
|||
unsigned int offs1024 = 0;
|
||||
int cdda_on;
|
||||
|
||||
cdda_on = (PicoMCD & 1) && (PicoOpt&0x800) && !(Pico_mcd->s68k_regs[0x36] & 1) &&
|
||||
cdda_on = (PicoAHW & PAHW_MCD) && (PicoOpt&0x800) && !(Pico_mcd->s68k_regs[0x36] & 1) &&
|
||||
(Pico_mcd->scd.Status_CDC & 1) && loaded_mp3;
|
||||
|
||||
if (cdda_on) {
|
||||
|
|
28
gp2x/emu.c
28
gp2x/emu.c
|
@ -225,18 +225,18 @@ static void cd_leds(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int EmuScan16(unsigned int num, void *sdata)
|
||||
static int EmuScanBegin16(unsigned int num)
|
||||
{
|
||||
if (!(Pico.video.reg[1]&8)) num += 8;
|
||||
DrawLineDest = (unsigned short *) gp2x_screen + 320*(num+1);
|
||||
DrawLineDest = (unsigned short *) gp2x_screen + 320 * num;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int EmuScan8(unsigned int num, void *sdata)
|
||||
static int EmuScanBegin8(unsigned int num)
|
||||
{
|
||||
if (!(Pico.video.reg[1]&8)) num += 8;
|
||||
DrawLineDest = (unsigned char *) gp2x_screen + 320*(num+1);
|
||||
DrawLineDest = (unsigned char *) gp2x_screen + 320 * num;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -266,7 +266,8 @@ static void blit(const char *fps, const char *notice)
|
|||
else if (!(emu_opt&0x80))
|
||||
{
|
||||
// 8bit accurate renderer
|
||||
if (Pico.m.dirtyPal) {
|
||||
if (Pico.m.dirtyPal)
|
||||
{
|
||||
Pico.m.dirtyPal = 0;
|
||||
if(Pico.video.reg[0xC]&8) { // shadow/hilight mode
|
||||
vidConvCpyRGB32(localPal, Pico.cram, 0x40);
|
||||
|
@ -278,7 +279,7 @@ static void blit(const char *fps, const char *notice)
|
|||
localPal[0xe0] = 0x00000000; // reserved pixels for OSD
|
||||
localPal[0xf0] = 0x00ffffff;
|
||||
gp2x_video_setpalette(localPal, 0x100);
|
||||
} else if (rendstatus & 0x20) { // mid-frame palette changes
|
||||
} else if (rendstatus & PDRAW_SONIC_MODE) { // mid-frame palette changes
|
||||
vidConvCpyRGB32(localPal, Pico.cram, 0x40);
|
||||
vidConvCpyRGB32(localPal+0x40, HighPal, 0x40);
|
||||
vidConvCpyRGB32(localPal+0x80, HighPal+0x40, 0x40);
|
||||
|
@ -297,7 +298,7 @@ static void blit(const char *fps, const char *notice)
|
|||
if (emu_opt & 2)
|
||||
osd_text(osd_fps_x, h, fps);
|
||||
}
|
||||
if ((emu_opt & 0x400) && (PicoMCD & 1))
|
||||
if ((emu_opt & 0x400) && (PicoAHW & PAHW_MCD))
|
||||
cd_leds();
|
||||
|
||||
//gp2x_video_wait_vsync();
|
||||
|
@ -339,13 +340,11 @@ static void vidResetMode(void)
|
|||
} else if (currentConfig.EmuOpt&0x80) {
|
||||
gp2x_video_changemode(16);
|
||||
PicoDrawSetColorFormat(1);
|
||||
PicoScan = EmuScan16;
|
||||
PicoScan(0, 0);
|
||||
PicoScanBegin = EmuScanBegin16;
|
||||
} else {
|
||||
gp2x_video_changemode(8);
|
||||
PicoDrawSetColorFormat(2);
|
||||
PicoScan = EmuScan8;
|
||||
PicoScan(0, 0);
|
||||
PicoScanBegin = EmuScanBegin8;
|
||||
}
|
||||
if ((PicoOpt&0x10)||!(currentConfig.EmuOpt&0x80)) {
|
||||
// setup pal for 8-bit modes
|
||||
|
@ -625,8 +624,7 @@ void emu_forcedFrame(void)
|
|||
|
||||
//vidResetMode();
|
||||
PicoDrawSetColorFormat(1);
|
||||
PicoScan = EmuScan16;
|
||||
PicoScan(0, 0);
|
||||
PicoScanBegin = EmuScanBegin16;
|
||||
Pico.m.dirtyPal = 1;
|
||||
PicoFrameDrawOnly();
|
||||
|
||||
|
@ -782,7 +780,7 @@ void emu_Loop(void)
|
|||
}
|
||||
|
||||
// prepare CD buffer
|
||||
if (PicoMCD & 1) PicoCDBufferInit();
|
||||
if (PicoAHW & PAHW_MCD) PicoCDBufferInit();
|
||||
|
||||
// calc vsync offset to sync timing code with vsync
|
||||
if (currentConfig.EmuOpt&0x2000) {
|
||||
|
@ -960,7 +958,7 @@ void emu_Loop(void)
|
|||
|
||||
change_fast_forward(0);
|
||||
|
||||
if (PicoMCD & 1) PicoCDBufferFree();
|
||||
if (PicoAHW & PAHW_MCD) PicoCDBufferFree();
|
||||
|
||||
// save SRAM
|
||||
if((currentConfig.EmuOpt & 1) && SRam.changed) {
|
||||
|
|
10
gp2x/menu.c
10
gp2x/menu.c
|
@ -553,7 +553,7 @@ static void draw_savestate_bg(int slot)
|
|||
}
|
||||
|
||||
if (file) {
|
||||
if (PicoMCD & 1) {
|
||||
if (PicoAHW & PAHW_MCD) {
|
||||
PicoCdLoadStateGfx(file);
|
||||
} else {
|
||||
areaSeek(file, 0x10020, SEEK_SET); // skip header and RAM in state file
|
||||
|
@ -878,7 +878,7 @@ static void kc_sel_loop(void)
|
|||
{
|
||||
int menu_sel = 3, menu_sel_max = 3;
|
||||
unsigned long inp = 0;
|
||||
int is_6button = PicoOpt & 0x020;
|
||||
int is_6button = PicoOpt & POPT_6BTN_PAD;
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -1174,7 +1174,7 @@ static void menu_opt_cust_draw(const menu_entry *entry, int x, int y, void *para
|
|||
switch (entry->id)
|
||||
{
|
||||
case MA_OPT_RENDERER:
|
||||
if (PicoOpt&0x10)
|
||||
if (PicoOpt & POPT_ALT_RENDERER)
|
||||
str = " 8bit fast";
|
||||
else if (currentConfig.EmuOpt&0x80)
|
||||
str = "16bit accurate";
|
||||
|
@ -1198,7 +1198,7 @@ static void menu_opt_cust_draw(const menu_entry *entry, int x, int y, void *para
|
|||
text_out16(x, y, "Frameskip %s", str24);
|
||||
break;
|
||||
case MA_OPT_SOUND_QUALITY:
|
||||
str = (PicoOpt&0x08)?"stereo":"mono";
|
||||
str = (PicoOpt & POPT_EN_STEREO) ? "stereo" : "mono";
|
||||
text_out16(x, y, "Sound Quality: %5iHz %s", PsndRate, str);
|
||||
break;
|
||||
case MA_OPT_REGION:
|
||||
|
@ -1288,7 +1288,7 @@ static void menu_options_save(void)
|
|||
// force setting possibly changed..
|
||||
Pico.m.pal = (PicoRegionOverride == 2 || PicoRegionOverride == 8) ? 1 : 0;
|
||||
}
|
||||
if (!(PicoOpt & 0x20)) {
|
||||
if (!(PicoOpt & POPT_6BTN_PAD)) {
|
||||
// unbind XYZ MODE, just in case
|
||||
unbind_action(0xf00, -1, -1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue