Some may have noticed already, but some time ago the Virtual 6502 suite received an update on its GUI, featuring both dark and light mode.
Maybe somewhat less obvious, the assembler now supports anonymous (or temporary) labels. Meaning, you can mark any address/instruction by a “!” or a colon (“:”) for an empty label at the start of the line and may refer to this by an “!” or a colon and any number of plus or minus signs as a quantifier as a target address, where “!-” refers to anonymous label immediately before and “!++” to the second-next anonymous label and so on. (E.g., “BNE !+” may be a useful construct, where you just want to skip a couple of instructions and do not want to think of yet another label for this.)
The disassembler received an option to include cycle counts as comments for each instruction. And there’s a new option to format the output to lower-case.
Last fall, the Virtual 6502 suite also received support for the BBC Micro (or Acorn 8-bits in general) and the assembler integrated in BBC BASIC. I had planned a write-up on this, but this somehow vanished in the cracks. Anyways, in order to assure round-trips through the entire suite, this eventually involved parsing and executing some BASIC instructions, as well, especially string functions. (This is mostly for the peculiar indirection mechanism of BBC BASIC Level I, which doesn’t feature any constructs for including any literals directly in the assembler code, but requires a break-out to BASIC in order to insert values into memory by the help of some special BASIC variables. As this is used mostly for strings, this afforded some BASIC string processing capabilities, as well, in order to run/process actual BBC BASIC sources. This is also includes a basic “understanding” of FOR-loops, at least enough to recognize the loop variable and to ignore them otherwise. You get the idea… Retrofitting this to what was once a very simple assembler was a bit of an adventure. However, there’s now a “BBC Micro” checkbox to each of the applications for doing the 6502 BBC-style.)
Finally, there’s a minor bug-fix to the emulator and the disassembler, where we attempted to output a character literal for 0x7F, which is a non-printable character.
Moreover, the Digital Library finally features Wittgenstein’s tractatus logico-philosophicus, which had been a safe bet for a candidate right from the beginning, because the unique proposition numbers of the tractatus and sequence numbers are a match made in heaven — or hell (you decide) — at least not at ground level. Diagrams are a bit difficult, though. (We have to admit, however interesting this may be, the inprint of punch card remains a somewhat questionable choice of media for literature.)
Expanding the catalog of questionable media for the sake of literature.
Meanwhile, the mass:werk Digital Library has been busy expanding its catalog of nerdy presentations of famous works of literature. (The library currently has a focus on prototypical exponents of materialist philosophy, like Jane Austen.)
Addresses immediately follwing a declared symbol will be translated to a labeled “+1” address (optionally). This may be useful with any code setting up pointers, etc, where only the low-address is declared as a symbol (as is often the case with zero-page system addresses.)
Symbols may be optionally declared specifically for write access only by a “w” suffix (case-insensitive). Think of the Atari VCS (AKA Atari 2600) and TIA read and write registers sharing the same address.
(The assembler ignores such a suffix in order to provide compatibility with such symbol tables.)
CXP0FB = $02 ;read register
WSYNC = $02 w ;write access only
Predefined symbol tables for the C64, the PET 2001, the Atari VCS, and the BBC Micro/Acorn may be loaded directly from the UI.
The disassembler now supports .DATA pseudo instruction for its symbol tables to declare an address or a range of addresses as data to be excluded from the disassembly (".BYTE" pseudo instructions will be added instead.)
.DATA $2040 ;exclude a single address
.DATA $2040 ... $240F ;exclude range $2040 … $240F (inclusive)
.DATA $2040, $240F ;as above
.DATA D1 ... D1+4 ;expressions are allowed
A comment with a binary representation of the respective byte (e.g., “;%01110101”) will be added to any verbose output format, in order to help identifying sprites and similar patterns.
This should be a useful for drilling down on some code: just keep adding “.DATA” statements to your symbol table as you identify a data section and keep on disassembling.
(Again, such a DATA pseudo-instruction is ignored by the assembler to assure compatibility.)
Moreover, all the “virtual 6502” apps now support input and output in “&…” hex notion to comfort those who were tragically mislead by the BBC (while MOS made it quite clear that is “$…”). ;-) (Seriously, I’ve really the highest respect for the BBC Micro, which was an enormous achievement.)
By this, the disassembler looks much like feature-complete.
Presenting a new old-school video game just a few years late, totally unironically.
Back in 2017, I was asking myself — like about every other person on Earth has done so before ;-) —, what would a Spacewar!-like game with multiple gravitational attractors look like? Would it even be playable? Well, time for an experiment.
Another major update to the venerable “Virtual 6502” emulator – assembler – disassembler suite.
I may have been a bit unresponsive over the last few days, but there is a reason for this. Namely, I invested most of my available time into another round of updates to the “Virtual 6502” suite, consisting of an emulator of the MOS 6502 MPU, an old-school assembler, and a respective disassembler. And this has been a major round of updates. Suffice to say, I think these venerable programs, which had been a bit basic and even dated by now, do now for a competent little suite of programs.
+++ Updated for an even improved version of the disassembler. (June 25, 2021) +++
Never at a loss to improve and always afraid to miss out on features or correctness ;-), I added another bunch of improvements to the Virtual 6502 suite.
This time, it has been about the emulator, which received a watchdog to monitor breakpoints and other conditions (like register contents or stack underflow), and support for interrupts. Also, stack operations in conjunction to the implementation of the break flag have been improved. (Moreover, all the applications now enjoy — hopefully as much as the user — fancy UI buttons and custom dialogs. Besides looking period appropriately pretty — this is sort of a sympathetic restoration —, these also provide some extended functionallity that is essential to some of these improvements, like the dialog for editing the watchdog’s conditions.)
In addition to this, the 6502 Instruction Set Sheet now features all kind of information on “illegal” opcodes: there’s now a checkbox below the instruction table to include them in the view, a new section with details on those undocumented instructions, and two more decoding tables showing, where these fit in, and providing deeper insight into the internal operations.
Improving one of the oldest 6502 tool sets on the web.
The Virtual 6502 suite maybe the oldest 6502 tool set on the web still in existence. It may be also one of the earlier ones, at least, when I was doing it, I hadn’t found another one. Reason enough, to give these venerable web pages a bit of an update treatment.
The PET 2001 online emulator just received its first sponsored update, by this advancing to version 1.4. And this update is all about Copy & Paste integration. — TLDR version; have a look at the respective section in the online help, accessible via the “Help” button on top of the emulator’s page.
Text to Speech in JS, and a curious bug. Also, Safari desktop compatibility.
However, this stopped working and the bug rose its head of rare, but questionable beauty once again. It doesn’t happen on all browsers, but, for me, it happens at least in current versions of Firefox. Even more, it seems to be a real Heisenbug, since the script exits on an “out of memory” exception on varying points depending on the specific version of the code. In the minimized production version, the code makes it to several debug messages before the final exit, in the unminimized test version, however, it exits on a different point, which renders intercepting that specific error a somewhat impractical endeavor. Also, the exception dosen’t depend on the length of the utterances spoken (thus suggesting that the “out of memory” exception isn’t caused by memory allocation of the actual code, but the result of cascading failures internal to the JS engine), it just happens on each 80th call of the method “speak()”, which triggers a run of the internal eSpeak engine. Which, on the other hand, provides a suitable point of access to an otherwise somewhat cryptic and inaccessible failure mode, namely, simply keeping track of the number of calls and automatically restarting the engine on every 80th call. (Mind that this may cause a small delay, but it’s still better than the script stalling on an uncatchable exception.)
Shout-out to Trent Murgatroyd for reporting the fault and testing!
This had actually been addressed in version 2.0.6, as of a few days ago (2020-04-17), already. But there was another issue, which had passed my radar, namely, the Safari desktop browser muting Web Audio on default. This is now addressed similar to how mobile devices are handled, by attempting to unlock audio on the first mousedown event occuring in the window. (Unlocking requires a direct user interaction. Hence, meSpeak.js must listen for a global user event. However, it neither blocks or consumes the event in any way, nor does it extract any data.) Additionally to this, meSpeak.js now also attempts to resume the audio-context on every call of the method “speak()” prior to playing any audio, in case it’s found in suspended state. (Again, this will be of any effect only, if the call was issued from code triggered by a user event. On the other hand, it doesn’t hurt trying.)
Proudly announcing version 1.1 of the PET 2001 online emulator.
Version 1.1 of the PET 2001 online emulator features a totally revamped mounting and loading mechanism for files. For users this means full access to disk directories and LOADing programs from inside BASIC. For all the nerdy details and some hilarious insights into Commodore IEEE file loading (like, “Where on Earth — uhm, in memory — is the BASIC scondary device address?”) follow the link:
Proudly announcing version 1.0 of the PET 2001 online emulator.
Recently, I’ve been posting on Commodore BASIC and more specifically about the PET 2001 quite a bit. While not the sole reason, this was partly because I was adding a few features to the PET 2001 online emulator behind the scenes. I even endeavored into a major reorganization of some of the source code in order to facilitate this and future work. And, last but not least, there’s now even a suitable help file / documentation. — Reason enough to promote the emulator from its previous beta state to version 1.0!
mass:werk proudly presents: Running BASIC on a virtual PET 2001 from URL-data.
So you want to show your friends a little BASIC program or want to solve some problem with (retro) style? Despair no more, since help is near…
More specifically, just a click away, at www.masswerk.at/pet, where you find my enhanced version of Thomas Skibo’s in-browser PET 2001 emulation. What’s new is an additional mode, where the emulator loads (and runs) a program from data encoded in URL-parameters — as provided either in the query-string or in the URL-fragment (hash). And you may use this for immediate execution in direct mode, as well!
The Terminals Working Group proposed a new Unicode range earlier this month (Jan. 4, 2019) for the purpose of retrocomputing and emulation. As of version 1.1, the newly proposed glyphs are already included in the Char8.js library for generating 8-bit characters from Unicode.
Here’s a sample, rendering the new glyphs in double height using a 16 × 8 character matrix:
The proposed range incorporates glyphs from various legacy systems, including
It may be just the right season to remind of one of the first computer animations, “Snowflake” written in the 1960s for the DEC PDP-1. Despite various research efforts, the author of this amazing little program remains still unknown, which is quite a bity, since s/he deserves to be rembered along with the program.