Skip to content

Commit 41b5d35

Browse files
committed
Release 1.01
* Corrected link to Z80ExplorerGuide online guide * Re-arranged the monitor control block structure
1 parent 2dc61bc commit 41b5d35

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/ClassTrickbox.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const static QStringList pins = { "_int", "_nmi", "_busrq", "_wait", "_reset" };
1010

1111
ClassTrickbox::ClassTrickbox(QObject *parent) : QObject(parent)
1212
{
13-
static_assert(sizeof(trick) == (2 + 5*4 + 4), "unexpected trick struct size (packing?)");
13+
static_assert(sizeof(trick) == (2 + 2 + 4 + 5*4), "unexpected trick struct size (packing?)");
1414
m_trick = (trick *)&m_mem[TRICKBOX_START];
1515
memset(m_mio, 0xFF, sizeof(m_mio));
1616
}
@@ -35,19 +35,19 @@ quint8 ClassTrickbox::readMem(quint16 ab)
3535
*/
3636
void ClassTrickbox::writeMem(quint16 ab, quint8 db)
3737
{
38-
// Writing to address 0 immediately stops the simulation
39-
if (ab == 0)
40-
{
41-
qInfo() << "Stopping sim: WR(0)";
42-
return ::controller.getSimZ80().doRunsim(0);
43-
}
4438
if (ab >= m_rom)
4539
m_mem[ab] = db;
4640

4741
// Trickbox control address space
4842
if (m_trickEnabled && (ab >= TRICKBOX_START) && (ab <= TRICKBOX_END))
4943
{
50-
// We let the value already be written in RAM, which is a backing store for the trickbox
44+
// Writing to the "stop" word immediately stops the simulation
45+
if ((ab & ~1) == TRICKBOX_START)
46+
{
47+
qInfo() << "Stopping sim: tb_stop";
48+
return ::controller.getSimZ80().doRunsim(0);
49+
}
50+
// We let the value be written in RAM first, which is a backing store for the trickbox
5151
// counters anyways; here we check the validity of cycle values but only on the second
5252
// memory access of each 2-byte word. Likewise, we disable trickbox control in between
5353
// writing the first byte (low value) and the final, second byte (high value).

src/ClassTrickbox.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
#define MAX_PIN_CTRL 5
99
struct trick
1010
{
11+
uint16_t stop; // Writing to this address immediately stops the simulation
1112
uint16_t cycleStop; // Cycle number at which to stop the simulation
13+
uint32_t curCycle; // Current cycle number (low 16 bits + high 16 bits)
1214
struct
1315
{
1416
uint16_t cycle; // Cycle number at which to assert a pin
1517
uint16_t count; // Number of cycles to hold it asserted
1618
} pinCtrl[MAX_PIN_CTRL]; // That, for 5 pins: INT, NMI, BUSRQ, WAIT, RESET
17-
uint32_t curCycle; // Current cycle number (low 16 bits + high 16 bits)
1819
};
1920
#pragma pack(pop)
2021

src/MainWindow.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
<string>Open the user's manual online</string>
183183
</property>
184184
<property name="whatsThis">
185-
<string>https://baltazarstudios.com/Z80Explorer</string>
185+
<string>https://baltazarstudios.com/uc/Z80ExplorerGuide</string>
186186
</property>
187187
</action>
188188
<action name="actionEditColors">

0 commit comments

Comments
 (0)