Repository navigation
0.12
| Editor | Mega Drive exporter | SNES exporter | |
|---|---|---|---|
| Windows (x64) | ModularSpriteEditor-windows.zip |
export_megadrive-windows.zip |
export_snes-windows.zip |
| macOS (Apple Silicon) | ModularSpriteEditor-macos.zip |
export_megadrive-macos.zip |
export_snes-macos.zip |
| Linux (x64, glibc 2.35+, e.g. Ubuntu 22.04) | ModularSpriteEditor-linux.tar.gz |
export_megadrive-linux.tar.gz |
export_snes-linux.tar.gz |
Games need this version's runtime. The exported data has changed: the Mega Drive's is blob version 7 (8 when
streamed; it was 5 up to 0.11), the SNES's data version 4 (5 when streamed; it was 2). A game that exports again needs
the runtime files from this version: on the Mega Drive src/modsprite.c, src/modsprite_draw.s (new: the draw loops
in 68000 assembly) and inc/modsprite.h from examples/megadrive/megadrive_demo; on the SNES src/modsprite.c,
src/modsprite_draw.asm and inc/modsprite.h from examples/snes/snes_demo. The calls a game made with 0.11's
runtime keep their meaning.
The editor exports for the Mega Drive and the SNES itself (File ▸ Export ▸ Mega Drive (SGDK)... and File ▸ Export ▸
SNES (PVSnesLib)...). The exporters are the same exports from the command line, for programmers who export in a game's
build without opening the editor; you do not need them to make sprites.
The example projects, for every system: ModularSpriteEditor-examples.zip (Prince of Persia, Sonic and the
Adventurer). Unpack it and open a project with File ▸ Open... in the editor.
The SNES demo: ModularSpriteEditor-snes-demo.zip. modular_sprite_snes_demo.sfc is a SNES ROM made with the
editor's SNES export from the Prince of Persia example: open it in a SNES emulator (Mesen, bsnes, ares). It starts on
the Swordfight; UP / DOWN switch between scenes, animations, frames and modules, LEFT / RIGHT browse, A plays and pauses,
B shows hitboxes and points, X changes the look (mappings and palette swaps), START shows the controls and what a frame
costs. Next to it is the ROM's PVSnesLib project (examples/snes/snes_demo): export your own project into it and
build it with PVSnesLib 4.x, with make on macOS and Linux, or on Windows with build_windows.ps1 (PVSnesLib's Windows
tools, no make or MSYS2).
The user guide: https://modularsprites.bionic-productions.com/ (what's new, for artists:
https://modularsprites.bionic-productions.com/reference/releases/)
Both exporters take the same options: --project-json, --output-dir, --mapping (a mapping's name or id, all or
none), --mode (parts, parts_streamed or frames_streamed), --copy-assets and --strict; the SNES's also
--setup for its sprite sizes.
Mega Drive: export_megadrive --project-json my.json --output-dir path/to/megadrive_game, then build the game with SGDK.
The demo builds with make release; on macOS and Linux its first build compiles SGDK's library with your own m68k GCC,
because the one SGDK ships links only with SGDK's GCC 13 (which Windows uses). See
examples/megadrive/README.md.
SNES: export_snes --project-json my.json --output-dir path/to/snes_game writes the data into a PVSnesLib project
that has the SNES runtime (the demo project has it). See
examples/snes/README.md.
The builds are not signed. Windows: "More info" › "Run anyway". macOS: right-click › Open the first time
(or xattr -dr com.apple.quarantine ModularSpriteEditor.app export_megadrive export_snes).
Every build was tested in CI: unit tests; the built editor drives every tab against the PoP_WW and Sonic examples
(--smoke-test), exports for the Mega Drive and the SNES included; each built exporter writes exactly what its Python
exporter writes. On Windows the Mega Drive demo ROMs were built from the packaged files with the bundled SGDK, and the
SNES demo ROMs with the bundled PVSnesLib. The Mega Drive runtime was built with the vendored SGDK into probe ROMs of PoP_WW, Sonic and the Adventurer and
played in BlastEm 0.6.2, resident and in both streamed ways: every sprite table and profile as the host build of the
runtime writes them, the VDP's sprite table, video memory and colour RAM, frames of four sprites or more drawn by its
68000 loops. The SNES demo ROM in the zip was built with PVSnesLib 4.6.0
on Linux and its runtime checked in Mesen 2.1.1: every sprite table byte for byte as the host build of the runtime
writes it, which the unit tests compare with the editor. The ROM built on Windows was played next to it in Mesen with
the same presses through every view and drew the same on every frame.
What's new since 0.11
Frames stored whole. A frame marked Store whole in the Frames tab is stored by both console exports as one picture
per palette, cut into the fewest hardware sprites, wherever it shows; every other frame stays parts. The budget
overlay, the readouts, Check Project and the export reports count it that way. The Animations tab's budget also says how
many characters playing an animation fit side by side before sprites drop.
Ways to store the sprites. File ▸ Export for the Mega Drive and the SNES has Store as, with a table of what each
way costs: parts resident (as before), parts streamed (video memory holds what each character shows; a frame's tiles go
into its slot when it is drawn) and whole frames streamed. The exporters take --mode. See
docs/EXPORT_MODES.md.
The runtimes' new calls, the same on both consoles. ms_draw_frame_flipped and ms_draw_module_flipped (a frame
mirrored about its origin, a module in place, like a part mirrored in a frame); ms_frame_sprites, ms_module_sprites,
ms_frame_bounds and ms_module_bounds, to plan a picture before drawing it; a slot cache shared by every character of
a streamed export (ms_slot_cache_init), or load lists for slots a game keeps itself (ms_frame_load_list,
ms_module_load_list, ms_load_list_tiles); give-way levels (ms_set_give_way): what is drawn with a level is left
out first when a picture asks for more sprites than the console shows. A game sizes the cache and the levels' queues
when it compiles modsprite.c (MS_CACHE_SLOTS, MS_GIVE_WAY_DRAWS, MS_QUEUED_DRAWS; 0 leaves them out).
The Mega Drive's draw loops in 68000 assembly, for frames of four hardware sprites or more
(src/modsprite_draw.s), checked against the C loops in BlastEm by tools/check_megadrive_rom.py, which the release
workflow now runs.
File format 9 (frames marked Store whole). Version 0.11 opens format 9 projects with a warning and exports those
frames as their parts.