dosemu2 / fdpp

FreeDOS plus-plus, 64bit DOS
GNU General Public License v3.0
198 stars 18 forks source link

BBS Door "Dungeon Master" can't find configfile #212

Closed ryanfantus closed 1 year ago

ryanfantus commented 1 year ago

Describe the bug When trying to run a BBS Doorgame called "Dungeon Master", the main gamefile cannot find the configfile specified during the setup portion. I have confirmed this works as expected in dosbox and a DOS VM.

To Reproduce Download Dungeon Master - https://www.johndaileysoftware.com/download?method=1&terms=220DM - and run the installer. Once the installer has completed, run 'dm.exe /LOCAL' and get an error that it cannot find "DEFAULT.CFG" - which is in .\config\ - also note that this will work when trying to use another means (i.e., dosbox) to run the game.

Attach program/game binaries or provide an URL https://www.johndaileysoftware.com/download?method=1&terms=220DM

Attach the log

FDPP kernel 1.6 [GIT: ] (compiled Jan 30 2023)
fdpp: plugin loaded: 1
CONF: config variable parser_version_3 set
CONF: config variable c_system set
CONF: Parsing built-in dosemu.conf file.
CONF: config variable version_3_style_used set
CONF: Parsing /etc/dosemu/dosemu.conf file.
CONF: Parsing built-in global.conf file.
CONF: mapping driver = 'auto'
debug flags: -a+cw
CONF: timer freq=18, update=54925
CONF: CPU set to 586
CONF: CPUEMU set to sim
CONF: CPU VM set to 1
CONF: CPU VM set to 1 for DPMI
CONF: 8192k bytes EMS memory
CONF: EMS-frame = 0xe000
CONF: dos_up: on
CONF: DPMI-Server on (0x20000)
CONF: DPMI base addr = 0x2000000
CONF: DPMI linear reserve size = 0x80000
CONF: PM DOS API Translator on
CONF: No DJGPP NULL deref checks: on
CONF: 8192k bytes int15 ext memory
CONF: 16384k bytes XMS memory
Warning: CONF: dosemu not running on console
CONF: time mode = 'linux'
SER: directory /var/lock namestub LCK.. binary No
MOUSE: /dev/input/mice, type 7 using internaldriver: yes, emulate3buttons: no baudrate: 0
CONF: Keyboard-layout us
Warning: CONF: **** Warning: floppy /dev/fd0 not accessible, disabled
CONF: fastfloppy = 1
default_drives 0
Setting up drive C, ~/.dosemu/drive_c
Creating default drive C
Added drive 0 (80): ~/.dosemu/drive_c
default_drives 1
Added drive 1 (81): /usr/share/dosemu/dosemu2-cmds-0.3
Setting up default drives from E
Added drive 2 (82): /usr/share/comcom32
Added drive 3 (83): /usr/share/dosemu2-extras/bat
CONF: IPX support off
CONF(LPT0) f: (null)   c: lpr -l  t: 20  port: 0
CONF(LPT1) f: (null)   c: lpr -P PDF  t: 20  port: 0
CONF: not allowing speaker port access
CONF: Packet Driver enabled.
CONF: NE2000 enabled.
CONF: config variable c_system unset
Command line: /usr/bin/dosemu.bin -o /home/ryan/.dosemu/boot.log
Warning: Linux kernel 5.15.0; CPU speed is 2199996000 Hz
Warning: CPU-EMU speed is 2200 MHz
CONF: V86 cpu vm set to 1
CONF: DPMI cpu vm set to 1
CONF: not running on console
CONF: mostly running as USER: uid=1000 (cached 1000) gid=1000 (cached 1000)
CONF: priv operations unavailable
Warning: dosemu2-2.0pre9 is coming up on Linux version 5.15.0-58-generic dosemu2/dosemu2#64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64
Warning: Compiled with clang version 14.0.0 (gnuc 4.2)Warning:  64bit
Warning: CFLAGS: -Wno-microsoft -Wno-incompatible-pointer-types -Wno-address-of-packed-member -Wall -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -fms-extensions -pthread -Wno-unused-result -Wcast-qual -Wwrite-strings -Wstrict-aliasing=2 -fsigned-char -Wno-address-of-packed-member -ggdb3 -fdebug-macro -fpie -g -O2 -ffile-prefix-map=/build/dosemu2-Y1BMcA/dosemu2-2.0~pre9-7891=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security
CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K))
CONF: reserving 16Kb at 0xFA000 for 'r' (Dosemu reserved area)
CONF: reserving 8Kb at 0xFE000 for 'b' (BIOS)
initial register values: fs: 0x0000  gs: 0x0000 eflags: 0x0202
initial segment bases: fs: 0x7fd78c8f70c0  gs: (nil)
CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory)
Warning: Using V86 mode inside KVM
Conventional memory mapped from 0x7fd789c1e000 to 0x7fd769b0e000
DPMI memory mapped to 0x7fd769c1e000 (reserve)
Registering HWRAM, type=m base=0x110000 size=0x800000
CONF: reserving 64Kb at 0x100000 for 'H' (HMA)
loading fonts for cp437
VID: Video set to Video_term
ERROR: term: stderr still on tty, closing
Registering HWRAM, type=e base=0xa5f6000 size=0x400000
CONF: reserving 4Kb at 0xC0000 for 'V' (VGAEMU Video BIOS)
Warning: SERIAL $Id$
DPMI: mem init, mpool is 140468224 bytes at 0x7fd76bb0e000
Warning: Using DPMI inside KVM
TIME: using 9154 usec for updating ALRM timer
CONF: freeing region for 'E' (EMS page frame)
booting with comcom32
config.boot_dos set to 400000
config.int_hooks set to 0
config.force_revect set to 0
CONF: reserving 124Kb at 0xC1000 for 'U' (Upper Memory Block (UMB, XMS 3.0))
CONF: reserving 40Kb at 0xF0000 for 'U' (Upper Memory Block (UMB, XMS 3.0))
CONF: reserving 16Kb at 0xE0000 for 'E' (EMS page frame)
CONF: reserving 16Kb at 0xE4000 for 'E' (EMS page frame)
CONF: reserving 16Kb at 0xE8000 for 'E' (EMS page frame)
CONF: reserving 16Kb at 0xEC000 for 'E' (EMS page frame)
DOS termination requested
leavedos(do_doshelper:65|0) called - shutting down
leavedos thread started
leavedos thread ended
coopthreads stopped

Package info:
dosemu2: installed
dosemu2 2.0~pre9-7891-79f529cd9+202301310546~ubuntu22.04.1
fdpp: installed
fdpp    1.6-1321-7e7d9cf+202301302116~ubuntu22.04.1

A regression? I believe this worked as expected in dosemu1.

Additional info Using dosemu-freedos, /etc/dosemu/dosemu.conf is as follows:

$_cpu_vm = "kvm"
$_cpu_vm_dpmi = "kvm"
$_cpuemu = (1)
$_hogthreshold = (10)
$_timemode = "linux"
$_fixed_term_size = "80x25"
$_layout = "us"
$_rawkeyboard = (0)
$_joy_device = ""
$_speaker = ""
$_sound = (off)
stsp commented 1 year ago

Should now be fixed. Your instructions are incomplete because it used to ask for "dmmodule.dat" first. So I need to spend half an hour figuring out where to get this one. Please provide complete instructions next time, thanks.

stsp commented 1 year ago

Also this software is full of a famous "runtime error 200" bug. You may want to apply the patches to it, google for "runtime error 200" to find them out.

ryanfantus commented 1 year ago

Wow, that was super quick! Apologies re: dmmodule.dat, didn't realize. I appreciate the speedy turnaround here, thanks!

stsp commented 1 year ago

Please note that recently I also implemented the proper support for remote mode doors: https://github.com/dosemu2/dosemu2/issues/1706#issuecomment-1407648713 There needs to be some coordinated efforts to get dosemu2 a main-stream platform for such things, so if you can participate (like trying remote mode over a new functionality and let us know the results) - please do. Patching out the "runtime error 200" bug should also be the part of that process.

ryanfantus commented 1 year ago

Confirmed this fix works and the game runs perfectly. Thanks! Unbelievable speed/turnaround. Please let me know if there's some way I can donate to this project as I use it a ton for my DOS BBS doorgames.

Re: runtime 200 bug, yeah, sorry, forgot to mention that as well when I initially reported the bug. I'm just very used to patching these by now it's almost a reflex lol.

As far as remote mode doors, very cool. I'll definitely give this a whirl. Thanks for the note.

stsp commented 1 year ago

Confirmed this fix works and the game runs perfectly.

Interesting because you said you are using dosemu-freedos. So actually you are not using dosemu-freedos then?

Please let me know if there's some way I can donate to this project

This is an interesting question. So far, the only person donating to that project is myself: I donate on patreon to SDL in a hope they will implement the features we need (which isn't happening of course, but they are good guys nevertheless), and I also donate to the bounties for some code for dosemu2 (but such a bounty was taken only once). So I see 2 possibilities: you can either offer the bounties for the features you need, or you can donate on patreon to me, to compensate my own donations to the project. :) Of course if more people want to donate and my own costs are compensated, we would need to ask all other contributors too. But as long as I am the only donor, I take the liberty to suggest donating to compensate my own donations. :)

Re: runtime 200 bug, yeah, sorry, forgot to mention that as well when I initially reported the bug.

I mean, that should be done in a more coordinated manner. Like uploading the patched binaries somewhere, and offer to download them, or maybe ask the original sites to provide the patched versions. Otherwise people always gets confused about "why things don't work on dosemu2, lets just use dosbox".

There was such an attempt: http://wiki.synchro.net/howto:dosemu2 But as you can see, this all failed. Writing a proper howto, uploading the patched binaries, providing a proper bug reports and feature requests here is what needs to be done. Those people tried this all, but their attitude was mostly "this worked well on dosemu1, so if you can't get it to work on dosemu2 then you are an idiot and we can't waste our time on that". So their bug reports were not reproducible, their test-cases didn't work for me as advertised, their configs were full of outdated dosemu1-specific options, and the communication have failed.

ecm-pushbx commented 1 year ago

Please let me know if there's some way I can donate to this project

This is an interesting question. So far, the only person donating to that project is myself: I donate on patreon to SDL in a hope they will implement the features we need (which isn't happening of course, but they are good guys nevertheless), and I also donate to the bounties for some code for dosemu2 (but such a bounty was taken only once). So I see 2 possibilities: you can either offer the bounties for the features you need, or you can donate on patreon to me, to compensate my own donations to the project. :) Of course if more people want to donate and my own costs are compensated, we would need to ask all other contributors too. But as long as I am the only donor, I take the liberty to suggest donating to compensate my own donations. :)

Can you link your patreon here?

stsp commented 1 year ago

Hmm, actually to give you a link, it seems I need to create the initial page... So here it is: patreon.com/stsp I was using patreon only for donating so far, so the page is just created, but it doesn't mean I've just registered there. :) I probably also need to create a memberships, or are the donations already possible?

Note: saying that I am the only donor, needs a clarification: "in a last 7-8 years". Because 10 years ago dosemu2 project was started exactly because a few people got a "dosbox is only for games" usual reply at dosbox forums, and offered me quite a good sums of money (I mean, really good, a few thousands in bucks) to start this all. This didn't help at a global scope (dosbox is no longer only for games and has a superior features these days), but those guys got all the features they requested, and above.

ecm-pushbx commented 1 year ago

Hmm, actually to give you a link, it seems I need to create the initial page... So here it is: patreon.com/stsp I was using patreon only for donating so far, so the page is just created, but it doesn't mean I've just registered there. :) I probably also need to create a memberships, or are the donations already possible?

I don't see a way to subscribe donations to you just yet, no.

Note: saying that I am the only donor, needs a clarification: "in a last 7-8 years". Because 10 years ago dosemu2 project was started exactly because a few people got a "dosbox is only for games" usual reply at dosbox forums, and offered me quite a good sums of money (I mean, really good, a few thousands in bucks) to start this all.

I don't have thousands of €$ but I'd be happy to chip in a little every month.

This didn't help at a global scope (dosbox is no longer only for games and has a superior features these days),

DOSBox-X is okay, but DOSBox is still very focused on games. And the FS redirector is only implemented for the internal DOS there I believe, unlike dosemu's MFS which works with any compatible DOS kernel.

stsp commented 1 year ago

I don't see a way to subscribe donations to you just yet, no.

I've got a notification that my page is currently under a review. I think it will take a few hours.

I don't have thousands of €$ but I'd be happy to chip in a little every month.

Thanks! :) I haven't even created an option to donate "thousands". If the sums will ever be above covering my own donations, then this all will need to be re-considered anyway, as I can't take the large sums for what others also contributed in. Which is usually where every donation question stops. People do not know how to share donations between contributor, and do not take anything at all. But well, this time let's at least try, because I will not take the sum, but rather re-donate.

DOSBox-X is okay, but DOSBox is still very focused on games.

I personally think dosbox-staging has the best potential. dosbox-x is so much concerned on a portability to win95 and win31, that even building it under linux is/was a challenge! And its not fast enough. But dosbox-staging seems to have a lot of a dev power and is using it adequately.

unlike dosemu's MFS which works with any compatible DOS kernel.

I hope to bring in more features, like a tool-chain for building the djgpp-based apps for 64 bits. There are already the reverse-engineering frame-works around libdosbox, so we need to try the library approach too. Being just an emulator is no longer viable, too many competitors around. Alas, libdosbox is already there too... :)