TextOut y value
Re: TextOut y value
This might be a better way to report this data, average ticks /TextOut()
.344 ticks/TextOut()
.430 ticks/TextOut()
1.08 ticks/TextOut()
How fast vs flexible do we want or need TextOut() to be?
.344 ticks/TextOut()
.430 ticks/TextOut()
1.08 ticks/TextOut()
How fast vs flexible do we want or need TextOut() to be?
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: TextOut y value
Well, I'm fine with half the speed it used to be. John said he used a crude method of setting the bits in the latest FW, that's probably why it's so slow. Now that he will be using bit-math on the whole 16 bits at once, it should be significantly faster than 1.08 ticks per draw.
I'm curious though, what if you set all the y values to LCD_LINE1-1, so to speak. Offset them all to some degree, and see if that effects the speed.
I'm curious though, what if you set all the y values to LCD_LINE1-1, so to speak. Offset them all to some degree, and see if that effects the speed.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: TextOut y value
...and BTW the speed when using ric fonts instead would be also interestring to see :)
Re: TextOut y value
On my NXT with the not yet uploaded firmware image using Nicolas' code I get 5931. Latest compiler, optimization level 3. That seems pretty respectable.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: TextOut y value
With this code I get 5931 followed much later by 63062:
FontTextOut is definitely much slower - but more flexible, for certain.
With offsets such as -1, -2, or -4 from the standard lines the TextOut result was around 6050.
John Hansen
With offsets such as -1, -2, or -4 from the standard lines the TextOut result was around 6050.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: TextOut y value
This seems much more complicated than some bit logic but I can give it a try if I understand what it is supposed to do.afanofosc wrote:If you have any ideas what I might be doing wrong with my JMPABSVAR opcode (and almost certainly the BRCMPABSVAR and BRTSTABSVAR opcodes) I'd be grateful for the assistance there as well. I'll check in the code later on tonight so you can have a look at it, if you are interested.
I think my compiler is generating the right value for the absolute address to jump to (which I am trying to convert into a relative jump offset) but I wind up getting a ERR_INSTR file abort.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
Re: TextOut y value
I think it might be possible to speed up the copybits code for drawing RIC sprites. This is where I got the "iterate through each bit in the current font byte" logic from but the routine is structured in a way that makes it a little harder to switch to Nicolas' code inside the nested for loops. I think, though, that with a little thought we could improve this in a similar fashion. It may not need to use any masking across 2 lines like with the text drawing - except perhaps on the top row of the sprite data and the bottom row of the sprite data when that row is drawn at a Y value that is not a multiple of 8.
I will get the code checked in tonight and upload a new firmware image to the test_releases folder.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: TextOut y value
This should be possible improve this code, but things are much more complicated because bytes are in lines in sprites, but columns on the screen! May be with a lot of scratch registers...afanofosc wrote:I think it might be possible to speed up the copybits code for drawing RIC sprites.[...]
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
Re: TextOut y value
Ah, yes. I see that now. I was getting confused by all the sx and sy, etc.. Thanks for looking at it, anyway. I still need to upload a new image, which I keep forgetting to do.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: TextOut y value
when taking all the efforts for printing buitl-in fonts at any x,y,
what about having also 4-5 different font sizes like in RobotC ?
(there you can print several font sizes of built-in fonts at any x,y)
what about having also 4-5 different font sizes like in RobotC ?
(there you can print several font sizes of built-in fonts at any x,y)
Who is online
Users browsing this forum: No registered users and 4 guests