Binxelview - tool for finding uncompressed maps and images

You can talk about almost anything that you want to on this board.

Moderator: Moderators

Post Reply
User avatar
rainwarrior
Posts: 7680
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Binxelview - tool for finding uncompressed maps and images

Post by rainwarrior » Fri Apr 12, 2019 3:25 pm

https://github.com/bbbradsmith/binxelview/releases

I wanted a tool that would let me visually inspect gridlike data in binary files, like level maps and graphics. Basically it lets you define how a pixel's bits should be fetched, and then renders the binary file with that pixel format. You can play with the parameters until the data comes into alignment. This makes finding things like level maps within the data fairly quick.

It's a C sharp application. Free and open source if anyone here would find it useful.

The binary version I've provided uses .NET 4 so the minimum requirement is Windows XP SP3. Might be possible to rebuild for other platform targets, but I'll leave that for anyone interested to figure it out.
binxelview_aspetra_map.png
binxelview_alfonzo.png
Edit: switched from .NET 4.6.1 to 4, reducing requirement from Windows 7 SP1 to XP SP3.
Last edited by rainwarrior on Sat Apr 13, 2019 6:49 pm, edited 2 times in total.

lidnariq
Posts: 8791
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Binxelview - tool for finding uncompressed maps and imag

Post by lidnariq » Fri Apr 12, 2019 10:43 pm

Tentatively seems to run fine under Mono. Can't figure out the right invocation to mcs to rebuild, however.

Does this give me enough rope to view GB/SNES style bitplanes? I've been playing with it for a bit, but I keep on ending up with something that acts like packed pixels instead of planes. Might be a Mono bug.

User avatar
rainwarrior
Posts: 7680
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Binxelview - tool for finding uncompressed maps and imag

Post by rainwarrior » Fri Apr 12, 2019 11:17 pm

These two should match YY-CHR's "2BPP GB" and "4BPP SNES/PCE (CG)":
SNES 2BPP.bxp
SNES 4BPP.bxp

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2032
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Binxelview - tool for finding uncompressed maps and imag

Post by FrankenGraphics » Sat Apr 13, 2019 2:15 am

Very nice! Getting things to align nicely in yy-chr is sometimes up to luck. This will be helpful. :)
http://www.frankengraphics.com - personal NES blog

User avatar
rainwarrior
Posts: 7680
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Binxelview - tool for finding uncompressed maps and imag

Post by rainwarrior » Sat Apr 13, 2019 1:24 pm

Added a few more example presets to the build that might help understand how to define formats. In particular the "plane tiling" feature is for images that need to be put together from separate tiles of data. That name might have been a red herring, maybe I should change it to just "tiling".

Like for NES, you could use it to build a PPU-viewer / YYCHR style row of 16 8x8 tiles, or stack two tiles vertically to show 16 pixel high sprites:
binxelview_nes16px16w.png
I added it initially for Atari ST, which packs 2 or 4 planes into a packet of 16-bit words, so you get 16 pixels contiguously but then have to jump to the next group of words. That's what the plane tile feature does "every N columns, shift the data pointer by this additional amount".

Edit: I have renamed "plane tiling" to just "tiling" and changed the semantics slightly. This should hopefully be easier to understand.
Last edited by rainwarrior on Sat Apr 13, 2019 6:52 pm, edited 1 time in total.

User avatar
rainwarrior
Posts: 7680
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Binxelview - tool for finding uncompressed maps and imag

Post by rainwarrior » Sat Apr 13, 2019 6:40 pm

Tried setting the .NET framework back to 4 to get XP SP3 support in there. Seems to work OK.

Also changed the semantics of tiling in a way that I think will be less confusing.

"Phase tiling" is not just called "tiling", and its "shift" parameter is now renamed "stride" and made absolute rather than relative. So now the value is the byte/bit width of a tile directly, rather than something relative to the pixels within the tile.

Finally added a few keyboard shortcuts. (Kinda limited... the easiest way seemed to be mnemonic Alt keys for buttons, so every shortcut has to be a button with a name containing the key.)

Version 1.1.0.0 contains these changes:
https://github.com/bbbradsmith/binxelview/releases/

User avatar
nesrocks
Posts: 437
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Binxelview - tool for finding uncompressed maps and imag

Post by nesrocks » Tue Apr 16, 2019 6:00 am

This tool is so fantastic!
Is it possible to add support for compressed formats?
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!

User avatar
rainwarrior
Posts: 7680
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Binxelview - tool for finding uncompressed maps and imag

Post by rainwarrior » Tue Apr 16, 2019 10:16 am

Well, my intent for this tool is really to figure out unknown formats (especially level maps), not implement a compendium of image formats.

I'm not personally interested in undertaking a project to write a decompressor for every kind of image under the sun. I can't see any reasonable endpoint for something like that.

So... it's possible yes, but that's out of scope for my goals here. I wanted a simple tool with a specific purpose. If you need an algorithmic format, you'll need to implement that algorithm yourself, but that's why this is open source. Trying to keep it small and clean was part of the goal, to make personal/custom adaptation easier.

If you do implement a new format that can be cleanly integrated into the project without encumbering the source code unduly, please submit a patch, but otherwise if that is your need please customize it for your own use. (Public forks are welcome too.)

Post Reply