apple2video: fix ivelultr/dodo/laser2c text rendering - #15290
Merged
Conversation
* align character bits to match hardware reference * also cleanup template instantiations
Contributor
On tk3000, that can be done by pressing the Mode key. The effect can be seen in this video of actual HW: https://www.youtube.com/watch?v=ZnpTV49uizc
I just checked again, and the way flashing/inverse characters are handled looks wrong for this system. |
Contributor
Author
|
Thanks! I had seen the "mode" key in the tk3000 manual, but now I also see that it is mapped to F11. Works fine. craft2p: OK, the references I could find only showed normal text. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(followup #14999)
This PR fixes text rendering on ivelultr/dodo/laser2c: these clones display text characters shifted one pixel too far to the right, which is mostly visible with INVERSE text:

After this PR, text rendering aligns with other Apples and clones:

I don't have direct experience with these clones, but it also matches the references I was able to find online:
This PR also cleans up the
screen_update()andtext_update()template instantiation to match what is actually used.Code comments:
Details
Auditing the various apple2 character ROMs shows there are three classes of text bitmap layout (plus inversion):
The shift case was briefly handled by an
Invert, Fliptemplate combination, but this broke when apple2gs changed to useInvert, so is now handled with explicita2_video_device::models. That's fine. But the shift by>> 1wasn't enough.>> 2works for all characters except 0xFF which fills all 7 bits in ivelultr (ASCII page) and dodo ROMs. I don't know how IVEL ULTRA hardware implements this, but based on the reverse engineering of a different GTAC clone, it's likely that the chargen shifters keep all 7 bits and just swizzle the order. So this code rotates bit 1 into bit 6, such that character 0xFF properly fills all seven pixels.For the instantiation cleanup, there are four fixes:
<II, true, false>is now replaced by<DODO, true, false><II, false, false>was only used by superga2 and tk2000, which have no text modes, so make them match apple2p and delete the unused instantiation<IVEL_ULTRA, false, true>was briefly added for albert, but is now unusedtext_update()matchscreen_update()Removing unused instantiations shrinks a clang arm64 release (O3, no LTO) binary by about 4kB.
TODO:
Details
I noticed a few other things while auditing: