New
- Structured error API — Expected failures use a small hierarchy instead of bare
ValueError:NeoConvError(base, withcodeand optionalhint)InvalidNeoError— bad or truncated.neofilesInvalidRomLayoutError— MAME layout, naming, ZIP/dir issues, C/V sequence gapsInvalidConfigurationError— extract sizes, P-ROM swap rulesUserCancelledError— GUI operation cancelled
resolve_genre()inneoconv.core— One shared function for genre name/id validation (CLI and GUI use the same rules).SwapModeenum —AUTO,YES, andNOfor P-ROM bank swap in core, CLI, and GUI (replaces mixed bool/string handling).py.typedin published wheels — PEP 561 marker so type checkers can use neoconv as a typed dependency.
Improvements
- GUI — Pack with auto swap — Parses the ROM source once and runs swap detection once (faster on large sets; less redundant work than before).
- GUI — Genre handling — Pack and Edit validate genre like the CLI; Pack preflight shows invalid genre in the status line (no silent “genre id 0”).
- GUI — Clearer feedback — Info tab shows proper
.neoerrors with hints; Edit tab warns when header metadata cannot be loaded; cancel is reported as info, not a generic error. - GUI — Startup — If
tkinteris missing,neoconv-guiexits with OS-specific install hints instead of a raw import error. - CLI & GUI — Actionable errors — Hints are printed/logged where available (e.g. C chip size, P-ROM swap on non–2 MB ROMs).
- Pack —
--swap-p yeson a non–2 MB P-ROM fails with an explicit message and hint (detect-swap/ useautoorno). - Library ergonomics —
SwapMode, exception types, andresolve_genreare exported fromneoconv.core. - Tests — End-to-end roundtrip integration tests (pack ↔ extract) strengthen regression coverage.
Bug fixes
- Interleave: odd C chip count raises a clear layout error instead of
IndexError. - Pack:
_word_swaploop step corrected (off-by-one). - CLI: internal
assertinextractreplaced withRuntimeErrorfor impossible states. - Removed stray duplicate
neoconv/core/cli.py.
Documentation
- README overhaul: Getting started table (pack / extract / edit / info), CLI + GUI called out up front, clearer structure and technical overview.
- Pack metadata limits (latin-1 field lengths, uint types) and extract size reference (byte values for
--c-chip-size/--v-bank-size). - Explained 2 MB fallback when sizes are unset vs per-game sizes from MAME /
neogeo.xml. - FBNeo compatibility and split-C-chip notes; why C/V sizes must be chosen on extract.
- New section: Errors (library API) for embedders.
For Python embedders
from neoconv.core import (
NeoConvError,
InvalidNeoError,
InvalidRomLayoutError,
InvalidConfigurationError,
UserCancelledError,
resolve_genre,
SwapMode,
)Catch NeoConvError subclasses for expected failures; read .code and .hint for stable handling and user-facing text.
Upgrade notes
- Library code that caught ValueError from neoconv.core should catch NeoConvError (or the specific subclasses) instead.
- CLI behaviour for successful conversions is unchanged; error text may include an extra hint line after —.
- No new CLI subcommands since 1.3.0; extract sizing (--c-chip-size, --v-bank-size) and other 1.3.x behaviour is unchanged.