Page 1 of 1
Way to periodically dump name table to images? Using Lua or?
Posted: Tue Jul 17, 2018 6:54 pm
by frantik
Is there a way to capture the name table as an image periodically? This would be really useful for creating level maps of games, vs taking screen shots manually over and over. I thought maybe it could be done using FCEUDX and Lua script but i didn't see any image saving functionality
Re: Way to periodically dump name table to images? Using Lua
Posted: Tue Jul 17, 2018 7:18 pm
by rainwarrior
You could hide sprites and just take a screenshot.
If you mean you want a shot of the 4 internal nametables rendered at some scanline like in the Nametable viewer, then no that doesn't exist currently.
You could in theory write a lua script to peek at the all the current PPU data and render an image based on it in response to a keypress or whatever trigger you want to hook up.
Less directly, in interim builds of FCEUX you can use the hex editor to dump PPU memory to file. (Can't remember if you could do that in earlier builds or not, it might be there too.)
An even less direct approach might be Biswit's animation merging tool:
https://bisqwit.iki.fi/source/animmerger.html
Re: Way to periodically dump name table to images? Using Lua
Posted: Tue Jul 17, 2018 7:53 pm
by frantik
this is basically what I would really like to do.. play through the game and end up with a map "automagically" rendered. Looks like to get the source images for that project, they had a modified emulator which would output every frame as an image.
this looks promising though of course i dont run linux so i cant use these scripts even if i could produce the source images
I tried just taking screen shots and it's super tedious
Re: Way to periodically dump name table to images? Using Lua
Posted: Tue Jul 17, 2018 9:04 pm
by tokumaru
frantik wrote:of course i dont run linux so i cant use these scripts
Running Linux in VirtualBox is pretty easy, and free. As for the images, many emulators can record video, and you can use VirtualDub to convert the video into a series of images.
Re: Way to periodically dump name table to images? Using Lua
Posted: Tue Jul 17, 2018 9:56 pm
by frantik
Yeah I suppose it could be done! I might try that route.. anybody know a good minimal Linux distribution to use these days?
Re: Way to periodically dump name table to images? Using Lua
Posted: Tue Jul 17, 2018 10:02 pm
by rainwarrior
frantik wrote:this looks promising though of course i dont run linux so i cant use these scripts even if i could produce the source images
there's a win32 build at the bottom of the page
Re: Way to periodically dump name table to images? Using Lua
Posted: Tue Jul 17, 2018 10:19 pm
by frantik
rainwarrior wrote:frantik wrote:this looks promising though of course i dont run linux so i cant use these scripts even if i could produce the source images
there's a win32 build at the bottom of the page
Oh nice.. I guess I didn’t look hard enough. Thanks
Re: Way to periodically dump name table to images? Using Lua
Posted: Wed Jul 18, 2018 12:59 am
by frantik
I tried it out but it doesn't seem to work too well unfortunately

when I try to filter out the HUD it goes haywire too
What it should look like
The generated image
It's missing some major features.. though honestly just using the raw frames might be easier than screen capping a bunch of times, though it'd still be pretty tedious.
edit.. yeah, that program isn't gonna work unfortunately

Re: Way to periodically dump name table to images? Using Lua
Posted: Wed Jul 18, 2018 10:29 am
by lidnariq
Which rom hack is that? I'd like to see if I can get sensible results with the same tools.
Re: Way to periodically dump name table to images? Using Lua
Posted: Wed Jul 18, 2018 11:26 am
by rainwarrior
Re: Way to periodically dump name table to images? Using Lua
Posted: Wed Jul 18, 2018 4:33 pm
by frantik
yes it's extra mario bros... I'm wondering if all the black space is causing problems, plus the stars are animated. i ran it on a few sets of images and it seems like it was tracking mario more than the background. I don't think that tool is the solution I'm looking for, but it was a nice idea.
If I could just capture the name table as a long image as it gets updated that would be really cool but i don't think it's that easy
Re: Way to periodically dump name table to images? Using Lua
Posted: Thu Jul 19, 2018 8:29 am
by frantik
Instead of using that program to merge the images, I've started using photoshops "Photo Merge" feature which isn't perfect but saves a lot of time since it can "snap" matching shapes into place when it doesnt get it right automatically
I record an AVI using raw video, then take that into VirutalDub, were I set it to only give me 2 frames a second (decimate by 30).. then I cherry pick frames which will allow me to build the room, import those into photoshop and use the merge tool. It's still slow but a lot faster than screen shotting every room and then stitching every image together manually
This game is a lot more fun once you start to understand the maps..
