- [ONGOING] Berserk Mode!

This commit is contained in:
2024-04-22 14:56:27 +02:00
parent 0bd7c841d9
commit 06734c3af4
3 changed files with 13 additions and 2 deletions

View File

@@ -86,10 +86,13 @@ int main(int argc, char *argv[])
z80debug::stop();
zxscreen::redraw();
} else {
if (z80::getPC()==0x05C8) zx_tape::go_berserk();
uint8_t dt = z80::step();
zx_tape::update(dt);
zx_ula::sound_update(dt);
zxscreen::refresh(dt);
if (!zx_tape::berserk()) {
zx_ula::sound_update(dt);
zxscreen::refresh(dt);
}
}
}
}

View File

@@ -33,6 +33,7 @@ namespace zx_tape
bool playing = false;
bool loaded = false;
bool berserk_mode = false;
std::vector<block_t> blocks;
uint8_t current_block = 0;
@@ -77,6 +78,7 @@ namespace zx_tape
void stop()
{
playing = false;
berserk_mode = false;
}
void rewind()
@@ -215,4 +217,8 @@ namespace zx_tape
zx_ula::set_ear(pulse_level);
}
void go_berserk() { berserk_mode = true; }
const bool berserk() { return berserk_mode; }
}

View File

@@ -8,4 +8,6 @@ namespace zx_tape
void stop();
void rewind();
void update(const uint8_t dt);
void go_berserk();
const bool berserk();
}