Way to periodically dump name table to images? Using Lua or?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Way to periodically dump name table to images? Using Lua or?

Post 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
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Way to periodically dump name table to images? Using Lua

Post 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
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Re: Way to periodically dump name table to images? Using Lua

Post by frantik »

rainwarrior wrote:An even less direct approach might be Biswit's animation merging tool: https://bisqwit.iki.fi/source/animmerger.html
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
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Way to periodically dump name table to images? Using Lua

Post 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.
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Re: Way to periodically dump name table to images? Using Lua

Post 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?
Last edited by frantik on Tue Jul 17, 2018 10:04 pm, edited 1 time in total.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Way to periodically dump name table to images? Using Lua

Post 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
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Re: Way to periodically dump name table to images? Using Lua

Post 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
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Re: Way to periodically dump name table to images? Using Lua

Post 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
Image

The generated image
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 :(

Image
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Way to periodically dump name table to images? Using Lua

Post by lidnariq »

Which rom hack is that? I'd like to see if I can get sensible results with the same tools.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Way to periodically dump name table to images? Using Lua

Post by rainwarrior »

I believe it's Extra Mario Bros.
https://www.romhacking.net/hacks/369/
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Re: Way to periodically dump name table to images? Using Lua

Post 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
frantik
Posts: 377
Joined: Tue Mar 03, 2009 3:56 pm

Re: Way to periodically dump name table to images? Using Lua

Post 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..

Image
Post Reply