What's New in v0.97

Dan's MEGA65 Digest

What’s New in v0.97. Dan’s MEGA65 Digest for March 2025.

What's New in v0.97.
Messages printed by the MEGA65 on an Okimate 10 printer
Messages printed by the MEGA65 on an Okimate 10 printer.

We’re getting ready to release the next major update to the MEGA65 firmware and system software, and you can help! We’re still finishing up the last few fixes before declaring a release candidate, but you can grab the latest development versions of the core and ROM and try them out. The more information we have about what works and what doesn’t, the stronger this release will be.

In this Digest, we’ll review installation and testing instructions, and look through the changelogs for things that could use some exercise. Soon, we will declare a release candidate, get all hands on deck to test for a bit, then announce the new version. The result will become release package version 0.97, the new recommended stable platform for all MEGA65 users.

But first, even more new stuff!

Screenful of BASIC 2025 compo reminder!

A kaleidoscopic design from one of my Screenful 2025 entries

A kaleidoscopic design from one of my Screenful 2025 entries.

The Screenful of BASIC 2025 compo is open and accepting submissions. Thanks to everyone who has entered so far! Remember that the deadline is April 22, 2025, 11:59 pm GMT.

I managed to get a couple of entries in. They only took me about an afternoon each. I tried to pack a lot of code into the small amount of space, but that’s hardly necessary. Poems don’t have to be dense to be effective.

Give it a try, and when you’re ready, upload your entry to itch.io and submit it to the Screenful game jam.

MEGASPUTUM v1.2 for Maniac Mansion

kibo and M3wP continue to evolve MEGASPUTM, their LucasArts adventure game player, currently capable of running the Amiga version of Maniac Mansion. The newly released v1.2 of MEGASPUTM adds a really cool feature: the ability to switch between the Amiga version’s sound and music, and the Commodore 64’s SID-based sound and music.

Installing the data files from the Amiga and C64 versions of Maniac Mansion can be a challenge, so M3wP has made it easier with a new utility included with the player. Provide the original Amiga ADF and Commodore 64 D64 disk image files for the game, and the utility will install the appropriate files onto the D81 disk images, directly on your MEGA65.

Huge thanks to kibo and M3wP for this fun update, and for continuing to work on the project!

MiSTer2MEGA framework update

The MiSTer2MEGA FPGA framework

The MiSTer2MEGA FPGA framework

sy2002 and MJoergen have updated the MiSTer2MEGA framework, upon which multiple alternate cores are based, to repair issues with R6 boards, HDMI output, and the joystick swapping feature. Authors of alternate cores will need to re-build and re-release the cores to pick up the fixes.

muse has already started the process of updating the arcade cores, starting with Bank Panic and Burnin’ Rubber. There is also now an R6 version of the Burnin’ Rubber core.

Mega Chase, by shad0wfax

Mega Chase, by shad0wfax.

Mega Chase by shad0wfax is an asymmetric 1-player or 2-player space battle game. Player One controls a powerful laser cannon capable of destroying ships in a single blast. Player Two (or the computer) pilots their ship, trying to dodge the laser. If the ship is hit before time runs out, Player One is victorious, otherwise Player Two escapes to fight another day. The game features original quad-SID music, multicolor sprites, custom text fonts, and sampled sound effects, and is written in BASIC.

muse’s arcade core of the month! Dig Dug (Namco, 1982) is now available for both R3 and R6 mainboards. Dig Dug was voted the 6th most popular arcade game of all time by the Killer List of Videogames, and was the 36th highest grossing according to sources gathered by Wikipedia. See the Github repo of the core for installation instructions, as usual.

Meteor Defense by Nuwanda puts you in charge of defending your city against a barrage of meteors. 80-column character based graphics give this challenging shooter extra charm.

Mars, 2049 AD by fredrikr is a short dialog-based text adventure game, written for PunyComp 2024 using the Inform 6 programming language and the PunyInform library. This MEGA65 version uses the Ozmoo interactive fiction player. You can visit the game’s itch.io page, or rate it at IFDB.org.

How to get the latest development core and ROM

You can download the latest development core and ROM at the following links. The core builds include the system files to copy to the SD card, as well as the core file to install from the core menu.

We covered installation steps and tips last year when we were testing v0.96, so I won’t repeat those. The User’s Guide, 2nd edition also has improved instructions for installing cores and system files.

The ROM changes in this release are expected to all be functional with the v0.96 core. If you can, please test the development core and ROM together, but if it’s more convenient for you, you can test the ROM separately. (This is not always the case for release testing, it just happens to be the case this time.)

If you don’t yet own a MEGA65 and want to help test the ROM in the Xemu emulator, the ROM FAQ explains how to use the latest ROM patch file. Please use the latest “future next stable” release of Xemu.

Remember that you can have multiple ROMs installed on your SD card. The ROM whose file is named MEGA65.ROM is used by default. To install a secondary ROM, give its file the name MEGA652.ROM, then hold the 2 key during boot. You can install up to eight ROMs this way with the v0.96 core; the latest development core expands this to ten ROMs, one for each digit key.

The development core includes changes to the Configuration interface. If you don’t want to make the development core your default core, you can access a non-default core’s interface by booting to the core selection menu (hold the No Scroll key while switching on the computer), selecting the core, then immediately pressing and holding the Alt key to open its version of the Configuration menu.

Pay attention to the Discord for updates and other testing instructions. Please file bugs in Github:

Core changes in v0.97 RC

The new Configuration option to disable disk noise, in the v0.97 release candidate
The new Configuration option to disable disk noise, in the v0.97 release candidate.

New features for everyday use:

  • You can now mount D64 disk images from the Freezer.
  • By default, accessing a D81 disk image in unit 8 manipulates the floppy drive to make nostalgic sounds. You can now disable this in Configuration: Chipset, Disk Image Drive Noise.
  • You can now have up to 10 alternate ROMs on the SD card, numbered 0 to 9.

New features for programmers:

  • DMA start and end addresses can now span megabyte boundaries, e.g. $00FFFFCC - $01000033.
  • Audio DMA can now trigger an IRQ when the playhead for a channel hits a given address high byte. Set D713.0-3 to enable IRQs for each audio DMA channel, and set D714-D717 to the address high byte trigger. In the IRQ handler, test D713.4-7 to determine which channel triggered. This makes sound sample buffering much easier to implement, for streaming long samples from Attic memory or other sources.
  • If the HWERRATA register is set above its maximum value for the given core, it will return the maximum value. Programs that need later HWERRATA levels can use this to detect if they’re running on an earlier core (and not getting the requested level).
  • Core selection menu support for the MEGA65 cartridge protocol. The v0.97 RC ROM also has corresponding changes.
  • Serial debugger disables interrupts in trace mode, so you can step through code without accidentally branching into the IRQ handler. (To step through the IRQ handler itself, set the breakpoint in the handler routine.) Note that this does not set the CPU I flag: it uses a separate mechanism so that the program’s use of the I flag is represented accurately.

Hardware support:

  • R4-R6 boards support the DIY keyboard project.
  • Core builds support the Wukong A100T V2 platform.

The v0.97 RC core also has improvements in these areas:

  • SID 8580 accuracy
  • Audio mixer
  • Raster Rewrite Buffer
  • Paddle/mouse line jitter
  • CIA one-shot timers
  • Sprites and the border
  • The rts #... instruction
  • C64 cartridge detection
  • Configuration utility
  • Keyboard debounce

There are currently known issues with mounting disks from the Freezer in the latest build. Also, formatting a new SD card doesn’t correctly offer to populate the SD card with the system software. We’re working on fixing these, and will hold this release until they are fixed.

See the mega65-core changelog for more details and links to resolved issues.

ROM changes in v0.97 RC

These ROM changes include corresponding changes in the latest User’s Guide PDF, as appropriate. Feel free to report documentation issues, if you find any.

New features for everyday use:

  • You can now mount D64 disk images using the MOUNT command.
  • The command DIR U12, to list the contents of the SD card, now accepts a pattern matching string, similar to using DIR with DOS devices. All wildcard characters are supported. For example: DIR "M*",U12
  • The DIR command has a new P flag that pauses long directory listings at each screenful: DIR P, DIR P,U12
  • Similarly, the TYPE command has a new P flag that pauses long TYPE output at each screenful, for displaying text files: TYPE "FILENAME",P

New features for BASIC programmers:

  • BASIC now supports binary literals! Use a percent sigil to start a binary number literal: %1010 The new DECBIN("...") function converts a string of 0 and 1 to a number. STRBIN$(n) converts a number to a string of 0 and 1 characters.
  • PRINT USING %-style patterns now support left zero padding for positive values in float and integer patterns: %07.2F %05D
  • RWINDOW(3) returns the screen height in rows, regardless of window size, similar to how RWINDOW(2) returns the screen width in columns.
  • JOY() now reports up to five game controller buttons, as defined by the 5-button protocol and as implemented by several modern game controllers and adapters. The C64GS controller reports two buttons; Commotron and several others report three buttons; mouSTer and Unijoysticle report five buttons. This protocol works with both R3 and R6 mainboards.
    • Note that the Xemu emulator pretends that a mouse is connected by default, which causes JOY() to believe buttons 4 and 5 are pressed. The “next” version of Xemu adds the ability to disable mouse emulation: open the context menu, Input Devices, Disable mouse emulation. Xemu does not yet have a way to emulate joystick buttons 2-5.
  • JOY(3) reports the combined status of joysticks in either port, allowing for a program to easily support a single joystick in either port without calling JOY() twice.
  • CHAR now accepts a 28-bit charset address argument. This was previously limited to 20-bit addresses. This is mostly useful for CHAR ...,$FF7E000, which tells CHAR to use the custom charset defined by FONT and CHARDEF statements when drawing text to the graphics screen. Use $FF7E800 for lowercase.
  • RPALETTE() now accepts a screen number of -1 to refer to the primary system palette (palette 0). It also accepts -2, -3, and -4 for the other three system palettes (palettes 1-3). Support for using the other system palettes from BASIC is planned for a future release.
  • It is now possible to disable “line pushing” in the screen editor, using the escape sequence ESC R (PRINT CHR$(27)+"R"). Use ESC N to re-enable. This allows the PRINT command to write a character to the right-most column without pushing other lines downward. Note that you must still use ESC M (PRINT CHR$(27)+"M") to disable screen scrolling to PRINT a character in the bottom-right corner without scrolling the screen. (Use ESC L to re-enable scrolling.)
  • The BASIC sprite subsystem now recognizes and honors the VIC-IV high resolution sprite registers sprenv400 (high-res vertical, per sprite) and sprh640 (high-res horizontal, system-wide). MOVSPR accepts 10-bit X and Y coordinates, and will correctly truncate coordinates in low-res modes. We will be adding a mode for matching the sprite resolution to the screen resolution in a future release. It will always be supported for a BASIC program to set these registers directly. We will also add support for a hires mouse pointer in a future release.
  • BSAVE now has a “raw” mode, symmetric with the BLOAD “raw” mode, that omits the two-byte start address header normally used for PRGs. This is essential for saving SEQ files, which typically don’t have such a header.
  • The bitwise operations AND, OR, XOR, and NOT operate on 16-bit integer values, and were previously restricted to the range of possible signed 16-bit integers [-32,768, 32,767]. It is often convenient to operate on the range of unsigned 16-bit integers [0, 65,535], but these operators were rejecting operands above 32,767. With this update, these operators now accept operands in the range [-32768, 65535]. They are still treated like 16-bit integers and produce a result in the signed 16-bit integer range.

