Wednesday, July 2, 2008

Small Success

Hooray! I figured it out, after only 3 hours!

Yeah, as I said in the last post, I was hung up on some syntax with my first challenge program, and I figured it out, mostly. I needed a way to position the cursor on the screen at a specific place, and my first intuition was to use the LOCATE command from QBasic. After all, I assumed, the Tandy 102 uses Microsoft Basic, so surely the QBasic commands should work too? Wrong!

Well, I looked online for a Basic Reference Guide for the Tandy 100 series, and guess what? It never existed! I couldn't believe it. So I downloaded the Basic reference for the Tandy 200 and the NEC 8201A, both close relatives of the Tandy 102. I eventually figured out that I needed to use a PRINT@ command, but the book said nothing of how to actually use that command. Dang again.

So, like any good hacker, I just started messing with it. I knew about PSET, which is the command that lets you draw pixels, and I knew it used cartesian coordinates to set the pixel on or off. So I thought PRINT@ would use them too. Wrong again. It uses a "screen location number" which basically means is just counts up the spaces from the upper left corner. So row 1 on the screen is locations 0 to 39, row 2 is 40 to 79, etc.

So now I know what I need to know. Onward! I am working on a Tandy demo (think demoscene but less glitzy) made with all ASCII text and Tandy symbols. I'm calling it the "Retro-Rocket" demo. It's gonna be kinda like the Z80 printer demo or equant's talking moose demo from the Winter Challenge. I'll mess with pixels later, when I've finished getting my feet wet.

EDIT: I guess equant didn't do the talking moose, MacTV did. Sadly, MacTV is not in the contest this year. :( So I guess I'll have to do the 'greets' demo.

2 comments:

Equant said...

Obviously you found the best solution, but I wonder if VT100 escape codes could be used to position the cursor?

Unknown said...

Funny thing- the Tandy does not use the VT100 standard. It doesn't support it at all, in fact. If you want VT100 support you have to actually use a VT100 emulator.