Name: Eric Smith
Member since: 2001-04-21 00:34:10
Last Login: 2007-08-03 00:36:10
Homepage: http://www.brouhaha.com/~eric/
Notes: Lots of interests, as described on my home page.
I've developed a number of Free Software projects. Only a few are listed here, see my obscure Free Software projects page for a more comprehensive list. Some of the Free Software projects I've worked on:
Some of my other projects:
Most diary entries I post here are from my blog, What's All This Brouhaha?.
Nonpareil now runs on Windows, as well as Linux and other Posix platforms.
Nonpareil is cross-compiled from Linux using a GCC cross-compiler targeting i586-mingw32msvc.
There is not yet an installer; it's just distributed as a ZIP file. It appears that I should be able to use NSIS to create an installer, and still do everything from Linux.
This is the first release to include the 82143A printer support I mentioned here last week. Graphics and custom characters (BLDSPEC) are supported, subject to the same limitations as a real 82143A (42 byte buffer size). The printout is shown in a separate window at two selectable sizes, and can be saved to a PNG file. Saving as text will probably be provided in a future release.
The 41C and Voyager keyboard support has been enhanced to provide two-key rollover matching the actual calculators. Thanks to John Hogerhuis for his comments and suggestions regarding the keyboard characteristics. I need to verify that the two-key rollover behavior is the same on Classics, Woodstocks, Topcats, etc.; in which case I'll make the same changes for those models.
Some progress has been made on the Windows port, but it still isn't ready. I expect to include a Windows preview release (possibly with less features than the Linux version) with release 0.73 or 0.74.
14 Jun 2005 (updated 14 Jun 2005 at 08:35 UTC) »
There's some bug that prevents the printer simulation from working on my Fujitsu Lifebook subnotebook (800 MHz Crusoe processsor), but I haven't yet had a chance to try to debug it. It works fine on my other machines, aside from the problem I noted yesterday with use of the Paper Advance button when the calculator is in program mode.
I added the double-size mode, selectable by a menu item. Internally there's an integer for the scale, so it could have values greater than 2, but right now the UI only allows toggling between 1 and 2.
I can't decide whether to use radio buttons for the printer mode (NORM/TRACE/MAN), or a menu with radio items. I've got both in the code now, with defines to select at compile time. For radio buttons, I think I prefer the three radio buttons arranged vertically, with the Print and Paper Advance buttons arranged vertically to the right of the radio button group. Anyhow, if buttons are used (even just for Print and Paper Advance), some effort needs to be put into making the layout aesthetically pleasing.
The arrows on the scroll bars on the printer output menu weren't working, though dragging the ``thumb'' or clicking in the paging regions (between the thumb and arrows) worked fine. It turns out that the default step_increment in the adjustments used by the GtkScrolledWindow and GtkLayout are zero! I would have expected them to be one (pixel), though that wouldn't have been much better. Anyhow, I'd never dealt with GtkAdjustments before, but they're fairly simple. I set the horizontal and vertical step_increments to the size of one character. Now that I think about it, they really need to be the size of a scaled character, and updated if the scale changes.
And once I did that, I realized that the GtkAdjustment was the key to making the printer output window automatically scroll as new output is added. I wanted that to happen only if the window was already scrolled to the end, so that if the user manually scrolls to some other part of the output, newly generated output doesn't keep jumping it to the end. At the beginning of gui_printer_update(), I do something like this:
bool was_at_end = ((p->v_adjustment->value + p->v_adjustment->page_size) >= p->v_adjustment->upper);
Then at the end, I do:
if (was_at_end)
gtk_adjustment_set_value (p->v_adjustment,
p->v_adjustment->upper - p->v_adjustment->page_size);
It seems to work quite well. It would be nice to have examples like this in the GTK+ API documentation or the tutorial.
P.S. To anyone with a lot of GTK+ experience this stuff probably seems blindingly obvious, but GUIs aren't really my area of expertise (despite having hacked Macintosh code since late 1984). In the Nonpareil project, my main interest is the guts of the simulation, and the reverse-engineering aspects (figuring out the internals of the old HP calculators). I'm doing the GTK+ work because I didn't think I could find anyone else willing to do it for me, but it's turned out to be quite fun. And maybe GTK+ expertise is a marketable skill. I wonder what percentage of GTK+-based development is done in C, vs. C++? I normally avoid C++, which is exactly why I chose GTK+ over Qt or WxWidgets.
It's not ready for release yet, but I basically have the 82143A printer simulation in Nonpareil working now! You can see the result of PRA, PRP, and PRSTK in this screenshot.
There's not yet any way to save or copy the printer output, nor to change the printer mode (MAN/TRACE/NORM) or press the printer ADV or PRINT buttons. I also want to add a double-size view.
I'll make a new release available soon.
I'm missing one character in the font, code 123 (0x7b hex), because I couldn't make it out at all in the manual scan. I haven't the slightest idea what it's supposed to be. There are probably other errors in my transcription of the character set, so I'd like to get a better scan of either the actual printer output, or the page of the manual showing it.
Hmmm, maybe I need to add printer sound effects too! :-)
Keyboard operation has been fixed, and there are improved keyboard mappings for Voyager calculators. The 41C bank switching has been fixed so the 41CX Extended Functions now work correctly. The stopwatch mode now works.
brouhaha certified others as follows:
Others have certified brouhaha as follows:
[ Certification disabled because you're not logged in. ]
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!