Hi-Res Patches for Fallout1&2 & the BIS Mapper

Discussion in 'Fallout General Modding' started by Mash, May 14, 2008.

  1. Glovz

    Glovz Vault Dweller
    Modder

    737
    Sep 16, 2005
    @Mash
    I mentioned this in the sfall thread, but I thought it was worth adding here as well, SDL 2.0 and its improvements:
    http://wiki.libsdl.org/moin.fcg/FrontPage

    Simple DirectMedia Layer

    What is it?

    Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.

    SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for other platforms may be found in the source code.

    SDL is written in C, works natively with C++, and there are bindings available for several other languages, including C# and Python.

    SDL 2.0 is distributed under the zlib license. This license allows you to use SDL freely in any software.
     
  2. zenoparadox

    zenoparadox First time out of the vault

    2
    Aug 18, 2013
    4.0.2 issue with F1 and fix

    * My setup *

    I run Windows XP as a VirtualBox guest on a Linux host. I've played through F1 once on this very virtual machine but I did not use the high resolution patch. This was my first try with the patch. What I did:

    1. Install a stock F1.
    2. Install Fallout_1_TeamX_Patch_ENG_1.2w.zip (from this place: http://atomicgamer.com/files/63134/fallout-1-v1-2-patch-by-teamx-semi-official)
    3. Install Fallout1_High_Resolution_Patch_4.0.2.zip (from this place: http://falloutmods.wikia.com/wiki/Fallout1_Resolution_Patch.)

    * Symptoms *

    After performing the installation instructions, I started F1. I noticed the main menu had an additional blank menu item compared to the stock F1. However, the "Options" item mentioned in the high resolution patch documentation did not show up. I tried a whole slew of different settings in the f1_res_Config utility but nothing changed.

    * Diagnosis and Solution *

    I eventually decided to move the f1_res.dll file somewhere where I knew F1 could not load it. F1 would start and still show the blank menu item. I knew at this point there was probably a silent failure in loading f1_res.dll.

    I downloaded a dependency walker from here: www.dependencywalker.com. I opened Falloutw.exe with it. I figured that loading f1_res.dll was a dynamic operation performed at execution time so I asked dependency walker to trace the execution of Falloutw.exe. Upon tracing, I found that f1_res.dll was failing to load d3dx9_31.dll. I checked what was present on my system and found d3dx9_32.dll but no d3dx9_31.dll. I found a d3dx9_31.dll file somewhere else and put it in /Windows/system32. From that point on, F1 would complain about being unable to set the mode. I swiched the "Graphic Mode" in f1_res_Config form "DirectX 9" to "DirectDraw 7" and no longer had any problems.

    On this page http://falloutmods.wikia.com/wiki/High_Resolution_Patch_bugs there is a report from a Vista user about a missing d3dx9_31.dll file error. (I will note here again that my loading failure was silent; no error message at all!) Mash suggests using the DirectX End-User Runtime Web Installer but I had done that while trying to fix my problem and did not help. Specifically, it did not install d3dx9_31.dll.
     
  3. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    zenoparadox,

    Thanks for the detailed post, I'm including some DirectX files in my next release (unrelated to the high-res mod, but does include the high-res mod) and this is very useful information.
     
  4. zenoparadox

    zenoparadox First time out of the vault

    2
    Aug 18, 2013
    I'm glad it helps. If I can spare someone else the trouble, that's a win!
     
  5. Mash

    Mash Vault Engineer Modder

    369
    May 3, 2008
    New versions of my fallout 1&2 patches are up. links in my sig.
    This is mainly a bug fix release although there are a couple fixes that are a bit more involved then the others..

    First is a fix for Windows Vista/7/8 to prevent UAC issues when using the hi-res patch under "Program Files". The config files f1_res.ini and f2_res.ini are now recreated in your user appData folder. The hi-res patch and Config program will then access these instead of the originals in your game directory. So there should no longer be a need to start the config program with admin privileges.
    WindowsXP and below are unaffected and use the ini in the game folder as usual. If you wish this feature can be turned off by setting "UAC_AWARE=0" in the ini that resides in your game directory.

    Second, I was running into some problems with the original mouse input which uses DirectInput. So in this version, DirectInput for the mouse is disabled instead mouse input is obtained via windows messages and functions.
    This has the negative effect of rendering sfalls mouse functions useless (Sorry Timeslip). Because of this I added some mouse wheel functionality to the hi-res patch to compensate. I've also enhanced inventory scrolling a bit, enabling you to scroll other inventory lists other than just the PCs.
    This fix is disabled by default when using one of Sfalls graphic modes allowing you to use sfalls mouse functions. If you wish to you the hi-res patches mouse in this case, set ALT_MOUSE_INPUT=1 in the ini.
    This fix may also help those with "Failure initializing input devices" errors on game start.

    One other thing to mention, it seems I've disabled the CPU usage fix In the fallout1 patch (A bit of a goof up on my part). I will be adding that back in soon but I'll hold off a few day to see if anything else crops up.

    @zenoparadox:
    I changed my suggestion on the hi-res bug report page to point to the Directx redistributable instead of the Web installer which should work better.
     
  6. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    umm... I'm not bothered by you taking over the mouse functionality, especially if it's better than mine, but unfortunately global scripts ride of the back of fallouts mouse input. If you've stopped fallout from calling GetDeviceState for the mouse, (it's never called for the keyboard) then you've just broken any global script that doesn't call SetGlobalScriptMode to attach itself to a different loop.

    If fallout still calls it as part of the input loop and ignores the results then all is fine, but given your 'Failure initializing input devices' comment, it sounds like you aren't even creating the interface.

    Edit: Actually, not as bad as I thought. Global scripts use the local map loop by default, so it's only those that call SetGlobalScriptMode(1) that'll be hit. Not sure if there are any in the rp that do that, but if so guess I need to spin a new sfall release with the global script call moved over to keyboard input instead of the mouse.
     
  7. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Thanks for the update, Mash. Just curious about a new option:
    What exactly does it do? From its name I was thinking it's about disabling PC's ability to drop his/her own items in the barter window. I change it between 0 and 1, but didn't notice any difference.

    BTW, it might be better to add a semicolon at the beginning of line 11 (the "if installed in the..." line) in the INI.
     
  8. killap

    killap Bear Dude Moderator Modder

    May 16, 2005
    The RP doesn't use any.

    However, if this does indeed break mode 1 on set_global_script_type then I'd definitely suggest rolling a new sfall at some point, since your readme does outline having that mode as an option and having it broken, surely unbeknownst to the modder, will just cause unnecessary pain.
     
  9. Mash

    Mash Vault Engineer Modder

    369
    May 3, 2008
    Oops, didn't realise that, would have done it differently had I known. I'll leave it as is since you've already moved things to keyboard input. The hi-res patch stomps all over the place these days, I try to avoid sfall where I can, totally missed that one though, Apologies.

    @NovaRain:
    BARTER_PC_INV_DROP_FIX=1
    Something very minor that's bothered me a while. The mouse drop zone(the area you can drop stuff back into your inventory from the trade table) doesn't match up visually with The PC's inventory, it's to far to the left. This fix shift this zone a little to the right 20 pixels.

    Thanks, will do.
     
  10. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Oh, didn't notice that before... I must get too used to such behavior.
    You might want to put the explanation in the readme.rtf, since there's no description about the option.
     
  11. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    Happy to see the 20-pixel item-drop offset fix, that always bothered me too.

    FYI, as far as Fallout 1 is concerned (since it doesn't use the extended Sfall stuff) the only loss will be ability to assign Middle Mouse Button and to adjust Mouse Sensitivity and adjust size of scroll when using scrollwheel.

    1. Does this mean my users should now have the [Input] section disabled in their ddraw.ini to avoid issues?

    2. Is it possible to add an option to skip the beginning cinematics and splash screen? The logo movie, intro movie, and overseer intro movie. When doing as much testing as I do, it gets really effing annoying to have to hit spacebar literally hundreds of times during a given test session for skipping the cinematics . :crazy:
     
  12. Mash

    Mash Vault Engineer Modder

    369
    May 3, 2008
    @NovaRain: There are a few things I need to add to the read-me but I wanted to get this version out ASAP and ran out of time.

    @Sduibek:
    Nope, it means the mouse related stuff under input wont have any effect.
    Not really a hi-res patch thing. Probably a pretty simple hex edit though, I'll pm you.
     
  13. Glovz

    Glovz Vault Dweller
    Modder

    737
    Sep 16, 2005
    Did you see this and is it useful?
     
  14. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    Not really. Fallout already uses directdraw. What do you want to gain by switching to sdl? You'd get the colour fix thrown in for free, but little else. Plus sdl2's hardware accelerated api doesn't have the sort of palette support fallout would need, afaics.
     
  15. Glovz

    Glovz Vault Dweller
    Modder

    737
    Sep 16, 2005
    I thought the cross platform support might help those trying to get Fallout to work on other platforms.

    Not sure though.
     
  16. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    Alas, using a cross platform library doesn't help much unless the application using the library is also cross platform.
     
  17. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    EDIT: I'm not tryign to be hostile in this post btw. I just require knowledge and I'm nitpicky 8-)

    1. Why is default graphics mode set to DirectX9? Also what does that mode even offer that Direct Draw 7 doesn't?

    2. Why is default resolution now set to 1024x768? I think most players will find this too high. Default of 800x600 makes most sense.

    3. Same goes for Colour Bits of 32 -- I've had reports of this causing crashes for certain users, so bits of 16 is sufficient and safer choice.

    4. Why is Windowed still enabled by default? I mentioned this on the Bug Reports wiki back at version 4.0.2

    5. Why were these removed from the supplied f1_res.ini between version 3.0.6 and version 4.1.3?

    EDIT: Also, combat rounds still hang and freeze the game with version 4.1.3 - added it to the bugs wiki.
     
  18. Mash

    Mash Vault Engineer Modder

    369
    May 3, 2008
    @ Sduibek Q&A:

    Q:1. Why is default graphics mode set to DirectX9? Also what does that mode even offer that Direct Draw 7 doesn't?
    A: I think the DirectX9 mode is the most likely work out of the box on hardware made in the last 5 years or so. And although both are presently comparable in features. I have some things on the backburner that wont be possible with Direct Draw.

    Q:2. Why is default resolution now set to 1024x768? I think most players will find this too high. Default of 800x600 makes most sense.
    A: I don't think that's true. Most users will likely have a 16:9 or 16:10 flat panel with resolutions far exceeding 800x600. Graphic card and monitor makers provide minimal or no support at all for 640x480. The minimum desktop resolution for Windows8 appears to be 1024x768, so I think 800x600's days are numbered.

    Q:3. Same goes for Colour Bits of 32 -- I've had reports of this causing crashes for certain users, so bits of 16 is sufficient and safer choice.
    A: Again I don't think this is true. Graphic cards have been geared toward 32bit for some time now. Windows8 desktop only supports 32bit(may have also been true for Win7).

    Q:4. Why is Windowed still enabled by default? I mentioned this on the Bug Reports wiki back at version 4.0.2
    A: I believe it's the mode most likely to work across most systems as it doesn't change your Desktop's graphics settings. So makes the best starting point.

    Q:5. Why were these removed from the supplied f1_res.ini between version 3.0.6 and version 4.1.3?

    ;Text displayed on the Main-menu for the Options/Game Preferences window.
    OPTIONS_TEXT=options
    A: The text was moved to ScrnSet.msg, message number 3.

    ;set to SAFER_DISPLAY_LIST=1 if you experience a crash using the Screen Settings Panel.
    SAFER_DISPLAY_LIST=1
    A: No longer necessary, I fixed the root cause of the problem.

    ;Height of the area at the bottom of screen for displaying subtitles when set in the Game Preferences window.
    SUBTITLE_AREA_HEIGHT=0
    ;Distance from the bottom of the screen to the bottom of the subtitles.
    SUBTITLE_POS=50
    A: These were in case the subtitles weren't visible when using strange resolutions or different font files etc.. I've since totally revamped that part of my code, and subtitles should always be visible. These settings became redundant.

    ; set to 1 to enable screen flickering fix.
    FLICKERING_SCREEN_FIX=1
    A: In fallouts WindowsProc function the WM_ERASEBKGND message was set to allow windows to erase the background causing the flicker. The WindowsProc function is now completely replaced in the hi-res patch, for this and various other reasons. So this setting is redundant as the fix is always applied.

    ; set to 1 to reduce CPU usage and heat generation by allowing the system to go idle.
    CPU_USAGE_FIX=0
    A: This one was removed by mistake and will be returning shortly. I got confused and thought it was permanently enabled. Blame lack of sleep and bourbon(to little or to much, I'm not sure).


    Haven't had the chance to look at that one yet.
     
  19. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    Excellent, thank you for entertaining my annoying questions :)
     
  20. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    I'm getting complaints from testers who aren't happy about the removed mouse functionality such as middle mouse button. The one that bugs me personally is that you can no longer scroll with mouse in inventory unless you're holding the pointer directly over the item list. (I never used middle mouse to switch weapons)

    Are you willing to either add in the functionality that ddraw provided with mouse that you've now forced to be disabled, or add option to disable your change in Mode1 and Mode2 instead of just Mode0?