mbbsemu / MBBSEmu

The MajorBBS Emulation Project is an Open Source, Cross-Platform emulator for easily running The MajorBBS & Worldgroup Modules
https://www.mbbsemu.com
MIT License
129 stars 14 forks source link

[CXO-LORD] Distant Places T-LORD IGM Script Expander - Unable to load #57

Closed dlightman311 closed 3 years ago

dlightman311 commented 4 years ago

Module Information

Describe the bug MBBSEmu fails to load the module. It does not have a MSG file and fails with System.IO.FileNotFoundException during MCV compilation.

To Reproduce Steps to reproduce the behavior:

  1. Add Module.
  2. Start MBBSEmu.

Expected behavior Module loads.

Screenshots 2020-08-23 23:45:28.0158 Info MBBSEmu.Program.Run Loading cxo-lord 2020-08-23 23:45:28.0179 Info MBBSEmu.Module.MsgFile..ctor Compiling MCV from .MSG Critical Exception has occured: System.IO.FileNotFoundException: Could not find file '/mbbs/newsys/lorddp/.MSG'. File name: '/mbbs/newsys/lorddp/.MSG' at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.File.ReadAllBytes(String path) at MBBSEmu.Module.MsgFile.BuildMCV() at MBBSEmu.Module.MsgFile..ctor(String modulePath, String msgName) at MBBSEmu.Module.MbbsModule..ctor(IFileUtility fileUtility, String moduleIdentifier, String path, MemoryCore memoryCore) at MBBSEmu.Program.Run(String[] args)

Software Information:

dlightman311 commented 4 years ago

Creating a empty file named .msg in the same directory as distant places satisfies MCV compilation and the module loads but is unavailable in T-LoRD's IGM manager (T-LoRD -> (U)se Sysop Options -> (I)GM Manager):

image

On v6.25 the module shows up after being loaded in MajorBBS:

image

enusbaum commented 4 years ago

IGM DLL's might be a little tricky.

We'll have to poke into how the DLL's work. They might be dynamically loaded by T-LORD or by the system itself as modules.

Additionally, we'll need to check the relocation table for Imports in the IGM DLL to see if it requires relocation patching including ordinals within RTSLORD.

ryanfantus commented 4 years ago

Looking at a true-blue MBBS installation with T-LoRD and Distant Places, it looks like the Distant Places installer does a couple of things.

During the install process it looks for the MBBS executable, so it's likely throwing the DLL in there somehow. Additionally, it adds two lines to the file IGMLIST.TXT in the RTSLORD subdirectory. The contents of that file are:

CXO-LORD
`0D`9istant `0P`9laces! `7(LORD IGM Expansion by `%M`7ike `%S`7nyder)

CXO-LORD.DLL and CXO-LORD.MDF are in the root MBBS directory. There is a subdirectory, \CXOLIGMS, which appear to contain dozens of IGMs using the Distant Places logic.

enusbaum commented 4 years ago

I looked at the Imports for CXO-LORD and it APPEARS to be a standalone module. No reason it couldn't be supported. Need to investigate more.

enusbaum commented 3 years ago

The MSG issue will be fixed in PR #119