ef9345: fix insert and cursor rendering logic #13631
Open
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.
Hello, this PR rewrites how the "insert" attribute is processed to solve the issue discussed in jfdelnero/minitel#3 (comment) and briefly mentioned in #13200.
TL;DR: MAME's current handling of the background color is wrong for the TS9347 video chip variant, and the "insert" attribute is handled wrong on EF9345 too. In addition, the hardware cursor should blink twice as fast as flashing text, instead of the same rate.
Longer recap from that discussion:
instead of
mame/src/devices/video/ef9345.cpp
Lines 417 to 420 in b4d55be
mame/src/devices/video/ef9345.cpp
Lines 433 to 440 in b4d55be
@jfdelnero and I initially made some experiments over the Internet on a real Minitel 2 to better understand how the PAT register works. I've then created a custom "development" board hosting real EF9345/TS9347 chips I bought on eBay. Thanks to this board I've written automatic tests to exhaustively capture the output of all the combinations of PAT and insert attribute values and, in addition, the interactions with the hardware cursor too.
This PR:
(test: test_40columns_cursor/pat60mat60a08b00).