mass:werk / Blog

(Posts 71 … 63.  Jump to newest. RSS feed: Subscribe.)

PET 2001 Emulator + 6502 Updates

Yet another software update notification.

Yet another illustration

After the big spring rewrite for version 2.0 of the PET 2001 emulator, which brought things like sound, cycle accurate video rendering (we run all the newest demos without modifications!), a new CPU emulation, and even more features, like a built-in 6502 assembler, various context aware dissassembly and dump modes to allow a close inpsection of the internals, support for joystick input with emulatinon of various adapter schemes (including SNES gamepads), and other things more, I’m happy to announce a few further upgrades.

Recently, I rewrote the entire keyboard handling from scratch, which now provides faithful emulation of the PET’s original keyboard in ”Games Mode”. Which — as suggested by the name — should provide better support for games that bring their own keyboard scan routines. (Compare our last installment.) Now I added support for a virtual numeric keypad, which is both complementary and somewhat alternative to the keyboard joystick emulation (which reroutes cursor input to any selected joystick scheme, using the CPAS-LOCK as a modal toggle.) Moreover, I rewrote the ROM implementation, which now (a) transparently relates to ROM sets and Commodore product IDs of the individual ROMs, and (b) allows modular upgrades without redundantly including duplicate code.

Somehow things are dropping in place and are coming together for a feature still missing, namely, support for the business keyboard. As the PET’s business keyboard features both typewriter-style numerals on the top row of the keyboard as well as a separate numeric keypad, which comes with its own key codes, any kind of emulated keypad is strictly a requirement for this to be of any use in the era of laptops and reduced keyboards. (Some laptops come with a NUM-LOCK feature, but others, like MacBooks, don’t have any of this. Hence, it’s up to the emulator to provide for this.) As the business keyboard also comes with its own keyboard matrix, we’ll have to replace the editor ROM in order for this to work. Which is already provided for by the new ROM architecture.

Other, I’m happy to announce that the CPU emulation passes Klaus Dormann’s functional test suite for the 6502 and the extensive decimal mode (BCD) test, which is also true for the closely related virtual 6502 emulation. The virtual 6502 suite also saw the addition of a new member, a tiny hex-editor for quick hacks of 8-bit binaries and hex-dumps (with special support for Commodore 8-bit PRG-files). Moreover, these apps now enforce their unique window identifier, which should provide improved interoperability, when switching between them, regardless of where you came from or how you navigated there.

Well, that’s it, for this time, but there may be coming more….

PET Keys — Series 2001 Edition

A closer inspection of the keyboard(s) of the PET 2001.

Another illustration

Where we investigate the PET keyboard, have a closer look at the keyboard matrix of the various layouts found on the PET 2001 and later PETs, as well, and even have a bit of 6502 fun.

Update: Now with code examples!

Continue reading…

Fear and Loathing in the Face of the Missing 4th Commodore BASIC Variable

Some early results of our hair-raising experiment.

Illustration: Fear and Loathing in the Face of the Missing 4th Commodore Variable — First Results

Before we resume our normal operations, a quick look at first results for our little experiment…

Continue reading…

The Case of the Missing 4th Commodore BASIC Variable — Bonus Episode

Yet another hair-raising experiment.

Illustration: The case of the Missing 4th Commodore Variable… Bonus Episode

A mildly interesting bonus episode, where we investigate our own signal to noise ratio using the new-fangled Clip Text™ Machine

Continue reading…

The Case of the Missing 4th Commodore BASIC Variable (and the 5th Byte)

Yet another detective story.

Illustration: The case of the Missing 4th Commodore Variable…

We investigate the hair-raising case of the missing 4th variable type in Commodore BASIC — and a possible damsel, possibly in distress. A true detective story…

Continue reading…

Link Your Time

An Update to the previous update.

Screenshot of the international time zone conversion utility.

Last time, we presented our nifty international time zone conversion utility. Now it has become even better: once, you’ve set up the converter, you may link the current set up in order to share it. There’s a link near the bottom of the page, which will be always up to date. Just right-click it and copy. (This may be helpul for negotiating dates or meetings.)

Moreover, you may also preconfigure a link in order to see, what the current time (or a specific one) will be in certain locations / time zones. See the documentation on parameters at the bottom of the page for details.

Also, I’m finally working on sound for the PET 2001 emulator…

December Updates

Assorted site news.

Title illustration

It’s been a while since my last post — sorry (a more substantial post is a bit long in the tooth, but may appear soon) —, so it may time to quickly announce a few updates to the site.

Since it’s end of the year, which is also the traditional time to look for a calendar, there is now one at www.masswerk.at/time/calendar. Pick a year and print it out in order to show off that you really understand how days work! :-). We had this already at our time display, but now you can have an entire year of this! E.g., here’s a link to 2023, which happens to be next year. (Make sure to disable headers & footers and to enable backgrounds in your print dialog.) If you really don’t like the idea of the layout (how dare you?), you may also export a no-frills plain-text version.

Another update is also related to time, namely it’s an international time zone conversion utility. Which can be found at www.masswerk.at/time/convert.
Now, JavaScript (and by this, your browser) features localized dates with time zones, nowadays, but this only supports foward conversions from UTC timestamps to localized dates. This, however, also involves finding a corresponding UTC date to a given local date so that you can pick a date and time in one timezone and see what this may be in annother time zone. Which is, what this utility does. (Please mind the disclaimer. Especially mind that things become a bit tricky with DST/standard time crossovers and there may be more than a single UTC reference for a given localized time-date combination. E.g., when a local clock rewinds to 2:00 am at 3:00 am, once a year.)

Screenshot of the international time zone conversion utility.

This is what it looks like. Technically, we use our trusty TZIntl.js library for this. And thanks to this, this utility runs entirely on your local computer, in the browser, without connecting to an external service or leaking any data.

Links to both utilities can be found at the bottom of our fancy time display, which is always behind the tiny clock icon at the very end of the site navigation.

The final news is about the PET 2001 emulator:
First, the emulator now supports quantifiers in PETSCII escapes in any BASIC source file or pasted code, like "{4 SPACES}" or "{12 RIGHT}", which adds another layer of compatibility to some listings as may be found in traditional type-in code. (It may even come handy for designing screen output more comfortably.) The other one is a rather major one, but without much of an external effect: The emulator now supports varying ROM sizes, which means, it now also comes with ROM 4.0. However, the IEEE interface emulation still only supports LOAD and SAVE commands, so there isn’t much utility to the advanced disk commands of Commodore BASIC 4.0. Still, there is otherwise full support for ROM 4.0, including text-to-BASIC, BASIC-to-text imports and exports and even click-anywhere-on-the-screen-to-place-the-cursor functionality (AKA, “Touch Cursor”). I guess, still sufficient added capability to elevate the emulator to version 1.5.

On Philosophia Mechanica

‘World, Fact, Case’ explained.

Illustration: On Philosophia Mechanica

To common knowledge, a joke explained is a dead joke. However, apparently it’s totally accepted and “ok” to explain a mechanical joke. As our last installment was pretty much a mechanical joke (it even has a crank!), we may thus feel free to do so. And, as we’re feeling like it, we’ll attempt to do so…

Continue reading…