console control codes in 4.1FE

A forum for general AmigaOS 4.x support questions that are not platform-specific

console control codes in 4.1FE

Postby lazi » Sun Apr 05, 2015 10:52 pm

Hi!

I am going to release an update to PDFToolkit, but found that the program looks broken in 4.1FE consoles.

I present the problem with a simple echo command in the shell.
Here is a picture from the UAE 3.1 installation (it is the same on 4.1 update 6, but I can't boot it now):
Image

And here is the OS4.1FE result with the a same control codes:
Image

You can see the the background color is rewritten from the first character in the row instead of just for the printed characters.
If it is an intended change, I have to find a workaround.
Can't found anything about the change.

Please let me know the reason of the new behaviour.


Thanks!
lazi
 
Posts: 36
Joined: Sat Jun 18, 2011 9:46 am

Re: console control codes in 4.1FE

Postby tonyw » Mon Apr 06, 2015 12:26 am

That is not an intended change and could be a bug.

I'll take a look at it.

(time passes)

I confirm that it is a bug, submitted as #9193.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1195
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: console control codes in 4.1FE

Postby lazi » Mon Apr 06, 2015 7:16 pm

Thank you very much!
lazi
 
Posts: 36
Joined: Sat Jun 18, 2011 9:46 am

Re: console control codes in 4.1FE

Postby tonyw » Tue Apr 07, 2015 4:31 am

OK, I've found the fault and fixed it, but I haven't released it to the betatesters yet.

The fixed version will not be released to the public for some time, so I suggest that you invoke a work-around anyway.

The problem is caused by the order of the operations:
1. Change background colour;
2. Position cursor to new place past the end of the line;
3. Fill with new spaces from the end of the line to where the new text is going;
4. Write the new text ("oo"" in your example).

Step 3 fills the line with spaces, but the new "fill" spaces are written in the new background colour. If you are over-writing existing characters, the problem does not occur, it only occurs when filling past the end of a line.

One work-around that I recommend is to change the order of operations:

if (new place is past the end of the line)
{
move cursor to end of line;
draw spaces until you get to the new place;
}
else
move cursor to new place;
change background and/or foreground colours;
write the new text.

That should work OK.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1195
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: console control codes in 4.1FE

Postby trixie » Tue Apr 07, 2015 11:05 am

tonyw wrote:The fixed version will not be released to the public for some time

The reason being... what?
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 349
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: console control codes in 4.1FE

Postby tonyw » Tue Apr 07, 2015 3:09 pm

It takes time for a changed component to be submitted to all the regression testing that the betatesters do. The few times that we have released "quick fixes" without going through the betatest stage, have all led to unanticipated problems.

At a guess, I would say a couple of months minimum before we are confident enough of this change, to release it. I don't know how that lines up with any planned updates.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1195
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: console control codes in 4.1FE

Postby Raziel » Tue Apr 07, 2015 5:24 pm

@tonyw

I found another strange behaviour with ESC colouring.

Code: Select all
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"
echo "*E[42mFirst Test...*E[0minbetween test*E[46m...second inbetween test"
echo "*E[42mSecond Test...*E[0minbetween test"


Try the attached example (simple) in a complete empty shell window (cls)
Everything works fine.
The first text is on a white background, the second text is normal and the third text (if printed) is on a light gray background.

Once the printout reaches the bottom of the shell and starts scrolling though, the light gray background is filling up the entire width of the line where it shouldn't even be printed/used at all (on the lines where no "second inbetween" text is printed - there isn't even the ESC code sequence in those lines).

Image
Link to picture

Could you please check and maybe add it to the bug report?

Thanks a lot
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 728
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains

Re: console control codes in 4.1FE

Postby tonyw » Wed Apr 08, 2015 1:14 am

Yes, I'm aware of that one and working on it atm. It's the same as appears on the end of the 4th line in lazi's original post.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1195
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: console control codes in 4.1FE

Postby Raziel » Wed Apr 08, 2015 8:01 am

Thank you :-)
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 728
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains

Re: console control codes in 4.1FE

Postby lazi » Mon Feb 06, 2017 9:59 am

Hi!

After the FE update my machine have this:
con-handler 53.78
console.device 53.99

The problem is the same as you can see in post #1.

Bye!
lazi
 
Posts: 36
Joined: Sat Jun 18, 2011 9:46 am

Next

Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 2 guests