Skip to content
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

heath/h19.cpp Implement Shift-Reset functionality #11339

Merged
merged 5 commits into from Jun 18, 2023

Conversation

mgarlanger
Copy link
Contributor

Attempt 2 of implementing reset functionality for H19/H89 previous pr - #11330 was reverted. This PR address comments on the reverted one.
Original Info from reverted PR:

The H19 allowed the user to press the right-shift and reset key to reset the system. Since the h89 shared the common terminal board in the H19, this reset also was routed to the h89 cpu board and reset the entire computer. The actual reset occurs on the release of the keys.

In mame, the default key for reset is F10. Using the right-shift and F10 now causes the machine (either H19 or H89) to be reset.

A few other general cleanup of comments, formatting, etc. is also done in this PR.

{
m_reset_pending = false;
reset();
m_reset(ASSERT_LINE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be immediately followed by an m_reset(CLEAR_LINE);? I've seen that for some other systems.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPU devices don't run while the reset line is asserted, which mirrors how real chips typically behave. So it's generally a good idea to clear the line when it's not being asserted for consistency.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it work in real life? Does it use a monostable to generate a pulse? If that’s the case, you can use a timer to deassert it after an appropriate amount of time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looks like it is actually held in reset while the keys are both pressed. When one of the keys is released, the reset line is cleared.

Comment on lines 173 to 181
void heath_z37_fdc_device::device_reset()
{
m_control_reg = 0;
m_interface_reg = 0;

m_intrq_allowed = false;
m_drq_allowed = false;
m_access_track_sector = false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the interrupt and/or DMA request outputs were asserted before the device was reset, they should be deasserted due to m_intrq_allowed and m_drq_allowed becoming false here, shouldn’t they? You need to call the callbacks to notify whatever’s connected of the change.

@mgarlanger mgarlanger requested a review from cuavas June 17, 2023 19:40
@cuavas cuavas merged commit ec8a319 into mamedev:master Jun 18, 2023
5 checks passed
pauldevine pushed a commit to pauldevine/mame that referenced this pull request Jun 21, 2023
heathkit/h89.cpp: Hold the main CPU in reset while keys pressed.

heathkit/z37_fdc.cpp: Implemented device reset.
sonninnos pushed a commit to libretro/mame that referenced this pull request Jul 20, 2023
heathkit/h89.cpp: Hold the main CPU in reset while keys pressed.

heathkit/z37_fdc.cpp: Implemented device reset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants