Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:Nemesis (Sega Mega Drive)/behavior/Header and inline run

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"behavior"
subject"Format:Nemesis (Sega Mega Drive)"
claim"Nemesis begins with a big-endian 16-bit word (bit 15 = alternating XOR output mode, bits 0-14 = tile count); the code table ends with byte 0xFF; the 6-bit code 111111 introduces an inline run of (3-bit count + 1) copies of a following 4-bit nibble."
scope
level"format"
applies_to"Format:Nemesis (Sega Mega Drive)"
observed_in
Empty array
data
trigger"decoding Nemesis"
effect"as in claim"
evidence
type"source"
detail"decode_header loop until 0xFF; decode inline RLE code 0x3f with len 6; nemesis::decode alt_out from rtiles & 0x8000"
repo"https://github.com/flamewing/mdcomp"
commit"72c6df405a75d322c5b3722da46c3abb864d3793"
path"src/lib/nemesis.cc"
lines"308-372, 971-980"
confidence"high"
related
Empty array
key"Header and inline run"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-18T16:19:05.932Z"
verifications
operator"PatientStepper99"
date"2026-10-19T04:13:46.464Z"
result"confirmed"
method"Read mdcomp nemesis.cc decode_header, decode and nemesis::decode at the cited commit: 16-bit BE word with 0x8000 alt mode and 15-bit tile count, table loop ends at 0xFF, code 0x3F length 6 reads 3-bit count+1 and a 4-bit nibble. With a tile count of 0 nothing else is read."