{"id":194,"date":"2006-01-25T19:56:55","date_gmt":"2006-01-26T03:56:55","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=194"},"modified":"2006-10-04T21:33:11","modified_gmt":"2006-10-05T04:33:11","slug":"nes-compression","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/nes-compression\/","title":{"rendered":"NES Compression"},"content":{"rendered":"<p>For budding computer geeks like myself, volume 20\/January 1991 issue of <a href=\"http:\/\/www.nintendopower.com\/\">Nintendo Power  magazine<\/a> (<a href=\"http:\/\/www.mobygames.com\/game\/nes\/mega-man-3\"><em>Mega Man III<\/em><\/a> cover) was of particular interest. In this issue, the editors attempted to shed some light on the technical matters driving the 8-bit Nintendo Entertainment System and give insufferable know-it-alls further opportunity to truly know it all.<\/p>\n<p><center><br \/>\n<img decoding=\"async\" src=\"\/eggs\/images\/8bitnes.jpg\" alt=\"8-bit Nintendo Entertainment System\" \/><br \/>\n<\/center><\/p>\n<p>I still recall the puerile, simplistic explanation for compression using a metaphor every Nintendo nerd could relate to: Tetris! I still think about this article sometimes and wonder what compression method they used and for which games. In fact, I located the relevant article section and scanned it for your enjoyment\/edification:<\/p>\n<p><center><br \/>\n<a href=\"\/eggs\/images\/nescompression-full.jpg\"><img decoding=\"async\" src=\"\/eggs\/images\/nescompression-thumb.jpg\" alt=\"NES Compression\" \/><br \/>\n<em>Click for larger image<\/em><\/a><br \/>\n<\/center><\/p>\n<p>I came across <a href=\"http:\/\/members.tripod.com\/FDwR\/docs\/zeldacmp.txt\">this document<\/a> describing a compression algorithm used for a <em><a href=\"http:\/\/www.mobygames.com\/game_group\/sheet\/gameGroupId,596\/\">Zelda<\/a><\/em> game on the Super NES, the direct successor to the NES, both market-wise and on a technical level. It seems that the scheme is largely a flexible <a href=\"http:\/\/multimedia.cx\/eggs\/video-coding-concepts-run-length-encoding\/\">RLE scheme<\/a> which allows for decoding single- or double-byte runs (output 5 instances of byte 0x56 vs. output 5 instances of 0x56 0x42); decoding runs of an incrementing byte (e.g., output a sequence of 4 incrementing bytes starting with 0xA2: 0xA2 0xA3 0xA4 0xA5); and even using into the encoded buffer as a dictionary and copying runs from a specified index.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you compress data on an 8-bit NES?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,4],"tags":[],"class_list":["post-194","post","type-post","status-publish","format-standard","hentry","category-nintendo","category-reverse-engineering"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":0,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/194\/revisions"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}