- [ONGOING] Berserk Mode!
This commit is contained in:
7
main.cpp
7
main.cpp
@@ -86,10 +86,13 @@ int main(int argc, char *argv[])
|
|||||||
z80debug::stop();
|
z80debug::stop();
|
||||||
zxscreen::redraw();
|
zxscreen::redraw();
|
||||||
} else {
|
} else {
|
||||||
|
if (z80::getPC()==0x05C8) zx_tape::go_berserk();
|
||||||
uint8_t dt = z80::step();
|
uint8_t dt = z80::step();
|
||||||
zx_tape::update(dt);
|
zx_tape::update(dt);
|
||||||
zx_ula::sound_update(dt);
|
if (!zx_tape::berserk()) {
|
||||||
zxscreen::refresh(dt);
|
zx_ula::sound_update(dt);
|
||||||
|
zxscreen::refresh(dt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace zx_tape
|
|||||||
|
|
||||||
bool playing = false;
|
bool playing = false;
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
|
bool berserk_mode = false;
|
||||||
|
|
||||||
std::vector<block_t> blocks;
|
std::vector<block_t> blocks;
|
||||||
uint8_t current_block = 0;
|
uint8_t current_block = 0;
|
||||||
@@ -77,6 +78,7 @@ namespace zx_tape
|
|||||||
void stop()
|
void stop()
|
||||||
{
|
{
|
||||||
playing = false;
|
playing = false;
|
||||||
|
berserk_mode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rewind()
|
void rewind()
|
||||||
@@ -215,4 +217,8 @@ namespace zx_tape
|
|||||||
|
|
||||||
zx_ula::set_ear(pulse_level);
|
zx_ula::set_ear(pulse_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void go_berserk() { berserk_mode = true; }
|
||||||
|
const bool berserk() { return berserk_mode; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user