Skip to content
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

Reverse mode in ISO mode #22

Open
mist64 opened this issue Sep 17, 2019 · 3 comments
Open

Reverse mode in ISO mode #22

mist64 opened this issue Sep 17, 2019 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers [KERNAL] Part of KERNAL

Comments

@mist64
Copy link
Collaborator

mist64 commented Sep 17, 2019

In ISO mode, reverse mode has no effect. Also, the cursor is a block that covers the character instead of inverting it.

This can be fixed by swapping the foreground and background colors both for reverse characters and for the cursor.

  • At nxt3, the character is inverted (ORA #$80) in the PETSCII codepath.
  • At nc3w, we currently disable the Ctrl+9 combination of having any effect in ISO mode.
  • AT key5, the cursor is drawn. In ISO mode, we draw code $9F instead of inverting the character.
@mist64
Copy link
Collaborator Author

mist64 commented Sep 17, 2019

Here's some code I worked on. The cursor leaves a trail. Needs debugging.

reverse.diff.zip

It uses this magic code to swap the nibbles:
asl
adc #$80
rol
asl
adc #$80
rol

@mist64 mist64 added the good first issue Good for newcomers label Sep 17, 2019
@Serentty
Copy link

If it's possible to implement reverse video with blinking this way, I think it would make sense to do this for PETSCII as well. Yes, it would mean that screen codes would no longer line up with the C64, but PETSCII text itself would still be compatible.

@mobluse
Copy link
Contributor

mobluse commented Nov 20, 2019

I thought Reverse On/Off worked in PETSCII-UC, PETSCII-LC, and ISO mode, but it doesn't work in ISO mode. Try RUNning this BASIC program before and after Ctrl+O:

10 PRINT "ABCD";CHR$($12);"EFGH";CHR$($92);"IJKL"
20 PRINT "ABCD";CHR$($02);"EFGH";CHR$($02);"IJKL"

CHR$($02) for reversing only works if you have merged PR 89 for x16-rom.

@mist64 mist64 added enhancement New feature or request [KERNAL] Part of KERNAL labels Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers [KERNAL] Part of KERNAL
Projects
None yet
Development

No branches or pull requests

3 participants