libretro / libretro-prboom

Port of prboom to libretro - plays Doom, Doom II, Final Doom and other Doom IWAD mods.
GNU General Public License v2.0
67 stars 48 forks source link

failing to find pwad and deh files and save folder prboom.cfg problem #57

Closed Sakitoshi closed 5 years ago

Sakitoshi commented 6 years ago

currently the prboom core isn't finding additional pwad and deh files.

prboom.cfg

# Doom config file
# Format:
# variable   value

# Misc settings
default_compatibility_level    -1
menu_background               1
max_player_corpse            32
flashing_hom                  0
demo_insurance                2
level_precache                0
demo_smoothturns              0
demo_smoothturnsfactor        6

# Files
wadfile_1                 "MASTERLEVELS.WAD"
wadfile_2                 ""
dehfile_1                 "MasterLevels.deh"
dehfile_2                 ""

# Game settings
default_skill                 3
weapon_recoil                 0
doom_weapon_toggles           1
player_bobbing                1
monsters_remember             1
monster_infighting            1
monster_backing               0
monster_avoid_hazards         1
monkeys                       0
monster_friction              1
help_friends                  1
allow_pushers                 1
variable_friction             1
sts_always_red                1
sts_pct_always_gray           0
sts_traditional_keys          0
show_messages                 1
autorun                       0

# Compatibility settings
comp_zombie                   0
comp_infcheat                 0
comp_stairs                   0
comp_telefrag                 0
comp_dropoff                  0
comp_falloff                  0
comp_staylift                 0
comp_doorstuck                0
comp_pursuit                  0
comp_vile                     0
comp_pain                     0
comp_skull                    0
comp_blazing                  0
comp_doorlight                0
comp_god                      0
comp_skymap                   0
comp_floors                   0
comp_model                    0
comp_zerotags                 0
comp_moveblock                0
comp_sound                    0
comp_666                      0
comp_soul                     0
comp_maskedanim               0

# Sound settings
sound_card                   -1
music_card                   -1
pitched_sounds                1
samplerate                22050
sfx_volume                    8
music_volume                  8
mus_pause_opt                 2
snd_channels                  8

# Video settings
screenblocks                  0
usegamma                      1
uncapped_framerate            0
filter_wall                   1
filter_floor                  1
filter_sprite                 1
filter_z                      1
filter_patch                  1
filter_threshold          49152
sprite_edges                  0
patch_edges                   0

# Mouse settings
use_mouse                     1
mouse_sensitivity_horiz      32
mouse_sensitivity_vert       10
mouseb_fire                   0
mouseb_strafe                 1
mouseb_forward                2
mouseb_backward              -1

# Key bindings
key_right                 0xae
key_left                  0xac
key_up                    0xad
key_down                  0xaf
key_menu_right            0xae
key_menu_left             0xac
key_menu_up               0xad
key_menu_down             0xaf
key_menu_backspace        0x7f
key_menu_escape           0x1b
key_menu_enter            0xd
key_setup                 0xc7
key_strafeleft            0x2c
key_straferight           0x2e
key_fire                  0x9d
key_use                   0x20
key_strafe                0xb8
key_speed                 0xb6
key_savegame              0xbc
key_loadgame              0xbd
key_soundvolume           0xbe
key_hud                   0xbf
key_quicksave             0xc0
key_endgame               0xc1
key_messages              0xc2
key_quickload             0xc3
key_quit                  0xc4
key_gamma                 0xd7
key_spy                   0xd8
key_pause                 0xff
key_autorun               0xba
key_chat                  0x74
key_backspace             0x7f
key_enter                 0xd
key_map                   0x9
key_map_right             0xae
key_map_left              0xac
key_map_up                0xad
key_map_down              0xaf
key_map_zoomin            0x3d
key_map_zoomout           0x2d
key_map_gobig             0x30
key_map_follow            0x66
key_map_mark              0x6d
key_map_clear             0x63
key_map_grid              0x67
key_map_rotate            0x72
key_map_overlay           0x6f
key_reverse               0x2f
key_zoomin                0x3d
key_zoomout               0x2d
key_chatplayer1           0x67
key_chatplayer2           0x69
key_chatplayer3           0x62
key_chatplayer4           0x72
key_weapontoggle          0x30
key_weaponcycleup         0x6d
key_weaponcycledown       0x6e
key_weapon1               0x31
key_weapon2               0x32
key_weapon3               0x33
key_weapon4               0x34
key_weapon5               0x35
key_weapon6               0x36
key_weapon7               0x37
key_weapon8               0x38
key_weapon9               0x39
key_screenshot            0x2a

# Chat macros
chatmacro0                "No"
chatmacro1                "I'm ready to kick butt!"
chatmacro2                "I'm OK."
chatmacro3                "I'm not looking too good!"
chatmacro4                "Help!"
chatmacro5                "You suck!"
chatmacro6                "Next time, scumbag..."
chatmacro7                "Come here!"
chatmacro8                "I'll take care of it."
chatmacro9                "Yes"

# Automap settings
mapcolor_back             0xf7
mapcolor_grid             0x68
mapcolor_wall             0x17
mapcolor_fchg             0x37
mapcolor_cchg             0xd7
mapcolor_clsd             0xd0
mapcolor_rkey             0xaf
mapcolor_bkey             0xcc
mapcolor_ykey             0xe7
mapcolor_rdor             0xaf
mapcolor_bdor             0xcc
mapcolor_ydor             0xe7
mapcolor_tele             0x77
mapcolor_secr             0xfc
mapcolor_exit             0x0
mapcolor_unsn             0x68
mapcolor_flat             0x58
mapcolor_sprt             0x70
mapcolor_item             0xe7
mapcolor_hair             0xd0
mapcolor_sngl             0xd0
mapcolor_me               0x70
mapcolor_enemy            0xb1
mapcolor_frnd             0x70
map_secret_after              0
map_point_coord               0
automapmode               0x0

# Heads-up display settings
hudcolor_titl                 5
hudcolor_xyco                 3
hudcolor_mesg                 6
hudcolor_chat                 5
hudcolor_list                 5
hud_msg_lines                 1
hud_list_bgon                 0
hud_distributed               0
health_red                   25
health_yellow                50
health_green                100
armor_red                    25
armor_yellow                 50
armor_green                 100
ammo_red                     25
ammo_yellow                  50
hud_active                    2
hud_displayed                 0
hud_nosecrets                 0

# Weapon preferences
weapon_choice_1               6
weapon_choice_2               9
weapon_choice_3               4
weapon_choice_4               3
weapon_choice_5               2
weapon_choice_6               8
weapon_choice_7               5
weapon_choice_8               7
weapon_choice_9               1

# Music
mus_bunny                 "..\music\doom\d_bunny.mp3"
mus_e1m1                  "..\music\doom\d_e1m1.mp3"
mus_e1m2                  "..\music\doom\d_e1m2.mp3"
mus_e1m3                  "..\music\doom\d_e1m3.mp3"
mus_e1m4                  "..\music\doom\d_e1m4.mp3"
mus_e1m5                  "..\music\doom\d_e1m5.mp3"
mus_e1m6                  "..\music\doom\d_e1m6.mp3"
mus_e1m7                  "..\music\doom\d_e1m7.mp3"
mus_e1m8                  "..\music\doom\d_e1m8.mp3"
mus_e1m9                  "..\music\doom\d_e1m9.mp3"
mus_e2m1                  "..\music\doom\d_e2m1.mp3"
mus_e2m2                  "..\music\doom\d_e2m2.mp3"
mus_e2m3                  "..\music\doom\d_e2m3.mp3"
mus_e2m4                  "..\music\doom\d_e2m4.mp3"
mus_e2m5                  "..\music\doom\d_e1m5.mp3"
mus_e2m6                  "..\music\doom\d_e2m6.mp3"
mus_e2m7                  "..\music\doom\d_e2m7.mp3"
mus_e2m8                  "..\music\doom\d_e2m8.mp3"
mus_e2m9                  "..\music\doom\d_e2m9.mp3"
mus_e3m1                  "..\music\doom\d_e3m1.mp3"
mus_e3m2                  "..\music\doom\d_e3m2.mp3"
mus_e3m3                  "..\music\doom\d_e3m3.mp3"
mus_e3m4                  "..\music\doom\d_e3m4.mp3"
mus_e3m5                  "..\music\doom\d_e3m5.mp3"
mus_e3m6                  "..\music\doom\d_e3m6.mp3"
mus_e3m7                  "..\music\doom\d_e3m7.mp3"
mus_e3m8                  "..\music\doom\d_e3m8.mp3"
mus_e3m9                  "..\music\doom\d_e3m9.mp3"
mus_inter                 "..\music\doom\d_inter.mp3"
mus_introa                "..\music\doom\d_introa.mp3"
mus_intro                 "..\music\doom\d_intro.mp3"
mus_victor                "..\music\doom\d_victor.mp3"
mus_adrian                "..\music\doom2\d_adrian.mp3"
mus_ampie                 "..\music\doom2\d_ampie.mp3"
mus_betwee                "..\music\doom2\d_betwee.mp3"
mus_count2                "..\music\doom2\d_count2.mp3"
mus_countd                "..\music\doom2\d_countd.mp3"
mus_ddtbl2                "..\music\doom2\d_ddtbl2.mp3"
mus_ddtbl3                "..\music\doom2\d_ddtbl3.mp3"
mus_ddtblu                "..\music\doom2\d_ddtblu.mp3"
mus_dead2                 "..\music\doom2\d_dead2.mp3"
mus_dead                  "..\music\doom2\d_dead.mp3"
mus_dm2int                "..\music\doom2\d_dm2int.mp3"
mus_dm2ttl                "..\music\doom2\d_dm2ttl.mp3"
mus_doom2                 "..\music\doom2\d_doom2.mp3"
mus_doom                  "..\music\doom2\d_doom.mp3"
mus_evil                  "..\music\doom2\d_evil.mp3"
mus_in_cit                "..\music\doom2\d_in_cit.mp3"
mus_messag                "..\music\doom2\d_messag.mp3"
mus_messg2                "..\music\doom2\d_messg2.mp3"
mus_openin                "..\music\doom2\d_openin.mp3"
mus_read_m                "..\music\doom2\d_read_m.mp3"
mus_romer2                "..\music\doom2\d_romer2.mp3"
mus_romero                "..\music\doom2\d_romero.mp3"
mus_runni2                "..\music\doom2\d_runni2.mp3"
mus_runnin                "..\music\doom2\d_runnin.mp3"
mus_shawn2                "..\music\doom2\d_shawn2.mp3"
mus_shawn3                "..\music\doom2\d_shawn3.mp3"
mus_shawn                 "..\music\doom2\d_shawn.mp3"
mus_stalks                "..\music\doom2\d_stalks.mp3"
mus_stlks2                "..\music\doom2\d_stlks2.mp3"
mus_stlks3                "..\music\doom2\d_stlks3.mp3"
mus_tense                 "..\music\doom2\d_tense.mp3"
mus_theda2                "..\music\doom2\d_theda2.mp3"
mus_theda3                "..\music\doom2\d_theda3.mp3"
mus_the_da                "..\music\doom2\d_the_da.mp3"
mus_ultima                "..\music\doom2\d_ultima.mp3"

log file

[libretro INFO] FindFileInDir: not found Doom2 in C:\Users\Sakitoshi\Emulation\DooM\Master
[libretro INFO] FindFileInDir: not found Doom2 in C:\Users\Sakitoshi\Emulation\DooM\Master
[libretro INFO] FindFileInDir: found C:\Users\Sakitoshi\Emulation\DooM\Master\Doom2.wad
[libretro INFO] FindFileInDir: found C:\Users\Sakitoshi\Emulation\DooM\Master\prboom.wad
[libretro INFO] FindFileInDir: not found MASTERLEVELS.WAD in C:\Users\Sakitoshi\Emulation\DooM\Master
[INFO] Environ SYSTEM_DIRECTORY: "C:\Program Files\RetroArch\system".
[libretro INFO] FindFileInDir: not found MASTERLEVELS.WAD in C:\Program Files\RetroArch\system
[libretro INFO] FindFileInDir: not found MASTERLEVELS.WAD in C:\Users\Sakitoshi\Emulation\DooM
[libretro INFO] FindFileInDir: not found MASTERLEVELS.WAD in C:\Users\Sakitoshi\Emulation
[libretro INFO] FindFileInDir: not found MASTERLEVELS.WAD in C:\Users\Sakitoshi
[libretro INFO] FindFileInDir: not found MASTERLEVELS.WAD in C:\Users
[libretro INFO] FindFileInDir: not found MASTERLEVELS.WAD in C:
[libretro INFO] FindFileInDir: not found MasterLevels.deh in C:\Users\Sakitoshi\Emulation\DooM\Master
[INFO] Environ SYSTEM_DIRECTORY: "C:\Program Files\RetroArch\system".
[libretro INFO] FindFileInDir: not found MasterLevels.deh in C:\Program Files\RetroArch\system
[libretro INFO] FindFileInDir: not found MasterLevels.deh in C:\Users\Sakitoshi\Emulation\DooM
[libretro INFO] FindFileInDir: not found MasterLevels.deh in C:\Users\Sakitoshi\Emulation
[libretro INFO] FindFileInDir: not found MasterLevels.deh in C:\Users\Sakitoshi
[libretro INFO] FindFileInDir: not found MasterLevels.deh in C:\Users
[libretro INFO] FindFileInDir: not found MasterLevels.deh in C:

on top of that, having the prboom.cfg file in the save folder is creating a problem of his own while trying to load mods. having a single config file for official wad doesn't allow to have different independent pwad/deh and music ready to run since you need to go and edit the prboom.cfg file to load different sets of pwad/deh and music. the way it was before allowed to have multiple copies of the prboom.cfg file and thus having multiple sets of mods ready to be used.

Sakitoshi commented 6 years ago

58 fixes the issue with the pwads and deh files not being found.

but having a single prboom.cfg per iwad is still an issue.

a way to solve it would be to revert the change that moves the prboom.cfg file to the save folder and only keep the saves there, it would be almost like treating the prboom.cfg file as a cue file.

another way would be to create a cue-like file that specifies the iwad, pwads, deh/bex and music to use and leave the prboom.cfg file either in the save or system folder.

but I think that either way the saves will collide as the way they behave now they all would be created in the same save folder and have the same names.

jdgleaver commented 6 years ago

One thing to note: the prboom.cfg files have to be stored in a directory with write access. That's the main reason why I moved them to the save directory (#45). If the config files are kept with the game data, you can't (for example) place your game data on an external sdcard under Android. I think that's rather important.

Sakitoshi commented 6 years ago

One thing to note: the prboom.cfg files have to be stored in a directory with write access. That's the main reason why I moved them to the save directory (#45). If the config files are kept with the game data, you can't (for example) place your game data on an external sdcard under Android. I think that's rather important.

I don't use my phone to play, so I didn't knew. but AFAIK apps can write to the external sdcard on android, the app has to request the write access and then you are asked to select the sdcard folder to authorize, at least in marchmellow (android 6), maybe they changed that again (thanks android?) but I can't test for myself as mm is as far as my xperia z3 compact can go (officially at least).

but that's kinda besides the point. it makes sense to place the cfg file in the save folder, most games do just that and keeps the content folder clean, but prboom is a special case for how pwad, deh/bex and music loading works. all things considered looks like the best option would be to move pwad, deh/bex and music from the cfg file to a cue-like file and name the save folder after said file to avoid save file collision.

Ferk commented 6 years ago

It would be good to be able to open the prboom.cfg directly as content.

But in case you didn't know, you don't really have to create prboom.cfg files. DEH files with the same name as the pwad are automatically detected by the core when loading that pwad. In the example you wrote, just make sure you have the same casing (if you filesystem is case sensitive) and just open the MasterLevels.wad, if you have MasterLevels.deh and Doom2.wad in the same directory (or parent) it should load fine without the need of creating an additional prboom.cfg file for each pwad. See #32.

Sakitoshi commented 6 years ago

I don't know about loading the prboom.cfg as content, that file contains configurations and as such belongs in the save folder. the thing is that also contains what files to load which isn't right in this case since pwad, deh/bex and music differ, that's why I suggested a new file (.dom?) that would act the same as a cue file explicitly telling the core which iwad, pwad, deh/bex and music to load. this will also eliminate any problem with retroarch trying to find files, since they all will be specified (well, except prboom.wad, since that file should be in the system folder).

I know having to create a new file is not very user friendly but gives it the flexibility that needs since some pwad use doom 2, others ultimate doom and others registered doom non-ultimate (and those last 2 share the same filename) and the wad finder defaults to doom 2, not really its fault since there is no way to tell which iwad should use.

Ferk commented 6 years ago

I don't know about loading the prboom.cfg as content, that file contains configurations and as such belongs in the save folder.

I was thinking about it being loaded as an override, so you could have whatever you want inside, if you want configuration then so be it, if you don't want the full configuration then just place the lines corresponding to the wad/dex and only the wad/dex will be changed.

I know having to create a new file is not very user friendly but gives it the flexibility that needs since some pwad use doom 2

At the moment you can have that flexibility already, but you need to differentiate doom1, udoom and doom2 inside different folders. It might not be user friendly but it does give that flexibility and I believe it's good to have them organized anyway.

not really its fault since there is no way to tell which iwad should use.

In theory if the pwad includes maps we could make it so it tries to detect if it's made to use doom2/doom1 by checking the lump name of the map, sort of how it already does when loading Doom2 iwad. Then just based on that change the order of the iwad search so it prefers to find first the iwads that match the map name convention.

But this method wouldn't cover the 100% of cases, and it's still better to have each iwad in its own directory tree together with the pwads that correspond to it.