Is there a way to do this in Axe or ASM?
I suppose you could display the text to the buffer and rotate the buffer, but I can't help you with that Sad.
Raylin wrote:
Is there a way to do this in Axe or ASM?

Make a vertical font, and write your own display routines.
Yikes.
It's not that hard, just create 26 sprites that display vertical characters.
souvik1997 wrote:
I suppose you could display the text to the buffer and rotate the buffer, but I can't help you with that Sad.
That would be the easiest, probably, and not even that hard to do! Raylin, I'd be happy to show you some ways to do this in ASM. The rotation would be the hardest part; it's not even hard to rotate, it's just hard to rotate in minimal instructions.
The hard part would be if you didn't want a monospaced font...and still not *that* hard.
elfprince13 wrote:
The hard part would be if you didn't want a monospaced font...and still not *that* hard.
I don't think that would be too hard at all; Doors CS explicitly exposes character widths, and if you use DPutMap or even simple _vputs, you can compare the (pencol) before and after drawing a string to figure out how wide it was, then perform the rotation.
Intriguing. So, what could I do for displaying the text letter-by-letter?
Raylin wrote:
Intriguing. So, what could I do for displaying the text letter-by-letter?
So for that, the high-level pseudocode would look something like this:


Code:
{assume coder set top-left coordinates {x,y}
{assume coder set string s}
procedure DrawSidewaysString(x,y,s):
     for each character c in string s:
          display c at (88,57);
          width <- (pencol)-88;
          for a in [0,width-1] step 1 do:
               for b in [0,6] step 1 do:
                    p <- read pixel (88+a,63-b);
                    write pixel (x+b,y) <- p;
               endfor
               y <- y + 1;
           endfor
     endfor
endproc


Does that make sense? Would you like to see some lower-level code for it?
I'd take a look at the LoadPattern ROM call. This returns the width of the specified character and the pixel data for that character. Drawing each character to the screen should then be relatively straightforwards (far easier than rotating an existing image of a text string, anyway).
benryves wrote:
I'd take a look at the LoadPattern ROM call. This returns the width of the specified character and the pixel data for that character. Drawing each character to the screen should then be relatively straightforwards (far easier than rotating an existing image of a text string, anyway).
Ooooh, I forgot about that one. For some reason I was always under the impression that that only worked with the large (homescreen) font, but a quick glance at the System Routine Reference just convinced me otherwise.
Soooo...

Could I get a little more usage information on this? How does LoadPattern work in the program? What does it destroy?
Raylin wrote:
Soooo...

Could I get a little more usage information on this? How does LoadPattern work in the program? What does it destroy?

The TI-83 Plus System Routines PDF is invaluable for developing TI-83+ software and contains the answers you need. Smile
benryves wrote:
Raylin wrote:
Soooo...

Could I get a little more usage information on this? How does LoadPattern work in the program? What does it destroy?

The TI-83 Plus System Routines PDF is invaluable for developing TI-83+ software and contains the answers you need. Smile
Most heartily seconded. While we're on the subject of the ideal reference set, here's mine:

:: System Routines PDF - inputs, outputs, descriptions, destroyed, and sample code for most if not all TI-OS bcalls.
:: TI-83+ SDK PDF - Description of how to interact with the OS on a variety of levels; probably more helpful to a shell programmer like me than to a game programmer using the fruits of a shell programmer's labors.
:: z80time.txt - Opcode timing and size information. The size stuff is good to know to be able to write more intuitively-compact code; the timing stuff is more helpful again to shell programmers (and music/tone routine programmers, and grayscale programmers, and network/linking driver programmers...)
:: ASM in 28 Days - I use this as a quick access to the font set diagrams, the direct input codes, and the VAT structure of non-programs when I can't remember them.

Edit: For future individuals who are JFGI-savvy enough to get to this thread but too lazy to click through to the PDF, the LoadPattern bcall is as follows:

:: Input: character in the accumulator (a)
:: Set fracDrawLFont, (iy + fontFlags) to use the large font, reset it for the small font
:: Outputs are in some specialized RAM areas.

For your purposes, you should probably then do a bitwise copy from the buffer to the screen; I unfortunately don't know any good code for an in-place 90 degree rotation in z80.
The Z80 User Manual should be close to hand as well. Wink

With regard to rotating a sprite, this thread may provide some hints. Personally, I'd just shift the bits out of each row of the returned font data one by one and copy to the buffer as required. It's not desperately fast but it should be adequate and is easy to implement.
Ooooh, that's a nifty thread; I think I remember reading that before, but I had forgotten about it. Sidebar, Ray mentioned that he had gotten this code working, and I asked him to post it, but he needs to type it out from his calculator, since he has no SilverLink, so I'm eagerly awaiting that.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement