MEGA65: The Next Batch!
Dan's MEGA65 Digest, September 2022
First off, thank you all so much for the outpouring of support for this Digest idea. I didn't expect to see so many of you subscribe to a newsletter sight unseen. I really hope it'll be an enjoyable use of your attention.
And boy did we time this right, because we get to discuss big news in the first issue!
Batch #2 is shipping soon
MEGA's assembly and distribution partner Trenz Electronic has parts in hand for the next batch of 400 computers, and is scheduled to assemble and deliver them by the end of the 2022 calendar year. Soon there will be 800 MEGA65s in the hands of new owners, not counting the 100 Dev Kits.
All batch #2 machines will ship with updated factory-installed firmware and system software, including fixes and improvements made since batch #1 shipped back in May. Batch #2 will include the printed User’s Guide from the first print run. If you receive a batch #2 machine, you'll want to download the most recent PDF as a supplement. I'll try to keep the Welcome Guide up to date as well.
Trenz is planning these fulfillment batches based on the availability of parts, especially the Xilinx FPGA chips. The MEGA65 team has done a great job mitigating risk in the supply chain, with unusual pieces like the injection molded cases and floppy disk drives well stocked. (We were all surprised when the first batch was delayed due to a shortage of cardboard, of all things.) We can all look forward to continued fulfillment of pre-orders through next year.
Help with testing for batch #2
The MEGA65 community made a huge push to test the factory-installed firmware and system software for batch #1. We're doing it again for the batch #2 release candidate—and you can help!
The closer you can get your MEGA65 to the final configuration, the better for testing. If you own a MEGA65, a Dev Kit, or a Nexys FPGA board, jump in the
release-test forum on the Discord. Check out the release candidate verification home page with links to downloads and instructions for testing and reporting bugs. You can install the latest core in slot 1 of the core management utility, and prepare a new internal SD card with the latest system software and bundled disk images.
If you're one of the lucky ones to have both a batch #1 MEGA65 and a JTAG programming interface, you can install the candidate core in the special "slot 0," which is how batch #2 machines will be configured. Overwriting slot 0 requires opening your case to flip a tiny switch, as well as running some fancy commands. We need slot 0 testers, so if this sounds like you, please give it a try. See the wiki page for instructions.
If you don’t yet have a MEGA65, you can still help test the ROM using the Xemu emulator. You’ll need to use the C65 ROM diff files along with a copy of the original Commodore 65 ROM version 910828 (which you can find online or on the C64 Forever CD-ROM) to produce the
Thanks to everyone who can help out!
What's the latest firmware, anyway?
The core team and contributors have been improving the MEGA65 firmware and system software (including the MEGA65 version of the Commodore 65 ROM code) continuously since batch #1 shipped. So what's considered the "latest" version, and should you upgrade?
There are two major release packages for the system software: the stable release package, and the experimental release package.
The stable release package contains the most recent set of software that has been through a testing phase, which today is the factory-installed set from batch #1. It includes MEGA65 core version
20220109.11,1586ad4 and the MEGA65 ROM version
920287. When we've completed verification of the batch #2 software set, that set will become the new stable release. You can download this from the MEGA65 R3 Release Package page on Filehost. (You'll need a Filehost account registered with your owner code to access it, because it contains the licensed ROM.) Stable releases have their own version number to represent the entire set of software, with the current release known as version 0.9.
The experimental release package is the bleeding edge, built regularly from the latest changes committed to the source repo. As of this writing, the experimental package download contains core version
20220717.12-develo-3253c5d. Contributors do their best to keep everything in working order when they submit changes. For additional assurance that changes maintain backwards compatibility, they are held in this "experimental" state while we test them and put them through their paces. You can download the experimental release core and system software from the Experimental Release MEGA65 R3 page on Filehost.
Unlike the stable package, the experimental release package does not contain the ROM. As of now, the latest ROM is
920377, and is available from the C65/MEGA65 Kernal ROM page on Filehost.
The batch #2 verification build has its own download page and may be slightly newer than the experimental release during the test phase.
Which release should I use?
Which release you choose to install on your own MEGA65 is a matter of taste. Everyone is encouraged to install the latest stable release. For batch #1 owners, this just means that we'll throw an upgrade party when batch #2 is finalized. If you don't want to hassle with frequent upgrades of experimental releases, and the occasional downgrade when issues are discovered, stick with the stable release and watch for announcements. If you'd like to preview new features, get the latest bug fixes, and help test new contributions, consider installing the latest experimental release. I've had a good time keeping the latest experimental release on my MEGA65 all year, though I've also been paying close attention to bug reports.
One of the coolest things about the MEGA65 is that it's easy to switch between multiple versions of these components. You can have multiple cores in flash memory, you can have multiple ROMs on the SD card, and you can easily switch between them when you boot the machine. This is not quite true for the auxiliary system software in those
.m65 files on the SD card. If you find yourself switching between stable releases, you might want more than one SD card prepared with the appropriate files. The differences in the files between experimental releases tend to be minor enough to just use one SD card.
As of right now, my personal recommendation is for batch #1 owners to proceed with upgrading to the experimental or batch #2 verification release set. Since batch #1 shipped, newer releases have fixed noticeable bugs and improved the overall quality of life for MEGA65 owners. You'll also be helping with the verification effort by upgrading now. When the batch #2 testing phase completes, that'll be a good time to install the new stable release as your default core (in slot 1) and default ROM (with filename
As anyone who has done software release management professionally can tell you, release verification is an expensive process. We’re gradually building out automated testing solutions to reduce the time between stable releases, though this is challenging when custom hardware is involved. I'm grateful to everyone who tests experimental releases. You make continuous improvement possible!
For instructions on how to upgrade your MEGA65's firmware and system software, see the User's Guide included with the machine, as well as the Welcome Guide.
Upcoming type-in zine, call for submissions
ZeHa of Dr. Wuro Industries (known as ZeHa on the forums, drwuro on Discord) is producing Megazine, a printed zine of type-in BASIC programs for the MEGA65, and is calling for submissions. If you've always wanted to see one of your programs featured in magazines like Compute!'s Gazette, now is your big chance!
Megazine is looking for BASIC programs with a focus on fun, such as games, animations, or demos. Keep it short, and keep it readable enough for beginner programmers to understand. (I remember doing a type-in as a kid and encountering the word
FORK in the program and wondering what it did. It took me a moment to realize it was just a
FOR statement and a variable named
K, with the space removed.) Also please only submit unreleased programs.
When the zine was originally announced, the submission deadline was set at September 30. This will probably be extended, though a new date has not yet been determined as of this writing. Check out the original forum announcement for submission details and updates.
Character graphics made easy
One of the easiest ways to get started with programming games on the MEGA65 is with character graphics. Your BASIC program plots colored letters and symbols on the screen, checks whether the joystick or fire button is pushed, and decides on new positions for player, enemy, and environment objects. Do that in a loop and you've got a game.
Just like with the Commodore 64, you can replace the glyphs used for each letter or symbol with your own custom designs. And starting with ROM version
920347, MEGA65 BASIC makes this super easy!
CHARDEF command takes the character screen code whose glyph you want to replace, and eight numbers that describe the new 8x8 pixel image, one number for each row. Try this at the
If you get a
SYNTAX ERROR, double-check that you're using the latest version of the ROM. (ROM
920347 came after the batch #1 v0.9 release.)
Now type the "at" symbol (
@) a few times.
0 is the screen code for the "at" symbol. Screen codes
26 are the letters
Z. See this table for all the screen codes.
CHARDEF supports the first 256 screen codes in the uppercase PETSCII mode. (This will be updated to support all 512 codes, uppercase and lowercase PETSCII, in an upcoming release of the ROM.)
Each of the numbers following the screen code describes a row of the character glyph.
MEGA65 BASIC's built-in support for hexadecimal notation comes in really handy here, because each hexadecimal digit describes exactly four pixels.
Many of the games I wrote as a kid featured this classic "brick wall" glyph. Look at the diagram below. What hexadecimal numbers describe this pattern? What
CHARDEF command would change the letter
A to appear as a brick wall?
CHARDEF __, $__, $__, $__, $__, $__, $__, $__, $__
To restore the glyphs back to the MEGA65 PETSCII font, use the
FONT command, with the letter
C as an argument:
There's also a
FONT A, which replaces some lowercase glyphs with ASCII punctuation not available in PETSCII, and
FONT B which resembles a DOS-like font. Try them! (Remember you can toggle between uppercase and lowercase modes with Mega+Shift.)
CHARDEF in your BASIC programs, you're well on your way to making some fun games. Be sure to submit yours to Megazine!
That'll do it for this month. Best of luck to all the testers, and congrats to everyone about to receive a new MEGA65!
Looking forward to the MEGAzine & awesome article...thanks !