Author
|
Topic: What are your current gripes with hex editors? (Read 2 times)
|
DarthNemesis
Guest
|
|
« Reply #45 on: June 17, 2008, 01:54:17 pm » |
|
Oh, be sure not to forget the ability to search for kana, ala WinHex. But perhaps you could add kanji? That'd probably be overkill, though.
~DS
I don't think that would be overkill, especially if all it involves is enabling the user to select an encoding type.
|
|
|
|
Kajitani-Eizan
Guest
|
|
« Reply #46 on: June 18, 2008, 02:47:40 pm » |
|
yeah, definitely be able to search for non-english text. like shift-jis, unicode, etc. if you want inspiration, i like the way the Cygnus hex editor does it.
|
|
|
|
Lindblum
Guest
|
|
« Reply #47 on: August 05, 2008, 03:06:12 pm » |
|
WinHex lets you open up the RAM, which has GOTTA be useful for something! What sucks is they won't let you save more than 200kB, and it seems to complain if you copy more than 16MB as hex string (to use in another editor). What I want to do is find the VRAM of a game or emulator and extract the 3D data so I can search for geometric primitives. For example I can convert a set of bytes into a point cloud and see if it correlates to the scene in the game, like an incomplete 3D screenshot. Then if it works I can analyze the data for triangle meshes. It'll be a lot of trial&error, but do you think I can do this?
|
|
|
|
Lleu
Guest
|
|
« Reply #48 on: August 06, 2008, 04:32:06 am » |
|
Oh, be sure not to forget the ability to search for kana, ala WinHex. But perhaps you could add kanji? That'd probably be overkill, though.
~DS
I don't think that would be overkill, especially if all it involves is enabling the user to select an encoding type. yeah, definitely be able to search for non-english text. like shift-jis, unicode, etc. if you want inspiration, i like the way the Cygnus hex editor does it.
Text input (i.e. what you type in) will be assumed as Unicode by default. I hadn't thought of a good reason for this (Sorry Win 9x/ME users). If it seems useful, I may consider a customized (separate) c/p dialog for different encodings. However, once the text has been entered into the search window, I do plan to allow the user to define the search criteria using a configurable format list (including user-defined encodings!). This would entail, of course, that all entered characters had a corresponding entry in the encoding (maybe include a checkbox to consider them as wildcards...). I'm not sure on the GUI implementation yet. Tradition would suggest a combobox, but if something easier comes up, that may change. I haven't begun work on the search plugin, yet. Right now I'm still working on the plugin API and GUI framework. I've got auto-detecting of plugin files, partial configuration support (it is working, but I've got some better ideas for future features that requires a rewrite), and part of the plugin interface (loading, ToolStrip integration, etc) finished. However, once I got where I did, I decided that dockable windows (for the plugins) were important to me. So I'm investigating into using DockPanel Suite in the interface for now, which would allow a lot of flexibility. I've also been distracted by retooling various Windows Setup discs in order to facilitate having multiple Windows versions on one partition, hunting contract work and studying, too. By the way, WinFLP is not fun to customize. Stick with XP if you want to automate the installation process. Also, ponies. WinHex lets you open up the RAM, which has GOTTA be useful for something! What sucks is they won't let you save more than 200kB, and it seems to complain if you copy more than 16MB as hex string (to use in another editor). What I want to do is find the VRAM of a game or emulator and extract the 3D data so I can search for geometric primitives. For example I can convert a set of bytes into a point cloud and see if it correlates to the scene in the game, like an incomplete 3D screenshot. Then if it works I can analyze the data for triangle meshes. It'll be a lot of trial&error, but do you think I can do this?
Memory viewing is actually a pretty popular feature in hex editors. It's rather useful for x86 hacking. Generally, large memory blocks are dumped to files, rather than copied (look for a dump command. I don't use WinHex much). I'm pretty sure that the latest HxD supports this as well; if you're hurting for memory viewing, it might have something workable. Or not. I don't use it much these days. Certain programs have a tendency to move the data structures around, though, so make sure the data that you're working with is always in the same spot. TSearch also has a memory editor and "AutoHack" capability for finding that ever-so-stealthy data. I don't recall how well its dumping mechanism works, though. I'm sure it can be done. It's likely going to be somewhat complicated (read: difficult) if you don't understand the game engine or hardware (specifically or in general). But if you're interested, I seem to recall that there was a tutorial on hacking 3d cameras in the database for a PSX game. You might want to start with that. The Playstation only has something like one MB of VRAM, and there are various PSX debuggers available, which might be helpful. I wouldn't be the best resource on this, though. I'm not really up-to-speed with 3d graphics. As to whether my editor will support memory editing, I cannot say at the moment. I'm not vehemently opposed to it being added in once what I consider as the basics are covered. However, I haven't quite wrapped my head about how I'm going to handle data storage and manipulation through plugins, yet. And data plugins are essential for some of what I've got planned. Thank you for the input, everyone! If y'all run across anything else that seems useful, feel free to post it. I'll be using this thread as a secondary checklist once the core is complete.
|
|
|
|
Nightcrawler
Guest
|
|
« Reply #49 on: August 06, 2008, 07:59:57 am » |
|
You should probably compile a list of all planned features so people can quickly see what's already been suggested and what you plan to have in it.
|
|
|
|
Lindblum
Guest
|
|
« Reply #50 on: August 07, 2008, 12:37:34 pm » |
|
Lleu, I'm glad to see that you're well-informed. I've made a forum topic for this by the way: http://www.romhacking.net/forum/index.php/topic,6917.0.htmlI'm a fan of 3D geometric algorithms, 3D scanning and stereolithography, so I think this might be a neat project to try. The more I can learn about finding and parsing display-memory the better. If I can help make the ultimate 3D-screenshot utility I can die knowing I've made the world a better place.
|
|
|
|
Lleu
Guest
|
|
« Reply #51 on: January 23, 2009, 02:19:48 pm » |
|
I've been shamed into an update, here. Since the topic was safe from the great board prune, I didn't feel the urge to bump it. Updates will become more frequent when I've reached the point of screenshots and alphas. Lots of pieces are rather solid already, but it's an extremely ambitious project. Therefore, it will take a while before it's reached a stage that I deem usable. I was planning to use DockPanel Suite for Visual Studio-style docking, but I'm not sure that it's solid enough for my purposes. Something about it rubs me the wrong way. Besides, it's got a lot of Windows-specific code, which interferes with the cross-platform goals. Currently I'm stalled at the "writing the custom hex editor controls" stage. It's planned to be extensible enough that you can line up multiple arbitrary data representations and offset formats on the hex editor, so this is one stage where I don't want to skimp. I'm kind of lost as to the best way to turn a click into a location in the background for data selection and carat positioning, so I'm stepping back for the moment to do other things. I've got another project in the works that I'll probably showcase in a month or so. It's a tool used to track time on various projects. Most useful for billing and reporting purposes, although it's useful just to see where your time goes. Anyone who's ever had to use ERP software will probably find this software very useful. I'm putting transparent forms in this project, so once the feature is finalized I'll repurpose it for the hex editor. I'm also trying a different approach to some XML stuff that I might end up using. Sometimes it's easier to just write the features into separate apps first, and then make libraries out of them.
|
|
|
|
seirj
Guest
|
|
« Reply #52 on: January 23, 2009, 11:09:59 pm » |
|
I'm still looking forward to this.
|
|
|
|
Karatorian
Guest
|
|
« Reply #53 on: January 30, 2009, 02:19:12 am » |
|
There was a bunch of features I was going to suggest, but it seems like they've all been mentioned already. (woot)
This looks like it'll be a really cool project once it gets going. I'm really looking forward to a release. I've assuming that since it'll be written for Mono that you'll be able to write plugins in any supported language. I'm partial to Python, so not having to learn C# and simply use IronPython instead would be a great plus.
The one thing I've really missed is the address support Disch suggested. The other ideas floating around so far are all great as well. One thing I'd like, not sure if it's been mentioned (I read the thread really quickly) is the ability to map some keys (like the F keys or something) to run commands, so you can run your emulator, or a game specific utility or whatever, in a quick and easy way. I got this idea from various game editors that have a configurable "run in emulator" command.
In all honesty, this is looking less and less like a hex editor and more like an IDE. Which is sweet, so more power to ya. In light of that, I've got a suggestion you may want to consider. It may be out in left field, but here goes.
With all the advanced text support that you're planning on adding, I'd suggest splitting the hex editor and the text editor into two seperate plug-ins. You could have them display side by side like a usual hex editor by default, but if they where actually seperate, then you could close the hex part and just use it like a text editor when not working on binary data.
The idea of allowing plug-ins to manipulate reads and writes in between the raw data and the display is brilliant. Besides the aformentioned support for compressed sections (Which, BTW, I think you should allow for whole files. You may think it's a bad idea. I kinda agree, but it sounds like the infrastructure will be there, so why not let the user decide?), there a hundred other things you could do with it.
People have mentioned disassembly. This could actually be pretty easy with the system you're setting up. (I'm not saying you'd have to write it yourself, just that if I understand your ideas correctly, it'd be easy for someone else to write.) Basically, what a disssasmbly view would do is get the raw binary data from the main data interface (or some other plug-in, who knows, why restrict it) and then disssamble it and display the output using the standard text display plug-in. If someone was really ambitious, they could even add write support to it, so it'd do assembly too. (That'd make ASM hacks a whole new level of easy. Ok, not easy, but easier.)
I think the automatic pointer stuff could work in a similar fashion. The plug-in would somehow plug into the data layer and monitor an area of data in one place that's being pointed to by other data elsewhere. When the data changes, it simply writes to the pointer table. With a sophisticated configuration system, it would be able to handle practically any sort of pointer scheme without being platform or (even worse, game) specific. (Of course a few presets could be handy too.)
The great thing about this architecture is that the rest of the program doesn't have to know or care anything about pointers (or ASM, or whatever). The text widget just edits the text like usual. The pointer plug-in updates the pointers in the background, and the hex widget shows the changes. It's almost like magic.
All of this brings me to the one feature I'd suggest. You've mentioned color coding and such, but I say take it a step further and impliment full syntax hilighting. It sounds complicated at first, but it's really not that bad. All you have to do is take the hilighting support you're already planning and add a pattern language to it. I'd suggest using regular expressions to avoid reinventing the wheel. (Of course simply shell style glob patterns (* and friends) are an option too. Perhaps offer both, gobbing for the average Joe and REs for the power users.)
While syntax hilighting might seem like overkill, especially as the main goal is a hex editor, not a code editor (however, I suggest you're headed for a great plaform for both), it would actually have uses while hex editing too. Say, for instance that you're editing some text that also contains some control characters. You could set up the hilighting to make them stand out, automatically. For instance, if 0xFF is the end of string char, you could have it be red, and if the other control chars are all in the range 0x00 - 0x1F, you could hilight them yellow.
If you made it generic enough, it could be quite simple and very powerful at the same time. Basic users could do things like what I mentioned with the control characters, while more advanced hackers could write a full blown hilighting scheme for 6502 assembler code.
Anyway, that's my two gil, I hope you think about it. If you deliver all the features you've planned, plus a bit of support for plain text editing, I'll probably use your program all the time.
|
|
|
|
Lleu
Guest
|
|
« Reply #54 on: January 30, 2009, 05:09:25 pm » |
|
Thanks for the support, seirj. I'll definitely continue to work on this, but keep in mind that it's rather ambitious in scope. It'll take a while to flesh it out while coding in my spare time. There was a bunch of features I was going to suggest, but it seems like they've all been mentioned already. (woot)
This looks like it'll be a really cool project once it gets going. I'm really looking forward to a release. I've assuming that since it'll be written for Mono that you'll be able to write plugins in any supported language. I'm partial to Python, so not having to learn C# and simply use IronPython instead would be a great plus.
Correct, any language that compiles down to the IL should be fine. I'm pretty sure IronPython does that. They will need to be compiled assemblies, though, since I don't really want to add in support for runtime compilation. The one thing I've really missed is the address support Disch suggested. The other ideas floating around so far are all great as well. One thing I'd like, not sure if it's been mentioned (I read the thread really quickly) is the ability to map some keys (like the F keys or something) to run commands, so you can run your emulator, or a game specific utility or whatever, in a quick and easy way. I got this idea from various game editors that have a configurable "run in emulator" command.
Agreed. I'd planned on hotkey support, but I hadn't explicitly included the Function keys in that. Noted. With all the advanced text support that you're planning on adding, I'd suggest splitting the hex editor and the text editor into two separate plug-ins. You could have them display side by side like a usual hex editor by default, but if they where actually separate, then you could close the hex part and just use it like a text editor when not working on binary data.
Both hex and text will be data views, so in the end, it's just what views you have enabled. Changing the configuration on the fly might be a bit difficult in the first iteration. But the application uses a configuration file with the same name as the executable. Make a copy with a different name and you can store different settings. Also, it will read settings from the same directory, which means it's portable for USB drives and any location, really. The idea of allowing plug-ins to manipulate reads and writes in between the raw data and the display is brilliant. Besides the aforementioned support for compressed sections (Which, BTW, I think you should allow for whole files. You may think it's a bad idea. I kinda agree, but it sounds like the infrastructure will be there, so why not let the user decide?), there a hundred other things you could do with it.
People have mentioned disassembly. This could actually be pretty easy with the system you're setting up. (I'm not saying you'd have to write it yourself, just that if I understand your ideas correctly, it'd be easy for someone else to write.) Basically, what a disassembly view would do is get the raw binary data from the main data interface (or some other plug-in, who knows, why restrict it) and then disssamble it and display the output using the standard text display plug-in. If someone was really ambitious, they could even add write support to it, so it'd do assembly too. (That'd make ASM hacks a whole new level of easy. Ok, not easy, but easier.)
Correct. That's the whole idea behind the plugin architecture. The data can be manipulated extensively before the user sees it. Tiles and other image formats, sounds, 3d models, textures, code, etc could all be handled within the program. It's just a matter of identifying the data properly and tagging it with the necessary metadata. And if the plugins are coded properly, then it isn't simply for display, but also for editing... I think the automatic pointer stuff could work in a similar fashion. The plug-in would somehow plug into the data layer and monitor an area of data in one place that's being pointed to by other data elsewhere. When the data changes, it simply writes to the pointer table. With a sophisticated configuration system, it would be able to handle practically any sort of pointer scheme without being platform or (even worse, game) specific. (Of course a few presets could be handy too.)
The great thing about this architecture is that the rest of the program doesn't have to know or care anything about pointers (or ASM, or whatever). The text widget just edits the text like usual. The pointer plug-in updates the pointers in the background, and the hex widget shows the changes. It's almost like magic.
I've got relational links between objects planned, which is intended for this purpose. I can't implement them until I get further along with the data views, though. I'm sure there will be a lot of obstacles (I can't even tell how many since I haven't started on this part yet), but I think the benefits are worth the effort. All of this brings me to the one feature I'd suggest. You've mentioned color coding and such, but I say take it a step further and impliment full syntax hilighting. It sounds complicated at first, but it's really not that bad. All you have to do is take the hilighting support you're already planning and add a pattern language to it. I'd suggest using regular expressions to avoid reinventing the wheel. (Of course simply shell style glob patterns (* and friends) are an option too. Perhaps offer both, gobbing for the average Joe and REs for the power users.)
While syntax hilighting might seem like overkill, especially as the main goal is a hex editor, not a code editor (however, I suggest you're headed for a great plaform for both), it would actually have uses while hex editing too. Say, for instance that you're editing some text that also contains some control characters. You could set up the hilighting to make them stand out, automatically. For instance, if 0xFF is the end of string char, you could have it be red, and if the other control chars are all in the range 0x00 - 0x1F, you could hilight them yellow.
If you made it generic enough, it could be quite simple and very powerful at the same time. Basic users could do things like what I mentioned with the control characters, while more advanced hackers could write a full blown hilighting scheme for 6502 assembler code.
Colour highlights in the hex view are intended strictly for data organization purposes. This is to make it easy for the user to know exactly what type of data they're working with. However, the text view (and any other views) needn't have the same limitation. It's entirely possible to implement syntax highlighting. It's a bit farther than I have planned at the moment, but I'll note it for future consideration. Anyway, that's my two gil, I hope you think about it. If you deliver all the features you've planned, plus a bit of support for plain text editing, I'll probably use your program all the time.
Thanks! I'm going to have to implement it in stages, but the end result should end up being rather useful. I appreciate all the feedback that I've gotten on the project so far and look forward to delivering a really flexible tool.
|
|
|
|
Kajitani-Eizan
Guest
|
|
« Reply #55 on: January 30, 2009, 07:11:28 pm » |
|
Cygnus now has a FREE EDITION (caps theirs). you may want to check it out to see how it implements certain things... at least, i find it very very nice, especially when dealing with japanese (e.g. searching for shift-jis in the file, and pasting text into the search area from an input program). it doesn't have many features at all, but what it does, it does well. (that also means it should be quick to check out, i think... for the free edition, anyway.)
|
|
|
|
|