- [CHG] mode berserk passa a per Fast Tape. sistema de Opcions.
- [NEW] Opció per a parar execució al acabar de carregar una cinta. - [NEW] Opció per a parar l'execució al trobar una instrucció del Z80 no vàlida - [NEW] Savestate del Fernando Martin, per a provar més ràpid. - [NEW] Treballant en el sistema d'anàlisi visual del codi
This commit is contained in:
23
zx_tape.cpp
23
zx_tape.cpp
@@ -1,6 +1,7 @@
|
||||
#include "zx_tape.h"
|
||||
#include "zx_ula.h"
|
||||
#include "zx_screen.h"
|
||||
#include "z80debug.h"
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -34,7 +35,7 @@ namespace zx_tape
|
||||
|
||||
bool playing = false;
|
||||
bool loaded = false;
|
||||
bool berserk_mode = true;
|
||||
bool options[ZXTAPE_NUM_OPTIONS] = { true, true };
|
||||
|
||||
std::vector<block_t> blocks;
|
||||
uint8_t current_block = 0;
|
||||
@@ -80,7 +81,7 @@ namespace zx_tape
|
||||
void stop()
|
||||
{
|
||||
playing = false;
|
||||
berserk_mode = false;
|
||||
//berserk_mode = false;
|
||||
}
|
||||
|
||||
void rewind()
|
||||
@@ -220,6 +221,7 @@ namespace zx_tape
|
||||
printf("end\n");
|
||||
stop();
|
||||
rewind();
|
||||
if (options[ZXTAPE_OPTION_STOP_AT_END]) z80debug::stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -232,8 +234,6 @@ namespace zx_tape
|
||||
zx_ula::set_ear(pulse_level);
|
||||
}
|
||||
|
||||
void setberserk(const bool value) { berserk_mode = value; }
|
||||
const bool getberserk() { return berserk_mode; }
|
||||
const bool getplaying() { return playing; }
|
||||
|
||||
void report()
|
||||
@@ -242,4 +242,19 @@ namespace zx_tape
|
||||
const int percent = (float(block_pos)/float(blocks[current_block].length))*100;
|
||||
printf("tape loading: %i%\n", percent);
|
||||
}
|
||||
|
||||
const bool getOption(const int option)
|
||||
{
|
||||
return options[option];
|
||||
}
|
||||
|
||||
void setOption(const int option, const bool value)
|
||||
{
|
||||
options[option] = value;
|
||||
}
|
||||
|
||||
void toggleOption(const int option)
|
||||
{
|
||||
options[option] = !options[option];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user