Skip to content

Releases: 32blit/32blit-sdk

v0.1.11 RC2

24 Feb 15:26
61b79e5
Compare
Choose a tag to compare

On The Home Stretch - a.k.a. RC2

Right now we're at shaking up the docs, fixing little bits and bobs with the SDK tooling and making things work just a little bit smoother and better.

As such there aren't many groundbreaking changes here:

More Noise

Okay, perhaps not more noise but @sh1boot has overhauled the random noise sample generator to create beautiful noise with uniform loudness across its range of frequencies:

Image of ascending noise pulses

Of course... you probably can't hear the different, but at least it's technically correct.

Less Sleepy

The bug that prevented the screen returning from its sleep brightness when a button was pressed has been fixed. Your blit will also wait longer before sleeping - 120s instead of 30s. Thanks @Daft-Freak

SDL Tweaks

@Daft-Freak has replaced the SDL scaling code with SDL_RenderSetLogicalSize and SDL_RenderSetIntegerScale which replaces a bunch of custom schmoo with SDL functions to accomplish the same thing in addition to scaling input.

The SDL build now also gains some additional metadata to achieve parity with the metadata tagged onto .blit files.

Metadata API

Now SDL has all the metadata that's baked into .blits @Daft-Freak has added a way to access it- great if you need to get your game version, author, title, description, URL or category.

I've added an example demonstrating the get_metadata() API, it's predictably called metadata-test.

Minor Tweaks

  • Most system menu items are now const, saving a little RAM
  • Games no longer auto-launch after 32blit install, you can optionally launch them with --launch
  • @Daft-Freak has given the Windows docs a good shake-up
  • Bug fixed in launcher so it handles more files before crashing - thanks @Daft-Freak
  • Minor overhaul to multiplayer API, including a handshake and an is_connected to... check if it's connected - thanks @Daft-Freak
  • Sprite scaling examples added to the sprite demo - thank @ahnlak
  • @Daft-Freak has split the API Version into Major and Minor to handle both breaking (hopefully few) and non-breaking changes in future.
  • 32blit tools required version has been bumped to 0.6.1 to support updated install command
  • Windows release binaries will now work without development stuff installed .... - thanks @Daft-Freak
  • Fixes to SDL2 DLL handling for MinGW - thanks @Daft-Freak

As usual you can see the full list of changes here: v0.1.10...v0.1.11

v0.1.10 RC1

10 Feb 18:49
8997903
Compare
Choose a tag to compare

Quick! Change everything before release

Rename to 32blit-sdk

The repository has finally moved from pimoroni/32blit-beta to 32blit/32blit-sdk.

This change goes hand-in-hand with some other changes and you will need to:

  1. Update your tools - pip install --upgrade 32blit
  2. Update your local copy of the 32blit SDK
  3. Update any games you've published with the boilerplate

The SDK now uses find_package and you should change your CMakeLists.txt like so:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d4602d..4b2d065 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,6 @@
 cmake_minimum_required(VERSION 3.8)
 
 project(game)
-set(32BLIT_PATH "../" CACHE PATH "Path to 32blit.cmake")
 set(PROJECT_SOURCE game.cpp game.hpp)
 set(PROJECT_DISTRIBS LICENSE README.md)
 
@@ -12,10 +11,8 @@ if(MSVC)
 else()
   add_compile_options("-Wall" "-Wextra" "-Wdouble-promotion")
 endif()
-if(NOT EXISTS ${32BLIT_PATH}/32blit.cmake)
-  message(FATAL_ERROR "Define location of 32Blit API with -D32BLIT_PATH=<path to 32blit.cmake>")
-endif()
-include (${32BLIT_PATH}/32blit.cmake)
+
+find_package (32BLIT CONFIG REQUIRED PATHS ../32blit-sdk)
 
 blit_executable (${PROJECT_NAME} ${PROJECT_SOURCE})
 blit_assets_yaml (${PROJECT_NAME} assets.yml)

If you were previously specifying 32BLIT_PATH in your cmake invocation it's now 32BLIT_DIR.

Audio Reworking

32blit's audio engine has acquired an enable/disable flag: sound::enabled.

Additionally the audio waveform callback has been reworked to supply the entire AudioChannel instance. callback_waveBufferRefresh is now wave_buffer_callback and wave_callback_arg is now user_data to highlight that you can assign user_data to an audio channel irrespective of whether you plan to use it in a callback.

This change will break any games using the audio API, they need changed and recompile. Where previously the code might look something like:

channels[0].wave_callback_arg = some_ptr;
channels[0].callback_waveBufferRefresh = &callback;

//...

void callback(void *data) {
  //...
  for(int i = 0; i < 64; i++)
    channels[0].wave_buffer[i] = some_sample;
}

It should now look like this:

channels[0].user_data = some_ptr;
channels[0].wave_buffer_callback = &callback;

//...

void callback(AudioChannel &channel) {
  auto data = channel->user_data;
  //...
  for(int i = 0; i < 64; i++)
    channel.wave_buffer[i] = some_sample;
}

Finally, the wave buffer sample size has changed from 8-bit to 16-bit.

If you've previously been using 16-bit samples, you must avoid dividing them (by 256) and 8-bit samples should be multiplied by 256.

@ThePythonator has created waveform-demo to show off some of the sound effects you can achieve with the 32blit audio engine.

Temporary Files

Since it's clear that QSPI Flash throughput is considerably faster than SD throughput, a region of Flash has been designated as "temp."

This region - currently 4Mb - can be used however a game sees fit and is excellent for caching read-only game content (ROMs, okay, I'm talking about ROMs) to speed up execution.

Any file (providing it fits into the temporary area) on the SD card can be cached by opening it with OpenMode::cached:

File f("path/to/thing", OpenMode::read | OpenMode::cached);
// file has been copied to flash if possible
// cache space is reserved until close

Display Sleep

Thanks to @Daft-Freak your 32blit display and sound will now fade out after 30 seconds, helping to conserve the battery. Pressing any button or moving the analog stick will wake up your 32blit.

Blits & Bobs

@ali1234 has added support for setting window position when launching SDL games, just supply a --position x y argument. This is useful for side-by-side testing of multiplayer games.

@ahnlak has added a center() function to blit::Rect. It finds the center of the Rect.

The file flashing progress bar now shows over 160x120 resolution games. It'll show over palette modes games too but in whatever colours happen to be in your palette at the time.

@Daft-Freak has tweaked, fixed and pruned the CDC streaming used to "flash" games from your host PC to your 32blit- it should be less prone to breaking now. Additionally SD-card writes have been optimised and you may or may not see a small performance improvement when flashing games.

Games are no longer auto-launched when flashed and there's now a separate "Launch" command to... launch games. It accepts a file path to the game you wish to launch from SD card or a block number prefixed by flash:/ for a game in flash.

@andreban has improved the doom-fire demo, moving the alorithm to the render loop, so it doesn't run faster than it needs to, and adding directional wind (press the left/right d-pad buttons).

As usual, for the full list of changes see v0.1.9...v0.1.10

v0.1.9 RC0

22 Jan 12:15
0ea8cbf
Compare
Choose a tag to compare

Arrrr, Sea Zero

Since there are no more huge sweeping changes to the firmware on the horizon (a shame, they were always so exciting) and the focus of development has been mostly fixes, tweaks, tidyup and refactoring I'm going to do the unthinkable and call 0.1.9...

Release Candidate 0 (RC0)

This means we're fixing to drag 32blit kicking and screaming out of its "beta" phase and the development focus should be on fixes and improvements.

This doesn't mean things wont change. But 32blit has been pretty stable - in terms of not horribly breaking compatibility with games - for a while now and the "Beta" moniker doesn't quite fit anymore.

In fact as I dawdle on tagging and publishing this release we have even more things in the pipeline that are potentially breaking, but not quite so breaking as the things before them. Woohoo!

Firmware/Launcher/Update Tweaks

From lessons learned in 0.1.8 we've refactored the launcher and firmware to be smarter about handling updates. Now you can just throw launcher.blit and firmware-update.blit onto an SD card and - on the next reset - they will be flashed and deleted.

The firmware now also cleans up any leftover launchers or updaters from external Flash when a new one is installed.

Firmware updates are now identified by a metadata category of "firmware"- so you don't need to worry about the metadata name if you ship your own updater. The same applies to launchers which use "launcher" as their category. Suffice to say... don't use these to categorise your games!

Launcher Tidyup

@Daft-Freak has swept through the launcher, tidying up a lot of organically grown code into something more sensible. This includes de-duplicating some functions that must run under various different circumstances, cleaning up the handlers for flashing/launching games and lots of other tweaks to make the code less scary to behold.

Operation Operators

While neck-deep in writing Sprite Editor I found a few things I wanted the 32blit Engine to do- chiefly things like Pen == Pen, Size / N and Size * N.

Performance & Stability Fixes

@Daft-Freak realized 32blit's CPU clock was a little... unstable... and also realized we hadn't updated the clock config to use the external oscillator used for USB. That's been fixed and things might be ever so slightly faster and more stable now. You'll probably only notice this if you're benchmarking emulator code against a reference implementation or have a very keen ear for pitch.

@Daft-Freak has also fixed some oddness in the SD implementation, removing some of the very broken timeout handling. This has made - and I pinged my SD card across the room a few times trying this - SD card insertion pretty darn reliable. If your SD card contents weren't appearing when plugging in a card... this probably fixed it.

SpriteSheets

The file extension for spritesheets is now ".blim" for "Blit Image." Sort-of rolls off the tongue, but sheesh dreaming up file extensions is tricky and we've already used .blit.

The Launcher will now afford special consideration for 128x128 pixel .blim images and allow you to preview them like screenshots. If you have Sprite Editor installed, you can load these right into it for editing.

Scrolly Tile / Rainbow Ascent Hi-Score

@ThePythonator has added high score saving to Rainbow Ascent so you can track your progress. It doesn't take account of level seed or mode, but since the whole game is hard as nails it's a good barometer for progress none the less.

Docs

@titimoby and @dstretch have made some contributions to the docs. This is much appreciated- if you run into any problems setting up for development, or working with 32blit then let us know!

Summary

As always, the full list of tweaks is available here: v0.1.8...v0.1.9

v0.1.8 Beta

11 Jan 10:43
1de8a09
Compare
Choose a tag to compare

Firmware Update Fun

The dependency between the launcher/firmware caused for some tricky update procedures, where you'd end up with updated firmware and a broken launcher when attempting to update via DFU or from an SD card. The 32blit tool is usually the cure-all for this, but we appreciate it's not suitable in all cases and we can do better.

And do better we have. Or @Daft-Freak has, anyway. The firmware now looks for launcher.blit and firmware-update.blit on the SD card and runs them if they're available. This means you can just stick these two files on an SD card and reset to perform a complete firmware upgrade.

Updating your firmware from SD card

Grab the -STM32.zip package (https://github.com/pimoroni/32blit-beta/releases/download/v0.1.8/32blit-beta-v0.1.8-STM32.zip) from this release and extract it somewhere.

Drop both firmware-update-v0.1.8.blit and launcher.blit on your SD card and run firmware-update-v0.1.8.blit using your 32blit's launcher.

Following the update it will install itself again followed by the launcher.

For future updates you should rename firmware-update-v0.1.8.blit to firmware-update.blit when copying it to your SD card. Firmware v0.1.8 and greater will now detect and install it automatically.

Beneath The Surface

Some bugfixes for Surface have also snuck into this release. This includes slightly better support for .bmp formats and better handling of oversized images that might otherwise have overflowed a buffer.

If you're passing your own buffer into Surface::load you will now also need to pass the size: Surface::load(filename, buffer, sizeof(buffer)). load will refuse to load oversized images and return a nullptr.

It's a short list

As usual you can find the complete - rather short this time - list of changes here: v0.1.7...v0.1.8

Known Issues

It looks like - at least in my tests - this new firmware can delete the firmware updater before it's actually run, causing a weird situation where the 32blit looks like this:

image0

This will only apply to the next firmware update you do, and to avoid this problem you need only rename firmware-update-v0.1.9.blit to firmware-update.blit, save it to your SD card and hit reset. The code that runs the firmware update from SD happens after any residual update utilities are deleted from flash.

v0.1.7 Beta

09 Jan 21:47
ee0fe08
Compare
Choose a tag to compare

Do A Clean Build

⚠️ Do a clean rebuild. No. I mean it.

Quite often we'll change something that really doesn't gel with CMake's ability to auto-detect changes and you'll have to clean rebuild for things to stop being a broken, crashy mess. Sorry about that!

SpriteSheet/Surface

Since SpriteSheet and Surface were effectively the same thing with very few differences, we have merged them together into one: Surface.

The big driver behind this was the static helper methods. These helpers, defined on Surface and SpriteSheet, do some setup and return either a nullptr, if something went wrong, or a Surface or SpriteSheet, if everything went right. These are important for loading packed sprite data from flash or disk, since you might want to catch some hiccup with the loading process and handle it gracefully.

Maintaining these for loading various data types across two different virtually identical classes wasn't fun. So waves wand they're one class now.

Surface has adopted the two properties from SpriteSheet that it was missing- rows and cols- and does everything SpriteSheet used to do.

SpriteSheet is marked as deprecated and you should replace uses of it with Surface.

Surface now supports loading from various sources and will accept either a nullptr (default) or a buffer argument if you're keen to understand your game's memory usage ahead of time. IE this will handle allocating for you with new:

auto surface = Surface::load(filename);

And this will ask the new Surface to use a specific buffer you've allocated ahead of time:

uint8_t buffer[128 * 128 * 3];
auto surface = Surface::load(filename, buffer);

(See Flight and Launcher for examples of the latter in action)

Bon Voyage, C++ Tool

The C++ version of the Python toolset has fallen a little by the wayside lately. I've filtered it out of the 32blit repository into its own home over at https://github.com/32blit/tools-cpp. This should preserve contribution history.

I don't know what its future looks like, but feel free to use it and contribute to it if it suits you!

Toolchain Tweaks

There have been some fairly significant toolchain tweaks and fixes. While these don't really significantly affect your experience, they will make things work that should work. @Daft-Freak has wrangled PIC and stdlib issues so that external libraries added to 32blit projects wont cause horrible, horrible crashes... this enabled me to bring 32blit Lua back to life. @lenardg has fixed up a Visual Studio project so that Windows/VS folks can work on the Launcher. @a2 has fixed up some SDL_net install quirks on Mac.

Launcher Tweaks

Credit Where Credit Is Due

Let me say on no uncertain terms that the 32blit beta and regular backers have been instrumental in bringing the project leaps further than we'd ever really dreamed. There's some seriously cool stuff happening here and I have to pinch myself that it's running on a microcontroller. Thank you.

launcher4

To ensure those of you who've helped make this happen are duly credited @lenardg has added the most glorious retro-cinematic rolling credits into the launcher (I love them!). Just press Menu to fire 'em up and let 'em roll by.

Credits are auto-generated on release. If you feel you're not duly credited here, let me know!

Screenshot Viewer / Surface Save/Load

The launcher now has an integrated screenshot viewer. Screenshots are now saved to the "screenshots" directory and switching to this folder will give you lovely full-screen previews of your saved screenshots. Press A on a screenshot to hide the menu and view its uninterrupted glory, and press B to return.

Launcher3

These are made possible by @Daft-Freak's work on save/load plumbing in Surface, which can load from the same bitmap files it saves to and save to the same raw format it can load from. This opens the door for pixel editors which could open, edit and save either 32blit-compatible .bmp files or 32blit's own raw format.

Cleanup

The launcher input handling has been refactored and should feel pretty tight with no bounce or missed pressed. Holding a direction for ~.6sec should give you a fast scroll up/down through your games/files/ROMs/screenshots.

Fancy Font Fun

By general consensus we've moved over to @Daft-Freak's bigger, better, more readable font for most text in the Launcher where we're not so constrained by storage.

Themes

The launcher also has the very beginnings of theme support plumbed in. It uses the Save/Load API so that .blit/Launcher/save0 contains RGBA colour data for the background, overlay, text and accent (highlighted text, titles, etc) colours. Right now you'll need to hex edit this file to change the colours, but some kind of theme browser/editor is planned and themes will probably be moved to a more sensible location. In the mean time enjoy the l33t feeling of using gHex or HxD to customise your Launcher colours.

Swooshy Background

I felt the launcher was a little static and boring so I spruced it up with a swooshy background. These effect might be familiar to some, except in this case it uses scanlines to dampen the otherwise pretty distracting illusion of horizontal motion. This effect is totally unnecessary and indulgent, but I love that it just works.

The swooshes use out-of-phase sine waves with slightly varied scaling to produce some interesting emergent patterns.

General Tidyup, Fixes & Improvements

RGB to RGB blits are now supported, which was also fundamental to the screenshot viewer.

Changing screen mode would go horribly awry due to timing of screen mode changes not quite aligning with the new DMA2d flips. @Daft-Freak has swooped in and fixed this.

@Daft-Freak also trimmed ~4k from the firmware by removing a single printf call that blit::debug was using and removing the shim that routes printf over CDC Serial.

As always you can see the complete list of changes here: v0.1.6...v0.1.7

Known Issues

launcher1

The launcher has a memory fragmentation or leak problem when browsing through games and files on the SD card. You'll most likely see this manifested as corruption in the screenshot browser shortly before the launcher crashes outright and needs relaunching. Stop admiring the awesome launcher, and hit reset to fix it 😆

v0.1.6 Beta

02 Jan 17:30
289b832
Compare
Choose a tag to compare

Surprise Big Features

Okay, I foreshadowed these a little but we've finally merged two big shiny features from @Daft-Freak:

  1. Minimal multiplayer support
  2. Application file associations

⚠️ The required 32blit tools version is now 0.4.0. Don't forget to update!

⚠️ Backwards compatibility with older firmwares will certainly be horrible broken, make sure to update your firmware, launcher, games and get new .blit files for all the user games you love!

⚠️ Multiplayer requires the SDL2 Net libraries, you might see an error complaining about SDL2_NET_INCLUDE_DIR. Don't forget to install these!

Bouncy Bouncy

I've added a small patch from @Daft-Freak into 32blit's input handling to prevent button repeats and effectively (getting it right this time) de-bounce input. I've tested it with Rainbow Ascent and it makes the game... actually possible. If you're doing any de-bouncing in your game code, you can probably drop it now.

Col 319, where are you?

Many moons ago @Daft-Freak noticed that column 319 (the 320th column if you're counting from 1), the right-most column of pixels on 32blit's screen was missing in action. I've tweaked the LTDC config to bring it back.

Minor Timer Tweak

@Loxrie noticed a bug with timers and has moved the callback to after the timer state has been updated.

⚠️ This means timer callbacks get potentially different (now correct) information when they fire. Be aware!

Code Cleanup

@lenardg has swooped in and started cleaning up some of the code in "firmware" and "32blit-stm32". These projects are now effectively one and the same, although they still remain separate and require some significant effort to clean up and rationalise. The first steps have been boldly taken, woohoo!

DMA2d Redux

Not one to leave an awesome update at anything less than perfection, @zenodante has polished the DMA2d flipping code making it cleaner and simpler. I'd like to point out that they're working on an STM32 eval board and submitting PRs through the GitHub web UI. That's some next-level devotion right there, and I'm thrilled to have their input (and tolerance of my poor understanding!)

File Associations

Okay okay. So File Associations are exactly what you expect them to be. An app or game on 32blit can say it's responsible for certain filetypes (identified by their extension). So long as this particular app/game is installed into your internal flash, the launcher can identify files it's capable of running and launch right into them.

Yes that means you can browse ROMs in the launcher and launch directly into an emulator.

Implementing file association support in your app/game is surprisingly straight-forward. You need only do two things.

  1. List the files your app can support in your metadata.yml:
title: My Awesome App
description: So awesome!
author: gadgetoid
icon:
  file: no-icon.png
splash:
  file: no-image.png
version: v1.0.0
filetypes:
  - gif
  - jpg
  - png
  1. Check get_launch_path() and launch the associated file if it's not empty:
auto launchPath = blit::get_launch_path();
if(launchPath)
    loadFile(launchPath);

Muliplayer

While the crux will be on people to actually implement multiplayer in their games, @Daft-Freak has laid the basic building blocks in both the 32blit firmware and the SDL HAL.

See the multiplayer example for a basic introduction to sending messages between 32blits. For a blit-to-blit connection you will need a microB to microB OTG cable. You can find one on Amazon with a red end to denote the HOST.

It's entirely possible for 32blit games to multiplay with SDL games- albeit an interim app will be required- and also for online multiplayer to happen via tethered 32blits - again an interim app/multiplayer lobby would be required.

If anyone's keen to try build these things, they are most welcome!

All The Things

As usual you can find a complete list of changes here - v0.1.5...v0.1.6

v0.1.5 Beta

29 Dec 21:37
9892ac2
Compare
Choose a tag to compare

December Momentum

A few folks have found the time in December to start chipping away at some of the rough edges of the 32blit codebase. This is awesome. As a consequence this release includes improvements, bug fixes, tweaked examples, a fancier system menu, some Visual Studio TLC and more.

Launch Time

With internal flash storage being precious and dwindling fast, it was high time to investigate separating the Launcher into its own binary to it could be free to flourish and bloat beyond our wildest dreams. @Daft-Freak took the lead on this and fixed up the necessary plumbing to make it work. Keeping the ability for the launcher to flash/delete games - since it's actively running out of external flash - was no small feat!

This means to things:

  1. You can now make your own launcher if you don't like the default one.
  2. You need to install launcher.blit or you wont be able to launch games!

When you upgrade to this release, don't forget to stick launcher.blit onto your SD card or flash it with the 32blit tool.

Home & Menu Swapped At Last

The Home (House button on final units, burger menu on beta) and Menu (vice versa) button functions have been swapped to their intended states. Now the left-most button (Home) will display the system menu with a short press, and exit the current game with a long press. The right-most button (Menu) is for use in your games.

More Awesomer System Menu

The system menu also has some improvements championed by @lenardg, including sub menus to tuck some of the less widely used options out of the way.

Most notably is a new button bind for "mute/unmute" so you can quickly turn off sound without affecting your saved volume level. Additionally both volume and brightness now have fewer individual steps, so it doesn't take a year to navigate through them.

Juicy details about the battery have been moved into "Battery Info" where you can still see the voltage, VBUS source and charge status.

A new "About 32blit" menu also joins the ranks, showing firmware version and build date plus whether the device is beta/retail (I imagine mods will make this less physically obvious in future).

Overall the menu is really starting to feel like a menu now. Yay!

Flippin' Fast

STM32 wizard @zenodante has returned with more low-level trickery, bringing a lores DMA2d flip that somehow manages to accomplish pixel doubling from the 160x120 back-buffer to the 320x240 front buffer in a three step process.

While this doesn't really get us any speed gains yet, it offloads some crucial processing to a hardware peripheral rather than the CPU and opens up the door for interleaving 32blit system tasks with the individual DMA2d steps.

The LTDC back-buffer has also changed to RGB565 from RGB888, freeing up 150KB RAM. This is a slightly controversial change since there's an 18-bit connection between the STM32 and the display (RGB666) so technically we lose 1-bit of colour-depth from red and blue.

But... c'mon... 150KB is a whole bunch of RAM! And 16-bit colour is more retro, right?

Mass Storage

@Daft-Freak found a setting for MSC (Mass Storage) mode that increases the packet size and, in some cases, makes it faster. Handy!

TLDR

When you upgrade to this release, don't forget to stick launcher.blit onto your SD card or flash it with the 32blit tool.

Home and Menu have swapped.

All The Things

  • Prevented accidental "install" of invalid games/null selections - thanks @a2
  • Improved system menu with battery info - thanks @lenardg
  • Added a "mute" shortcut to the system menu, and reduced number of vol/backlight steps to something more manageable - thanks @lenardg
  • Added "About" to the system menu - thanks @lenardg
  • Fix tween starting position - thanks @ahnlak
  • New custom font and point alignment examples in text dem - thanks @ahnlak

Thanks to @lenardg, @ahnlak, @a2, @zenodante and - as always - @Daft-Freak for helping pack this release with tweaks and fixes.

As usual the complete list of changes is available here: v0.1.4...v0.1.5

v0.1.4 Beta

19 Dec 17:29
824f7af
Compare
Choose a tag to compare

Slight Whoops Edition

Okay I was in a hurry to get v0.1.3 released in time for the weekend and didn't properly test the firmware- we lost multiple game support for a hot minute there. Oopsie!

@Daft-Freak found the oopsie and fixed it alongside some other little bits and bobs. No fancy new features, grand plans or exciting distractions in this release- it's just v0.1.3 with the added bonus of working 😆

Find the list of fixes here v0.1.3...v0.1.4

v0.1.3 Beta

18 Dec 23:46
0140992
Compare
Choose a tag to compare

Tidyup, Better Releases, Breaking The API, Refinements & MAGIC!

Momentum on the firmware development front has continued, with many improvements both small and large finding their way into this release.

Prepare To Launcher

Thanks to @mikerr the Launcher now supports the analog stick and shows game version info.

I've also overhauled the D-Pad handling to avoid an issue where you could skip over multiple games if you were scrolling through quickly. This infuriated me!

As always @Daft-Freak is bashing the rough edges off things and has made multiple improvements to the Launcher (which is still part of the firmware at the moment) including handing duplicate game flashes and moving Mass Storage mode to a menu option (I'd press that button by accident every darn time).

Many of these tweaks lay the groundwork for removing the Launcher from firmware and making it a separate app that you can - if you wish - replace with your own. Crucially this allows the launcher to be big and fancy, beyond the confines of the small internal flash.

Precious Bytes

@Daft-Freak as added RLE - Run Length Encoding - support to packed spritesheets, with a counterpart change to the 32blit tool. You don't have to worry or think about it- it just happens. Turns out low-entropy, low-colour sprites pack well- who knew!?

Here's the size of some assets before/after compression:

tunnel                          18678    7755    -10923
gadgetoid_raycaster             19474    9756     -9718
flight                          10386    1279     -9107
s4m_ur4i_space_shooter_ships    10386    4544     -5842
s4m_ur4i_space_shooter_backdrop 10386    4597     -5789
s4m_ur4i_top_down_shooter       10374    5268     -5106
no_image                         6206    1289     -4917
s4m_ur4i_pirate_tilemap         10386    6778     -3608
s4m_ur4i_dingbads               12438    9000     -3438
babblesheet                      3250     754     -2496
s4m_ur4i_pirate_characters      12450    9958     -2492
s4m_ur4i_platformer             10386    7896     -2490
fire                             3226    1583     -1643
ship                             1106     558      -548
palette_swap                      838     494      -344
no_icon                            34      42         8
water                            2706    3024       318

You might notice that no_icon and water don't compress well- the tool will automatically output the non-RLE version for assets like this.

Precious Cycles

@zenodante has swooped in and fixed some bug in the dma2d flip, ekeing some more performance out of the blit. They also provided significant insight into my reworking of the System/Charge LED- which is now driven by SysTick_Handler saving a whole bunch of timer and interrupt faff and a chunk of CPU time. Not to mention saving a few bytes of that scarce internal flash.

Cleanup & Breaking API Changes

@Daft-Freak has cleaned up some API warts, giving us a debug function that supports all the good stuff without burdening the firmware.

If you use any of the API - that is the interface that handles calls into firmware functions like loading/saving files - in your game, you'll need to recompile it against this new release or it'll crash back to the Launcher.

Tooling Tweaks

The CMake tooling is a bit more explicit about what mystery meat it's downloading when you first configure your project. Hint: It's the position-independent custom stdlib required to get PIC games working.

@Daft-Freak has done some spring cleaning and purged old/defunct files. I've been wrangling CMake on some slower systems and have made it print which example it's configuring to avoid a long, awkward pause.

Could it be magic? Oh, OH!

@Daft-Freak has dropped another blit bombshell and tackled #192 - building a firmware update .blit that... uh... updates your firmware? It's ended up with the dry and descriptive name firmware-update, but we'll always know it as "magic". Remind me to make some sassy cover art to pay homage to that.

Right now the "firmware" is both the core 32blit device features - such as handling input, battery monitoring and other sundry operations not directly related to games - and the launcher, which installs and launches games. Being able to update this with one easy .blit package is enormously handy since it means no more messing around with DFU unless something goes truly awry.

You can drop firmware-update.blit on your SD card and run it with the launcher, or fire it at your 32blit with the tools using 32blit flash flash --file firmare-update.blit (or, as of v0.3.0, 32blit firmware-update.blit).

All firmware as of v0.1.3 should have a visble version number in the bottom right of the system menu.

Platform Shoes

You can now walk around, jump, swim, climb ladders and fall out of the level into a ceaseless oblivion in Platformer. Enjoy!

Complete list of changes...

As usual, for the complete list of changes see - v0.1.2...v0.1.3

v0.1.2 Beta

08 Dec 23:48
d1d8f3a
Compare
Choose a tag to compare

Bin to Blit, Bug Bashing ... mp3 support!?!?

There's probably a law against including significant new features in point releases, but we'd run out of numbers otherwise.

This release finally includes @Daft-Freak's mp3 playback support, which was so awesome it easily qualified as a core API feature. Can't be fussed to score your game in retro C64 style? Stick some mp3 intro music onto it!

We've also added a version check against the 32Blit tools, so you'll be warned if they're out of date, in addition to the old warning when they were not instaled.

Bin to Blit

Since we had .bin and .reloc.bin confusing everyone, it was finally time to settle upon a 32Blit file extension. By general Discord consensus we arrived at .blit. Succinct. Punchy. Short. Games are now game.blit instead of game.bin and the firmware has changed to reflect this.

You can rename old games from .bin to .blit and they will work, but you should probably recompile/rebuild.

Fixes

  • Fixed my silly code in palette-swap so that ships are no longer 0px wide and invisible
  • Unbroke matrix-test (thanks @Daft-Freak)

v0.1.1...v0.1.2