mirror of
https://github.com/Oibaf66/fbzx-wii.git
synced 2024-12-01 04:24:16 +01:00
576p support
This commit is contained in:
parent
22f91ace59
commit
019e4d8524
@ -171,6 +171,7 @@ void computer_init () { //Called only on start-up
|
|||||||
ordenador.fetch_state =0;
|
ordenador.fetch_state =0;
|
||||||
ordenador.last_selected_poke_file[0]='\0';
|
ordenador.last_selected_poke_file[0]='\0';
|
||||||
ordenador.npixels=4;
|
ordenador.npixels=4;
|
||||||
|
ordenador.progressive=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void computer_set_palete() {
|
void computer_set_palete() {
|
||||||
|
@ -38,6 +38,7 @@ struct computer {
|
|||||||
|
|
||||||
unsigned char precision; //If set 1 emulate with more precision
|
unsigned char precision; //If set 1 emulate with more precision
|
||||||
unsigned char npixels; //1, 2 or 4 depending on dblscan and zaurus_mini
|
unsigned char npixels; //1, 2 or 4 depending on dblscan and zaurus_mini
|
||||||
|
unsigned char progressive; //interlace or progressive 576
|
||||||
unsigned int temporal_io;
|
unsigned int temporal_io;
|
||||||
|
|
||||||
// screen private global variables
|
// screen private global variables
|
||||||
|
@ -45,6 +45,8 @@
|
|||||||
#include <ogc/usbstorage.h>
|
#include <ogc/usbstorage.h>
|
||||||
#include <network.h>
|
#include <network.h>
|
||||||
#include <smb.h>
|
#include <smb.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -352,6 +354,38 @@ void load_rom(char type) {
|
|||||||
size=fread(ordenador.shadowrom,8192,1,fichero);
|
size=fread(ordenador.shadowrom,8192,1,fichero);
|
||||||
fclose(fichero);
|
fclose(fichero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int set_video_mode()
|
||||||
|
{
|
||||||
|
#ifdef GEKKO
|
||||||
|
GXRModeObj *rmode;
|
||||||
|
|
||||||
|
rmode = VIDEO_GetPreferredMode(NULL);
|
||||||
|
|
||||||
|
if ((rmode->viTVMode)!=VI_TVMODE_PAL_INT) return -1;
|
||||||
|
|
||||||
|
switch(ordenador.progressive)
|
||||||
|
{
|
||||||
|
case 0: //interlace
|
||||||
|
rmode=&TVPal576IntDfScale;
|
||||||
|
break;
|
||||||
|
case 1: //progressive
|
||||||
|
rmode=&TVPal576ProgScale;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rmode=&TVPal576IntDfScale;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
VIDEO_Configure(rmode);
|
||||||
|
VIDEO_Flush();
|
||||||
|
VIDEO_WaitVSync();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void init_sdl()
|
void init_sdl()
|
||||||
{
|
{
|
||||||
int retorno, bucle;
|
int retorno, bucle;
|
||||||
|
@ -51,5 +51,6 @@ FILE *myfopen(char *filename,char *mode);
|
|||||||
void init_sdl();
|
void init_sdl();
|
||||||
void init_sound();
|
void init_sound();
|
||||||
void init_screen(int resx,int resy,int depth,int fullscreen,int dblbuffer,int hwsurface);
|
void init_screen(int resx,int resy,int depth,int fullscreen,int dblbuffer,int hwsurface);
|
||||||
|
int set_video_mode();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -101,8 +101,11 @@ static const char *screen_messages[] = {
|
|||||||
/*03*/ "TV mode",
|
/*03*/ "TV mode",
|
||||||
/*04*/ "^|Color|B&W",
|
/*04*/ "^|Color|B&W",
|
||||||
/*05*/ " ",
|
/*05*/ " ",
|
||||||
/*06*/ "Resolution",
|
/*06*/ "Buffer resolution",
|
||||||
/*07*/ "^|640X480|320X240",
|
/*07*/ "^|640X480|320X240",
|
||||||
|
/*08*/ " ",
|
||||||
|
/*09*/ "576p video mode",
|
||||||
|
/*10*/ "^|on|off",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -409,7 +412,6 @@ static void manage_tape(int which)
|
|||||||
case 5: //Create
|
case 5: //Create
|
||||||
// Create tape
|
// Create tape
|
||||||
create_tapfile_sdl();
|
create_tapfile_sdl();
|
||||||
//msgInfo("Not yet implemented",3000,NULL);
|
|
||||||
break;
|
break;
|
||||||
case 6: //Delete
|
case 6: //Delete
|
||||||
delete_tape();
|
delete_tape();
|
||||||
@ -541,7 +543,7 @@ static void save_load_general_configurations(int);
|
|||||||
|
|
||||||
static void screen_settings(void)
|
static void screen_settings(void)
|
||||||
{
|
{
|
||||||
unsigned int submenus[3],submenus_old[3];
|
unsigned int submenus[4],submenus_old[4];
|
||||||
int opt, i;
|
int opt, i;
|
||||||
|
|
||||||
memset(submenus, 0, sizeof(submenus));
|
memset(submenus, 0, sizeof(submenus));
|
||||||
@ -549,8 +551,9 @@ static void screen_settings(void)
|
|||||||
submenus[0] = !ordenador.dblscan;
|
submenus[0] = !ordenador.dblscan;
|
||||||
submenus[1] = ordenador.bw;
|
submenus[1] = ordenador.bw;
|
||||||
submenus[2] = ordenador.zaurus_mini?1:0;
|
submenus[2] = ordenador.zaurus_mini?1:0;
|
||||||
|
submenus[3] = !ordenador.progressive;
|
||||||
|
|
||||||
for (i=0; i<3; i++) submenus_old[i] = submenus[i];
|
for (i=0; i<4; i++) submenus_old[i] = submenus[i];
|
||||||
|
|
||||||
|
|
||||||
opt = menu_select_title("Screen settings menu",
|
opt = menu_select_title("Screen settings menu",
|
||||||
@ -560,6 +563,7 @@ static void screen_settings(void)
|
|||||||
|
|
||||||
ordenador.dblscan = !submenus[0];
|
ordenador.dblscan = !submenus[0];
|
||||||
ordenador.bw = submenus[1];
|
ordenador.bw = submenus[1];
|
||||||
|
ordenador.progressive = !submenus[3];
|
||||||
|
|
||||||
if (submenus[0] != submenus_old[0]) update_npixels();
|
if (submenus[0] != submenus_old[0]) update_npixels();
|
||||||
|
|
||||||
@ -572,6 +576,14 @@ static void screen_settings(void)
|
|||||||
update_npixels();
|
update_npixels();
|
||||||
restart_video();
|
restart_video();
|
||||||
}
|
}
|
||||||
|
if (submenus[3] != submenus_old[3])
|
||||||
|
{
|
||||||
|
if (set_video_mode())
|
||||||
|
{
|
||||||
|
msgInfo("Only avalaible from 576i PAL",3000,NULL);
|
||||||
|
ordenador.progressive = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_joystick(int joy, unsigned int sdl_key, int joy_key)
|
static void setup_joystick(int joy, unsigned int sdl_key, int joy_key)
|
||||||
|
Loading…
Reference in New Issue
Block a user