Test run on Ultima 4 NES. http://pastebin.com/qtSG6puZ for a lua script that will light up the dungeons.