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

Long reset aka hard-reset does not reset "Eagle's Nest" #79

Closed
sy2002 opened this issue Jun 19, 2023 · 7 comments
Closed

Long reset aka hard-reset does not reset "Eagle's Nest" #79

sy2002 opened this issue Jun 19, 2023 · 7 comments
Assignees
Labels
5.1 (R4/R5 Surge) bug Something isn't working

Comments

@sy2002
Copy link
Collaborator

sy2002 commented Jun 19, 2023

This bug is a regression introduced in V5 as this worked in V4.

Expected behavior (see also tests/README.md):

  • Short reset: Back to game's title screen
  • Long reset: Reset C64, back to Basic

What happens:

A long reset does not return to Basic

When was the regression introduced:

  • WIP-V5-A9, i.e. commit 65d8fc8 works
  • Interestingly enough WIP-V5-A10, i.e. commit 9c336c2 also works, even though there,
    the new handle_cold_start mechanism was introduced
  • WIP-V5-A23, i.e. commit e1c696d is the last version that works
  • From WIP-V5-B1 on, i.e. commit 584972c it does not work any more

Here is a code comparison between these two commits:
https://github.com/MJoergen/C64MEGA65/compare/e1c696d..584972c

Impact:

It is very likely that this bug is not only affecting "Eagle's Nest" but also materializes itself in other situations where it will lead to either the reset itself not working or applications loaded after the reset not working properly.

@sy2002 sy2002 added bug Something isn't working V6 or later labels Jun 19, 2023
@sy2002 sy2002 changed the title Long reset does not reset "Eagle's Nest" Long reset aka hard-reset does not reset "Eagle's Nest" Jun 19, 2023
@sy2002
Copy link
Collaborator Author

sy2002 commented Jun 22, 2023

Confirmed by discord user mauricevg that Pac-Man is affected, too:
https://discord.com/channels/719326990221574164/794775503818588200/1121155136853639219

@sy2002 sy2002 self-assigned this Oct 20, 2023
sy2002 added a commit that referenced this issue Oct 29, 2023
The Long-Reset aka Hard-Reset bug was documented in this issue: #79     This was a regression introduced in V5 due to sw_cartridge_wrapper's logic which pulled reset_soft_i high for longer than reset_hard_i. main.vhd was not ready for this change in semantics. Fixed by wrapping hard_reset_n and hard_rst_counter into an additional if clause.
@sy2002
Copy link
Collaborator Author

sy2002 commented Oct 29, 2023

Fixed.

@sy2002 sy2002 closed this as completed Oct 29, 2023
@MauriceMEGA65
Copy link

MauriceMEGA65 commented Nov 20, 2023

I just discovered: Pac-man needed to have the hard reset to be fixed, which is done in one of the alpha versions.
However, I just encountered the following in the alpha version:

Hard-reset DOES properly reset the system, I'm back in the BASIC 2 or JiffyDOS screen.
However, when I do a soft-reset AFTER the hard-reset, I'm back in the Pac-man welcome screen!?!?

@sy2002
Copy link
Collaborator Author

sy2002 commented Nov 21, 2023

@MauriceMEGA65 I think this is "works as desgined". What happens on a real C64?

@MauriceMEGA65
Copy link

A real C64 does not have a reset button IIRC. It’s no dealbreaker of course, just I thought the hard-reset is like a power cycle on a real C64. But apparently the memory is not really reset as a soft-reset after the hard-reset seems to reinitialize what was in memory before the hard-reset.

@sy2002
Copy link
Collaborator Author

sy2002 commented Nov 21, 2023

Yes, this is what I mean by "works as designed" :-) The hard reset does what a hard reset button (that was an extra gadget you could buy), did. We implemented this behavior: https://www.c64-wiki.com/wiki/Reset_Button

@MauriceMEGA65
Copy link

Ah! “Previously used data in the RAM, especially BASIC-programs, survive this
Yes, all clear now! Thank you and sorry for the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.1 (R4/R5 Surge) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants