It is currently Sat Apr 20, 2019 7:38 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Fri Apr 12, 2019 3:25 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7408
Location: Canada
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.

Attachment:
binxelview_aspetra_map.png
binxelview_aspetra_map.png [ 16.19 KiB | Viewed 613 times ]
Attachment:
binxelview_alfonzo.png
binxelview_alfonzo.png [ 44.53 KiB | Viewed 604 times ]


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.

Top
 Profile  
 
PostPosted: Fri Apr 12, 2019 10:43 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8256
Location: Seattle
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.


Top
 Profile  
 
PostPosted: Fri Apr 12, 2019 11:17 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7408
Location: Canada
These two should match YY-CHR's "2BPP GB" and "4BPP SNES/PCE (CG)":
SNES 2BPP.bxp
SNES 4BPP.bxp


Top
 Profile  
 
PostPosted: Sat Apr 13, 2019 2:15 am 
Offline
Formerly WheelInventor
User avatar

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1996
Location: Gothenburg, Sweden
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


Top
 Profile  
 
PostPosted: Sat Apr 13, 2019 1:24 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7408
Location: Canada
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:
Attachment:
binxelview_nes16px16w.png
binxelview_nes16px16w.png [ 36.16 KiB | Viewed 491 times ]


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.

Top
 Profile  
 
PostPosted: Sat Apr 13, 2019 6:40 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7408
Location: Canada
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/


Top
 Profile  
 
PostPosted: Tue Apr 16, 2019 6:00 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 398
Location: Rio de Janeiro - Brazil
This tool is so fantastic!
Is it possible to add support for compressed formats?

_________________
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!


Top
 Profile  
 
PostPosted: Tue Apr 16, 2019 10:16 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7408
Location: Canada
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.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group