Register - Login
Views: 99392553
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-24-22 10:10:43 AM
Jul - Game Development/Mod Projects - Datamijn New poll - New thread - New reply
Next newer thread | Next older thread
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 1717/2066
EXP: 6305062
For next: 87712

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 6 days
Last activity: 1 day

Posted on 05-04-18 08:07:22 AM Link | Quote


*Sanqui flops, wings involved.

level 76

exp 3933688

exppct 59.6%

numposts 1717

 
I'm working on an awesome binary data description language and YOU get to be a part of it!

Datamijn is primarily a domain-specific language for describing binaries. It's meant to be as concise as possible. You know what the data looks like and you just want YAML out of it. Datamijn won't make you write any boilerplate.

A datamijn definition file is natural to write and read. Example:


position {
x u8
y u8
}

_start {
version u16
positions [8]position
}

In this .dm file, we describe a type, "coords", consisting of two bytes. We then describe how to parse the binary from the beginning.

Is position only used once? No need to pollute your namespace. In datamijn, you can always define a type anonymously.


version u16
positions [8]{
x u8
y u8
}

In this example, we haven't defined _start, so datamijn starts parsing the file from the first field.

A binary file parsed with such a definition might end up looking like this pleasant YAML.


version: 1
positions:
- x: 5
y: 6
- x: 26
y: 12
...


What can datamijn actually do?

Here's a more complex example in which I'm parsing a bunch of data from Final Fantasy 1... including strings!

ff1.dm:

ff1.yaml:


string_ptr is of particular note: it involves reading a NES pointer, doing some calculations to convert it into an absolute pointer within the NES ROM, and then reading a zero-terminated string at that location. The idea is that you won't even have to write this pointer math: nesptr should be a part of the standard library!

The end goal is that you'll describe a ROM according to what you know... and get all of the data out of it, without having write boilerplate or possibly even touching a programming language. Of course, this is all a lie, because if you'll be decompressing some data using datamijn, you'll probably have to write a for loop or two. But the idea is it should be all super concise and intuitive.

Support for writing is also on the roadmap, but only as a second class citizen. It's likely there will be some limitations.

Datamijn isn't complete and I won't be releasing it until I deem it usable, but it's already quite powerful and evolves with my own needs.

Is datamijn interesting to you? Do you have any questions or ideas? I'll probably follow this up with some thoughts on how to do decompression, but this should be enough for now.

____________________
In our brief lives,  •  we've managed to meet.  •  Treasure this gift,  •  this precious time that we have.        
marrub

Level: 19


Posts: 21/84
EXP: 30325
For next: 5452

Since: 01-23-18

Pronouns: they/them - others are welcome
From: colorado (previously hell (aka. ohio))

Since last post: 1.5 years
Last activity: 299 days

Posted on 07-06-18 06:56:39 AM Link | Quote
UESC-7010A > cat post
~/jul
I'm all for more utilities like QuickBMS. Exploding binary data into readable (and processable) text data is invaluable in reverse-engineering and this seems like a pretty darn good thing for doing that.

____________________
EOF
[1] 0:zsh*
"lane" 14:31 25-Jul-49
Next newer thread | Next older thread
Jul - Game Development/Mod Projects - Datamijn New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

27 database queries.
Query execution time:  0.076778 seconds
Script execution time:  0.009335 seconds
Total render time:  0.086113 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 301 - Warning: unescaped & or unknown entity "&page"
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 187 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 177 column 102 - Warning: unescaped & or unknown entity "&postid"
line 179 column 74 - Warning: <style> isn't allowed in <td> elements
line 179 column 9 - Info: <td> previously mentioned
line 179 column 613 - Warning: <style> isn't allowed in <td> elements
line 179 column 9 - Info: <td> previously mentioned
line 179 column 3831 - Warning: '<' + '/' + letter not allowed here
line 184 column 20 - Warning: '<' + '/' + letter not allowed here
line 184 column 34 - Warning: '<' + '/' + letter not allowed here
line 188 column 21 - Warning: '<' + '/' + letter not allowed here
line 260 column 3603 - Warning: discarding unexpected </div>
line 260 column 3609 - Warning: discarding unexpected </div>
line 260 column 3615 - Warning: discarding unexpected </td>
line 263 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 265 column 9 - Warning: missing <tr>
line 283 column 13 - Warning: missing <tr>
line 284 column 102 - Warning: unescaped & or unknown entity "&postid"
line 286 column 74 - Warning: <style> isn't allowed in <td> elements
line 286 column 9 - Info: <td> previously mentioned
line 286 column 139 - Warning: missing </div>
line 289 column 17 - Warning: missing <tr>
line 289 column 17 - Warning: discarding unexpected <table>
line 292 column 35 - Warning: missing <tr>
line 292 column 50 - Warning: missing </font> before </td>
line 292 column 91 - Warning: missing </font> before </table>
line 294 column 35 - Warning: missing <tr>
line 294 column 50 - Warning: missing </font> before </td>
line 295 column 37 - Warning: unescaped & or unknown entity "&id"
line 294 column 187 - Warning: missing </font> before </table>
line 296 column 17 - Warning: discarding unexpected </textarea>
line 296 column 28 - Warning: discarding unexpected </form>
line 296 column 35 - Warning: discarding unexpected </embed>
line 296 column 43 - Warning: discarding unexpected </noembed>
line 296 column 53 - Warning: discarding unexpected </noscript>
line 296 column 64 - Warning: discarding unexpected </noembed>
line 296 column 74 - Warning: discarding unexpected </embed>
line 296 column 82 - Warning: discarding unexpected </table>
line 296 column 90 - Warning: discarding unexpected </table>
line 298 column 9 - Warning: missing </font> before <table>
line 310 column 25 - Warning: discarding unexpected </font>
line 319 column 37 - Warning: discarding unexpected </font>
line 297 column 1 - Warning: missing </center>
line 120 column 63 - Warning: <img> lacks "alt" attribute
line 125 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 125 column 93 - Warning: <img> lacks "alt" attribute
line 141 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 141 column 98 - Warning: <img> lacks "alt" attribute
line 148 column 45 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 144 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 248 - Warning: <img> proprietary attribute value "absmiddle"
line 160 column 16 - Warning: <img> proprietary attribute value "absmiddle"
line 160 column 16 - Warning: <img> lacks "alt" attribute
line 160 column 59 - Warning: <img> proprietary attribute value "absmiddle"
line 160 column 59 - Warning: <img> lacks "alt" attribute
line 160 column 102 - Warning: <img> proprietary attribute value "absmiddle"
line 160 column 102 - Warning: <img> lacks "alt" attribute
line 160 column 145 - Warning: <img> proprietary attribute value "absmiddle"
line 160 column 145 - Warning: <img> lacks "alt" attribute
line 161 column 22 - Warning: <img> lacks "alt" attribute
line 161 column 63 - Warning: <img> lacks "alt" attribute
line 161 column 112 - Warning: <img> lacks "alt" attribute
line 161 column 162 - Warning: <img> lacks "alt" attribute
line 162 column 11 - Warning: <img> lacks "alt" attribute
line 172 column 15 - Warning: <img> lacks "alt" attribute
line 248 column 1972 - Warning: <img> lacks "alt" attribute
line 250 column 2060 - Warning: <img> lacks "alt" attribute
line 268 column 22 - Warning: <img> lacks "alt" attribute
line 268 column 63 - Warning: <img> lacks "alt" attribute
line 268 column 111 - Warning: <img> lacks "alt" attribute
line 268 column 161 - Warning: <img> lacks "alt" attribute
line 269 column 11 - Warning: <img> lacks "alt" attribute
line 279 column 15 - Warning: <img> lacks "alt" attribute
line 295 column 45 - Warning: <img> proprietary attribute value "absmiddle"
line 295 column 144 - Warning: <img> proprietary attribute value "absmiddle"
line 295 column 248 - Warning: <img> proprietary attribute value "absmiddle"
line 304 column 25 - Warning: <img> lacks "alt" attribute
line 309 column 267 - Warning: <img> lacks "alt" attribute
line 149 column 50 - Warning: trimming empty <font>
line 289 column 17 - Warning: trimming empty <tr>
line 292 column 50 - Warning: trimming empty <font>
line 125 column 68 - Warning: <nobr> is not approved by W3C
line 141 column 68 - Warning: <nobr> is not approved by W3C
line 177 column 27 - Warning: <nobr> is not approved by W3C
line 284 column 27 - Warning: <nobr> is not approved by W3C
Info: Document content looks like HTML5
Info: No system identifier in emitted doctype
Tidy found 98 warnings and 0 errors!


The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md