Format:Atari Lynx LNX file
| Magic | LYNX |
|---|---|
| Extensions | .lnx |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
The .lnx cartridge dump format of the Atari Lynx (emulator header, magic "LYNX"): a 64-byte header with the two ROM bank page sizes, a version of 1, the 32-byte cartridge name, 16-byte manufacturer and a rotation byte, followed by the raw ROM.
Header
The 64-byte header (Handy emulator, copied in Beetle Lynx / Mednafen: mednafen/lynx/cart.h, LYNX_HEADER, decoded little endian in CCart::DecodeHeader):
| Offset | Size | Field |
|---|---|---|
| 0x00 | 4 | magic LYNX
|
| 0x04 | 2 | page size of bank 0 (u16 LE) |
| 0x06 | 2 | page size of bank 1 (u16 LE) |
| 0x08 | 2 | version, must be 1 |
| 0x0A | 32 | cartridge name, NUL padded |
| 0x2A | 16 | manufacturer name |
| 0x3A | 1 | rotation: 0 none, 1 left, 2 right |
| 0x3B | 5 | spare |
The loader rejects a file whose magic is not LYNX or whose version is not 1 and then treats the whole file as headerless (name "NO HEADER"); cart.cpp, CCart::CCart. Valid page sizes are 0x000 (bank unused), 0x100, 0x200, 0x400 and 0x800; a bank holds 256 pages, so the bank size is page size * 256 (64, 128, 256 or 512 KiB: address mask 0xFFFF, 0x1FFFF, 0x3FFFF, 0x7FFFF). Bank 0 is the cartridge ROM; bank 1 is a second ROM or RAM bank used by a few carts. Rotation values other than 0, 1, 2 are forced to 0.
The header is not part of any real cartridge. Emulators also keep a CRC32 database of known games that can override rotation (lynxDB[] in cart.cpp).
Raw ROM
The ROM follows at file offset 0x40. Unverified: the cartridge is read serially through the Susie chip (reading RCART0 auto-increments a page counter), not as memory-mapped ROM, so reverse engineering a game means following the cart-read registers, not file offsets.
Related
Code & repositories
- https://github.com/libretro/beetle-lynx-libretro @
fcdefcfb3c11d6d2e71be076a5d3df2e88ab73ed· license: GPL-2.0 (declared by the contributor; GitHub's detector did not recognize COPYING)
Mednafen Lynx core (Handy-derived): LNX header decoding, memory map and MAPCTL
Tested on: source read, not run: read the source, not built · checked 2026-10-18