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

Some game cause the Apple IIe to hang #41

Closed
frozen-signal opened this issue Apr 10, 2024 · 2 comments
Closed

Some game cause the Apple IIe to hang #41

frozen-signal opened this issue Apr 10, 2024 · 2 comments
Labels
bug Something isn't working MMU Related to the Apple IIe's MMU (344-0010)

Comments

@frozen-signal
Copy link
Owner

Some games are not working when using a specific setup. Not exactly sure what could be the problem. Possibly another timing issue.
This setup works without problem:

  • 6502 with un-enhanced ROMs
  • 80-Col Expansion card (820-0067-D)
  • Apple 5.25 Drive Controller Card (655-0101-E)

But using instead a 65C02 with enhanced ROMs will cause problems with Doulbe HiRes games. For example, Aliens will hang when switching to the graphic mode.
Seems to be tied to the 80-Col card, but it's possible to re-create the problem without the card present. For example, Aliens normally can run without the 80-Col card. But will still hang without it.

Apple IIe Diagnostic v2.1 also reports problems with the 80-Col card.

@frozen-signal frozen-signal added bug Something isn't working MMU Related to the Apple IIe's MMU (344-0010) labels Apr 10, 2024
@frozen-signal
Copy link
Owner Author

frozen-signal commented Apr 13, 2024

There seems to be a problem with CASEN_N and EN80_N.

This is a logic analyzer capture of the game ALIENS, with a trigger on the falling edge of EN80_N:
Both captures are without a 80-Col Card present, on an enhanced Apple IIe.
With the ASIC MMU:
image
With the MMU from this repository:
image

For some reason, the CASEN_N and EN80_N signals are wrong in the prototype.

@frozen-signal
Copy link
Owner Author

frozen-signal commented Apr 18, 2024

Fixed in 5f5cba5

At first, I though that the SELMB_N computation of the emulator schematics was incorrect. So, I re-wrote SELMB_N to be closer to the ASIC schematics. This new implementation is much simpler than the other schematics one, but do not fix the problem described above.

Later, I was convinced that PG2 somehow ended up with the wrong value and started searching through the logic analyzer traces until I found this:
image
The CPU places $C054 on the address bus to reset the soft-switch PG2, But while the address is crumbling, the MMU momentarily sees $C055 and sets it back.

To fix, the latch enabling that control these soft-switches must be forced HIGH during PHI_1 (i.e. during PHI_0 LOW).

This fixes the problem with ALIENS, Apple IIe Diagnostic v2.1, as well as almost every game. Except "The Black Cauldron" that seems to have an problem. Will open a different issue for that one.

frozen-signal added a commit that referenced this issue Apr 25, 2024
The previous fix for /EN80 and Q3 was not correct. This commit fixes the issues #41 and #42

Renamed RAS_HOLD_TIME -> DRAM_HOLD_TIME and ROMEN_HOLD_TIME -> MMU_HOLD_TIME
Removed support for Lattice devices
frozen-signal added a commit that referenced this issue Apr 25, 2024
The previous fix for /EN80 and Q3 was not correct. This commit fixes the issues #41 and #42

Renamed RAS_HOLD_TIME -> DRAM_HOLD_TIME and ROMEN_HOLD_TIME -> MMU_HOLD_TIME
Removed support for Lattice devices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MMU Related to the Apple IIe's MMU (344-0010)
Projects
None yet
Development

No branches or pull requests

1 participant