anchor.diff:  	ECHO             Steam : DOOM Classic Complete - ^(all of the above^)
   	ECHO       GOG / Steam : DOOM 3 BFG Edition    - DOOM.WAD ^& DOOM2.WAD
   	ECHO               GOG : The Ultimate DOOM     - DOOM.WAD
  -	ECHO               GOG : DOOM II + Final DOOM  - DOOM2.WAD, TNT.WAD ^& PLUTONIA.WAD 
  +	ECHO               GOG : DOOM II + Final DOOM  - DOOM2.WAD, TNT.WAD ^& PLUTONIA.WAD
  +	ECHO             Steam : Heretic               - HERETIC.WAD
  +	ECHO             Steam : Hexen                 - HEXEN.WAD
           ECHO:
   	ECHO     %_HEADING_%Shareware:%_%
   	ECHO:
  
positive.code: 	IF EXIST "%REG%\base\wads\NERVE.WAD" SET "PWAD_PATH=%REG%\base\wads\NERVE.WAD" & GOTO :iwad
  )
  REM # if the WAD was not found, we cannot continue, the user does not have NERVE.WAD
  IF "%PWAD_PATH%" == "" (
  	ECHO:
  	ECHO   ERROR: "NERVE.WAD" missing:
  	ECHO:
  	ECHO   You must purchase "DOOM 3: BFG Edition" from Steam to get NERVE.WAD.
  	ECHO   doom.bat automatically finds it, if installed. If you have NERVE.WAD
  	ECHO   elsewhere, copy it to the "%IWADS%" folder and try again.
  	ECHO:
  	POPD
  	PAUSE
  	EXIT /B 1
  )
  REM # PWAD found, skip ahead
  GOTO :iwad
  
  :pwad_master
  REM --------------------------------------------------------------------------------------------------------------------
  REM # are we looking for "Master Levels for DOOM II"?
  IF /I NOT "%PWAD:~0,7%" == "MASTER\" GOTO :pwad_missing
  
  REM # extract the WAD name from that
  SET "WAD=%PWAD:~8%"
  
  REM # is Steam : Master Levels for DOOM II installed?
  CALL :reg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 9160" "InstallLocation"
  IF NOT "%REG%" == "" (
  	REM # check if the WAD can be found there
  	IF EXIST "%REG%\master\wads\%WAD%" SET "PWAD_PATH=%REG%\master\wads\%WAD%"
  )
  REM # is GOG : DOOM II + Final DOOM (including Master Levels) installed?
  CALL :reg "HKLM\SOFTWARE\GOG.com\Games\1435848814" "Path"
  IF NOT "%REG%" == "" (
  	REM # check if the WAD can be found there
  	IF EXIST "%REG%\master\wads\%WAD%" SET "PWAD_PATH=%REG%\master\wads\%WAD%"
  )
  
  REM # if the WAD was not found, we cannot continue, the user does not have Master Levels
  IF "%PWAD_PATH%" == "" (
  	ECHO:
  	ECHO   ERROR: "%WAD%" missing:
  	ECHO:
  	ECHO   You must purchase either "DOOM Classic Complete" from Steam or
  	ECHO   "DOOM II + Final DOOM" from GOG to get "Master Levels for DOOM II";
  	ECHO   doom.bat automatically finds it, if installed. If you have the Master Levels
  	ECHO   WADs elsewhere, copy them to the "%IWADS%\MASTER" folder and try again.
  	ECHO:
  	POPD
  	PAUSE
  	EXIT /B 1
  )
  REM # PWAD found, skip ahead
  GOTO :iwad
  
  :pwad_missing
  REM --------------------------------------------------------------------------------------------------------------------
  
negative.code: 
  :iwad_check
  REM # did we find the IWAD in GOG / Steam?
  REM # TODO: if IWAD was found in GOG / Steam, offer to copy it into PortaDOOM?
  IF EXIST "%IWAD_PATH%" GOTO :iwad_found
  
  
  