Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming of extracted binaries seems to be wrong #229

Open
B-G-T opened this issue Nov 5, 2020 · 1 comment
Open

Naming of extracted binaries seems to be wrong #229

B-G-T opened this issue Nov 5, 2020 · 1 comment

Comments

@B-G-T
Copy link
Contributor

B-G-T commented Nov 5, 2020

The command
tttool segments "Grundschulwoerterbuch Englisch.gme"_
outputs a list with the games in the groups "Binaries 1", "Binaries 2" and "Binaries 3":

At 0x04C970F7 Size 208: Header/Binaries 1
At 0x04C971C7 Size 18912: Header/Binaries 1/Game01.b
At 0x04C9BBA7 Size 18804: Header/Binaries 1/Game02.b
At 0x04CA051B Size 17848: Header/Binaries 1/Game03.b
At 0x04CA4AD3 Size 18132: Header/Binaries 1/Game04.b
At 0x04CA91A7 Size 17376: Header/Binaries 1/Game05.b
At 0x04CAD587 Size 16272: Header/Binaries 1/Game06.b
At 0x04CB1517 Size 17656: Header/Binaries 1/Game07.b
At 0x04CB5A0F Size 17688: Header/Binaries 1/Game08.b
At 0x04CB9F27 Size 21060: Header/Binaries 1/Game09.b
At 0x04CBF16B Size 18476: Header/Binaries 1/Game10.b
At 0x04CC3997 Size 17692: Header/Binaries 1/Game11.b
At 0x04CC7EB3 Size 18008: Header/Binaries 1/Game12.b
At 0x04CCC537 Size 32: Header/Single binary 2
At 0x04CCC557 Size 19408: Header/Single binary 2/Main3202
At 0x04CD1153 Size 208: Header/Binaries 2
At 0x04CD1223 Size 18908: Header/Binaries 2/Game01.b
At 0x04CD5BFF Size 18800: Header/Binaries 2/Game02.b
At 0x04CDA56F Size 17844: Header/Binaries 2/Game03.b
At 0x04CDEB23 Size 18128: Header/Binaries 2/Game04.b
At 0x04CE31F3 Size 17372: Header/Binaries 2/Game05.b
At 0x04CE75CF Size 16268: Header/Binaries 2/Game06.b
At 0x04CEB55B Size 17652: Header/Binaries 2/Game07.b
At 0x04CEFA4F Size 17684: Header/Binaries 2/Game08.b
At 0x04CF3F63 Size 21056: Header/Binaries 2/Game09.b
At 0x04CF91A3 Size 18472: Header/Binaries 2/Game10.b
At 0x04CFD9CB Size 17688: Header/Binaries 2/Game11.b
At 0x04D01EE3 Size 18004: Header/Binaries 2/Game12.b
At 0x04D06563 Size 32: Header/Single binary 3
At 0x04D06583 Size 19116: Header/Single binary 3/Main3202
At 0x04D0B033 Size 4: Header/special symbols
At 0x04D0B05B Size 208: Header/Binaries 3
At 0x04D0B12B Size 18612: Header/Binaries 3/Game01.b
At 0x04D0F9DF Size 18504: Header/Binaries 3/Game02.b
At 0x04D14227 Size 17548: Header/Binaries 3/Game03.b
At 0x04D186B3 Size 17832: Header/Binaries 3/Game04.b
At 0x04D1CC5B Size 17076: Header/Binaries 3/Game05.b
At 0x04D20F0F Size 15976: Header/Binaries 3/Game06.b
At 0x04D24D77 Size 17356: Header/Binaries 3/Game07.b
At 0x04D29143 Size 17388: Header/Binaries 3/Game08.b
At 0x04D2D52F Size 20760: Header/Binaries 3/Game09.b
At 0x04D32647 Size 18176: Header/Binaries 3/Game10.b
At 0x04D36D47 Size 17392: Header/Binaries 3/Game11.b
At 0x04D3B137 Size 17708: Header/Binaries 3/Game12.b

The naming of the binaries created by the export command
tttool binaries "Grundschulwoerterbuch Englisch.gme"
results in a slightly different numbering which seems to be wrong:

"1_Game01.b"
"1_Game02.b"
"1_Game03.b"
"1_Game04.b"
"1_Game05.b"
"1_Game06.b"
"1_Game07.b"
"1_Game08.b"
"1_Game09.b"
"1_Game10.b"
"1_Game11.b"
"1_Game12.b"
"2_Game01.b"
"2_Game02.b"
"2_Game03.b"
"2_Game04.b"
"2_Game05.b"
"2_Game06.b"
"2_Game07.b"
"2_Game08.b"
"2_Game09.b"
"2_Game10.b"
"2_Game11.b"
"2_Game12.b"
"3_Main3201"
"4_Main3202"
"5_Main3202"
"6_Game01.b"
"6_Game02.b"
"6_Game03.b"
"6_Game04.b"
"6_Game05.b"
"6_Game06.b"
"6_Game07.b"
"6_Game08.b"
"6_Game09.b"
"6_Game10.b"
"6_Game11.b"
"6_Game12.b"

@nomeata
Copy link
Member

nomeata commented Nov 6, 2020

Indeed, internally it just numbers the different groups in the order they appear in the file:

    ttBinaries1 <- fromMaybe [] <$> maybeIndirection "Binaries 1" getBinaries
    ttSpecialOIDs <- maybeIndirection "special symbols" getSpecials
    ttBinaries2 <- fromMaybe [] <$> maybeIndirection "Binaries 2" getBinaries

    jumpTo 0x00A0
    ttBinaries3 <- fromMaybe [] <$> maybeIndirection "Single binary 1" getBinaries
    getWord32 --ignored
    ttBinaries4 <- fromMaybe [] <$> maybeIndirection "Single binary 2" getBinaries

    jumpTo 0x00C8
    ttBinaries5 <- fromMaybe [] <$> maybeIndirection "Single binary 3" getBinaries
    ttBinaries6 <- fromMaybe [] <$> maybeIndirection "Binaries 3" getBinaries

I guess this could be cleaned up, although not high priority (those few who are playing around with the binaries can look at this issue to learn about the naming convention).

If we learn more about the meaning of these groups (e.g. how the groups map to pen versions(?)), we can maybe use that for a more helpful naming convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants