New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heathkit/h89.cpp: Implement single-step hardware #11847
Conversation
src/mame/heathkit/h89.cpp
Outdated
void h89_state::map_fetch(address_map &map) | ||
{ | ||
map(0x0000, 0xffff).lr8(NAME([this](offs_t offset) | ||
{ | ||
return m1_r(offset); | ||
})); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems overly convoluted – why can’t use use map(0x0000, 0xffff).r(FUNC(h89_state::m1_r));
in the same way that e.g. src/mame/osborne/osborne1.cpp does?
src/mame/heathkit/h89.cpp
Outdated
// Single Step | ||
#define LOG_SS (1U << 1) | ||
|
||
#define VERBOSE ( LOG_SS ) | ||
#include "logmacro.h" | ||
|
||
#define LOGSS(...) LOGMASKED(LOG_SS, __VA_ARGS__) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all macro glue – it goes outside the anonymous namespace. Also, probably a good idea not to leave logging enabled here since it’s in a read handler and hence very hot.
src/mame/heathkit/h89.cpp
Outdated
if (m_single_step_enabled && !m_556b_latch) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t forget to check !machine().side_effects_disabled()
or this will cause chaos when debugger windows are open.
These changes implement the single-step hardware functionality in the H89. This is based the manual, and an h89 diagnostic program. It is now passing the tests: