Look into Crimson Room DS

Discussion in 'NDS - ROM Hacking and Translations' started by psycoblaster, Dec 7, 2008.

Dec 7, 2008

Look into Crimson Room DS by psycoblaster at 3:06 PM (3,261 Views / 0 Likes) 17 replies

  1. psycoblaster
    OP

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    In this game, it seems like mainly, only 6 files needs editing.

    First of all, the font.
    the font is a basic NFTR 12x12 (but 11x11, shadows probably takes the extra 1 pixel)
    It is called lc1212_utf16.NFTR
    By the utf16 in the font name, you'll know straight away that the game uses unicode than s-jis.
    So a look into the font..
    [​IMG]
    Because it is a unicode font, there are LOTS of characters inside. The full font is about 2 times of what you see in the picture, with the english characters at the end. To be able to translate this game, a VWF is necessary, and changing the character map for the english characters to single byte characters might also help.

    Now a look into the script files.
    As I thought, the script files were the incs files.
    The header was quite long, so I only looked at the first portion, and skipped through the rest.
    [​IMG]

    0x00000000 ~ 0x00000003 (the red part) INC magic header
    0x00000004 ~ 0x00000007 (the yellow part) probably the particular header size? It was 14 for every INC file in this ROM, so that's what I think.
    0x00000008 ~ 0x0000000B (blue) file size
    0x0000000C ~ 0x0000000F (green) pointer to pointer table

    Because the pointer to the pointer table is E4 31 02 00, with a flip, that is 0x000231E4. Now at that location...
    [​IMG]
    you can see that it is aligned by 4 bytes.
    The first pointer in this file is 4C 36 02 00, so in offset 0x0002364C, (remember to set your table as a unicode (codepage 1200)) you will see the text CRoom.
    [​IMG]
    But as you see, below it is some non-dialogue text, so let's skip this part and scroll a little below...
    in offset 0x00023DF8, you can start to see some text.
    [​IMG]
    Just in case... do a search for the hex value F8 3D 02 00.. it's found in offset 0x00023348. So once this text moves to somewhere else, you can just change this byte to whatever you wish.
    So, if your file size has increased due to translation, you should remember to change the byte on the header.

    So before a translation starts for this game, a VWF is necessary, so you can fit english characters in the game.
    There are barely any graphics that needs to be changed, so you won't need to worry about that.
    But because the font is an NFTR font, editing shouldn't be too hard.

    I have also done some testing for increasing the file size for these text files.
    The file size of this file was 152036 bytes (the value in the header in decimal form)
    I made a new file that was 160000 bytes in crystaltile2, and imported all data, and inserted a text in the extra space in the end.
    [​IMG]
    Then I switched the pointer that originally pointed to 0x000242A6 to the new offset 0x00025344
    [​IMG]
    Then finally I edited the header of the file to the new size just in case it would crash.

    then tested after repacking with dslazy...
    [​IMG]
    works [​IMG]

    Now finally, a look into the graphic files.
    It looks like the format is
    NBGCR (BG = background)
    NSPCR (SP = sprite)

    Both have the same header.
    0x00000000 ~ 0x00000007 SOLCOMP magic stamp (solo compression, probably?)
    0x00000008 flag 10, meaning it is compressed in LZ77. from offset 8, do an lz77 decompression and you will find out it is a simple NARC file.

    the SDMD files doesn't require any editing.

    The arm9.bin contains SOME script. Probably the text you see in the main menu, such as "do not turn your DS OFF" etc, and the text you see before you select a room, like "CRIMSON ROOM" "Blue Chamber" etc are there.




    so overall, the file system is really basic, and I recommend this game to anybody that wants to start romhacking.
     
  2. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    it's straight not strait [​IMG]
     
  3. psycoblaster
    OP

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    fixed lol
     
  4. cosmiccow

    Member cosmiccow Original Hippie

    Joined:
    Feb 5, 2008
    Messages:
    1,125
    Country:
    Germany
    oh my. that's some great work psycoblaster. though i still can't translate it as i'm a noob to this - hope someone else with more experience in romhacking can do it [​IMG]
     
  5. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    What's this game? it's my first time hearing it.
     
  6. psycoblaster
    OP

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    It is a flashgame, ported to the DS. It's like a room escape game.
     
  7. War

    Member War Take it easy~

    Joined:
    Oct 26, 2007
    Messages:
    5,409
    Location:
    California
    Country:
    Japan
    OMG I LOVE ROOM ESCAPE GAMES D: Are you gonna start working on this, psyco?
     
  8. psycoblaster
    OP

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    would I? [​IMG]
    I'm still busy with my final fantasy 12 korean translation, but it won't be too bad taking a break from it for some time because there really aren't much text in crimson room DS.
     
  9. kesadisan

    Member kesadisan GBAtemp Regular

    Joined:
    Oct 13, 2008
    Messages:
    176
    Location:
    Farplane
    Country:
    Indonesia
    i try it, even it would be taking long time
    but since i'm no hacking master or just noob wanna hack
    maybe give me a little tutor
    since i finished this flash game for long time, and remember all the words.
    put me in...!
     
  10. WildWon

    Former Staff WildWon EXTERMINATE!

    Joined:
    Apr 4, 2008
    Messages:
    2,814
    Location:
    8-Bit Heaven
    Country:
    United States
    Oh wow. i LOVE these games. Played through all the flash versions. I would start again on the DS if they'd even be half-assed working on the DS lol.

    *IF* i could help, i would... in a heartbeat. The downside is that i've never done any work like this before, so i have NO clue where to start.

    I pray someone works on this. [​IMG]
     
  11. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    Psycoblaster will work on this.
     
  12. psycoblaster
    OP

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    naw I never said that yet :|
    I'm still testing stuff out.
    The game uses 12 as a width, so even if I edit the font, it still wouldn't work.
    I'm thinking of creating a font with 2 letters per tile. But that would take forever [​IMG]
     
  13. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    Don't tell me I made the font for nothing [​IMG]
    mkay, do whatever you want.
     
  14. psycoblaster
    OP

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    To bypass the 12 font, what has been done was this:
    [​IMG]
    I just did it so each tile has 2 characters instead of 1.
    This also saves bytes, because 2 characters are displayed with 2 bytes.
    The only problem about this bitmap is the thin characters like the "i", "l", etc.
    ALL the letters will basically take 5 pxls, because I'm too lazy to manually add that stuff :|

    the algorithm to create such a font is really simple.
    First, I've created a 6x11 bitmap font, and I've applied a map file to it. The map file works similar to the for loop of how the table generation works.
    CODEÂÂÂÂÂÂÂÂfor (i = 'A'; i
     
  15. HernanZh

    Member HernanZh GBAtemp Regular

    Joined:
    Apr 6, 2008
    Messages:
    178
    Location:
    The Netherlands
    Country:
    Netherlands
    Lol, funny workaround. It does the job I guess.
     
  16. litium

    Member litium GBAtemp Regular

    Joined:
    Mar 19, 2008
    Messages:
    196
    Location:
    Argentina
    Country:
    Argentina
    Thanks for the info, i'll pick this up to try something. I hope this teahces me something along the way.
     
  17. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    He obviously didn't do all this hacking for nothing.
     
  18. psycoblaster
    OP

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    As I have no knowledge in assembly, it's what I thought could work XD
    but after testing, I figured out that this game's width isn't hardcoded as 12, though, the width table seems to be located somewhere else.
    I took a brief look into the arm9 but couldn't find anything on my first quick glance.
    But then what works is that this font is almost as similar as using single byte characters, so it is also a way to save bytes.
     

Share This Page