-
Notifications
You must be signed in to change notification settings - Fork 158
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
RGB card decoder gets into weird states #850
Comments
How the extended DHIRES modes are actually triggered is not completely known. There is documented cases, but it looks like the hardware reacts to other cases. It's actually the same for the Applecolor RGB and Féline, and they all might have different hardware implementations - I hope not, since they were all made under Video-7's patent. The best would be to test on a real SL7 card, but in the meantime I'm going to track the mode changes down to try to find a pattern and fix this. Note: the Video-7 demo disk also have a different test menu for the IIc adapter which is triggered when running from a IIc. However you can run it manually from BASIC. The IIc adapters have the same features than the Féline card (no 160x192 mode), the only difference seems to be that the colors that aren't the same between the various adapters (analog/TTL/greyscale). |
@fenarinarsa - I took a quick look. At least for the "Extended 80-Column Text/AppleColor Adaptor Card", you can set the F2,F1 RGB mode just by toggling $C05E/5F, and without needing to touch $C00C/0D between each $C05E/5F toggle, eg, the following will set RGB 560 B&W mode: $C00C (then $C00D & $C05E to set regular DHGR mode) How about for your LCM adaptor? |
It works but of course C00C/C00D needs to be written to.
=> 560 BW First thing first: except for the specific Video-7 modes, the demo disk runs perfectly on my IIc (I did I did a lot (a lot!) of testing tonight on my LCM IIc adapter, and its behavior is... erratic to say the least. It mostly seems to behave like the Video-7 patent describes it, that is, switching from $C05E to $C05F injects the current value of ~80COL to F1 (pushing F1 into F2). AN3 needs that specific change of state to inject ~80COL into the shift register, and that's how it's described in the patent (FIG1 with the two D flip flops). However during my tests I found that sometimes, it didn't happen for some unknown reason. I did all my testing manually under the monitor and filled 3 sheets of results, and sometimes it doesn't work, and when I repeat all the sheet's pattern again, it works. So I decided to make a test program consisting of 14 random opcodes patterns of C00C/C00D/C05E/C05F (each ending with C05E+C00D to enable DHIRES) and run it multiple times on my IIc, starting with 560 BW (F1=F2=1). And then, I found out that I can't get to reproduce the exact same result at each run. Most of the code patterns generates the same modes at every run, but some don't. I even have cases where the first regular switch to 560BW didn't work. In AppleWin, the generated modes are always the same from one run to another. I don't know what to think about that... it looks like Pandora's box. |
Okay, I made some progress. First I removed all prerequisites in
All video-7 DHIRES modes now work, except for the regular 140x192 mode... So I traced all video modes softswitches, and it appears that in 140x192, SW_IOUDIS is set to true so Note that I detected another bug in... HIRES modes. Test number 6 fails every other run. For DHIRES here's the softswitches trace. (SW_IOUDIS) means that 160x192 140x192 560x192 Mixed |
And BTW, I also traced how PoP initialize DHIRES: Video switch: C051 So it should be 140x192 in every case (C00D x2). Maybe it triggers a bug in LCM's IIc adapter? If that's the case, the first part of the intro being in color is pure chance. Edit: do you believe it, I fixed the code of Prince of Persia and it's the $C057 that triggers the BW mode when the intro comes back to DHIRES! I really don't understand what's happening in the adapter. I wonder how the second part of the intro renders on other RGB cards. I don't think $C056/$C057 changes the state of ~80COL? Original in UNPACK.S:
Fixed:
|
Some thoughts:
|
Okay, I wondered why there was IOUDIS support :) anyway it works on my IIc so...? Well the bug is there anyway.
I already asked a friend to check on his LCM Eve (IIe).
It might be. I took a look at the IIc's manual and Sather's book, and it might not be that trivial. and it has only access to the following signals: 14M, VID7M, ~LDPS, TEXT, GR and SEGB. So my guess is that it's a behavior of the IIc adapters only, and that you need to use the switchs in the correct order in that case to avoid messing with the signals' sync detection in the adapter. |
Hi @fenarinarsa, I think a small patch (to remove the prerequisite checks, as in your code fragment above) is needed in the short-term to enable all the RGB DHIRES modes to be set correctly. I'd be keen to push out a patch release of AppleWin with just this change so that anyone trying this new RGB video mode gets to experience the work you've done (and isn't confused by the current failing modes due to specific code sequences of C00C/D and C05E/F). Then later, eg. when you get feedback from your friend on the LCM Eve for //e, we can refine the code appropriately. Do you agree? |
I got the test result of the LCM's Eve on a non-enhanced //e, PoP DHIRES screen shows in color with no bug at all. So my guess is the buggy behavior is specific to the IIc adapters - which ones, I'm not sure. As far as I know it may even be a defect of my adapter since I couldn't test any other. For me it's better to push the patch as you say, and fix it later if we find other behaviors on //e. And ignore the //c adapters' instabilities completely. |
. removed the precondition for enabling the extra RGB DHIRES modes . changed IOUDIS soft-switch so that it's for //c only
@xotmatrix - try this new build AppleWin 1.29.16.0 - let us know how this goes. |
Looks good! |
Thanks for confirming. Closing. |
-rgb-card-type sl7
.Selecting demo 14 (mix of 11 and 13) after 13 has glitched will also start glitched but restore the 140 decoder (13) the moment the 560 mixed text (11) is drawn. Variously ordered selections of demos 11, 12, 13 will eventually restore decoding of these different modes while glitching others.
![Applewin_2020-10-25_19-35-13](https://user-images.githubusercontent.com/14209329/97122194-678f1f00-16fa-11eb-8aed-072fa195ff8b.png)
![Applewin_2020-10-25_19-35-26](https://user-images.githubusercontent.com/14209329/97122195-69f17900-16fa-11eb-9dad-55bb8142f0f6.png)
![Applewin_2020-10-25_19-41-06](https://user-images.githubusercontent.com/14209329/97122196-6b22a600-16fa-11eb-93cf-e2d22211cffd.png)
Video-7 Apple II RGB Demo (Video-7, Inc.)(1984).dsk.zip
The text was updated successfully, but these errors were encountered: