Giter Club home page Giter Club logo

mbbsemu's Introduction

The MajorBBS Emulation Project

dotnet License: MIT

Home | Wiki | Issue Tracker | Releases | Automated Builds | Building MBBSEmu | Modules | Discord

The MajorBBS Emulation Project Screenshot

MBBSEmu is an emulator for running MajorBBS and Worldgroup Modules on Windows, Linux, and macOS. Additionally it supports both x86 and ARM platforms, such as the Raspberry Pi. It is licensed under the terms of the MIT License.

Getting Started

  1. Extract MBBSEmu to your target folder
  2. Edit your appsettings.json to your desired settings
  3. Create a modules.json file if want to run multiple Modules
  4. Start MBBSEmu with your desired Command Line Options

That's it! :)

Is MBBSEmu Crashing or not emulating accurately?

Reporting issues is a great way to help MBBSEmu get even better! If you're running into any exceptions, crashing or just general weirdness, please let the team know!

  • Check the Website for common issues and what they mean
  • Search the MBBSEmu Issues to see if someone has already reported the same issue
  • +1 your Issue or open a new Issue for the team to investigate

Contribute

Because much of this software is several decades old, and the number of people who remember it is literally shrinking by the day, it's on us as a community to continue keeping the memory of this software alive and accessible.

You too can help out The MajorBBS Emulation Project in many ways:

  • Fix an open issue
  • Help write more automated tests
  • Debug and fix known compatibility issues with a Module
  • Add some awesome new features we haven't even thought of yet!

How It Works

MBBSEmu is very similar to DOSBox, in that it emulates the Galacticomm host environment (MajorBBS/Worldgroup) as well as the host platform (x86_16). Modules that were written for The MajorBBS & Worldgroup were different from traditional Bulletin Board System Door games at the time. They were early DLL files in NE format with specifically exported methods which allowed multiple users to be within a single module at any given time. This is also why Modules written for The MajorBBS & Worldgroup cannot be run on any other Bulletin Board System platform.

MBBSEmu works by loading the Module DLL as the original host software would, and then executing it within an emulated environment. The underlying x86 Assembly is executed on an emulated 16-bit x86 Processor with calls into ordinals in the DLL Imported Name Table being emulated. Just like the original Galacticomm software, MBBSEmu registers modules and invokes their defined routines when specific events or status codes occur on the user channel.

MBBSEmy System Diagram

License / Copyright

MBBSEmu is Copyright (c) 2023 Nusbaum Consulting, LLC and is licensed under the terms of the MIT License.

mbbsemu's People

Contributors

enusbaum avatar ericpnusbaum avatar fletcherm avatar paladine avatar sirredbeard avatar synacktic avatar tuday2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mbbsemu's Issues

[GALQFM] Quest for Magic - Crashes upon entering character name

Module Information

  • Identifier: GALQFM
  • Module Name: Quest for Magic
  • Version: unknown

Describe the bug
Crashes upon entering character name when you first enter module

To Reproduce
Steps to reproduce the behavior:

  1. Enter Module
  2. Enter your name

Expected behavior
You enter the game world

Screenshots
Annotation 2020-08-29 104105

MBBSEmu Log:

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unable to locate FFFF:00A9')
   at MBBSEmu.Memory.MemoryCore.GetWord(UInt16 segment, UInt16 offset)
   at MBBSEmu.CPU.CpuCore.GetOperandValueUInt16(OpKind opKind, EnumOperandType operandType)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ThreadHelper.ThreadStart()

Software Information:

  • OS: Windows 2019 Server Standard
  • Telnet Client: NetRunner

API REPORT:
{"UniqueIdentifier":"GALQFM","File":"GALQFM.DLL","Imports":{"DOSCALLS":[89],"PHAPI":[16],"MAJORBBS":[520,403,476,11,169,401,468,578,604,579,629,463,628,444,624,487,474,534,543,68,437,455,441,566,456,492,589,331,574,544,713,459,726,351,485,117,162,654,621,317,659,340,335,603,573,522,402,559,511,550,516,113,571,420,167],"GALGSBL":[40,58,59]}}

MBBSEmu - Nightly Cleanup Routine

Modules register a "Midnight Cleanup Routine" when calling REGISTER_MODULE() during init. On a traditional MajorBBS/Worldgroup install, this routine is invoked once per day (3:00A by default). Most modules use this routine to handle cleanup, user maintenance, and daily resets for mobs, etc.

MBBSEmu should:

  1. Have a configuration option in the appsettings.json of a time (UTC? Local?) for the time of day this routine is to run
  2. The Worker Thread/Event Loop in MbbsHost.cs should be enhanced to execute these routines in each registered module once per day at the given time

https://github.com/enusbaum/MBBSEmu/blob/master/MBBSEmu/HostProcess/MbbsHost.cs

Note:
As per the MajorBBS Development Guide, the Channel Number while Auto-Cleanup operations are being invoked should be set to -2 (0xFFFE)

[MBBSEmu] - MZ EXE Support

Many MajorBBS & Worldgroup modules came packaged with utilities that are designed to be run offline through the main administration menus, or online during the nightly cleanup (defined in the MDF file for the given module).

Ideally, MBBSEmu would be expanded with a new command line option (-EXE) where users could specify the EXE file to be emulated and run. There are some technical differences to be considered:

  1. Majority of APIs within an MZ EXE file will require a more robust implementation of the INT 21h API set within the CpuCore.cs
  2. Because the target output is the console, depending on the INT 21h API, there might be some drawing shenanigans for cursor locations, etc.
  3. A lot of Console Applications use ANSI formatting for colors/etc. This might present issues on platforms that don't support the ANSI character set/encoding on the console

Technical Info:
MZ EXE Format: https://www.fileformat.info/format/exe/corion-mz.htm

Mutants! - Crash when enumerating "stores"

Mutants! crashes when performing a "stores" command after buying land and opening a store.

Unhandled exception. System.Exception: Unsupported Key Length: 30
   at MBBSEmu.Btrieve.BtrieveFileProcessor.GetByKeyNextNumeric(BtrieveQuery query)
   at MBBSEmu.Btrieve.BtrieveFileProcessor.SeekByKey(UInt16 keyNumber, ReadOnlySpan1 key, EnumBtrieveOperationCodes btrieveOperationCode, Boolean newQuery)
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.qnpbtv()
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Looking at the API for qnpbtv(), it assumes a query performed before it and passes the same query the second time for the "Next" part of the operation.

Will need to double check the logic in that if a new key is passed in as part of the "Next" operation, if it should be considered a new query to get next from the current file position.

[SFAYTZ] Yahtzee - No Instructions displayed when you type "I" from the Main Menu

Module Information

  • SFAYTZ
  • Yahtzee

Describe the bug
When trying to display instructions, nothing is displayed and it hangs until you hit enter.

To Reproduce

  1. Enter the Module
  2. Hit I
  3. Observe blank output
  4. Hit enter to return to main menu

Expected behavior
Instructions should appear

** Technical Information **

It appears SFAYTZ does an open of SFAYTZ.INS and should output the content but it is not. The loop is the module going into deferred execution by calling btuinj for status 240. This is how it monitors for "Enter" before re-displaying the menu.

It opens the file successfully and saves the pointer, but it's not displaying the contents.

Telnet session terminated with socket error: WouldBlock

MBBSEmu Build #082020-4

After logging in play a game which requires a lot of input such as blox or or simply hold down enter at the main menu. After 1-3 seconds the telnet session is terminated.

MBBSEmu does not crash but logs:

2020-08-20 21:18:32.7580 Warn MBBSEmu.Session.Telnet.TelnetSession.CloseSocket Session x.x.x.x:yyyyy (Channel: 2) socket error: WouldBlock

and:

Warn MBBSEmu.Session.Telnet.TelnetSession.Send Channel 2: Attempted to write on a disposed socket

at a rate of around 700 per second.

40.txt

Mutants! - Creatures & Items missing their Names

Overview

When you enter a room in Mutants! that contains a monster or items on the floor, they can appear without their names.

Details

The game loads the base names for Items & Monsters from the Btrieve files (MJWMUTI.DAT & MJWMUTM.DAT). I'm able to confirm these files are being loaded correctly but I suspect there's an issue with the pointer to the given Btrieve record after a query is being performed.

image

I discovered recently that if a null pointer is passed in for the result record on a Btrieve Operation through MAJORBBS.H (such as GABBTV()), that it sets the result record pointer only in the current BTRIEVE struct. Need to verify that this logic is consistent across all Btrieve Query/Retrieval operations as I suspect Mutants! is getting a null/bad pointer for the record if it's looking in the BTRIEVE struct and it's not being set properly.

[SFAYTZ] Yahtzee - Crash on Exit

Module Information

  • Identifier: SFAYTZ
  • Module Name: Yahtzee
  • Version: Unknown

Describe the bug
Module crashes MBBSemu on exit

To Reproduce
Steps to reproduce the behavior:
Enter module - play game - upon exit it will crash MBBSEmu

Expected behavior
Exit properly

Screenshots
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 131')
at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
at MBBSEmu.CPU.CpuCore.Tick()
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer) at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadHelper.ThreadStart()

Software Information:

  • OS: Windows 2019 Server Standard
  • Telnet Client: Netrunner

[MHWWHL] Wheel of Fame! - Crashing on any command in game

Module Information

  • Identifier: MJWWHL
  • Module Name: Wheel of Fame!
  • Version: Unknown

Describe the bug
Module crashes on any input once you are playing a game

To Reproduce
Steps to reproduce the behavior:
Enter module - play game - Any input once in game will crash MBBSemu

Expected behavior
Game plays properly

Screenshots
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 579')
at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
at MBBSEmu.CPU.CpuCore.Tick()
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Software Information:

  • OS: Windows 2019 Server Standard
  • Telnet Client: Netrunner

API REPORT
{"UniqueIdentifier":"MJWWHL","File":"MJWWHL.DLL","Imports":{"DOSCALLS":[89],"PHAPI":[16],"MAJORBBS":[574,762,827,459,713,460,625,330,437,516,561,599,550,628,313,53,485,534,326,578,604,566,650,441,389,543,455,456,544,65,492,589,331,476,559,474,521,761,335,463,403,629,113,785,787,786,582,117,119,162,579,401,573,654,484,520,665,571,560,77,11,659,486,621,351,522,94,411,205,225,622,757,357,167],"GALGSBL":[40,63,72,59]}}

Crashes on long string length

Typing 30 characters at the Username prompt and pressing return at the Password prompt causes this crash (1):

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
at MBBSEmu.HostProcess.Structs.UserAccount.GetUserId()
at MBBSEmu.HostProcess.HostRoutines.MenuRoutines.LoginPasswordInput(SessionBase session)
at MBBSEmu.HostProcess.HostRoutines.MenuRoutines.ProcessSessionState(SessionBase session, Dictionary`2 modules)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Typing 60 characters at the Username prompt and pressing return causes this crash (2):

Unhandled exception. System.ArgumentException: Destination array was not long enough. Check the destination index, length, and the array's lower bounds. (Parameter 'destinationArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at MBBSEmu.HostProcess.Structs.UserAccount.SetUserId(String username)
at MBBSEmu.HostProcess.HostRoutines.MenuRoutines.LoginUsernameInput(SessionBase session)
at MBBSEmu.HostProcess.HostRoutines.MenuRoutines.ProcessSessionState(SessionBase session, Dictionary`2 modules)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Crash 2 is also reproducible at the username prompt during new user signup.

[WCCMMUD] MajorMud - Consider supporting Megamud default settings for global commands and messages

I expect that our largest, long-term user group will be people scripting Majormud. And with Megamud specifically.

Attached is a screenshot of Megamud's default global commands and settings. Long term let's seek to support these defaults.

This is low priority and cam come well after basic Majormud and other module support.

Relevant commands and strings from the screenshot:

  • Logoff command
  • Relog command
  • Toggle ANSI
  • Logon message
  • Logoff message
  • Shutdown message
  • Broadcast message

I am not sure about these two items in the screenshot:

  • Speech prefix
  • Broadcast prefix

Megamud default bbs comms

Selecting modules from main menu

There seems to be an input handling issue in build 081920-8. If more than 9 modules are loaded attempts to access modules with an option number of greater than 9 seem to have the second digit truncated loading module 1.

Additionally after this occurs BladeMaster and Blox are left in a inaccessible state where only the "module menu" is displayed then returning to the main menu. Restarting MBBSEmu restores access until a module > 9 is selected again.

Captures:

first.txt
second.txt

[MHWWHL] Wheel of Fame! - Crashing on start of a game

Module Information

Identifier: MJWWHL
Module Name: Wheel of Fame!
Version: Unknown

Describe the bug
Module crashes once you start a game (basic commands seem to work now!)

To Reproduce
Steps to reproduce the behavior:
Enter module - Type "Play" -- after about 10 seconds a new game will start and after it announces the Multiplier for the game it crashes

Expected behavior
Game plays properly

Screenshots
Annotation 2020-08-29 104102

MBBSEmu Error:
Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key '65535' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.outprf()
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ThreadHelper.ThreadStart()

Software Information:

OS: Windows 2019 Server Standard
Telnet Client: Netrunner

API REPORT
{"UniqueIdentifier":"MJWWHL","File":"MJWWHL.DLL","Imports":{"DOSCALLS":[89],"PHAPI":[16],"MAJORBBS":[574,762,827,459,713,460,625,330,437,516,561,599,550,628,313,53,485,534,326,578,604,566,650,441,389,543,455,456,544,65,492,589,331,476,559,474,521,761,335,463,403,629,113,785,787,786,582,117,119,162,579,401,573,654,484,520,665,571,560,77,11,659,486,621,351,522,94,411,205,225,622,757,357,167],"GALGSBL":[40,63,72,59]}}

Mutants! - Prompt Character not being displayed (btupmt)

Mutants! utilizes GSBL.btupmt() to set the prompt character that is displayed for a user when input is ready to be accepted. While MBBSEmu currently accepts setting the btupmt value, it is not displaying the prompt character properly.

In the case of Mutants!, the prompt character is >

image

Expected:

image

MajorMUD - No Deferred Execution (Cannot Move, Exit, etc.)

Overview:

There's an issue with MajorMUD (1.11g -> 1.11p) where once you create your character and enter the game, while some commands work, other commands that have deferred execution do not.

Details

There are some actions in MajorMUD that use a delayed/deferred execution method in order to simulate things such as movement delay, being over encumbered, etc.

It appears to accomplish this, MajorMUD kicks off a BEGIN_POLLING() on the Channel after a user tries to move, exit, or perform one of these actions. The issue appears that the follow-up (delayed) execution is not being completed within BEGIN_POLLING(), causing the user to be suck in a waiting state.

I can confirm that BEGIN_POLLING() does start on the specified channel and appears to be executing, but something with the state or logic within the routine isn't firing the deferred event properly.

[SFAYTZ] Yahtzee - Inputs not working correctly

Module Information

  • Identifier: SFAYTZ
  • Module Name: Yahtzee
  • Version: Unknown

Describe the bug
Inputs not completely working - Score and Exit module work, partial/full rerolls do not "R123", "R12", "R1", "RA"

To Reproduce
Steps to reproduce the behavior:
Enter module, "S" works but not "R123" or "R12" or "RA" (roll commands), all other commands seem to work

Expected behavior
Ability to "lock dice in" and roll for better results

Screenshots
R)oll, S)core, Q)uit, or ? to re-display: R3

*** Invalid die number.

You can only roll die numbers 1 thru 5.

Example:

R)oll, S)core, Q)uit, or ? to re-display: R123

...will roll die numbers 1, 2, and 3.

Screenshots 2
RA

*** Invalid die number.

You can only roll die numbers 1 thru 5.

Example:

R)oll, S)core, Q)uit, or ? to re-display: R123

...will roll die numbers 1, 2, and 3.

To roll all the dice, enter: RA

Software Information:

  • OS: Windows 2019 Server Standard
  • Telnet Client: Netrunner

MBBSEmu - Logon Routine Required

Describe the bug
When a user logs into the system, the function registered to lonrou() for each module is invoked.

You're currently able to disable this functionality via the appconfig.json option Module.DoLoginRoutine.

Additionally, lonrou() is not being called for Rlogin clients

The problem with the logic is that modules assume lonrou() will be invoked with each login of a channel. Some modules (such as Tele-Arena) use lonrou() as an opportunity to load a player record.

Proposed Solution

  1. Add a bool property on session base for OutputEnabled to specify if data is to be sent to the channel
  2. In SessionBase.SendToClient, do nothing if OutputEnabled is set to TRUE
  3. For Rlogin clients, on initial connect set OutputEnabled to TRUE
  4. If the Rlogin client is connecting to the main port (for main menu), run all lonrou() routines as they would for a standard Telnet User
  5. If the Rlogin client is connecting directly into a module, run the lonrou() for that module before the user is put into the module
  6. Set OutputEnabled to FALSE after lonrou() has been executed for Rlogin CLients

Additionally ....

  1. If appconfig.json setting Module.DoLoginRoutine is TRUE, set OutputEnabled to FALSE for all clients connecting via Telnet and set back to TRUE after lonrou() routines have executed.

[DIALCHAT] DialChat - Configuration commands unavailable.

DialChat handles configuration in module vs msg via the /config, /config1 & /config2 commands. Under MBBSEmu when attempting to use any of these commands DialChat responds with No such command.

Likely unrelated but there is also welcome message displayed on entry that is bypassed on MBBSEmu and the module responds with Welcome back, name!. In DEMO mode this is where the module tells the user they are limited to 5 minutes until the sysop registers the module.

Verified this works correctly in v6.25.

image
image
image
image

rLogin - MysticBBS - Extra Carriage Return

When going from MysticBBS <> MBBSEmu on Windows 2019 Server Standard, using port 31337

I have tried Mutants!, MajorMud, and Casino -- all of them are adding an extra carriage return after every line

image

[DIALCHAT] DialChat - Saving settings in DialChat causes crash due to missing ordinal 224 (FSDFXT)

Enter DialChat, execute /set command, change a value and save.

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 244')
at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
at MBBSEmu.CPU.CpuCore.Tick()
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer) at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.HostProcess.HostRoutines.FsdRoutines.ExitingFullScreenDisplay(SessionBase session)
at MBBSEmu.HostProcess.HostRoutines.FsdRoutines.ProcessSessionState(SessionBase session, Dictionary`2 modules)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadHelper.ThreadStart()

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

Module Information

  • Identifier: CXO-LORD
  • Module Name: Distant Places T-LORD IGM Script Expander
  • Version: 1.1A

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:

  • OS: CentOS 7.7.1908 / Case Insensitive FS

(LOGCAS) Casino does NOT like the graceful shutdown

Hit CTRL-C in Windows 2019 Server running MBBSEmu -- Mutants! & T-LORD shutdown correctly, Casino threw this error:

2020-08-19 22:34:41.4263 Info MBBSEmu.HostProcess.MbbsHost.b__18_0 Calling shutdown routine on module LOGCAS
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unable to locate FFFF:00C1')
at MBBSEmu.Memory.MemoryCore.GetWord(UInt16 segment, UInt16 offset)
at MBBSEmu.CPU.CpuCore.GetOperandValueUInt16(OpKind opKind, EnumOperandType operandType)
at MBBSEmu.CPU.CpuCore.Tick()
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.HostProcess.MbbsHost.CallModuleRoutine(String routine, Action`1 preRunCallback, UInt16 channel)
at MBBSEmu.HostProcess.MbbsHost.Shutdown()
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

MBBSEmu crashed when console telnet client session killed

When killing a client telnet session, MBBSEmu fails with the following:

Unhandled exception. System.Exception: Invalid IAC?
   at MBBSEmu.Session.Telnet.TelnetSession.ParseIAC(ReadOnlySpan`1 iacResponse)
   at MBBSEmu.Session.Telnet.TelnetSession.ProcessIncomingClientData(Int32 bytesReceived)
   at MBBSEmu.Session.Telnet.TelnetSession.OnReceiveData(IAsyncResult asyncResult)
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback()
   at System.Net.ContextAwareResult.<>c.<Complete>b__15_0(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.LazyAsyncResult.InvokeCallback(Object result)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode)
   at System.Net.Sockets.OverlappedAsyncResult.CompletionCallback(Int32 numBytes, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError errorCode)
   at System.Net.Sockets.SocketAsyncContext.BufferMemoryReceiveOperation.InvokeCallback(Boolean allowPooling)
   at System.Net.Sockets.SocketAsyncContext.OperationQueue`1.ProcessAsyncOperation(TOperation op)
   at System.Net.Sockets.SocketAsyncContext.ProcessAsyncReadOperation(ReadOperation op)
   at System.Net.Sockets.SocketAsyncContext.ReadOperation.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Aborted (core dumped)

[BSSTELE] The Hideout! - Crash after entering user ID

Module Information

  • Identifier BSSTELE
  • Module Name The Hideout!

Describe the bug
Module loads and inits but crashes after entering user ID due to missing ordinal 480.

To Reproduce
Steps to reproduce the behavior:

  1. Enter module
  2. Enter name when prompted to enter a new ID
  3. Press return

Expected behavior
Enter chat with chosen user ID.

Screenshots

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 480')
at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
at MBBSEmu.CPU.CpuCore.Tick()
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer) at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

API Report:

{"UniqueIdentifier":"bsstele","File":"bsstele.dll","Imports":{"DOSCALLS":[89],"PHAPI":[16],"MAJORBBS":[476,403,629,112,113,334,521,350,463,628,468,480,578,511,474,637,520,543,550,560,574,566,650,441,456,492,589,331,460,459,636,625,786,486,401,783,624,119,437,785,458,713,522,167],"GALGSBL":[30,72]}}

Notes:

Ordinal 480 is the profanity filter (PROFAN) and for now it might be easy change to return no/low profanity on all calls to it.

Software Information:

  • OS: CentOS 7.7.1908 / Case Insensitive FS
  • Telnet Client: Netrunner

[MBBSEmu] RLogin - First entry is ignored upon connection

Module Information

  • Identifier: MBBSEmu
  • Module Name: Rlogin
  • Version: 08-29-2020-1

Describe the bug
Upon connecting to the "menu" based RLogin port from MysticBBS I am shown the menu of modules, no matter what I enter it ignores and shows the menu again. Once the menu is repeated you can now select a module and everything works.

To Reproduce
Steps to reproduce the behavior:

  1. Connect to RLogin menu port (shows list of modules)
  2. Enter any number 1-9, the menu will repeat itself as if you didn't pick anything

Expected behavior
Initial menu will allow you to enter a module

Screenshots
Annotation 2020-08-29 104103

Software Information:

  • OS: Windows Server 2019 Standard
  • Telnet Client: NetRunner

MBBSEmu - Parameterize appsettings.json file location

The emulator currently makes assumptions about where to find appsettings.json file.

Let's parameterize it instead. That way we can be more explicit about where to find the file.

I'm thinking something like:
MBBSEmu -S /foo/bar/appsettings.json

I'm not married to the flag being -S. Whatever floats your boat.

MBBSEmu can't load appsettings.json unless present in the cwd

MBBSEmu exits with an error when appsettings.json is not in the current working directory.

I would expect MBBSEmu to, by default, look for the file to be in the same dir as it, regardless of what my cwd is.

λ MBBSEmu\bin\Release\netcoreapp3.1\MBBSEmu.exe
Critical Exception has occured:
System.TypeInitializationException: The type initializer for 'MBBSEmu.DependencyInjection.ServiceResolver' threw an exception.
 ---> System.IO.FileNotFoundException: Unable to locate appsettings.json file. Please ensure the file is in the same directory as the MBBSEmu executable file.
   at MBBSEmu.DependencyInjection.ServiceResolver.LoadAppSettings() in C:\git\MBBSEmu\MBBSEmu\DependencyInjection\ServiceResolver.cs:line 76
   at MBBSEmu.DependencyInjection.ServiceResolver..cctor() in C:\git\MBBSEmu\MBBSEmu\DependencyInjection\ServiceResolver.cs:line 31
   --- End of inner exception stack trace ---
   at MBBSEmu.Program.Main(String[] args) in C:\git\MBBSEmu\MBBSEmu\Program.cs:line 34

By contrast, MBBSEmu runs fine when it and appsettings.json are in the cwd

C:\git\MBBSEmu\MBBSEmu\bin\Release\netcoreapp3.1 (master -> origin)
λ .\MBBSEmu.exe
MBBSEmu - A MajorBBS/Worldgroup Emulator
By: Eric Nusbaum @ The MajorBBS Emulation Project
https://www.mbbsemu.com
https://github.com/enusbaum/MBBSEmu
-----------------------------------------------------------
Command Line Options:
(rest of output elided for brevity)

Login screen never works for me, via bsd telnet, puTTY or syncterm

The login ANSI display has only \n in it, and in my telnet clients it doesn't shift back to the beginning of the line, so everything is offset.

There is code to automatically convert all \n and \r to \r\n, but it doesn't apply to the menu screen. The code that converts these ought to move out of the module handler and into the telnet code, since it's more of a telnet issue.

Mutants! - Missing API (MAJORBBS.51 - AABBTV)

An exception is thrown in Mutants! when a creature kills another creature.

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 51')
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

This exception is due to missing API MAJORBBS.51 - AABBTV

int aabbtv (void *recptr, long abspos, int keynum);

image

Create an end-to-end integration test that loads the test module and verifies expected output

We have unit tests for testing certain functionality, but we don't have any integration/functional tests that cover entire system operation.

Ideally we'd have a test that loads the test module, executes it and accepts test driven input via some sort of memory stream, and verifies output from another memory stream.

Initially the test could cover the basic echo functionality of the module, but can be expanded further into additional tests, even going as far as testing the Full Screen Editor. By modifying the test module we can support testing any API we see fit.

[MJWMUT] Mutants! - Btrieve Error when enumerating High Scores after Nightly Cleanup

After Mutants! runs its nightly cleanup routine and establishes a high score list, when you go to enumerate the high scores the following btrieve error is thrown:

Unhandled exception. System.Exception: Unsupported Btrieve Query Option: 57
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.qnpbtv()

I suspect the issue is happening on the High Score list after a GetLast to get the HIGHEST score, it's then performing a GetPrevious (7 == GetPrevious, 50 == Keyed) to get the NEXT highest score.

We need to add support for GetPrevious in both qnpbtv() and the BtrieveFileProcessor.cs

rLogin - MysticBBS - Blank UserId passed

2020-08-20 20:58:38.9610 Info MBBSEmu.Program.Run Started MBBSEmu Build #081920-8

2020-08-20 20:59:20.1871 Info MBBSEmu.Server.Socket.SocketServer.OnNewConnection Accepting incoming Rlogin connection from 127.0.0.1:62853...
2020-08-20 20:59:20.1975 Info MBBSEmu.HostProcess.MbbsHost.AddSession Session 127.0.0.1:62853 added to incoming queue
2020-08-20 20:59:20.1975 Info MBBSEmu.HostProcess.MbbsHost.WorkerThread Added Session 127.0.0.1:62853 to channel 0
2020-08-20 20:59:20.1975 Info MBBSEmu.Session.Rlogin.RloginSession.ReceiveWorker Rlogin For User:

Example Output from /#:

image

[SFABLX] Blox - Cannot Re-enter module after exiting, requires restart MBBSEmu

1) Instructions option displays nothing.

2) Reset high scores option crashes MBBSEmu with missing ordinal 211 (FILELENGTH).

3) Pressing P to play and not specifying a level (default 0) at the prompt produces a newline and enter has to be pressed again to enter the game. Specifying the level and pressing enter loads the game as normal.

4) When the demo row limit is reached (10 rows cleared) a box is displayed indicating the demo is over and to press any key to continue. No combination of keys will exit the demo message and nothing is logged. Once this occurs if the same user attempts to re-enter the module after level selection they receive a blank screen. Once MBBSEmu is restarted the user can re-enter.

5) If the module is played for long enough it eventually hangs and no new pieces are generated nor do the options to redraw screen, quit or pause work. Nothing is logged when this occurs. Experienced this at 67, 85, 88 and 126 bits played in both DEMO and non-DEMO modes. Dropping connection and re-entering the module works.

  1. If you exit the module menu with X then press X at the main menu but answer no to the logoff question you cannot re-enter Blox until MBBSEmu is restarted. Attempts to enter print the Blox module menu then return you to the main menu. Once this occurs the module is inaccessible for all users.

(RTSLORD) - T-LoRD Issues

  1. Selecting Converse with patrons from the Inn locks up but does not crash MBBSEmu. After this occurs MBBSEmu still accepts connections but does not negotiate IAC or do anything other than log "HostProcess.MbbsHost.AddSession Session x.x.x.x:yyyyy added to incoming queue" until it is restarted.

  2. There is no way to exit live chat (Jabber with the locals) or view the help menu. Chat doesn't work and randomly a new chat message clears the screen:

image

  1. Write mail command cannot find any user specified.

  2. List warriors has odd characters in the Mastered column:

image

  1. Random characters such as shown in the list warriors screen shot are output during play sometimes they are accompanied by a screen clear.

Fighting, healing, buying/selling, bank deposit/withdraw, buying a room, flirting with violet/hearing seth all work. Longer play will be required but it seems close to being 100%.

[DIALCHAT] DialChat - /SM command crashes MBBSemu

Module Information

  • Identifier: DIALCHAT
  • Module Name: DialChat
  • Version: unknown

Describe the bug
Using the /SM command causes MBBSEmu to crash

To Reproduce
Steps to reproduce the behavior:

  1. Enter DIalChat module
  2. Execute the "/SM" command to show members

Expected behavior
Lists members

Screenshots
Annotation 2020-08-29 104104

MBBSEmu Log:
Unhandled exception. System.Exception: Unsupported Btrieve Query Option: 59
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.qrybtv()
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Software Information:

  • OS: Windows 2019 Server Standard
  • Telnet Client: NetRunner

API Report
{"UniqueIdentifier":"DIALCHAT","File":"dialchat.dll","Imports":{"DOSCALLS":[89],"PHAPI":[16],"MAJORBBS":[582,134,587,560,571,574,589,601,550,622,444,544,534,757,628,455,456,492,331,665,520,625,420,330,494,158,261,68,437,566,505,357,658,636,459,434,417,516,569,77,637,476,334,629,463,191,87,114,403,401,543,624,97,578,349,11,522,474,435,113,458,559,713,428,91,467,350,656,238,260,234,640,88,511,164,641,366,553,85,162,170,485,129,442,151,241,521,167,53,484,313,462,117,119,180,460,194,1040,244,249,252,263,242,568,55,783,785,787,786,579,121,122,131,573,413,205,210,225,584,654,486,562],"GALGSBL":[72,7,53,4,60,30,21,36,63,62,19,6,22,64]}}

(DIALCHAT) DialCHAT -- Just for Fun statistics command, "/JFF" causes crash

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 1040')
at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
at MBBSEmu.CPU.CpuCore.Tick()
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

(MJWWHL) - Wheel of Fame - crashes on entry

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unable to locate FFFF:02F9')
at MBBSEmu.Memory.MemoryCore.GetWord(UInt16 segment, UInt16 offset)
at MBBSEmu.CPU.CpuCore.GetOperandValueUInt16(OpKind opKind, EnumOperandType operandType)
at MBBSEmu.CPU.CpuCore.Tick()
at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer) at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer)
at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

(MUICHAOS) Linux path issues trying to address game data and other subdirectories

Receive the following errors trying to initialize MUICHAOS:

2020-08-20 22:49:58.3356 Info MBBSEmu.HostProcess.ExportedModules.Majorbbs.f_open Creating new file MUICHAOS/DATA/BAGS/BAG62.DAT
Critical Exception has occured:
System.IO.DirectoryNotFoundException: Could not find a part of the path '/doors/mbbsemu/games/muichaos/MUICHAOS/DATA/BAGS/BAG62.DAT'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.f_open()
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.AddModule(MbbsModule module)
   at MBBSEmu.Program.Run(String[] args)

Note that my /doors/mbbsemu/games/muichaos/ directory looks as follows, and it appears that MBBSEmu attempted to create subdirectories which conform to MS-DOS style paths:

/doors/mbbsemu/games/muichaos$ ls
 MUICHAOS       MUICHAOS.MCV  'MUICHAOS\DATA\BAGS'       MUICHAOS_MBBSEmu.zip
 MUICHAOS.DLL   MUICHAOS.MDF  'MUICHAOS\DATA\GFORUMS'
 MUICHAOS.DOC   MUICHAOS.MSG  'MUICHAOS\DATA\ROOMITMS'
 MUICHAOS.H     MUICHAOS.RLN  'MUICHAOS\DATA\TEXT'

Edit - this is what's in MUICHAOS/DATA:

/doors/mbbsemu/games/muichaos$ ls MUICHAOS/DATA/
BIZNESS.DAT   FAME.DAT      LOG.DAT       NEWSTAND.DAT  USERFILE.DAT
CLOSETS.DAT   GUILDS.DAT    MACROS.DAT    OFFICES.DAT
COWARDS       HELP          MAIL          ROOMADD.DAT
CRITFILE.DAT  ITEMFILE.DAT  NAMEFILE.DAT  ROOMFILE.DAT

MBBSEmu - Global Command Processor

Modules register global commands using void globalcmd(int (*rouptr)());.

MBBSEmu supports globalcmd() and the registered pointers are saved to Module.GlobalCommandHandlers, but the command handlers are not currently called in the main worker thread/event loop in MbbsHost.cs.

We need to enhance the worker thread/event loop in MbbsHost.cs to call the registered GlobalCommandHandlers registered for each module any time a user submits input (Status == 3).

https://github.com/enusbaum/MBBSEmu/blob/master/MBBSEmu/HostProcess/MbbsHost.cs#L114

Additional documentation for this feature is available in the MajorBBS Developers Guide

[TTIOLT] Oltima 2000 - Crashes when navigating menu

Module Information

  • Identifier: TTIOLT
  • Module Name: Oltima 2000
  • Version: unknown

Describe the bug
Game crashes when navigating initial menu

To Reproduce
Steps to reproduce the behavior:

  1. Enter Module
  2. Try to move around menu

Expected behavior
Ability to "Play" the game and navigate menu

Screenshots
Annotation 2020-08-29 104106

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in GALGSBL: 22')
   at MBBSEmu.HostProcess.ExportedModules.Galgsbl.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ThreadHelper.ThreadStart()

Software Information:

  • OS: Windows Server 2019 Standard
  • Telnet Client: NetRunner

API Report
{"UniqueIdentifier":"TTIOLT","File":"TTIOLT.DLL","Imports":{"DOSCALLS":[89],"PHAPI":[16],"MAJORBBS":[11,226,43,637,401,77,403,628,520,476,629,377,334,463,543,516,561,599,455,456,492,589,331,113,574,544,624,511,636,560,474,119,485,162,313,53,534,167,565,350,578,571,462,389,566,107,441,650,158,117,522,587,484,625,351,621,459,437,654,659,458,713,559,658,486,317,409,428,601,134,580,475,712,640,639,582,477,505,550,205,225],"GALGSBL":[11,21,30,6,36,19,22,39,60,72,56]}}

[LUNATIX] Lunatix - Crash on startup

Module Information

  • Identifier [LUNATIX]
  • Module Name [Lunatix]
  • Version [5.3f]

Describe the bug

Critical Exception has occured:
System.OverflowException: Value was either too large or too small for an unsigned byte.
   at System.Number.ThrowOverflowException(TypeCode type)
   at MBBSEmu.HostProcess.ExportedModules.ExportedModuleBase.ProcessEscapeCharacters(ReadOnlySpan`1 inputSpan)
   at MBBSEmu.HostProcess.ExportedModules.ExportedModuleBase.FormatPrintf(ReadOnlySpan`1 stringToParse, UInt16 startingParameterOrdinal, Boolean isVsPrintf)
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.sprintf()
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.AddModule(MbbsModule module)
   at MBBSEmu.Program.Run(String[] args)

To Reproduce
Steps to reproduce the behavior:

  1. Launch MBBSEmu to run Lunatix
  2. Crash at launch time, see error

Expected behavior
Best case: Game runs. Worst case: Game doesn't run, but crash doesn't take down MBBSemu.

Software Information:

  • OS: Ubuntu 20.04 (64 bit)

(Lunatix) Lunatix - issues

  1. Opponent HP is too high. Encountered 194 to 23869 over the course of 20 fights.

  2. Hit/miss mechanics are off. In 20 out of 20 fights the opponent missed me and I missed them on every attempt. Had to end the fight with (R)unForYourLife!.

  3. Depositing and withdrawing crazy bucks seems to work but the amount variables are all wacky:

image

  1. Player information not saved on exit and re-enters as new player.

[MBMGEMP] Galactic Empire - Crashes on startup

Module Information

  • Identifier: MBMGEMP
  • Module Name: Galactic Empire
  • Version: 3.2e

Describe the bug
Game crashes on startup of MBBSemu

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to load game

Expected behavior
Game loads

Screenshots

2020-08-24 04:52:40.1280 Warn MBBSEmu.Module.MbbsModule.Execute MBMGEMP exhausted execution Units, creating additional
Critical Exception has occured:
System.FormatException: Input string was not in a correct format.
   at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
   at System.Int16.Parse(ReadOnlySpan`1 s, NumberStyles style, IFormatProvider provider)
   at MBBSEmu.Module.McvFile.GetNumeric(Int32 ordinal)
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.numopt()
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.AddModule(MbbsModule module)
   at MBBSEmu.Program.Run(String[] args)

Software Information:

  • OS: Windows 2019 Server Standard
  • Telnet Client: NetRunner

[NTHORDER] NTHOrder - Module fails to Initialize

Module Information

  • Identifier: NTHORDER
  • Module Name: Warlords of Order & Chaos
  • Version: unknown

Describe the bug
Module fails to initialize

To Reproduce
Steps to reproduce the behavior:

  1. Add module to moduleConfig.json

Expected behavior
Module initializes

Screenshots

Critical Exception has occured:
System.ArgumentException: An item with the same key has already been added. Key: STAYCAS
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   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:

  • OS: Windows Server 2019 Standard
  • Telnet Client: N/A

Telnet text entry echo'd twice, \n not interpreted by MBBSEmu

In the 081920-8 build (and a previous one that I don't recall) I can't get MBBSEmu to do anything with the text I enter while using console telnet. When I type my username, it just echos back what I typed, and I can't get it to do anything else. I have to manually ctrl-c to break out of it.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.