Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Simple binary data viewer

Author
Message
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 3rd Apr 2009 20:09 Edited at: 3rd Apr 2009 23:17
I made this program because - would you believe it - I don't have any hex editors installed on my machine currently. I wanted to visualize the data in a file format for an incredibly ancient video game that I'm trying to reverse engineer so that I can make a program on DBPro that will load up the game's maps.

Anyway, it's a small enough program and I thought it might be useful to someone, so I'm posting it here.

This is a simple binary file viewer that prints the file to the screen. It has two display modes. Mode 1 that shows the hex address of where that line starts, the hex value of each byte on the left with the text data on the right. Mode 2 displays the text data along with the position in the file that the line starts at.

The snippet has been updated to show the address in both modes and to represent all numeric data as hex. Also, it now lets you drag and drop files on the executable to allow you to load any file easily. Also changed the loop so that the addresses displayed are correct. Also, the left/right keys always work now.

It shouldn't be too difficult to convert it into an actual hex editor.

Controls are:
1: Switches to Mode 1
2: Switches to Mode 2
Page Up/Down scrolls the data by a whole page.
Home resets to the first position.
Up/Down Arrow keys move the data line by line
Left/Right arrow keys advance or retreat the position by one.




Everything I needed to know about trigonometry, I learned by becoming a game programmer.

Login to post a reply

Server time is: 2024-11-22 07:56:17
Your offset time is: 2024-11-22 07:56:17