New and improved KERNAL routines; see the “KERNAL Jump Table” appendix of the Compendium:

  • SAVEFL: a SAVE variant that can do a “raw” save, similar to the BSAVE BASIC command
  • GETIO: Read the current input and output devices
  • GETLFS : Read file, device, secondary address
  • KEYLOCKS: Read/set keyboard locks
  • ADDKEY: Add a character to the soft keyboard input buffer
  • SETBNK: Reimplemented with 28-bit address support, using a backwards compatible API.
  • VECTOR: KEYSCAN vector allows programs to intercept keyboard input.

Important changes to existing features:

  • The BASIC INT() function now always rounds toward negative infinity, also known as the floor function. This is a change to the behavior when the argument is negative and has a fractional part: INT(-1.5) = -2, INT(-1) = -1. All versions of Commodore BASIC, and many other BASICs derived from Microsoft BASIC, define INT() as “floor,” and other parts of BASIC depend on this definition internally. This was inadvertently changed starting at ROM 920177 to mean “round toward zero,” breaking dependent behaviors. Restoring this also fixes issues with trigonometric functions and other features.
  • Previously, if the RENUMBER command was executed without a space between the command name and the first argument (e.g. RENUMBER100), the command would omit the space between keywords and line numbers in the resulting program (“crunch” mode). This feature remains, but now requires a C flag to prevent accidental activation: RENUMBER C 100 Note that “crunch” mode does not change any other whitespace in the program.
  • The KERNAL VECTOR routine now copies 56 bytes of vector table data, not 32. Future changes to the vector table will use a different routine, to keep this API compatible with existing programs.
  • The boot state of register $0001 has changed to start with the datasette lines turned off. The datasette port will be supported in the upcoming expansion board.

Stuff that already existed but has now been documented in the latest User’s Guide PDF:

  • The VOL command accepts two parameters, a volume for the right stereo channel SIDs, and a volume for the left stereo channel SIDs: VOL 9,9
  • The MOUSE command was intended by Fred Bowen to accept arguments to adjust the location of the “hot spot” on the mouse pointer sprite, as well as set the pointer’s initial screen position. These arguments were incorrectly documented and also were not functioning correctly. The features have been fixed, using the original intended argument order: MOUSE ON,port,sprite,hotspot-x,hotspot-y,location-x,location-y
  • The trigonometric functions SIN(), COS(), and TAN() accept an argument in units of radians. The previously undocumented variants SIND(), COSD(), and TAND(), respectively, accept an argument in units of degrees.
  • FONT accepts a built-in font ID as a parameter: A, B, or C. It also supports D, E, and F, which are the same as A, B, and C, respectively, set to lowercase mode. (Mega + Shift toggles between uppercase and lowercase, as usual, unless disabled by the appropriate escape code.)

The v0.97 RC ROM also has improvements in these areas:

  • BASIC 65 bitplane graphics
  • The MONITOR
  • Run/Stop + Restore
  • CHAR
  • VSYNC
  • Number printing
  • MOUNT
  • POT()
  • CURSOR ON mode was leaving behind stray blinked-on cursors when the position changed.
  • PRINT USING
  • JOY(1) no longer reports a spurious signal when top row keys are pressed.
  • Text highlighting of error messages
  • RMOUSE
  • DEC()
  • CONT
  • FOR X& = ...
  • MOVSPR
  • DS / DS$ disk error codes
  • BLOAD and BVERIFY and Attic RAM
  • VAL()
  • MOUSE ON

See the ROM changelog for more details.


Thanks to everyone who is available to help test this release. Even if you only have a moment to install it and run through a few games and demos, it’d be really appreciated.

Also, huge thanks to everyone who has contributed to the platform in the last year and a half! Every bug fixed makes the MEGA65 better for everyone, now and into the future.

Remember, you can support this Digest and my other work. Visit: ko-fi.com/dddaaannn

— Dan