Display, Speed, Bonuses

Spent several hours this weekend working on some new stuff for D2.

1. Display

I’ve been experimenting with OpenGL as the display engine. Unfortunately, that didn’t pan out (worked for 1x & 2x magnification, but 1.5x looked horrible).

However, I did manage to eek out some more improvements to the existing display code. It should be about 2x as fast at the larger magnifications.

When testing scroll speed, use a macro loop like this:


start
j:<all: oa-1:
.ExtCall "timer","start":
x=1 : ba-j:
$2=.ExtStr "timer","stop":
msg "Scroll down took: " + $2>!
<ba-j>:

2. More Speed

There is a new preference called “Speed”. Your options are Normal and Faster. Faster simply performs more 65c02 operations per cycle. What does that mean? It means if you have cpu intense operations, they’ll go much faster.

Why provide an option at all? One of the side-effects of this change is that operations can happen so fast that the screen never updates. For example, if you have a small to medium-sized word processor document and your press oa-S to save it. Under the Faster option, the save is so fast that the screen doesn’t change on you at all. That can be disconcerting.

3. External Commands

Many moons ago, when Randy & I were working on the dot-commands for UltraMacros related to Deja ][ 1.0, we added three commands:


.ExtCall $, $
$ = .ExtStr $, $
# = .ExtNum $, $

In the course of doing Deja IIx (ie 2.0), these commands were disabled. Well, they’re back. While I haven’t setup the plugin architecture yet, the new mechanism is in place to make it easy (for me) to add commands to UltraMacros.

The first string is the command name, the second string contains any parameters. If the command has a result, you can use either .ExtStr or .ExtNum to get a string or numeric result as appropriate for the command. Commands are set up to be case-insensitive. If you call .ExtStr or .ExtNum on a command that doesn’t have any results, you’ll get an empty string or zero respectively.

So, here is a simple example of a new command:

.ExtCall "http","www.dejaIIx.com"

This command goes to the given URL in your default browser.

.ExtCall "timer","start"

This command starts a timer for a timed event.

$ = .ExtStr "timer","mark"

$ = .ExtStr "timer","stop"

This command marks the end of a timer event and returns the # of minutes or seconds since the last .ExtCall “timer”, “start” was called.

You can use “timer”,”mark” as an intermediate timer calculation.

Future command ideas:

“applescript” – run an AppleScript

Post your ideas for other possible commands.