[RELEASE] fw2nds - build firmware.nds from firmware.bin

Discussion in 'NDS - Emulation and Homebrew' started by dr1ft, Jun 25, 2018.

  1. dr1ft
    OP

    dr1ft Advanced Member

    Newcomer
    2
    Mar 2, 2018
    United States
    ?????
    so over the past couple of days ive been working on reverse engineering firmware.nds to understand how it worked. i didnt expect to make any progress, but somehow i managed to figure out exactly how it works.

    ive managed to develop a single tool that automatically converts a firmware.bin file into a firmware.nds with no user interaction other than dragging the bin file onto the exe

    has been tested with 7 different English firmware revisions and all FlashMe v8 variations

    this is important because firmware.nds cannot be legally distributed due to containing substantial portions of the ds firmware, but now we can build our own using legal means :)

    have fun, and be sure to report any issues you have in this thread

    ill be making a more in-depth writeup of how this all works in the near future so stay tuned for that
     

    Attached Files:

    Last edited by dr1ft, Jun 28, 2018
  2. Coto

    Coto

    Member
    6
    Jun 4, 2010
    Chile
    Dr1ft == endrift?

    Hope to see more development. Thanks!!
     
    dr1ft likes this.
  3. ChampionLeake

    ChampionLeake NTR/TWL Exploiter

    Member
    3
    Jan 19, 2016
    United States
    Nice work!
     
    dr1ft likes this.
  4. dr1ft
    OP

    dr1ft Advanced Member

    Newcomer
    2
    Mar 2, 2018
    United States
    ?????
    if someone else is called endrift, im not them :P
     
  5. bilibili2011

    bilibili2011 Newbie

    Newcomer
    1
    Nov 25, 2014
    France
    Very nice and interesting , looking forward to source code
     
  6. FAST6191

    FAST6191 Techromancer

    pip Reporter
    21
    Nov 21, 2005
    United States
    Nice. We have had quite a few people over the years wanting shots, sound samples, video and more of the DS firmware/menu. Would be nice to have a simple point people at it type solution.

    Will you include a PC editor so people can still change the colour, birthday, name... settings of these new .nds files? Or indeed might you be able to force it to use the same offsets somehow?
     
  7. dr1ft
    OP

    dr1ft Advanced Member

    Newcomer
    2
    Mar 2, 2018
    United States
    ?????
    well, this doesnt let you do anything you couldnt already do with a competent emulator that supported firmware dumps. also, the settings are contained in nvram and this makes no attempt to store them in the file. you *could* do that with additional patches, but i dont see *why* you would... this is mostly intended for helping with my personal obsession of running the original ds firmware on every iteration of the ds :P
     
  8. Sha8q

    Sha8q pls help

    Member
    2
    Mar 31, 2018
    Jamaica
    Is the firmware.nds the original DS's firmware? The DS Lite's firmware hadn't publicly been released. I have several flashcards and a DS Lite. If you need the firmware to it, I could provide it.
     
  9. dr1ft
    OP

    dr1ft Advanced Member

    Newcomer
    2
    Mar 2, 2018
    United States
    ?????
    i have a ton of firmwares so im not too concerned with that
    feel free to send it my way anyway though, the more the merrier
     
  10. FAST6191

    FAST6191 Techromancer

    pip Reporter
    21
    Nov 21, 2005
    United States
    I vaguely recall a few years back around the time the pictochat trick got released or rediscovered (well after the DS lite was released as well) that everybody got all the versions going on put into a pack of all of them.

    I don't know about the Korean ones and ique models as they might still have a version or two that did not get dumped (still got some examples though) but as far as mainstream DS models from the usual regions then all firmwares and revisions should be out there, and likely have for many years now.

    Edit. Or if you prefer there is a reason flashme was able to backport the DS lite brightness adjustment for those later revisions of DS with the relevant chip.
     
  11. dr1ft
    OP

    dr1ft Advanced Member

    Newcomer
    2
    Mar 2, 2018
    United States
    ?????
    the set i have is mostly from noflashme.nds, they're not complete dumps but enough to build a firmware.nds from
     
  12. Sha8q

    Sha8q pls help

    Member
    2
    Mar 31, 2018
    Jamaica
    Oh
     
  13. dr1ft
    OP

    dr1ft Advanced Member

    Newcomer
    2
    Mar 2, 2018
    United States
    ?????
    well, it took me long enough, but there's a zip file attached in OP with source code in binaries now

    EDIT: is there some way i can change the thread title to [RELEASE] instead of [Very WIP]?
     
    Last edited by dr1ft, Jun 28, 2018
  14. Robz8

    Robz8 Coolest of TWL

    Member
    15
    Oct 1, 2010
    United States
    Report the OP to request to change title.
    I've done this plenty of times. :P
     
    dr1ft likes this.
  15. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    15
    Oct 7, 2007
    United States
    Levelland, Texas
    snapshot20180629005325.jpg

    ( ͡° ͜ʖ ͡°)


    It doesn't actually boot the game yet though. Big thanks to dr1ft for helping me with this. I managed to get a bootstrap program that launches his firmware.nds SRL and got it to work on 3DS. :D

    There's a few things that need to be in ram before firmware srl boots before it will show a game in slot-1. After checking in No$GBA it seems the game's arm binaries are already loaded into ram by the time you reach that screen. I guess NDS BIOS/bootrom loads those into ram? Not sure when that is happening. Firmware SRL doesn't seem to be doing it on it's own though. It is able to load the game's icon data. (it will hang too if I remove cart before it boots or eject cart while it's running just like on real DS consoles) My bootstrap only puts cart's header and a few other tidbits in the needed parts of ram. (refer to this to see what I mean: https://problemkaputt.de/gbatek.htm#biosramusage ). But those are data I compiled directly into the source code and aren't pulling that from the cart in slot-1 yet so my build was hard coded to only show Mario 64. (and will hang on boot if you attempt to use a different cart. :P )

    Cart loading code is a bit beyond me so someone else will have to pick up where I left off. dr1ft has the source to the bootstrap I used to boot this. Hopefully he can get something going with this. :D
     
    Last edited by Apache Thunder, Jun 29, 2018
  16. DeadSkullzJr

    DeadSkullzJr GBAtemp Advanced Fan

    Member
    4
    Sep 28, 2017
    United States
    GBA games, flashcarts, and other various extensions work perfectly with these. dumped quite a few firmwares, obviously the DSi firmware won't work for obvious reasons, creating a firmware.nds from the New Nintendo 3DS DS mode dump doesn't seem to work, it did work with the Old Nintendo 3DS DS mode dump though, turns out my old 3DS uses a v4 Phat firmware in DS mode :P
     
Loading...