mirror of
https://github.com/Oibaf66/fbzx-wii.git
synced 2024-12-26 08:31:55 +01:00
Pause instant load option, improved load command, QAOP joystick, CBA ay Audio
This commit is contained in:
parent
0a281faeba
commit
efa831330a
@ -119,6 +119,7 @@ void computer_init () { //Called only on start-up
|
|||||||
ordenador.pause = 1; // tape stop
|
ordenador.pause = 1; // tape stop
|
||||||
ordenador.tape_fast_load = 1; // fast load by default
|
ordenador.tape_fast_load = 1; // fast load by default
|
||||||
ordenador.rewind_on_reset = 1; //Rewound on reset by default
|
ordenador.rewind_on_reset = 1; //Rewound on reset by default
|
||||||
|
ordenador.pause_instant_load = 0;
|
||||||
ordenador.tape_current_mode = TAP_TRASH;
|
ordenador.tape_current_mode = TAP_TRASH;
|
||||||
ordenador.tap_file = NULL;
|
ordenador.tap_file = NULL;
|
||||||
|
|
||||||
@ -561,6 +562,7 @@ inline void show_screen (int tstados) {
|
|||||||
curr_frames++;
|
curr_frames++;
|
||||||
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
||||||
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
||||||
|
if (ordenador.pause_fastload_countdwn>0) ordenador.pause_fastload_countdwn--;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -666,6 +668,7 @@ inline void show_screen (int tstados) {
|
|||||||
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
||||||
|
|
||||||
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
||||||
|
if (ordenador.pause_fastload_countdwn>0) ordenador.pause_fastload_countdwn--;
|
||||||
|
|
||||||
if (ordenador.mustlock) {
|
if (ordenador.mustlock) {
|
||||||
SDL_UnlockSurface (ordenador.screen);
|
SDL_UnlockSurface (ordenador.screen);
|
||||||
@ -708,6 +711,7 @@ inline void show_screen_precision (int tstados) {
|
|||||||
curr_frames++;
|
curr_frames++;
|
||||||
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
||||||
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
||||||
|
if (ordenador.pause_fastload_countdwn>0) ordenador.pause_fastload_countdwn--;
|
||||||
}
|
}
|
||||||
//if (ordenador.tstados_counter > 31) ordenador.interr = 0;
|
//if (ordenador.tstados_counter > 31) ordenador.interr = 0;
|
||||||
return;
|
return;
|
||||||
@ -911,6 +915,7 @@ inline void show_screen_precision (int tstados) {
|
|||||||
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
if (ordenador.tape_start_countdwn==1) ordenador.pause=0; //Autoplay
|
||||||
|
|
||||||
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
if (ordenador.tape_start_countdwn>0) ordenador.tape_start_countdwn--;
|
||||||
|
if (ordenador.pause_fastload_countdwn>0) ordenador.pause_fastload_countdwn--;
|
||||||
|
|
||||||
if (ordenador.mustlock) {
|
if (ordenador.mustlock) {
|
||||||
SDL_UnlockSurface (ordenador.screen);
|
SDL_UnlockSurface (ordenador.screen);
|
||||||
@ -1247,8 +1252,10 @@ inline void read_keyboard () {
|
|||||||
|
|
||||||
case SDLK_F9:
|
case SDLK_F9:
|
||||||
//Emulate load ""
|
//Emulate load ""
|
||||||
if (ordenador.mode128k==4) //Spanish 128k
|
countdown_buffer=8;
|
||||||
|
switch (ordenador.mode128k)
|
||||||
{
|
{
|
||||||
|
case 4://Spanish 128k
|
||||||
ordenador.keyboard_buffer[0][8]= SDLK_l;
|
ordenador.keyboard_buffer[0][8]= SDLK_l;
|
||||||
ordenador.keyboard_buffer[1][8]= 0;
|
ordenador.keyboard_buffer[1][8]= 0;
|
||||||
ordenador.keyboard_buffer[0][7]= SDLK_o;
|
ordenador.keyboard_buffer[0][7]= SDLK_o;
|
||||||
@ -1266,9 +1273,28 @@ inline void read_keyboard () {
|
|||||||
ordenador.keyboard_buffer[0][1]= SDLK_F6; //F6 - play
|
ordenador.keyboard_buffer[0][1]= SDLK_F6; //F6 - play
|
||||||
ordenador.keyboard_buffer[1][1]= 0;
|
ordenador.keyboard_buffer[1][1]= 0;
|
||||||
ordenador.kbd_buffer_pointer=8;
|
ordenador.kbd_buffer_pointer=8;
|
||||||
}
|
break;
|
||||||
else
|
case 3: //+3
|
||||||
|
case 2: //+2
|
||||||
|
case 1: //128k
|
||||||
|
ordenador.kbd_buffer_pointer=2;
|
||||||
|
if (ordenador.mport1 & 0x10) //ROM 48k
|
||||||
{
|
{
|
||||||
|
ordenador.keyboard_buffer[0][5]= SDLK_j; //Load
|
||||||
|
ordenador.keyboard_buffer[1][5]= 0;
|
||||||
|
ordenador.keyboard_buffer[0][4]= SDLK_p; //"
|
||||||
|
ordenador.keyboard_buffer[1][4]= SDLK_LCTRL;
|
||||||
|
ordenador.keyboard_buffer[0][3]= SDLK_p; //"
|
||||||
|
ordenador.keyboard_buffer[1][3]= SDLK_LCTRL;
|
||||||
|
ordenador.kbd_buffer_pointer=5;
|
||||||
|
}
|
||||||
|
ordenador.keyboard_buffer[0][2]= SDLK_RETURN; // Return
|
||||||
|
ordenador.keyboard_buffer[1][2]= 0;
|
||||||
|
ordenador.keyboard_buffer[0][1]= SDLK_F6; //F6 - play
|
||||||
|
ordenador.keyboard_buffer[1][1]= 0;
|
||||||
|
break;
|
||||||
|
case 0: //48k
|
||||||
|
default:
|
||||||
ordenador.keyboard_buffer[0][5]= SDLK_j; //Load
|
ordenador.keyboard_buffer[0][5]= SDLK_j; //Load
|
||||||
ordenador.keyboard_buffer[1][5]= 0;
|
ordenador.keyboard_buffer[1][5]= 0;
|
||||||
ordenador.keyboard_buffer[0][4]= SDLK_p; //"
|
ordenador.keyboard_buffer[0][4]= SDLK_p; //"
|
||||||
@ -1280,12 +1306,9 @@ inline void read_keyboard () {
|
|||||||
ordenador.keyboard_buffer[0][1]= SDLK_F6; //F6
|
ordenador.keyboard_buffer[0][1]= SDLK_F6; //F6
|
||||||
ordenador.keyboard_buffer[1][1]= 0;
|
ordenador.keyboard_buffer[1][1]= 0;
|
||||||
ordenador.kbd_buffer_pointer=5;
|
ordenador.kbd_buffer_pointer=5;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
countdown_buffer=8;
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SDLK_F10: // Reset emulator
|
case SDLK_F10: // Reset emulator
|
||||||
ResetComputer ();
|
ResetComputer ();
|
||||||
break;
|
break;
|
||||||
@ -1358,6 +1381,13 @@ inline void read_keyboard () {
|
|||||||
if ((ordenador.joy_axis_x_state[joy_n] == JOY_LEFT)||(joybutton_matrix[joy_n][SDLK_LEFT])) ordenador.k12|= 16;
|
if ((ordenador.joy_axis_x_state[joy_n] == JOY_LEFT)||(joybutton_matrix[joy_n][SDLK_LEFT])) ordenador.k12|= 16;
|
||||||
if (joybutton_matrix[joy_n][SDLK_LALT]) {ordenador.k12|= 1; fire_on[joy_n]=1;}//fire button
|
if (joybutton_matrix[joy_n][SDLK_LALT]) {ordenador.k12|= 1; fire_on[joy_n]=1;}//fire button
|
||||||
break;
|
break;
|
||||||
|
case 4: // QAOP
|
||||||
|
if ((ordenador.joy_axis_y_state[joy_n] == JOY_UP) ||(joybutton_matrix[joy_n][SDLK_UP]))ordenador.k10|=1;
|
||||||
|
if ((ordenador.joy_axis_y_state[joy_n] == JOY_DOWN)||(joybutton_matrix[joy_n][SDLK_DOWN])) ordenador.k9 |=1;
|
||||||
|
if ((ordenador.joy_axis_x_state[joy_n] == JOY_RIGHT)||(joybutton_matrix[joy_n][SDLK_RIGHT])) ordenador.k13|=1;
|
||||||
|
if ((ordenador.joy_axis_x_state[joy_n] == JOY_LEFT)||(joybutton_matrix[joy_n][SDLK_LEFT])) ordenador.k13|=2;
|
||||||
|
if (joybutton_matrix[joy_n][SDLK_LALT]) {ordenador.k15|=1; fire_on[joy_n]=1;}//fire button
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1394,6 +1424,13 @@ inline void read_keyboard () {
|
|||||||
if ((ordenador.joy_axis_x_state[joy_n] == JOY_LEFT)||(status_hat[joy_n] & SDL_HAT_LEFT)) ordenador.k12|= 16;
|
if ((ordenador.joy_axis_x_state[joy_n] == JOY_LEFT)||(status_hat[joy_n] & SDL_HAT_LEFT)) ordenador.k12|= 16;
|
||||||
if (joybutton_matrix[joy_n][SDLK_LALT]) {ordenador.k12|= 1; fire_on[joy_n]=1;}//fire button
|
if (joybutton_matrix[joy_n][SDLK_LALT]) {ordenador.k12|= 1; fire_on[joy_n]=1;}//fire button
|
||||||
break;
|
break;
|
||||||
|
case 4: // QAOP
|
||||||
|
if ((ordenador.joy_axis_y_state[joy_n] == JOY_UP)||(status_hat[joy_n] & SDL_HAT_UP)) ordenador.k10|=1;
|
||||||
|
if ((ordenador.joy_axis_y_state[joy_n] == JOY_DOWN)||(status_hat[joy_n] & SDL_HAT_DOWN)) ordenador.k9 |=1;
|
||||||
|
if ((ordenador.joy_axis_x_state[joy_n] == JOY_RIGHT)||(status_hat[joy_n] & SDL_HAT_RIGHT)) ordenador.k13|=1;
|
||||||
|
if ((ordenador.joy_axis_x_state[joy_n] == JOY_LEFT)||(status_hat[joy_n] & SDL_HAT_LEFT)) ordenador.k13|=2;
|
||||||
|
if (joybutton_matrix[joy_n][SDLK_LALT]) {ordenador.k15|=1; fire_on[joy_n]=1;}//fire button
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1689,6 +1726,7 @@ void ResetComputer () {
|
|||||||
|
|
||||||
ordenador.precision=ordenador.precision_old; //in case the machine is reset during loading
|
ordenador.precision=ordenador.precision_old; //in case the machine is reset during loading
|
||||||
ordenador.tape_start_countdwn=0;
|
ordenador.tape_start_countdwn=0;
|
||||||
|
ordenador.pause_fastload_countdwn=0;
|
||||||
curr_frames=0;
|
curr_frames=0;
|
||||||
ordenador.tstados_counter=0;
|
ordenador.tstados_counter=0;
|
||||||
ordenador.cicles_counter=0;
|
ordenador.cicles_counter=0;
|
||||||
|
@ -176,6 +176,7 @@ struct computer {
|
|||||||
FILE *tap_file;
|
FILE *tap_file;
|
||||||
unsigned char tape_fast_load; // 0 normal load; 1 fast load
|
unsigned char tape_fast_load; // 0 normal load; 1 fast load
|
||||||
unsigned char rewind_on_reset;
|
unsigned char rewind_on_reset;
|
||||||
|
unsigned char pause_instant_load;
|
||||||
unsigned char current_tap[MAX_PATH_LENGTH];
|
unsigned char current_tap[MAX_PATH_LENGTH];
|
||||||
unsigned char last_selected_file[MAX_PATH_LENGTH];
|
unsigned char last_selected_file[MAX_PATH_LENGTH];
|
||||||
unsigned char last_selected_poke_file[MAX_PATH_LENGTH];
|
unsigned char last_selected_poke_file[MAX_PATH_LENGTH];
|
||||||
@ -189,6 +190,7 @@ struct computer {
|
|||||||
unsigned char tape_bits_at_end;
|
unsigned char tape_bits_at_end;
|
||||||
unsigned int tape_loop_counter;
|
unsigned int tape_loop_counter;
|
||||||
unsigned int tape_start_countdwn;
|
unsigned int tape_start_countdwn;
|
||||||
|
unsigned int pause_fastload_countdwn;
|
||||||
long tape_loop_pos;
|
long tape_loop_pos;
|
||||||
|
|
||||||
unsigned char tape_write; // 0 can't write; 1 can write
|
unsigned char tape_write; // 0 can't write; 1 can write
|
||||||
|
@ -710,6 +710,7 @@ int save_config(struct computer *object, char *filename) {
|
|||||||
fprintf(fconfig,"volume=%c%c",65+(object->volume),10);
|
fprintf(fconfig,"volume=%c%c",65+(object->volume),10);
|
||||||
fprintf(fconfig,"bw=%c%c",48+object->bw,10);
|
fprintf(fconfig,"bw=%c%c",48+object->bw,10);
|
||||||
fprintf(fconfig,"tap_fast=%c%c",48+object->tape_fast_load,10);
|
fprintf(fconfig,"tap_fast=%c%c",48+object->tape_fast_load,10);
|
||||||
|
fprintf(fconfig,"pause_instant_load=%c%c",48+object->pause_instant_load,10);
|
||||||
fprintf(fconfig,"rewind_on_reset=%c%c",48+object->rewind_on_reset,10);
|
fprintf(fconfig,"rewind_on_reset=%c%c",48+object->rewind_on_reset,10);
|
||||||
fprintf(fconfig,"joypad1=%c%c",48+object->joypad_as_joystick[0],10);
|
fprintf(fconfig,"joypad1=%c%c",48+object->joypad_as_joystick[0],10);
|
||||||
fprintf(fconfig,"joypad2=%c%c",48+object->joypad_as_joystick[1],10);
|
fprintf(fconfig,"joypad2=%c%c",48+object->joypad_as_joystick[1],10);
|
||||||
@ -888,7 +889,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,
|
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,
|
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,
|
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;
|
rewind_on_reset=255, pause_instant_load =255;
|
||||||
|
|
||||||
if (filename) strcpy(config_path,filename);
|
if (filename) strcpy(config_path,filename);
|
||||||
else return -2;
|
else return -2;
|
||||||
@ -986,6 +987,10 @@ int load_config(struct computer *object, char *filename) {
|
|||||||
tap_fast=(line[9]-'0');
|
tap_fast=(line[9]-'0');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!strncmp(line,"pause_instant_load=",19)) {
|
||||||
|
pause_instant_load=(line[19]-'0');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!strncmp(line,"rewind_on_reset=",16)) {
|
if (!strncmp(line,"rewind_on_reset=",16)) {
|
||||||
rewind_on_reset=(line[16]-'0');
|
rewind_on_reset=(line[16]-'0');
|
||||||
continue;
|
continue;
|
||||||
@ -1043,16 +1048,16 @@ int load_config(struct computer *object, char *filename) {
|
|||||||
if (ntsc<2) {
|
if (ntsc<2) {
|
||||||
object->videosystem=ntsc;
|
object->videosystem=ntsc;
|
||||||
}
|
}
|
||||||
if (joystick1<4) {
|
if (joystick1<5) {
|
||||||
object->joystick[0]=joystick1;
|
object->joystick[0]=joystick1;
|
||||||
}
|
}
|
||||||
if (joystick2<4) {
|
if (joystick2<5) {
|
||||||
object->joystick[1]=joystick2;
|
object->joystick[1]=joystick2;
|
||||||
}
|
}
|
||||||
if (ay_emul<2) {
|
if (ay_emul<2) {
|
||||||
object->ay_emul=ay_emul;
|
object->ay_emul=ay_emul;
|
||||||
}
|
}
|
||||||
if (audio_mode<4) {
|
if (audio_mode<5) {
|
||||||
object->audio_mode=audio_mode;
|
object->audio_mode=audio_mode;
|
||||||
}
|
}
|
||||||
if (mdr_active<2) {
|
if (mdr_active<2) {
|
||||||
@ -1084,6 +1089,9 @@ int load_config(struct computer *object, char *filename) {
|
|||||||
if (tap_fast<2) {
|
if (tap_fast<2) {
|
||||||
object->tape_fast_load=tap_fast;
|
object->tape_fast_load=tap_fast;
|
||||||
}
|
}
|
||||||
|
if (pause_instant_load<2) {
|
||||||
|
object->pause_instant_load=pause_instant_load;
|
||||||
|
}
|
||||||
if (rewind_on_reset<2) {
|
if (rewind_on_reset<2) {
|
||||||
object->rewind_on_reset=rewind_on_reset;
|
object->rewind_on_reset=rewind_on_reset;
|
||||||
}
|
}
|
||||||
@ -1532,10 +1540,13 @@ int main(int argc,char *argv[]) {
|
|||||||
|
|
||||||
if((!ordenador.mdr_paged)&&(PC==0x056c) && (ordenador.tape_fast_load==1)) {
|
if((!ordenador.mdr_paged)&&(PC==0x056c) && (ordenador.tape_fast_load==1)) {
|
||||||
if (ordenador.tap_file!=NULL)
|
if (ordenador.tap_file!=NULL)
|
||||||
|
{
|
||||||
|
if (ordenador.pause_fastload_countdwn==0)
|
||||||
{
|
{
|
||||||
if (ordenador.tape_file_type==TAP_TAP) fastload_block_tap(ordenador.tap_file);
|
if (ordenador.tape_file_type==TAP_TAP) fastload_block_tap(ordenador.tap_file);
|
||||||
else fastload_block_tzx(ordenador.tap_file);
|
else fastload_block_tzx(ordenador.tap_file);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
sprintf(ordenador.osd_text,"No TAP file selected");
|
sprintf(ordenador.osd_text,"No TAP file selected");
|
||||||
ordenador.osd_time=50;
|
ordenador.osd_time=50;
|
||||||
|
@ -82,12 +82,14 @@ static const char *emulation_messages[] = {
|
|||||||
/*03*/ "^|100%|50%|33%|25%|20%",
|
/*03*/ "^|100%|50%|33%|25%|20%",
|
||||||
/*04*/ "Tape instant load",
|
/*04*/ "Tape instant load",
|
||||||
/*05*/ "^|on|off",
|
/*05*/ "^|on|off",
|
||||||
/*06*/ "Turbo mode",
|
/*06*/ "Instant load pause",
|
||||||
/*07*/ "^|off|auto|fast|ultrafast",
|
/*07*/ "^|on|off",
|
||||||
/*08*/ "Rewind tape on reset",
|
/*08*/ "Turbo mode",
|
||||||
/*09*/ "^|on|off",
|
/*09*/ "^|off|auto|fast|ultrafast",
|
||||||
/*10*/ "Precision",
|
/*10*/ "Rewind tape on reset",
|
||||||
/*11*/ "^|on|off",
|
/*11*/ "^|on|off",
|
||||||
|
/*12*/ "Precision",
|
||||||
|
/*13*/ "^|on|off",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -99,7 +101,7 @@ static const char *audio_messages[] = {
|
|||||||
/*04*/ "^|on|off",
|
/*04*/ "^|on|off",
|
||||||
/*05*/ " ",
|
/*05*/ " ",
|
||||||
/*06*/ "Audio mode",
|
/*06*/ "Audio mode",
|
||||||
/*07*/ "^|mono|ABC|ACB|BAC",
|
/*07*/ "^|mono|ABC|ACB|BAC|CBA",
|
||||||
/*08 " ", */
|
/*08 " ", */
|
||||||
/*09 "Beeper low pass filter",*/
|
/*09 "Beeper low pass filter",*/
|
||||||
/*10 "^|0|1|2|3|4|5|6|7|max",*/
|
/*10 "^|0|1|2|3|4|5|6|7|max",*/
|
||||||
@ -123,7 +125,7 @@ static const char *screen_messages[] = {
|
|||||||
|
|
||||||
static const char *input_messages[] = {
|
static const char *input_messages[] = {
|
||||||
/*00*/ "Joystick type",
|
/*00*/ "Joystick type",
|
||||||
/*01*/ "^|Cursor|Kempston|Sinclair1|Sinclair2",
|
/*01*/ "^|Cursor|Kempston|Sinclair1|Sinclair2|QAOP",
|
||||||
/*02*/ "Bind key to Wiimote",
|
/*02*/ "Bind key to Wiimote",
|
||||||
/*03*/ "^|A|B|1|2|-|+",
|
/*03*/ "^|A|B|1|2|-|+",
|
||||||
/*04*/ "Bind key to Nunchuk",
|
/*04*/ "Bind key to Nunchuk",
|
||||||
@ -393,11 +395,21 @@ static int manage_tape(int which)
|
|||||||
case 3: //+3
|
case 3: //+3
|
||||||
case 2: //+2
|
case 2: //+2
|
||||||
case 1: //128k
|
case 1: //128k
|
||||||
|
ordenador.kbd_buffer_pointer=2;
|
||||||
|
if (ordenador.mport1 & 0x10) //ROM 48k
|
||||||
|
{
|
||||||
|
ordenador.keyboard_buffer[0][5]= SDLK_j; //Load
|
||||||
|
ordenador.keyboard_buffer[1][5]= 0;
|
||||||
|
ordenador.keyboard_buffer[0][4]= SDLK_p; //"
|
||||||
|
ordenador.keyboard_buffer[1][4]= SDLK_LCTRL;
|
||||||
|
ordenador.keyboard_buffer[0][3]= SDLK_p; //"
|
||||||
|
ordenador.keyboard_buffer[1][3]= SDLK_LCTRL;
|
||||||
|
ordenador.kbd_buffer_pointer=5;
|
||||||
|
}
|
||||||
ordenador.keyboard_buffer[0][2]= SDLK_RETURN; // Return
|
ordenador.keyboard_buffer[0][2]= SDLK_RETURN; // Return
|
||||||
ordenador.keyboard_buffer[1][2]= 0;
|
ordenador.keyboard_buffer[1][2]= 0;
|
||||||
ordenador.keyboard_buffer[0][1]= SDLK_F6; //F6 - play
|
ordenador.keyboard_buffer[0][1]= SDLK_F6; //F6 - play
|
||||||
ordenador.keyboard_buffer[1][1]= 0;
|
ordenador.keyboard_buffer[1][1]= 0;
|
||||||
ordenador.kbd_buffer_pointer=2;
|
|
||||||
break;
|
break;
|
||||||
case 0: //48k
|
case 0: //48k
|
||||||
default:
|
default:
|
||||||
@ -432,7 +444,9 @@ static int manage_tape(int which)
|
|||||||
ordenador.tape_current_mode=TAP_TRASH;
|
ordenador.tape_current_mode=TAP_TRASH;
|
||||||
rewind_tape(ordenador.tap_file,1);
|
rewind_tape(ordenador.tap_file,1);
|
||||||
}
|
}
|
||||||
msgInfo("Tape rewound",3000,NULL);
|
//msgInfo("Tape rewound",3000,NULL);
|
||||||
|
sprintf (ordenador.osd_text, "Rewind tape");
|
||||||
|
ordenador.osd_time = 100;
|
||||||
retorno=-1;
|
retorno=-1;
|
||||||
break;
|
break;
|
||||||
case 5: //Create
|
case 5: //Create
|
||||||
@ -507,7 +521,7 @@ static void set_machine_model(int which)
|
|||||||
|
|
||||||
static int emulation_settings(void)
|
static int emulation_settings(void)
|
||||||
{
|
{
|
||||||
unsigned int submenus[6],submenus_old[6];
|
unsigned int submenus[7],submenus_old[7];
|
||||||
int opt, i, retorno;
|
int opt, i, retorno;
|
||||||
unsigned char old_mode, old_videosystem;
|
unsigned char old_mode, old_videosystem;
|
||||||
|
|
||||||
@ -518,12 +532,13 @@ static int emulation_settings(void)
|
|||||||
submenus[0] = get_machine_model();
|
submenus[0] = get_machine_model();
|
||||||
submenus[1] = jump_frames;
|
submenus[1] = jump_frames;
|
||||||
submenus[2] = !ordenador.tape_fast_load;
|
submenus[2] = !ordenador.tape_fast_load;
|
||||||
submenus[3] = ordenador.turbo;
|
submenus[3] = !ordenador.pause_instant_load;
|
||||||
submenus[4] = !ordenador.rewind_on_reset;
|
submenus[4] = ordenador.turbo;
|
||||||
submenus[5] = !ordenador.precision;
|
submenus[5] = !ordenador.rewind_on_reset;
|
||||||
|
submenus[6] = !ordenador.precision;
|
||||||
|
|
||||||
|
|
||||||
for (i=0; i<6; i++) submenus_old[i] = submenus[i];
|
for (i=0; i<7; i++) submenus_old[i] = submenus[i];
|
||||||
old_mode=ordenador.mode128k;
|
old_mode=ordenador.mode128k;
|
||||||
old_videosystem = ordenador.videosystem;
|
old_videosystem = ordenador.videosystem;
|
||||||
|
|
||||||
@ -537,11 +552,13 @@ static int emulation_settings(void)
|
|||||||
|
|
||||||
jump_frames = submenus[1];
|
jump_frames = submenus[1];
|
||||||
ordenador.tape_fast_load = !submenus[2];
|
ordenador.tape_fast_load = !submenus[2];
|
||||||
ordenador.turbo = submenus[3];
|
ordenador.pause_instant_load = !submenus[3];
|
||||||
ordenador.rewind_on_reset = !submenus[4];
|
|
||||||
|
ordenador.turbo = submenus[4];
|
||||||
|
ordenador.rewind_on_reset = !submenus[5];
|
||||||
|
|
||||||
curr_frames=0;
|
curr_frames=0;
|
||||||
if (submenus[3] != submenus_old[3])
|
if (submenus[4] != submenus_old[4])
|
||||||
{
|
{
|
||||||
switch(ordenador.turbo)
|
switch(ordenador.turbo)
|
||||||
{
|
{
|
||||||
@ -572,9 +589,9 @@ static int emulation_settings(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (submenus[5] != submenus_old[5])
|
if (submenus[6] != submenus_old[6])
|
||||||
{
|
{
|
||||||
ordenador.precision = !submenus[5];
|
ordenador.precision = !submenus[6];
|
||||||
ordenador.precision_old=ordenador.precision;
|
ordenador.precision_old=ordenador.precision;
|
||||||
if (ordenador.turbo_state!=1) //Tape is not loading with turbo mode
|
if (ordenador.turbo_state!=1) //Tape is not loading with turbo mode
|
||||||
if (ordenador.precision)
|
if (ordenador.precision)
|
||||||
|
@ -360,6 +360,10 @@ inline void play_sound (unsigned int tstados) {
|
|||||||
lvalue = (beeper + ordenador.vol_b*2 + ordenador.vol_a)*ordenador.volume;
|
lvalue = (beeper + ordenador.vol_b*2 + ordenador.vol_a)*ordenador.volume;
|
||||||
rvalue = (beeper + ordenador.vol_a + ordenador.vol_c*2)*ordenador.volume;
|
rvalue = (beeper + ordenador.vol_a + ordenador.vol_c*2)*ordenador.volume;
|
||||||
break;
|
break;
|
||||||
|
case 4: //CBA
|
||||||
|
lvalue = (beeper + ordenador.vol_b + ordenador.vol_c*2)*ordenador.volume;
|
||||||
|
rvalue = (beeper + ordenador.vol_a*2 + ordenador.vol_b)*ordenador.volume;
|
||||||
|
break;
|
||||||
default: //No emulation
|
default: //No emulation
|
||||||
rvalue = beeper*ordenador.volume;
|
rvalue = beeper*ordenador.volume;
|
||||||
lvalue = beeper*ordenador.volume;
|
lvalue = beeper*ordenador.volume;
|
||||||
|
18
src/tape.c
18
src/tape.c
@ -862,7 +862,12 @@ void fastload_block_tap (FILE * fichero) {
|
|||||||
procesador.Ra.br.F=0x45;
|
procesador.Ra.br.F=0x45;
|
||||||
procesador.Rm.br.F |= F_C; // Load OK
|
procesador.Rm.br.F |= F_C; // Load OK
|
||||||
|
|
||||||
//if (longitud==6913) sleep(2); //Screen
|
|
||||||
|
if (ordenador.pause_instant_load)
|
||||||
|
{
|
||||||
|
ordenador.pause_fastload_countdwn=2000/20+1; //tap pause
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1151,8 +1156,6 @@ void fastload_block_tzx (FILE * fichero) {
|
|||||||
procesador.Ra.br.F=0x45;
|
procesador.Ra.br.F=0x45;
|
||||||
procesador.Rm.br.F |= F_C; // Load OK
|
procesador.Rm.br.F |= F_C; // Load OK
|
||||||
|
|
||||||
//if (longitud==6913) sleep(2); //Screen
|
|
||||||
|
|
||||||
byte_position=ftell(fichero);
|
byte_position=ftell(fichero);
|
||||||
|
|
||||||
retval=fread (&blockid, 1, 1, fichero); //Read next id block
|
retval=fread (&blockid, 1, 1, fichero); //Read next id block
|
||||||
@ -1164,9 +1167,10 @@ void fastload_block_tzx (FILE * fichero) {
|
|||||||
{
|
{
|
||||||
retval=fread (value, 1, 5, fichero); //read till flag byte
|
retval=fread (value, 1, 5, fichero); //read till flag byte
|
||||||
if (retval==5)
|
if (retval==5)
|
||||||
if ((value[4]!=0x0)&&(value[4]!=0xFF)) blockid=0x11; //custom data
|
if ((value[4]!=0x0)&&(value[4]!=0xFF)) blockid=0x1; //custom data
|
||||||
|
if ((value[4]==0x0)&&((value[2]+value[3]*256)!=0x13)) blockid=0x1; //custom data
|
||||||
}
|
}
|
||||||
if ((blockid==0x11)||(blockid==0x12)||(blockid==0x13)||(blockid==0x14)||(blockid==0x21)||(blockid==0x24))
|
if (blockid!=0x10)
|
||||||
{
|
{
|
||||||
//Anticipate auto ultra fast mode
|
//Anticipate auto ultra fast mode
|
||||||
if ((ordenador.turbo_state!= 1)&&(ordenador.turbo==1))
|
if ((ordenador.turbo_state!= 1)&&(ordenador.turbo==1))
|
||||||
@ -1177,6 +1181,10 @@ void fastload_block_tzx (FILE * fichero) {
|
|||||||
}
|
}
|
||||||
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])/30+1; //autoplay countdown
|
||||||
}
|
}
|
||||||
|
else if (ordenador.pause_instant_load)
|
||||||
|
{
|
||||||
|
ordenador.pause_fastload_countdwn=((unsigned int)pause[0]+256*(unsigned int)pause[1])/20+1; //tzx pause
|
||||||
|
}
|
||||||
|
|
||||||
fseek(fichero, byte_position, SEEK_SET);
|
fseek(fichero, byte_position, SEEK_SET);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user