Commit 8bdcdcbb authored by Sergio Costas's avatar Sergio Costas

Added again the compiling flags

Now the fast load fully works

Now allows to pause and play the tape also with the fast mode enabled
parent a981a994
......@@ -35,29 +35,29 @@ Z80free_codesFDCB.o: z80free/Z80free_codesFDCB.c z80free/Z80free.h
$(CC) -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
cargador.o: cargador.cpp emulator.hh z80free/Z80free.h computer.hh tape.hh cargador.hh
$(CPP) -o cargador.o cargador.cpp
$(CPP) $(CPPFLAGS) -o cargador.o cargador.cpp
characters.o: characters.cpp emulator.hh z80free/Z80free.h computer.hh tape.hh characters.hh
$(CPP) -o characters.o characters.cpp
$(CPP) $(CPPFLAGS) -o characters.o characters.cpp
computer.o: computer.cpp tape.hh emulator.hh z80free/Z80free.h computer.hh spk_ay.hh sound.hh microdrive.hh menus.hh characters.hh
$(CPP) -o computer.o computer.cpp
$(CPP) $(CPPFLAGS) -o computer.o computer.cpp
emulator.o: emulator.cpp sound.hh microdrive.hh z80free/Z80free.h menus.hh computer.hh tape.hh emulator.hh characters.hh cargador.hh
$(CPP) -o emulator.o emulator.cpp
$(CPP) $(CPPFLAGS) -o emulator.o emulator.cpp
menus.o: menus.cpp menus.hh tape.hh emulator.hh z80free/Z80free.h computer.hh characters.hh cargador.hh
$(CPP) -o menus.o menus.cpp
$(CPP) $(CPPFLAGS) -o menus.o menus.cpp
microdrive.o: microdrive.cpp emulator.hh z80free/Z80free.h computer.hh tape.hh microdrive.hh
$(CPP) -o microdrive.o microdrive.cpp
$(CPP) $(CPPFLAGS) -o microdrive.o microdrive.cpp
sound.o: sound.cpp sound.hh emulator.hh z80free/Z80free.h computer.hh tape.hh
$(CPP) -o sound.o sound.cpp
$(CPP) $(CPPFLAGS) -o sound.o sound.cpp
spk_ay.o: spk_ay.cpp sound.hh emulator.hh z80free/Z80free.h computer.hh tape.hh
$(CPP) -o spk_ay.o spk_ay.cpp
$(CPP) $(CPPFLAGS) -o spk_ay.o spk_ay.cpp
tape.o: tape.cpp z80free/Z80free.h tape.hh emulator.hh computer.hh
$(CPP) -o tape.o tape.cpp
$(CPP) $(CPPFLAGS) -o tape.o tape.cpp
......@@ -6,7 +6,7 @@ CFLAGS += `pkg-config --cflags sdl libpulse-simple alsa` -O2 -D D_SOUND_PULSE -D
CPPFLAGS += `pkg-config --cflags sdl libpulse-simple alsa` -O2 -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
LDFLAGS += `pkg-config --libs sdl libpulse-simple alsa`
#basecmd $(CPP)
#basecmd $(CPP) $(CPPFLAGS)
#extra_obj Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o
fbzx: %c
......
......@@ -58,7 +58,7 @@ void emulate (int tstados) {
play_sound (tstados);
//tape_read (ordenador.tap_file, tstados);
ordenador.OOTape.play(tstados);
ordenador.tape_readed = ordenador.OOTape.read_signal() == 0 ? 0 : 1;
ordenador.tape_readed = (ordenador.OOTape.read_signal() == 0) ? 0 : 1;
microdrive_emulate(tstados);
if (!ordenador.pause) {
......@@ -883,15 +883,13 @@ void read_keyboard (SDL_Event *pevento2) {
break;
case SDLK_F5: // STOP tape
if ((ordenador.tape_fast_load == 0) || (ordenador.tape_file_type==TAP_TZX))
ordenador.pause = 1;
ordenador.OOTape.set_pause(true);
ordenador.pause = 1;
ordenador.OOTape.set_pause(true);
break;
case SDLK_F6: // PLAY tape
if ((ordenador.tape_fast_load == 0) || (ordenador.tape_file_type==TAP_TZX))
ordenador.pause = 0;
ordenador.OOTape.set_pause(false);
ordenador.pause = 0;
ordenador.OOTape.set_pause(false);
break;
case SDLK_F9:
......@@ -904,7 +902,6 @@ void read_keyboard (SDL_Event *pevento2) {
if (ordenador.tap_file != NULL) {
ordenador.tape_current_mode = TAP_TRASH;
ordenador.OOTape.rewind();
//rewind_tape (ordenador.tap_file,1);
}
break;
......
......@@ -755,6 +755,9 @@ void do_fast_load() {
ordenador.other_ret = 1; // next instruction must be RET
procesador.Rm.br.F &= ~F_Z;
procesador.IFF1 = 0;
procesador.IFF2 = 0;
if (!(procesador.Rm.br.F & F_C)) { // if Carry=0, is VERIFY, so return OK
procesador.Rm.br.F |= F_C; // verify OK
procesador.Rm.wr.IX += procesador.Rm.wr.DE;
......@@ -817,6 +820,7 @@ void do_fast_load() {
return;
break;
case FASTLOAD_NO_FLAG:
printf("No flag\n");
continue;
break;
}
......
......@@ -307,10 +307,10 @@ void play_sound (int tstados) {
while (ordenador.tstados_counter_sound >= ordenador.tst_sample) {
ordenador.tstados_counter_sound -= ordenador.tst_sample;
if (sound_type!=1) //!SOUND_OSS
if (sound_type!=SOUND_NO)
for (bucle = 0; bucle < ordenador.increment; bucle++) {
sample_v = ordenador.sample1b[bucle];
if (ordenador.sound_bit && sample_v)
if (ordenador.sound_bit && sample_v)
//Sound bit volume max 96
ordenador.sound_current_value=ordenador.volume*6;
else
......
......@@ -390,12 +390,17 @@ enum FastLoadReturn Tape::fast_read(uint8_t *data, uint16_t &length,uint8_t flag
if (this->current_block == NULL) {
return FASTLOAD_END_TAPE;
}
this->current_block->reset();
this->block_accesed = true;
this->block_accesed = false;
if (!this->current_block->fast_load(data,length,block_flag)) {
return FASTLOAD_NO_BLOCK;
}
this->current_block = this->current_block->next_block();
if (this->current_block != NULL) {
this->current_block->reset();
}
printf("Cargo bloque de longitud %d\n",length);
if (block_flag != flag) {
return FASTLOAD_NO_FLAG;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment