int tape_play( void ) { libspectrum_tape_block* block; int error; if( tape.blocks == NULL ) return 1; block = (libspectrum_tape_block*)(tape.current_block->data); /* If tape traps are active and the current block is a ROM block, do nothing, _unless_ the ROM block has already reached the pause at its end which (hopefully) means we're in the magic state involving starting slow loading whilst tape traps are active */ if( settings_current.tape_traps && block->type == LIBSPECTRUM_TAPE_BLOCK_ROM && block->types.rom.state != LIBSPECTRUM_TAPE_STATE_PAUSE ) return 0; /* Otherwise, start the tape going */ tape_playing = 1; tape_microphone = 0; sound_beeper( 1, tape_microphone ); error = tape_next_edge(); if( error ) return error; return 0; }
static int tape_play( int autoplay ) { libspectrum_tape_block* block; int error; if( !libspectrum_tape_present( tape ) ) return 1; ZX_Unpatch_ROM();//unpatch rom so some protection loader schemes works tape_playing = 1; //tape_autoplay = autoplay; tape_microphone = 0; /* Update the status bar */ //ui_statusbar_update( UI_STATUSBAR_ITEM_TAPE, UI_STATUSBAR_STATE_ACTIVE ); //if( ( !( machine_current->timex ) ) && settings_current.sound_load ) //sound_beeper( 1, tape_microphone ); //loader_tape_play(); //el edge lo cojera directamente el Z80patch int edge_tstates; int flag; error = tape_next_edge( NULL, &edge_tstates,&flag); tape_edge_tstates_target = edge_tstates; tape_edge_tstates_current=0; if( error ) return error; return 0; }
static void do_acceleration( void ) { if( length_known1 ) { int set_b_high = length_long1; set_b_high ^= ( acceleration_mode == ACCELERATION_MODE_DECREASING ); if( set_b_high ) { z80.bc.b.h = 0xfe; } else { z80.bc.b.h = 0x00; } z80.af.b.l |= 0x01; z80.pc.b.l = readbyte_internal( z80.sp.w ); z80.sp.w++; z80.pc.b.h = readbyte_internal( z80.sp.w ); z80.sp.w++; event_remove_type( tape_edge_event ); tape_next_edge( tstates, 0, NULL ); successive_reads = 0; } length_known1 = length_known2; length_long1 = length_long2; }
static int tape_play( int autoplay ) { if( !libspectrum_tape_present( tape ) ) return 1; /* Otherwise, start the tape going */ tape_playing = 1; tape_autoplay = autoplay; tape_microphone = 0; /* Update the status bar */ ui_statusbar_update( UI_STATUSBAR_ITEM_TAPE, UI_STATUSBAR_STATE_ACTIVE ); /* If we're fastloading, turn sound off */ if( settings_current.fastload ) sound_pause(); loader_tape_play(); tape_next_edge( tstates, 0, NULL ); debugger_event( play_event ); return 0; }