1. mrmole

    OP mrmole Member
    Newcomer

    Joined:
    Jul 20, 2018
    Messages:
    32
    Country:
    United Kingdom
    So I had a quick look at Dark Souls Remastered file structure and essentially you could mod the movies more or less straight away, however the textures, sounds etc. are contained in BDT file. BDT file is a zlib archive that uses BHD5 for file indexing. You could do a raw extraction of BDT using something like Offzip, however you will not be able to put it back together. So the challenge is to find the right offsets used by the BHD5 header, so we can repack it.

    I have tried to use the already available tools for BDT extraction, however they all seem to not work anymore. The BDT and BHD5 sizes are changed.

    So does anybody have any experience in modding Dark Souls?

    EDIT

    @horkrux has created a mod that replaces all sounds in the game with high quality versions:
    https://www.nexusmods.com/darksoulsremastered/mods/105/
     
    Last edited by mrmole, Nov 30, 2018
    IceTeaX likes this.
  2. WadsRUs

    WadsRUs GBAtemp Regular
    Member

    Joined:
    Jun 12, 2009
    Messages:
    225
    Country:
    United Kingdom
    Thanks for what you've done so far. I don't have an answer for you I'm afraid, but I hope that somebody can find a way to replace the current audio files with those of a much higher quality. And sort out the A/B button mappings too ..... :)
     
  3. WadsRUs
    This message by WadsRUs has been removed from public view by x65943, Nov 7, 2018, Reason: Dupe.
    Oct 22, 2018
  4. mrmole

    OP mrmole Member
    Newcomer

    Joined:
    Jul 20, 2018
    Messages:
    32
    Country:
    United Kingdom
    If anybody is interested how to dump BDT file using Offzip, it is:

    This will dump all the compressed zlib content from the file. This can be also tried:

    As it deals with deflate compression. Apparently you can also repack it by using this command:

    I am not sure if this is the best solution, or whether it will actually produce usable results. To my knowledge creating a QuickBMS script would be the best way of unpacking and repacking the files.
     
  5. Bigjokker

    Bigjokker GBAtemp Regular
    Member

    Joined:
    Jan 4, 2015
    Messages:
    115
    Country:
    United States
    Found this QuickBMS script for Dark Souls (PC/360) BDT/BHD5 by AlphaTwentyThree. I haven't tried it yet so not sure if it is useful.

    # extracts the contents of bdt/bhd5 archive pairs
    # tested on: Dark Souls: Prepare to Die Edition (PC, X360)
    # NOTE: make sure both bdt and bht5 files have the same name before running the script!
    #
    # (c) 2012-10-31 by AlphaTwentyThree of XeNTaX
    set X360 1
    include "func_getTYPE.bms"
    open FDDE bhd5 0
    open FDDE bdt 1
    if X360 == 1
    endian big
    endif
    idstring "BHD5" 0
    get UNK long 0 # 00000000 (?)
    get FOLDERS long 0
    get NOF long 0 # number of files (not needed for loop)
    get GROUPS long 0
    get UNK long 0
    for i = 1 <= GROUPS
    get FIG long 0 # files in group/folder
    get OFF_INFO long 0
    savepos MYOFF 0
    goto OFF_INFO 0
    for j = 1 <= FIG
    get NAME_CRC long 0
    get SIZE long 0
    get OFFSET long 0
    get ZERO long 0
    if X360 == 1
    set OFFSET ZERO
    endif
    get FOLDER basename 0
    string FOLDER += "/"
    set NAME i
    string NAME += "_"
    string NAME += j
    string NAME += "_"
    string NAME_CRC p= "0x%08x" NAME_CRC
    string NAME += NAME_CRC
    putVarChr MEMORY_FILE SIZE 0
    log MEMORY_FILE 0 0
    log MEMORY_FILE OFFSET SIZE 1
    callfunction getTYPE 1
    if X360 == 1
    endian big
    endif
    string NAME += EXT
    set WNAME FOLDER
    string WNAME += NAME
    log WNAME 0 SIZE MEMORY_FILE
    next j
    goto MYOFF 0
    next i

    You need the "func_getTYPE.bms" also to run it.

    # determine file type via various heuristics
    # (c) 2014-10-01 by AlphaTwentyThree of XeNTaX
    startfunction getTYPE
    set TQUIT 0 # quit marker
    set EXT ""
    set TYPESTRING ""
    set ZNAME ""
    endian little
    goto 0 MEMORY_FILE
    get MSIZE asize MEMORY_FILE
    if MSIZE > 3
    for STR = 1 <= 4 # determine if string identifier (only first three bytes)
    get TEST byte MEMORY_FILE
    if TEST < 0x20
    break
    elif TEST > 0x7e
    break
    endif
    next STR
    math STR -= 1
    goto 0 MEMORY_FILE
    if STR == 4
    getDstring TYPE 4 MEMORY_FILE
    if TYPE == ""
    elif TYPE == "<?xm"
    set EXT ".xml"
    elif TYPE == "BFFB"
    set EXT ".bf"
    elif TYPE == "CIDS"
    set EXT ".cid"
    elif TYPE == "PAD "
    set EXT ".pad"
    elif TYPE == "<!--"
    set EXT == ".xml"
    elif TYPE == "OMG."
    set EXT ".omg"
    elif TYPE == "MIG."
    set EXT ".mig"
    elif TYPE == "1SNh"
    set EXT ".tgv" # Electronic Arts TGV movie
    elif TYPE == "TAE "
    set EXT ".tae"
    elif TYPE == "30GF"
    set EXT ".fpg" # FPG archive
    elif TYPE == "49SB"
    set EXT ".49sb" # Summer Stars 2012 archive
    elif TYPE == "4ACS"
    set EXT ".sca" # NDS-specific
    elif TYPE == "AIXF"
    set EXT ".aix" # Cri Engine aix audio file
    elif TYPE == "AKPK"
    set EXT ".pak" # AKPK pack
    elif TYPE == "BCA0"
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".nsbca" # NDS 3d graphic
    endif
    elif TYPE == "BG"
    goto 0 MEMORY_FILE
    get TYPE long MEMORY_FILE
    if TYPE == 0x1002742
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    math SSIZE += 0x14
    if SSIZE == MSIZE
    set EXT ".bmp" # bitmap picture
    endif
    endif
    elif TYPE == "BIKi"
    goto 4 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    math SSIZE += 8
    if SSIZE == MSIZE
    set EXT ".bik" # bink video
    endif
    elif TYPE == "BKHD"
    set EXT ".bnk" # Wwise sound bank
    elif TYPE == "BMD0"
    set EXT ".nsbmd" # NDS-specific
    elif TYPE == "BND3"
    set EXT ".bnd"
    elif TYPE == "BTX0"
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".nsbtx" # NDS-specific
    endif
    elif TYPE == "CHNK"
    set EXT ".pak.xen" # Guitar Hero compressed audio file
    elif TYPE == "CPK "
    set EXT ".cpk" # CRI cpk archive
    elif TYPE == "CRUS"
    goto 0 MEMORY_FILE
    getDstring TYPE 8
    if TYPE == "CRUSHDM!"
    set EXT ".ds" # NDS-specific
    endif
    elif TYPE == "DCX"
    set EXT ".dcx"
    elif TYPE == "DDS "
    set EXT ".dds" # DDS model
    elif TYPE == "DDSx"
    set EXT ".ddsx" # Extended DDS model
    elif TYPE == "DIFF"
    set EXT ".diff" # NDS-specific
    elif TYPE == "DNBW"
    set EXT ".xwb" # Xact Wave Bank
    elif TYPE == "ea3"
    goto 0xa MEMORY_FILE
    getDstring IDENT 4 MEMORY_FILE
    if IDENT == "GEOB"
    set EXT ".aa3" # Atrac3+ audio file
    endif
    elif TYPE == "Exte"
    set EXT ".xm" # Extended Module (Tracker)
    elif TYPE == "EZ00"
    set EXT ".ez" # EZ-compressed file
    elif TYPE == "EZ10"
    set EXT ".ez" # EZ-compressed file
    elif TYPE == "FEVl"
    set EXT ".fev" # FEV file
    elif TYPE == "FEV1"
    set EXT ".fev"
    elif TYPE == "fknc"
    set EXT ".crf" # CRF 3D model
    elif TYPE == "FORM"
    goto 0x8 MEMORY_FILE
    getDstring CODE 4 MEMORY_FILE
    if CODE == "AIFF"
    set EXT ".aiff" # AIFF sound form
    endif
    elif TYPE == "FSB3"
    set EXT ".fsb" # FSB3 archive
    elif TYPE == "FSB4"
    set EXT ".fsb" # FSB4 archive
    elif TYPE == "FSB5"
    set EXT ".fsb" # FSB5 archive
    elif TYPE == "FSGX"
    set EXT ".xgs" # Xact GS descriptor
    elif TYPE == "FUNl"
    set EXT ".fun" # MIB: Alien Crisis FUN container
    elif TYPE == "GRP1"
    set EXT ".grp" # GRP archive
    elif TYPE == "HVQM"
    set EXT ".h4m" # H4M movie
    elif TYPE == "INDA"
    set EXT ".data" # data pack (Agricultural Simulator)
    elif TYPE == "Inno"
    set ZNAME "unins000.dat" # uninstall data file
    elif TYPE == "KBDS"
    set EXT ".xsb" # Xact Sound Bank
    elif TYPE == "mhwa"
    set EXT ".mh" # NDS-specific
    elif TYPE == "MIPh"
    set EXT ".mip"
    elif TYPE == "MODS"
    set EXT ".mods" # NDS mods movie
    elif TYPE == "MOIK"
    set EXT ".kev_bdl" # Worms: Reloaded bundle
    elif TYPE == "MSCF"
    set EXT ".cab" # CAB archive
    elif TYPE == "mshd"
    set EXT ".mshdf" # Xbox 360 mshd file
    elif TYPE == "MULA"
    set EXT ".mula" # MIB3 MULA archive
    elif TYPE == "MUSX"
    set EXT ".musx" # MUSX sound container
    elif TYPE == "NARC"
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".narc" # NDS-specific
    endif
    elif TYPE == "NTRO"
    goto 4 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".nitro_archive" # NDS nitro archive
    endif
    elif TYPE == "OggS"
    goto 0x1c MEMORY_FILE
    get TEST string MEMORY_FILE
    if TEST == "fishead"
    set EXT ".ogm"
    else
    set EXT ".ogg" # ogg container
    endif
    elif TYPE == "PACK"
    set EXT ".pac" # NDS-specific
    elif TYPE == "PAL1"
    set EXT ".pal" # palette
    elif TYPE == "PIRS"
    set EXT ".pirs" # XBLA pirs archive
    elif TYPE == "PSIS"
    goto 0 MEMORY_FILE
    getDstring TEST 8 MEMORY_FILE
    if TEST == "PSISOIMG"
    set EXT ".psar" # Playstation emulation image (PSN)
    endif
    elif TYPE == "QRK."
    set EXT ".qrk" # NDS-specific
    elif TYPE == "RGCN"
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".ncgr" # NDS-specific
    endif
    elif TYPE == "RIFF"
    callfunction getWaveType 1
    elif TYPE == "RIFX"
    endian big
    callfunction getWaveType 1
    endian little
    elif TYPE == "RLCN"
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".nclr" # NDS graphic
    endif
    elif TYPE == "RPF4"
    set EXT ".rpf" # RPF4 container
    elif TYPE == "RPGN"
    set EXT ".npgr" # NDS-specific
    elif TYPE == "RTFN"
    set EXT ".nftr" # NDS-specific
    elif TYPE == "sawh"
    goto 0x14 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    math SSIZE += 0x200
    if SSIZE == MSIZE
    set EXT ".hwas" # NDS IMA ADPCM audio
    endif
    elif TYPE == "SDAT"
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".sdat" # Nintendo DS sdat sound archive
    endif
    elif TYPE == "SMPK"
    set EXT ".spk" # NDS sound pack
    elif TYPE == "SMV1"
    set EXT ".smv" # smv movie
    elif TYPE == "SWAV"
    goto 8 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    if SSIZE == MSIZE
    set EXT ".swav" # swav audio
    endif
    elif TYPE == "TEX1"
    set EXT ".tex" # texture
    elif TYPE == "TEX2"
    set EXT ".tex" # texture
    elif TYPE == "THP"
    set EXT ".thp" # THP multimedia file
    elif TYPE == "TNFS"
    set EXT ".fnt" # font
    elif TYPE == "TPF"
    set EXT ".tpf"
    elif TYPE == "VXDS"
    goto 0x28 MEMORY_FILE
    get SSIZE long MEMORY_FILE
    math SSIZE += 8
    if SSIZE == MSIZE
    set EXT ".vx" # Nintendo DS VX movie
    endif
    elif TYPE == "XEX2"
    set EXT ".xex" # Xbox 360 xex file
    elif TYPE == "XPR2"
    set EXT ".xpr"
    elif TYPE == "VRFS"
    goto 4 MEMORY_FILE
    getDstring TYPE 3 MEMORY_FILE
    if TYPE == "X360"
    set EXT ".vromfs.bin" # Xbox 360 rom file
    endif
    elif TYPE == "XMNP"
    set EXT ".manifest" # Xbox 360 $SystemUpdate manifest
    elif TYPE == "BDF3"
    set EXT ".bdt" # Dark Souls bdt archive
    elif TYPE == "BHF3"
    set EXT ".bhd"
    elif TYPE == "MVhd"
    set EXT ".vp6" # Electronic Arts VP6 video
    elif TYPE == "BGFA"
    set EXT ".ast" # Electronic Arts BGFA container
    elif TYPE == "GD.S"
    set EXT ".gd"
    elif TYPE == "LOCH"
    set EXT ".loc" # location file
    elif TYPE == "SEVT"
    set EXT ".sev"
    elif TYPE == "CPK0"
    set EXT ".cpk" # Capcom cpk file (unknown usage)
    elif TYPE == "AAAp"
    set EXT ".aaa" # stereo VAG audio file
    elif TYPE == "VAGp"
    set EXT ".vag" # mono Playstation ADPCM file
    elif TYPE == "BJBO"
    set EXT ".bjb"
    elif TYPE == "CFOM"
    set EXT ".cfo"
    elif TYPE == "RFOM"
    set EXT ".rfo"
    elif TYPE == "PLZP"
    set EXT ".plz"
    elif TYPE == "PIFF"
    set EXT ".pif"
    elif TYPE == "LANG"
    set EXT ".lang"
    elif TYPE == "PSND"
    set EXT ".psnd"
    elif TYPE == "VBSP"
    set EXT ".bsp" # Half-Life 2 map
    elif TYPE == "pmCx"
    set EXT ".xz_" # compressed Half-Life 2 archive
    elif TYPE == "DMAV"
    set EXT == "dmav"
    elif TYPE == "AUS "
    set EXT ".aus"
    elif TYPE == "WANM"
    set EXT ".wan"
    elif TYPE == "MSF0"
    set EXT ".msf"
    elif TYPE == "MUPS"
    set EXT ".mups"
    elif TYPE == "D11M"
    set EXT ".mesh"
    endif
    if EXT != ""
    set TQUIT 1
    endif
    elif STR == 3
    goto 0 MEMORY_FILE
    getDstring TYPE 3 MEMORY_FILE
    if TYPE == "SG2"
    set EXT ".sg2" # XBLA sg2 file
    goto 0x14 MEMORY_FILE
    get ZNAME string MEMORY_FILE
    elif TYPE == "RSF"
    set EXT ".rsf" # rsf file
    elif TYPE == "LOC"
    set EXT ".loc" # location file
    elif TYPE == "DCX"
    set EXT ".dcx"
    elif TYPE == "DRB"
    set EXT ".drb"
    elif TYPE == "TPF"
    set EXT ".tpf"
    elif TYPE == "TAE"
    set EXT ".tae"
    elif TYPE == "ID3"
    set EXT ".mp3"
    endif
    if MSIZE > 0x10
    goto 0xc MEMORY_FILE
    getDstring TYPE 4 MEMORY_FILE
    if TYPE == "NTRJ"
    set EXT ".srl" # NDS-specific
    endif
    endif
    if EXT != ""
    set TQUIT 1
    endif
    elif STR == 2
    goto 0 MEMORY_FILE
    getDstring TYPE 2 MEMORY_FILE
    if TYPE == "MZ"
    goto 0xd0 MEMORY_FILE
    get TEST string MEMORY_FILE
    if TEST == "PE"
    set EXT ".exe" # Executable Program
    elif TEST == "Rich"
    set EXT ".dll" # dynamic link library (dll)
    endif
    elif TYPE == "DB"
    set EXT ".db" # database file
    elif TYPE == "SD"
    set EXT ".sd"
    endif
    if EXT != ""
    set TQUIT 1
    endif
    elif STR == 0 # REMEMBER: set TQUIT to 1 if valid type is found!
    get TYPE long MEMORY_FILE
    if TYPE == 0x20000080
    set EXT ".adx" # CRI adx or ahx audio
    set TQUIT 1
    elif TYPE == 0x24000080
    set EXT ".adx" # CRI adx audio
    set TQUIT 1
    elif TYPE == 0x1c010080
    set EXT ".adx" # CRI adx audio file
    set TQUIT 1
    elif TYPE == 0x0d0d0d0d
    set EXT ".p256" # NDS 256p video
    set TQUIT 1
    elif TYPE == 0x401000
    goto 6 MEMORY_FILE
    getDstring TYPE 3
    if TYPE == "spx"
    set EXT ".spx" # NDS-specific
    set TQUIT 1
    endif
    elif TYPE == 0x474e5089
    set EXT ".png" # PNG picture
    set TQUIT 1
    elif TYPE == 0x75b22630
    set EXT ".wmv" # WMV video
    set TQUIT 1
    elif TYPE == 0x3032802
    set EXT ".ubipack" # Ubisoft sound pack
    set TQUIT 1
    elif TYPE == 0x80087322
    set EXT ".lds" # lds file (Worms: Reloaded)
    set TQUIT 1
    elif TYPE == 0xc000048
    set EXT ".sps" # EA sps audio file
    set TQUIT 1
    elif TYPE == 0x20000000
    goto 4 MEMORY_FILE
    getDstring TYPE 8 MEMORY_FILE
    if TYPE == "ftypM4A "
    set EXT ".m4a" # m4a audio file
    set TQUIT 1
    endif
    elif TYPE == 0xba010000
    set EXT ".mpg" # MPG video file
    set TQUIT 1
    elif TYPE == 0xba010000
    get TEST long MEMORY_FILE
    if TEST == 0x040044
    set EXT ".pss" # PSS movie (PS2)
    set TQUIT 1
    endif
    elif TYPE == 0xba010000
    set EXT ".pss"
    set TQUIT 1
    endif # type without string
    if TQUIT == 0
    goto 0 MEMORY_FILE
    get TYPE short MEMORY_FILE
    if TYPE == 0x7c1f
    set EXT ".tsb" # NDS-specific
    set TQUIT 1
    elif TYPE == 0xfbff
    set EXT ".mp3" # MPEG Layer3 audio file
    set TQUIT 1
    endif
    endif # TQUIT
    if TQUIT == 0
    goto 0 MEMORY_FILE
    get TYPE threebyte MEMORY_FILE
    if TYPE == 0x445242
    set EXT ".brd"
    set TQUIT 1
    endif
    endif # TQUIT
    if TQUIT == 0
    if MSIZE > 0x8
    goto 4 MEMORY_FILE
    getDstring TYPE 4 MEMORY_FILE
    if TYPE == "DAEH"
    set EXT ".ppp" # NDS ppp graphic
    set TQUIT 1
    endif
    if TQUIT == 0
    goto 5 MEMORY_FILE
    getDstring TYPE 3 MEMORY_FILE
    if TYPE == "TSF"
    set EXT ".tsf" # NDS tsf graphic
    set TQUIT 1
    endif
    endif
    if TQUIT == 0
    goto 4 MEMORY_FILE
    get TYPE threebyte MEMORY_FILE
    if TYPE == 0x041203
    set EXT ".adx" # CRI audio file
    set TQUIT 1
    endif
    endif
    endif
    endif
    if TQUIT == 0
    if MSIZE > 0xa
    goto 6 MEMORY_FILE
    getDstring TYPE 4 MEMORY_FILE
    if TYPE == "JFIF"
    set EXT ".jpg" # JPG picture
    set TQUIT 1
    elif TYPE == "Exif"
    set EXT ".jpg" # JPG picture
    set TQUIT 1
    endif
    endif
    if TQUIT == 0
    if MSIZE > 0x10
    goto 8 MEMORY_FILE
    getDstring TYPE 8 MEMORY_FILE
    if TYPE == "matroska"
    set EXT ".mkv" # MKV video
    endif
    endif
    endif
    endif # TQUIT
    endif # no string at start
    endif
    if TQUIT == 0
    if MSIZE >= 4
    goto 0 MEMORY_FILE
    get TYPE long MEMORY_FILE
    reverselong TYPE
    string TYPE p= ".%08x" TYPE
    set EXT TYPE
    set TYPESTRING "unknown (identifier: 0x%TYPE%)"
    else
    set TYPESTRING "unknown (file too small)"
    endif
    endif
    endfunction
    startfunction getWaveType
    goto 8 MEMORY_FILE
    getDstring TYPE 8 MEMORY_FILE
    if TYPE == "WAVEfmt "
    goto 0x14 MEMORY_FILE
    get CODEC short MEMORY_FILE
    if CODEC == 0x0165
    set EXT ".xma"
    elif CODEC == 0x0166
    set EXT ".xma"
    elif CODEC == 0x6501
    set EXT ".xma"
    elif CODEC == 0x6601
    set EXT ".xma"
    elif CODEC == 0x7002
    set EXT ".at3"
    elif CODEC == 0x161
    set EXT ".xWMA"
    elif CODEC == 0xffff
    set EXT ".Wwise"
    elif CODEC == 0x69
    set EXT ".lwav"
    elif CODEC == 0x11
    set EXT ".lwav"
    elif CODEC == 2
    set EXT ".lwav"
    elif CODEC == 1
    set EXT ".wav"
    elif CODEC == 0xfffe
    set EXT ".at3"
    else
    set EXT ".wav_unknown"
    endif
    elif TYPE == "AVI LIST"
    set EXT ".avi" # avi movie
    elif TYPE == "MVI_LIST"
    set EXT ".mvi" # mvi movie
    elif TYPE == "XWMAfmt "
    set EXT ".xwma" # Extended WMA
    else
    set EXT ".wav_unknown"
    set TYPESTRING "unknown wave format"
    endif
    endfunction
     
    mrmole likes this.
  6. mrmole

    OP mrmole Member
    Newcomer

    Joined:
    Jul 20, 2018
    Messages:
    32
    Country:
    United Kingdom
    Unfortunately this script does not work - it seems that the headers are different now, which renders the available scripts unusable.
     
  7. maxx488

    maxx488 GBAtemp Regular
    Member

    Joined:
    Jun 15, 2018
    Messages:
    219
    Country:
    Argentina
    I dont care about the A/B "problem" since i've been playing it like that since 2011. When I want to pick up an item my brain commands my thumb to press the bottom button. I would hate having to press the "O" ("A" on switch).
    But replacing those 1950's sound quality files would be awesome.
     
    Last edited by maxx488, Oct 23, 2018
  8. 8BitWonder

    8BitWonder Small Homebrew Dev
    Member

    Joined:
    Jan 23, 2016
    Messages:
    2,346
    Country:
    United States
    I remember trying to mod in better PC sounds a couple days ago to no avail.

    I was trying to use DeS-BNDBuild (Unpacks/Repacks dvdbnds) but learned pretty quickly that the switch dvdbnds were different than the original DS archives it was made for.

    However the source is available if it seems like something that can be forked or tweaked to work with DS:R.
    https://github.com/Wulf2k/DeS-BNDBuild
     
    Last edited by 8BitWonder, Oct 23, 2018
    mrmole likes this.
  9. mrmole

    OP mrmole Member
    Newcomer

    Joined:
    Jul 20, 2018
    Messages:
    32
    Country:
    United Kingdom
    I found this writeup on the file structure of the original Dark Souls archives: https://sites.google.com/site/fileformats/engines/dark-souls/archive-files

    I doubt that they switch release is much different apart from having some different files in the archives. So it might be just a matter of reexamining the headers in hex editor and correcting the offsets for QuickBMS script.
     
    8BitWonder likes this.
  10. Beware

    Beware GBAtemp Maniac
    Member

    Joined:
    Apr 5, 2007
    Messages:
    1,106
    Country:
    United States
    I've written about this issue at length on some other sites and in Discord servers. The Swtich release is certainly little-endian (like all Switch software) while the existing tools expect big-endian. This will be the biggest obstacle to extracting/repacking the BHT and BHD5 files.
     
  11. Bigjokker

    Bigjokker GBAtemp Regular
    Member

    Joined:
    Jan 4, 2015
    Messages:
    115
    Country:
    United States
    QuickBMS defaults to little endian so that won't be any trouble for it.
     
  12. Beware

    Beware GBAtemp Maniac
    Member

    Joined:
    Apr 5, 2007
    Messages:
    1,106
    Country:
    United States
    Sure except we need to repack the compressed resources then repack them to either be used with LayeredFS or repacjed as NSP.
     
  13. horkrux

    horkrux Member
    Newcomer

    Joined:
    Oct 26, 2018
    Messages:
    15
    Country:
    Germany
    I've started modifying Wulf's DeS-BNDBuild since the network test came out to also support all sorts of Switch formats. Just check out my fork (horkrux) on github.

    I think there is one BND3 format missing from the newest release that I haven't pushed yet, but the archives are pretty much all figured out.
    Don't think I've tried rebuilding the dvdbnds yet though, so not sure if that works.
    If you use it, pls let me know if you encounter any oddities.

    There are quite a few other files you won't be able to modify with existing tools, like MSB files (maps) f.e., so modding the Switch version isn't all that great now.
     
    mrmole likes this.
  14. Beware

    Beware GBAtemp Maniac
    Member

    Joined:
    Apr 5, 2007
    Messages:
    1,106
    Country:
    United States
    Well I've successfully extracted all the sound files. They are .bank files, which I'm presuming I can unpack with FSBExtractor, but how would I repack them? And continuing from there, how would we get these repacked as proper BHD5? Is there a way to use the loose audio with layeredFS without repacking the BDH5?
     
  15. horkrux

    horkrux Member
    Newcomer

    Joined:
    Oct 26, 2018
    Messages:
    15
    Country:
    Germany
    The bank files are RIFF containers, so you would have to extract the .fsb files from those first. There is a tool to replace sounds in DS1's fsb files, but it doesn't work with these. The samples then are also stored in RIFF containers as raw audio. They have some ADPCM encoding and I couldn't get them to play at all. Not really my field honestly lol
    Suffice it to say, with all these new formats, replacing sounds might be a bitch.

    To repack the BDT, you just open the BHD5 again and click "rebuild" instead. It then takes all the file paths from the filelist.txt it had created during extraction and repacks the archive.

    Loading loose files is probably not possible, unless s.o. changes to executable. That's how easier modding was enabled on the other versions.
     
    mrmole likes this.
  16. Beware

    Beware GBAtemp Maniac
    Member

    Joined:
    Apr 5, 2007
    Messages:
    1,106
    Country:
    United States
    When I attempt to rebuild the app just freezes and doesn't seem to move forward. Have you managed to extract the .fsb files from the .banks? I already have all the replacement .FSB files if we can get them out of the .bank then rebuild the .bank files.
     
  17. horkrux

    horkrux Member
    Newcomer

    Joined:
    Oct 26, 2018
    Messages:
    15
    Country:
    Germany
    It's a different FSB format too (FSB4 vs FSB3), so I don't think that would work :P

    I think freezing is normal, since it's taking a while (that's just the way it was originally programmed *cough*), but I don't think I've updated rebuilding those files for Switch yet, so they wouldn't work anyway. Gonna add that next.
     
    mrmole, Bst22322 and 8BitWonder like this.
  18. Beware

    Beware GBAtemp Maniac
    Member

    Joined:
    Apr 5, 2007
    Messages:
    1,106
    Country:
    United States
    QuickBMS can extract the fsb from the .bank files and fmod can get the .wavs out of those FSB. So if we can convert .wav files to the proper fsb format then the only missing pieces are the repacking tools (fsb-bank, loose files-BDH5).
     
    mrmole likes this.
  19. mrmole

    OP mrmole Member
    Newcomer

    Joined:
    Jul 20, 2018
    Messages:
    32
    Country:
    United Kingdom
    Amazing work so far @horkrux, great job at supporting the file formats!

    Perhaps using the official FMOD Studio could do the trick of converting .wav to the right version of the FSB format. As for converting loose files to BDH5, I have been asking around ZenHAX forum and there is a new version of QuickBMS script courtesy of aluigi. Personally, I had some problems using it, so let me know if everything works ok for you. With QuickBMS there is a reimport2 feature, which could potentially rebuild the archives.

    Links:
    FMOD Studio: https://www.fmod.com/studio
    QuickBMS script: http://aluigi.org/bms/dark_soul.bms
    horkrux's fork of Wulf's DeS-BNDBuild: https://github.com/horkrux/DeS-BNDBuild/releases
     
  20. horkrux

    horkrux Member
    Newcomer

    Joined:
    Oct 26, 2018
    Messages:
    15
    Country:
    Germany
    I've updated it now. Should work, but I can't really test it myself.
    If you've already extracted the BHD5 with the older version, you need to extract it again before rebuilding. If you've already rebuilt the BHD5, you need to overwrite the BHD5 and BDT with their respective .bak files.
    In short, just get rid of everything but the original files
     
  21. Beware

    Beware GBAtemp Maniac
    Member

    Joined:
    Apr 5, 2007
    Messages:
    1,106
    Country:
    United States
    Presuming FMOD can convert high quality .wavs to the proper FSB format, the only missing piece is repacking those FSB back into .bank. What's the proper FSB format for the Switch release?
     
  22. WadsRUs

    WadsRUs GBAtemp Regular
    Member

    Joined:
    Jun 12, 2009
    Messages:
    225
    Country:
    United Kingdom
    Have my fingers crossed that this can all be sorted out and we can have decent audio on the Switch version of Dark Souls. Major thanks to those who are working on this.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Investigation, Modding, Souls