mirror of
https://github.com/Oibaf66/fbzx-wii.git
synced 2024-11-24 09:09:20 +01:00
Ignore .z80 joystick conf option, longer pause before activating tape
This commit is contained in:
parent
3ee3ad572f
commit
526d10d6b4
@ -208,7 +208,7 @@ void virtkey_ir_run(void)
|
||||
int key_h = 64/RATIO;
|
||||
int border_x = VirtualKeyboard.sel_x/RATIO;
|
||||
int border_y = VirtualKeyboard.sel_y/RATIO;
|
||||
int key = 0;
|
||||
int key_sel = 0;
|
||||
SDL_Joystick *joy;
|
||||
static int joy_bottons_last[4];
|
||||
static char countdown_rumble=0;
|
||||
@ -223,7 +223,7 @@ void virtkey_ir_run(void)
|
||||
(SDL_JoystickGetButton(joy, 3) && !joy_bottons_last[1]) || /* 2 */
|
||||
(SDL_JoystickGetButton(joy, 9) && !joy_bottons_last[2]) || /* CA */
|
||||
(SDL_JoystickGetButton(joy, 10) && !joy_bottons_last[3])) /* CB */
|
||||
key = KEY_SELECT;
|
||||
key_sel = KEY_SELECT;
|
||||
|
||||
joy_bottons_last[0]=SDL_JoystickGetButton(joy, 0) ; /* A */
|
||||
joy_bottons_last[1] =SDL_JoystickGetButton(joy, 3) ; /* 2 */
|
||||
@ -231,7 +231,7 @@ void virtkey_ir_run(void)
|
||||
joy_bottons_last[3] =SDL_JoystickGetButton(joy, 10) ; /* CB */
|
||||
|
||||
|
||||
if (key==KEY_SELECT)
|
||||
if (key_sel==KEY_SELECT)
|
||||
{
|
||||
SDL_GetMouseState(&xm, &ym);
|
||||
x = (xm-border_x);
|
||||
@ -272,7 +272,8 @@ void virtkey_ir_run(void)
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
draw_vk();
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
}
|
||||
}
|
||||
key_sel=0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -597,7 +597,7 @@ void load_snap(struct z80snapshot *snap) {
|
||||
break;
|
||||
}
|
||||
|
||||
ordenador.joystick[0]=snap->joystick; //Only one Joystick in Z80 file
|
||||
if (ordenador.ignore_z80_joy_conf==0) ordenador.joystick[0]=snap->joystick; //Only one Joystick in Z80 file
|
||||
|
||||
procesador.Rm.br.A=snap->A;
|
||||
procesador.Rm.br.F=snap->F;
|
||||
|
@ -173,7 +173,7 @@ void computer_init () { //Called only on start-up
|
||||
strcpy (ordenador.SmbShare, "Share");
|
||||
strcpy (ordenador.SmbIp, "192.168.0.1");
|
||||
ordenador.autoconf=0;
|
||||
|
||||
ordenador.ignore_z80_joy_conf=0;
|
||||
ordenador.cpufreq = 3500000; // values for 48K mode
|
||||
ordenador.fetch_state =0;
|
||||
ordenador.last_selected_poke_file[0]='\0';
|
||||
|
@ -144,6 +144,8 @@ struct computer {
|
||||
signed char ay_envel_value;
|
||||
unsigned char ay_envel_way;
|
||||
//unsigned char sound_current_value;
|
||||
|
||||
//Z80 instruction variables
|
||||
unsigned int wr;
|
||||
unsigned int r_fetch;
|
||||
unsigned int io;
|
||||
@ -245,6 +247,10 @@ struct computer {
|
||||
unsigned char vk_auto;
|
||||
unsigned char vk_rumble;
|
||||
unsigned char vk_is_active;
|
||||
unsigned char autoconf;
|
||||
unsigned char ignore_z80_joy_conf;
|
||||
|
||||
//Port variables
|
||||
unsigned char port; //SD, USB, SMB or FTP
|
||||
unsigned char smb_enable;
|
||||
unsigned char SmbUser[32];
|
||||
@ -258,7 +264,7 @@ struct computer {
|
||||
unsigned char FTPIp[64];
|
||||
unsigned char FTPPassive;
|
||||
unsigned short FTPPort;
|
||||
unsigned char autoconf;
|
||||
|
||||
};
|
||||
|
||||
void computer_init();
|
||||
|
@ -718,6 +718,7 @@ int save_config(struct computer *object, char *filename) {
|
||||
fprintf(fconfig,"rumble2=%c%c",48+object->rumble[1],10);
|
||||
fprintf(fconfig,"port=%c%c",48+object->port,10);
|
||||
fprintf(fconfig,"autoconf=%c%c",48+object->autoconf,10);
|
||||
fprintf(fconfig,"ignore_z80_joy_conf=%c%c",48+object->ignore_z80_joy_conf,10);
|
||||
fprintf(fconfig,"turbo=%c%c",48+object->turbo,10);
|
||||
fprintf(fconfig,"vk_auto=%c%c",48+object->vk_auto,10);
|
||||
fprintf(fconfig,"vk_rumble=%c%c",48+object->vk_rumble,10);
|
||||
@ -889,7 +890,7 @@ int load_config(struct computer *object, char *filename) {
|
||||
unsigned char volume=255,mode128k=255,issue=255,ntsc=255, joystick1=255,joystick2=255,ay_emul=255,mdr_active=255,
|
||||
dblscan=255,framerate =255, screen =255, text=255, precision=255, bw=255, tap_fast=255, audio_mode=255,
|
||||
joypad1=255, joypad2=255, rumble1=255, rumble2=255, joy_n=255, key_n=255, port=255, autoconf=255, turbo=225, vk_auto=255, vk_rumble=255,
|
||||
rewind_on_reset=255, pause_instant_load =255;
|
||||
rewind_on_reset=255, pause_instant_load =255, ignore_z80_joy_conf=255;
|
||||
|
||||
if (filename) strcpy(config_path,filename);
|
||||
else return -2;
|
||||
@ -1019,6 +1020,10 @@ int load_config(struct computer *object, char *filename) {
|
||||
autoconf=line[9]-'0';
|
||||
continue;
|
||||
}
|
||||
if (!strncmp(line,"ignore_z80_joy_conf=",20)) {
|
||||
ignore_z80_joy_conf=line[20]-'0';
|
||||
continue;
|
||||
}
|
||||
if (!strncmp(line,"turbo=",6)) {
|
||||
turbo=line[6]-'0';
|
||||
continue;
|
||||
@ -1113,6 +1118,9 @@ int load_config(struct computer *object, char *filename) {
|
||||
if (autoconf<2) {
|
||||
object->autoconf=autoconf;
|
||||
}
|
||||
if (ignore_z80_joy_conf<2) {
|
||||
object->ignore_z80_joy_conf=ignore_z80_joy_conf;
|
||||
}
|
||||
if (turbo<2) {
|
||||
object->turbo=turbo;
|
||||
}
|
||||
|
@ -199,6 +199,10 @@ static const char *confs_messages[] = {
|
||||
/*05*/ " ",
|
||||
/*06*/ "Load confs automatically",
|
||||
/*07*/ "^|on|off",
|
||||
/*08*/ " ",
|
||||
/*09*/ "Ignore .z80 joystick confs",
|
||||
/*10*/ "^|on|off",
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -1794,7 +1798,7 @@ static void save_load_general_configurations(int which)
|
||||
static void manage_configurations()
|
||||
{
|
||||
int opt , retorno;
|
||||
int submenus[3];
|
||||
int submenus[4];
|
||||
|
||||
|
||||
memset(submenus, 0, sizeof(submenus));
|
||||
@ -1802,13 +1806,15 @@ static void manage_configurations()
|
||||
retorno = -1; //Exit from menu as default
|
||||
|
||||
submenus[2]=!ordenador.autoconf;
|
||||
submenus[3]=!ordenador.ignore_z80_joy_conf;
|
||||
|
||||
opt = menu_select_title("Configurations file menu",
|
||||
confs_messages, submenus);
|
||||
if (opt < 0)
|
||||
return;
|
||||
|
||||
ordenador.autoconf=!submenus[2];
|
||||
ordenador.autoconf=!submenus[2];
|
||||
ordenador.ignore_z80_joy_conf=!submenus[3];
|
||||
|
||||
switch(opt)
|
||||
{
|
||||
|
@ -1187,7 +1187,7 @@ void fastload_block_tzx (FILE * fichero) {
|
||||
jump_frames=7;
|
||||
ordenador.turbo_state=4;
|
||||
}
|
||||
ordenador.tape_start_countdwn=((unsigned int)pause[0]+256*(unsigned int)pause[1])/30+1; //autoplay countdown
|
||||
ordenador.tape_start_countdwn=((unsigned int)pause[0]+256*(unsigned int)pause[1])/20+1; //autoplay countdown
|
||||
}
|
||||
else if (ordenador.pause_instant_load)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user