1. Друзья, в это тяжёлое и непонятное для всех нас время мы просим вас воздержаться от любых упоминаний политики на форуме, - этим ситуации не поможешь, а только возникнут ненужные ссоры и обиды. Это касается также шуток и юмора на тему конфликта. Пусть войны будут только виртуальными, а политики решают разногласия дипломатическим путём. С уважением, администрация Old-Games.RU.

    Скрыть объявление
  2. Если Вы видите это сообщение, значит, вы ещё не зарегистрировались на нашем форуме.

    Зарегистрируйтесь, если вы хотите принять участие в обсуждениях. Перед регистрацией примите к сведению:
    1. Не регистрируйтесь с никами типа asdfdadhgd, 354621 и тому подобными, не несущими смысловой нагрузки (ник должен быть читаемым!): такие пользователи будут сразу заблокированы!
    2. Не регистрируйте больше одной учётной записи. Если у вас возникли проблемы при регистрации, то вы можете воспользоваться формой обратной связи внизу страницы.
    3. Регистрируйтесь с реально существующими E-mail адресами, иначе вы не сможете завершить регистрацию.
    4. Обязательно ознакомьтесь с правилами поведения на нашем форуме, чтобы избежать дальнейших конфликтов и непонимания.
    С уважением, администрация форума Old-Games.RU
    Скрыть объявление

A Nightmare on Elm Street

Тема в разделе "International Zone", создана пользователем hrvg54, 10 сен 2022.

  1. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    Hi, I would like to know if you translate this game: A Nightmare on Elm Street. I have the tool to modify the font of this game. Translating the LEVELS.BIN file is not a problem... But the DREAM.EXE file There is no problem translating the LEVELS.BIN file. But, I can't find the pointers to this DREAM.EXE file. Can you help me ? I have the tool from Nyerguds to modify the font. I can send you the tool.
     
  2.  
  3. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    1. unpack DREAM.EXE if you didn't already

    Код:
    UNP 4.12ß Executable file restore utility, written by Ben Castricum, 08/27/95
    
    processing file : DREAM.EXE
    DOS file size   : 114765
    file-structure  : executable (EXE)
    EXE part sizes  : header 512 bytes, image 114253 bytes, overlay 0 bytes
    processed with  : EXEPACK V4.05 or V4.06
    action          : decompressing... done
    new file size   : 130272
    writing to file : DREAM.EXE
    2. Load DREAM.EXE to IDA Pro. I'm using IDA Pro 5.0 Freeware version.

    3. Select any message to search for pointer. For example this one:

    Код:
    dseg:318B                 db  44h ; D
    dseg:318C                 db  61h ; a
    dseg:318D                 db  72h ; r
    dseg:318E                 db  6Eh ; n
    dseg:318F                 db  2Ch ; ,
    dseg:3190                 db  20h
    dseg:3191                 db  74h ; t
    dseg:3192                 db  68h ; h
    dseg:3193                 db  65h ; e
    dseg:3194                 db  20h
    dseg:3195                 db  63h ; c
    dseg:3196                 db  68h ; h
    dseg:3197                 db  61h ; a
    dseg:3198                 db  69h ; i
    dseg:3199                 db  6Eh ; n
    dseg:319A                 db  20h
    dseg:319B                 db  62h ; b
    dseg:319C                 db  72h ; r
    dseg:319D                 db  6Fh ; o
    dseg:319E                 db  6Bh ; k
    dseg:319F                 db  65h ; e
    dseg:31A0                 db  2Eh ; .
    dseg:31A1                 db  0Dh
    dseg:31A2                 db    0
    remember offset of first character - 318B

    4. Put cursor at the start of file (CTRL+PgUp) and search for string "318B" (menu Search - text... or ALT+T). The string "318B" should be somewhere in code, not in address column (continue search with CTRL+T)!

    Skip this (with CTRL+T), because here value "318B" is in address column:
    Код:
    seg001:318B                 pop     cx
    And here is the pointer to string:
    Код:
    seg002:1BC1                 mov     ax, 318Bh
    seg002:1BC4                 push    ax
    seg002:1BC5                 call    sub_59C4
    place cursor on "318Bh" and convert it to pointer (Menu Edit - Operand type - Offset - Offset data segment, or simply press O):

    Код:
    seg002:1BC1                 mov     ax, offset aDarnTheChainBr ; "Darn, the chain broke.\r"
    seg002:1BC4                 push    ax
    seg002:1BC5                 call    sub_59C4
    5. Put cursor on "sub_59C4" and press X to display all places where function sub_59C4 is called. Move to every place and covert AX value to offset:

    Код:
    seg001:1B95                 mov     ax, 2BAEh
    seg001:1B98                 push    ax
    seg001:1B99                 call    sub_59C4
    ...
    seg001:1CA2                 mov     ax, 2BC9h
    seg001:1CA5                 push    ax
    seg001:1CA6                 call    sub_59C4
    6. Repeat steps 3-5 for messages, that used in other functions.
    --- добавлено 11 сен 2022, предыдущее сообщение размещено: 10 сен 2022 ---
    P.S. could be not AX. For example, here:

    Код:
    seg007:135D                 push    word ptr [bx+0E1Bh]
    seg007:1361                 call    sub_59C4
    it's array of items. Put cursor on 0E1Bh and convert to offset:

    Код:
    seg007:135D                 push    word ptr off_16B5B[bx]
    seg007:1361                 call    sub_59C4
    now this array in dseg looks like this:
    Код:
    dseg:0E1B off_16B5B       dd aGoldCoins           ; DATA XREF: sub_105AD+D0r
    dseg:0E1B                                         ; sub_105AD+CCr
    dseg:0E1B                                         ; "Gold Coins"
    dseg:0E1F                 dd aBaseballBat         ; "Baseball Bat"
    dseg:0E23                 dd aMagicShield         ; "Magic Shield"
    dseg:0E27                 dd aHandGrenade         ; "Hand Grenade"
    dseg:0E2B                 dd aDagger              ; "Dagger"
    dseg:0E2F                 dd aPick                ; "Pick"
    dseg:0E33                 dd aAxe                 ; "Axe"
    and it points to item names:
    Код:
    dseg:1A93 aGoldCoins      db 'Gold Coins',0       ; DATA XREF: dseg:off_16B5Bo
    dseg:1A9E aBaseballBat    db 'Baseball Bat',0     ; DATA XREF: dseg:0E1Fo
    dseg:1AAB aMagicShield    db 'Magic Shield',0     ; DATA XREF: dseg:0E23o
    dseg:1AB8 aHandGrenade    db 'Hand Grenade',0     ; DATA XREF: dseg:0E27o
    dseg:1AC5 aDagger         db 'Dagger',0           ; DATA XREF: dseg:0E2Bo
    dseg:1ACC aPick           db 'Pick',0             ; DATA XREF: dseg:0E2Fo
    dseg:1AD1 aAxe            db 'Axe',0              ; DATA XREF: dseg:0E33o
     
    Последнее редактирование: 13 сен 2022
    Uka, bvedargh и Dimouse нравится это.
  4. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    Hi Off_rus,

    Thank you for your answer and your help.
    I will study your explanations, thank you.

    Regards,
     
  5. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    Hi,
    I found a table of pointers (screenshot 0). The pointers are xx xx D4 15 (15 D4 xx xx).
    Pointers (blue) are not for texts: Menu, load, save, etc. (screenshot 1).

    I tried with IDA. I had no problem with paragraphs 1, 2 and 3 (screenshot 2). I do not understand paragraph 4, sorry.

    Could you please explain to me.

    Regards.
     

    Вложения:

    • 0.png
      0.png
      Размер файла:
      56,9 КБ
      Просмотров:
      45
    • 1.png
      1.png
      Размер файла:
      102 КБ
      Просмотров:
      38
    • 2.png
      2.png
      Размер файла:
      22,7 КБ
      Просмотров:
      42
  6. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    I see something wrong on screenshot #2. Dos games from 1989 (see link to MobyGames) can't have dseg with 17069 offset. Programs in those days just were not able to address data in such a segment with 16-bit registers.

    A Nightmare on Elm Street licensees

    Did you loaded file to IDA as DOS Executable?
     

    Вложения:

  7. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    Hi OFF_rus,

    I see something wrong on screenshot #2. Dos games from 1989 (see link to MobyGames) can't have dseg with 17069 offset. Programs in those days just were not able to address data in such a segment with 16-bit registers.

    I do not know. I am a novice in computer.

    Did you loaded file to IDA as DOS Executable?

    Yes.
    I opened "DREAM.EXE" file and clicked OK then YES.
     

    Вложения:

    • 10.png
      10.png
      Размер файла:
      55,8 КБ
      Просмотров:
      40
    • 11.png
      11.png
      Размер файла:
      34,3 КБ
      Просмотров:
      37
    • 12.png
      12.png
      Размер файла:
      32,6 КБ
      Просмотров:
      38
  8. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    Последнее редактирование: 25 сен 2022
  9. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    "Possibly packed" on your last screenshot looks suspicious. Did you really unpacked EXE as I mentioned in paragraph 1?

    I have not done "1. unpack DREAM.EXE if you didn't already"
    I thought it was IDA.

    I downloaded "UNP.ver.4.12.English.zip". It is correct ?
     
  10. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    Yes.
     
  11. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    I am going to think about paragraph 1.
    But, I think it exceeds my little level in computer science.

    I like to find the pointers directly in the file to be translated.

    I thank you for your help.

    Regards.
     
  12. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    In packed EXE, pointer could be, you know, packed :)

    To unpack EXE you should run program like this:
    Код:
    unp dream.exe
    UNP is DOS program, so you should do this in DOSBox, or some other DOS environment.

    Or I can unpack your EXE if you send it to me.
     
  13. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    I thank you for your help and your patience.

    To unpack EXE you should run program like this:
    Code:

    unp dream.exe

    UNP is DOS program, so you should do this in DOSBox, or some other DOS environment.


    Ok.
    I unzipped the "UNP.ver.4.12.English.zip" file in the game folder.
    I launched UNP.EXE with DosBox.
    I typed "unp dream.exe"
    Is it correct?
    I have x extra files in the game folder and 5 folders??? I only have 2 folders in the game folder.
    It is normal ?
    --- добавлено 25 сен 2022, предыдущее сообщение размещено: 25 сен 2022 ---
    I have this now with IDA. (screenshot 22)

    My game clean :
    Nightmar 1.zip
    --- добавлено 25 сен 2022 ---
    In packed EXE, pointer could be, you know, packed

    I found the table of pointers for 3 text blocks out of 11 text blocks. But, I can not find the table of pointers for the other 8 text blocks... Why?
     

    Вложения:

    • 20.png
      20.png
      Размер файла:
      45,5 КБ
      Просмотров:
      38
    • 21.png
      21.png
      Размер файла:
      156,7 КБ
      Просмотров:
      32
    • 22.png
      22.png
      Размер файла:
      53 КБ
      Просмотров:
      39
  14. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    Yes.

    I see on your screenshow, that final size of the DREAM.EXE is 130272. It does not write information about original packed size, probably because you run it second time to make screenshot, when I run it on DREAM.EXE from your "Nightmar 1.zip" it writes me this:

    Код:
    UNP 4.12 Executable file restore utility, written by Ben Castricum, 05/19/97
    
    processing file : DREAM.EXE
    DOS file size   : 114765
    file-structure  : executable (EXE)
    EXE part sizes  : header 512 bytes, image 114253 bytes, overlay 0 bytes
    processed with  : EXEPACK V4.05 or V4.06
    action          : decompressing... done
    new file size   : 130272
    writing to file : DREAM.EXE[code]
    Final size 130272 - exactly as in your screenshot.
    --- добавлено 25 сен 2022, предыдущее сообщение размещено: 25 сен 2022 ---
    Write me what text is in some of these blocks, and I will check (now, that I have the same file as you have it will be easier to do).
     
  15. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    Ok.
    DREAM.EXE with IDA and I tried several times to test and without knowing UNP.EXE. Because I was discovering IDA. I will delete the game and take the clean game (copy).

    Here are the text blocks (screenshot).
    I think screenshot 45 does not need to be translated.

    My idea is to recover bytes on blocks of texts and to be able to change the too long sentences in the spaces that I freed up, like screenshot 31.


    I am an old man... Can we resume tomorrow, please?

    I thank you for your help and your patience.
     

    Вложения:

    • 30.png
      30.png
      Размер файла:
      88 КБ
      Просмотров:
      35
    • 31.png
      31.png
      Размер файла:
      79,8 КБ
      Просмотров:
      36
    • 40.png
      40.png
      Размер файла:
      98,7 КБ
      Просмотров:
      39
    • 41.png
      41.png
      Размер файла:
      88,8 КБ
      Просмотров:
      30
    • 42.png
      42.png
      Размер файла:
      71 КБ
      Просмотров:
      35
    • 43.png
      43.png
      Размер файла:
      96,7 КБ
      Просмотров:
      30
    • 44.png
      44.png
      Размер файла:
      91,5 КБ
      Просмотров:
      30
    • 45.png
      45.png
      Размер файла:
      91,3 КБ
      Просмотров:
      32
    • 46.png
      46.png
      Размер файла:
      78,4 КБ
      Просмотров:
      27
  16. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    Hi,

    I would like to find the pointer of this sentence to retrieve the 9 bytes (octets) of the previous sentence.

    Find Freddy's house, before he finds you!
     

    Вложения:

    • 53.png
      53.png
      Размер файла:
      70,4 КБ
      Просмотров:
      29
    Последнее редактирование: 26 сен 2022
  17. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    In IDA 5:
    1. Menu Jump -> jump to file offset... -> address from you screenshot 1A7C0
    2. Remember/copy offset of this string inside the dseg segment - dseg:2BC9
    3. Menu Search -> text... -> String = "2BC9", put mark on "Find all occurences".
    4. IDA will search and open results in new tab
    5. Go to second place (double clicking on second row)
    6. You can get Offset of this code in EXE file In left bottom angle of code window. If you'll view "Hex View-A" tab, you'll see that this row of code consists of 3 bytes and 2 of them are your offset. Or you can activate Options -> General -> Disassembly -> Display disassembly line parts -> Number of opcode bytes to 4-5:

    7. Now you can patch your EXE and move string to 9 bytes and patch this offset in code.
     

    Вложения:

  18. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    I understood. :good:
    It is simple when a person explains... :lol:
    Thank you very much for your help and your patience.

    Good day.
    Regards.
    --- добавлено 26 сен 2022, предыдущее сообщение размещено: 26 сен 2022 ---
    I declared victory too soon. Because, I do not find the pointer of "No" in 0x1c848.
    I did: 3. Menu Search -> text... -> String = "4C48", put mark on "Find all occurrences".
    I do not have an address. See screenshot :banghead:
     

    Вложения:

    • fin.png
      fin.png
      Размер файла:
      60 КБ
      Просмотров:
      31
    • no.png
      no.png
      Размер файла:
      20,4 КБ
      Просмотров:
      32
    • no 0.png
      no 0.png
      Размер файла:
      61 КБ
      Просмотров:
      30
    Последнее редактирование: 26 сен 2022
  19. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    I have another problem. LEVEL = NIVEAU (+1 byte). Which makes NIVEAU4 instead of NIVEAU 4. Can we move the word LEVEL to the left or the number to the right?
     

    Вложения:

    • 60.png
      60.png
      Размер файла:
      42,1 КБ
      Просмотров:
      38
    • 61.png
      61.png
      Размер файла:
      72,5 КБ
      Просмотров:
      30
  20. oFF_rus .

    oFF_rus

    Хелпер

    Регистрация:
    25 фев 2007
    Сообщения:
    2.139
    For me this looks like some type of structure - Structures in Assembly

    Код:
    dseg:4C3C                 db  0Dh
    dseg:4C3D                 db    6
    dseg:4C3E                 db    0
    dseg:4C3F                 db    2
    dseg:4C40                 db  0Eh
    dseg:4C41                 db  4Fh ; O
    dseg:4C42                 db  75h ; u
    dseg:4C43                 db  69h ; i
    dseg:4C44                 db    6
    dseg:4C45                 db  0Fh
    dseg:4C46                 db    2
    dseg:4C47                 db    0
    dseg:4C48                 db  20h
    dseg:4C49                 db  4Eh ; N
    dseg:4C4A                 db  6Fh ; o
    dseg:4C4B                 db    0
    Structures are usually addressed in programs as a whole entity and fields inside structures are addressed by offsets from structure start.

    Let's assume that it is a structure and it starts where previous data ends - at dseg:4C3C.
    Search for "4C3C" returns two meaningful results:

    Код:
    seg012:0F55                 mov     ax, 4C3Ch
    seg012:0F58                 push    ax
    seg012:0F59                 push    cs
    seg012:0F5A                 call    near ptr sub_129E3
    
    and

    Код:
    seg012:1022                 mov     ax, 4C3Ch
    seg012:1025                 push    ax
    seg012:1026                 push    cs
    seg012:1027                 call    near ptr sub_129E3
    Procedure sub_129E3 is used with many normal messages, we can name it "DisplayMessage()". And we can search for it usages with "X" key as described in my first message.

    Pointer to "Qui" or/and " No" inside this structure probably is calculated somewhere inside sub_129E3 procedure according to some other variable (SI register?).
    --- добавлено 26 сен 2022, предыдущее сообщение размещено: 26 сен 2022 ---
    You already moved phrase "Find Freddy's house, before he finds you!", why not move this "LEVEL"/"NIVEAU" somewhere where you have freed some space?
    --- добавлено 26 сен 2022 ---
    Код:
    seg001:27CD                 mov     ax, 8
    seg001:27D0                 push    ax
    seg001:27D1                 mov     ax, 0Fh
    seg001:27D4                 push    ax
    seg001:27D5                 mov     ax, 7
    seg001:27D8                 push    ax
    seg001:27D9                 mov     ax, 0Ah
    seg001:27DC                 push    ax
    seg001:27DD                 push    ds
    seg001:27DE                 mov     ax, offset aLevel ; "LEVEL"
    seg001:27E1                 push    ax
    seg001:27E2                 call    DisplayMessage
    seg001:27E7                 add     sp, 0Ch
    seg001:27EA                 mov     ax, 8
    seg001:27ED                 push    ax
    seg001:27EE                 mov     ax, 0Fh
    seg001:27F1                 push    ax
    seg001:27F2                 mov     ax, 7
    seg001:27F5                 push    ax
    seg001:27F6                 mov     ax, 10h
    seg001:27F9                 push    ax
    seg001:27FA                 push    di
    seg001:27FB                 call    DisplayNumber
    seg001:2800                 add     sp, 0Ah
    These "push" instructions are probably parameters for these functions. Last "ax" before calling function is offset to message. "ds" is segment of message (dseg for strings). Let's assume that next two values are coordinates to place message to. Parameters could be put to function in reverse order, so "LEVEL" is placed to (0Ah, 07h) and level number is place to (10h, 07h). Same row (7) and columns 10 (0Ah) and 16 (10h).

    So, try to change column (10h) for number.
     
  21. hrvg54

    hrvg54

    Регистрация:
    8 мар 2020
    Сообщения:
    190
    Hi,
    I am lost. I do not understand.
    I have 3 free bytes. But it is same. (screenshot)

    Could we move this structure where there is space to add bytes to the two "No" (Non)? In 0x1a23b.

    I am unable to do of these two things. It is too technical.
    Can you modify these two things (Niveau and two No (Non)), please?

    Here is the file I am working:
    DREAM.7z
    --- добавлено 27 сен 2022, предыдущее сообщение размещено: 27 сен 2022 ---
    I am happy. Niveau issue is fixed.

    Modified DREAM.EXE file:
    DREAM.7z
     

    Вложения:

    • niveau 0.png
      niveau 0.png
      Размер файла:
      63,3 КБ
      Просмотров:
      37
    • Sans titre.png
      Sans titre.png
      Размер файла:
      31,7 КБ
      Просмотров:
      34
  1. На этом сайте используются файлы cookie, чтобы персонализировать содержимое, хранить Ваши предпочтения и держать Вас авторизованным в системе, если Вы зарегистрировались.
    Продолжая пользоваться данным сайтом, Вы соглашаетесь на использование нами Ваших файлов cookie.
    Скрыть объявление