Skip to content

apple2video: fix ivelultr/dodo/laser2c text rendering - #15290

Merged
ajrhacker merged 1 commit into
mamedev:masterfrom
arekkusu42:apple2-text
Apr 30, 2026
Merged

apple2video: fix ivelultr/dodo/laser2c text rendering#15290
ajrhacker merged 1 commit into
mamedev:masterfrom
arekkusu42:apple2-text

Conversation

@arekkusu42

@arekkusu42 arekkusu42 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

(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:
ivelultr_ASCII_0287 dodo_laser2c_0287

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

I don't have direct experience with these clones, but it also matches the references I was able to find online:

  • This video (using ASCII not YU, so C with caron "č" appears as "~") shows inverse "D" and "_" character spacing on IVEL ULTRA hardware
  • The original thread dumping dodo ("GTAC Wiederbelebung" "Do-Do") contains a photo showing the cursor spacing on hardware
  • This video shows cursor spacing on Laser ][c hardware

ivelultr_ASCII_reference dodo_reference laser2c_reference


This PR also cleans up the screen_update() and text_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):

  1. flip: all apple2 EXCEPT ivelultr/dodo/laser2c, and spectred/ace500/2200
  2. shift & flip: ivelultr/dodo/laser2c
  3. no flip: all apple2e EXCEPT spectred/ace500/2200, and apple2gs

The shift case was briefly handled by an Invert, Flip template combination, but this broke when apple2gs changed to use Invert, so is now handled with explicit a2_video_device::models. That's fine. But the shift by >> 1 wasn't enough.

>> 2 works 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:
  1. <II, true, false> is now replaced by <DODO, true, false>
  2. <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
  3. <IVEL_ULTRA, false, true> was briefly added for albert, but is now unused
  4. make text_update() match screen_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:
  • It's unclear why craft2p is marked IMPERFECT GRAPHICS. The char ROM has two language pages, but they are both Portuguese. Is it dumped incorrectly?
  • ivelultr is commented as "wider character cell" but the video hardware uses regular 7x8 cells, only the alignment of the ROM bitmap differs, which this PR fixes
  • pravetz8m_chr has four language pages. There is an unemulated dip switch but I haven't found documentation on it.
  • It's unclear how to toggle language pages on tk3000 or laser128*

* align character bits to match hardware reference
* also cleanup template instantiations
@ajrhacker

ajrhacker commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

It's unclear how to toggle language pages on tk3000

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

It's unclear why craft2p is marked IMPERFECT GRAPHICS

I just checked again, and the way flashing/inverse characters are handled looks wrong for this system.

@ajrhacker
ajrhacker merged commit b3bc8ac into mamedev:master Apr 30, 2026
6 checks passed
@arekkusu42

Copy link
Copy Markdown
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.

@arekkusu42
arekkusu42 deleted the apple2-text branch May 1, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants