a2-4am / 4cade

100s of games at your fingertips, as long as your fingertips are on an Apple ][
https://archive.org/details/TotalReplay
MIT License
149 stars 23 forks source link

IIe Card issues -- black screen on some games #503

Closed JDW1 closed 2 years ago

JDW1 commented 2 years ago

Flapple Bird & Prince of Persia both give a permanent black screen after pressing Return to choose the game on an Apple IIe Card attached to a Macintosh LC575 motherboard, with Total Replay v5.0-alpha.4.hdv running off a FloppyEMU. Tried both CPU speed settings to no avail.

frankmilliron commented 2 years ago

I ran into something similar with Microwave. The accelerator was nuking some of the screen holes, some of which the FloppyEmu or game is relying on. Unfortunately no longer have a //e Card anymore to verify. TR is setting the accelerator itself, so changing CPU speed won't have any effect. I think both games rely on VBL, as well. Additionally, there were several versions of the //e Card firmware, some of which don't work properly. TR should filter for those, but I'd be curious what is in location $FBBE.

peterferrie commented 2 years ago

Both are double-hires games. Perhaps that's the issue. Do Airheart and Heavy Barrel also not work?

peterferrie commented 2 years ago

Airheart and Heavy Barrel would point to VBL, if they work. Then Pipe Dream probably would not. If none of them work, then it points to DHGR.

JDW1 commented 2 years ago

Gentlemen, you'll have to forgive my ignorance, but I am not an acronym savory person, beyond CPU, FBI and the most common ones that even young kids know. TR, VBL, DHGR, etc. are all Greek to me.

The IIe Card allows the user to operate the CPU at either 1MHz or 1.9MHz, so if 1.9MHz is defined as an "accelerator" then perhaps it could be said I have one, but let it be know that I did test at the base clock of 1MHz and still had the black screen on the two aforementioned games.

As to the IIe Card SOFTWARE (not FIRMWARE), I am using the newest 2.2.2d1 because I have an LC575 logic board, for which v2.2.2d1 was created. Now as to different FIRMWARE versions, I would need your handholding to know how to check that. I would also like to know if it is possible to upgrade the firmware. If it is, I would appreciate knowing (a) the step by step process and (b) where the different firmware files can be found.

I will test Airheart and Heavy Barrel with the IIe Card later today and report back.

Thank you.

frankmilliron commented 2 years ago

TR - Total Replay AKA 4cade VBL - Vertical BLank (allows smooth drawing on the screen between screen refreshes) DHGR - Double Hires GRaphics (later graphics mode that allows higher resolution and more colors)

In my notes about the card I have "v2.2.2d1 - buggy developer preview version, VBL signal reversed accidentally (don't use)". You can check the version by going to a BASIC prompt and typing "CALL -151" and then "FBBE" and report back the value it prints.

frankmilliron commented 2 years ago

//e Card Software Versions: $FBDD = 02 to distinguish the IIe card vs an actual IIe

v1.0 - requires an original LC, doesn't support hard drives $FBBE = 00

v2.0 - (pic of install disk on vectronics apple world) $FBBE = 01?

v2.0.1 -

v2.1 - (I seem to recall this is the best version to use) $FBBE = 02

v2.2 - $FBBE = 02?

v2.2.1 - $FBBE = 03

v2.2.2d1 - buggy developer preview version, VBL signal reversed accidentally (don't use) $FBBE = 03/04?

JDW1 commented 2 years ago

Here's my detailed test report.

FIRST On my Macintosh Color Classic Mystic (LC575 motherboard, Full FPU 68040 overclocked to 44MHz) with IIe Card installed and using v.2.2.2d1 of the IIe Setup app and with the IIe frequency set to 1 MHz, within the IIe environment, at the BASIC prompt, using "CALL -151" and then "FBBE" yields: 03 NOTE: Versions of the IIe Setup app older than 2.2.2d1 trigger a "Problem #4" error dialog on launch attempts. However, if I set the 68040 clock speed is to 40MHz or lower, that error dialog does not appear sometimes, allowing me to launch the app after a few repeated tries. Version 2.2.2d1 doesn't seem to care about the Mac's CPU clock speed, and I verified the IIe environment works even with the 040 is clocked at 50MHz (using Kay Koba's Spicy O'Clock).

To satisfy my curiosity, I tried the same BASIC commands in Virtual ][ v.11.1 running on a 5K iMac, and it yields: 00 (Hard drive image files added via SmartPort work fine.)

SECOND Using version 2.2.2d1 of the IIe Startup app on my CC Mystic, when I hit Return to load Airheart & Heavy Barrel, they both display and function fine. However, even with the Frequency set to 1 MHz and the virtual Clock and Mouse cards removed, Pipe Dream merely displays the chrome Lucas Film Games logo and freezes there.

THIRD I reduced the 68040 clock speed to 40MHz so I could repeat the above tests using older version 2.1 of the IIe Setup app (and with the older ProDOS system extension too) and found that it gives me an error dialog which says: "Unable to continue because of a fatal error. Error # 10019. Clearly, this software version isn't compatible with the LC575 motherboard. I then tried version 2.2.1 (with the correct ProDOS extension for that app version), and then found that Pipe Dream loads and plays fine! After that I tried Flapple Bird & Prince of Persia and found they both work fine too.

As I mentioned in "FIRST" above, older version 2.2.1 of the IIe Setup app doesn't always load even at the lower 40MHz 68040 CPU clock speed setting. The app often throws an error dialog which says: "Your Apple IIe Card is defective. Problem #4." Of course, the card isn't defective, but the app is seeing something it doesn't like and throws that error. By the way, that's the same error I get if I try to load the v2.2.1 app with the 68040 clock set to 44MHz or higher. The difference is that when running at 40MHz or lower, I can at least sometimes get v2.2.1 to load, but if I overclock to 44MHz or higher, it will never load. At 44MHz and higher, I must use the newest v2.2.2d1 app, which mostly works, except for the aforementioned game troubles.

I would appreciate hearing your thoughts in light of this.

frankmilliron commented 2 years ago

I seem to recall v2.2.1 being the best version, but your machine sounds a bit hot-rodded and perhaps requires the buggy one at higher speeds. Sounds like you can get it running, but will need to un-hot rod it before launching Total Replay.

peterferrie commented 2 years ago

Okay, so it confirms for me that the VBL bug in 2.2.2d1 causes the black screen. I don't know how to distinguish between 2.2.1 and 2.2.2d1 from within Total Replay, so I can't work around the issue.

peterferrie commented 2 years ago

I'll make a workaround so that the games are at least playable, even if not perfect. By the way, does H.E.R.O. also hang with 2.2.2d?

JDW1 commented 2 years ago

Peter, I will test H.E.R.O. this evening with 2.2.2d1 and let you know. Thank you for all the effort you have put into this great project!

Frank, un-hotting my rod (boy that sounds funny!) requires me to unscrew and remove the back panel, pull the motherboard, adjust the overclocker, and reassemble. It's doable, but I love finding workarounds to avoid that mundane task. If you want to learn more about what's involved, I have a two-part video series, starting with this video, on the subject.

JDW1 commented 2 years ago

...does H.E.R.O. also hang with 2.2.2d?

Peter, H.E.R.O. works perfectly with 2.2.2d1. No issues with that game. (Mac's 040 CPU was clocked at 40MHz for this test.)

peterferrie commented 2 years ago

Thank you. I have patched the other three games already so that they run. We might have also found a way to distinguish between the versions after all.

mgcaret commented 2 years ago

2.2.2d1 FBBE=03. There may be a way for you to tell the difference, though (see below).

It’s worth nothing, however, that the VBL signal in the IIe Card does not reflect the actual state of any video and merely cycles at (approximately) 60hz (TN#10). If you need it for timing you could simply ignore which state is blanking since it doesn’t matter anyway.

You may find my reverse engineering work useful (link below), particularly the resources in IIe Startup, which show which resources contain the various bits of “ROM,” as well as how to access the auxiliary firmware banks. It should be possible to find a difference, if one exists, between the Monx or PFI firmware in 2.2.1 vs 2.2.2d1.

http://apple2.guidero.us/doku.php/mg_notes/iie_card/start

mgcaret commented 2 years ago

I extracted the various Monx resources that are reliably visible inside the IIe card (Monitor, PFI, and 5.25") from both 2.2.1 and 2.2.2d1 and, unfortunately, they are identical in both versions. There's no other method that I am aware of to tell the difference from within the Apple II view of the system.

peterferrie commented 2 years ago

Thank you. This is why we settled on the VBL behaviour as the differentiator. It seems to be the only visible change from the Apple II side.

JDW1 commented 2 years ago

I confirmed just now that Total Replay 5 Beta 2 makes Flapple Bird and Prince of Persia playable using the Apple IIe Card and IIe Startup v.2.2.2d1. Thanks!