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
126 stars 14 forks source link

[MJWPAC] PacDude - Loads but hangs on play #449

Open TQPS opened 3 years ago

TQPS commented 3 years ago

Module Information

Describe the bug Module loads. Menu shows. Options work - except for Play Game appears to hang on some ANSI characters: [0;1;36m?

To Reproduce Steps to reproduce the behavior:

  1. Telnet into EMU
  2. Run PacDude (assumes you have it configured in the menu)
  3. Module loads
  4. Cannot Play, ANSI characters hang on display
  5. --- will allow you to drop back to WG and you can rinse and repeat (Does not crash EMU)

Expected behavior I believe it's meant to load a playboard? or some pre-game information? (Never seen it in action)

Screenshots This is the only log that shows:

2021-03-24 22:17:51.4928 Info MBBSEmu.HostProcess.ExportedModules.Galgsbl.btucmd Enable ANSI on channel 0 (Ignored)
![image](https://user-images.githubusercontent.com/66294837/112302765-8ddbd980-8cef-11eb-9b24-b604439e4ac0.png)

Software Information:

TQPS commented 3 years ago

{"UniqueIdentifier":"MJWPAC","File":"MJWPAC.DLL","Imports":{"DOSCALLS":[89],"PHAPI":[16],"MAJORBBS":[629,520,403,463,628,474,543,515,437,574,544,559,65,68,589,326,566,455,456,492,331,565,625,476,713,512,335,167,999,53,485,534,484,351,582,621,77,654,486,94,119,117,560,205,225,622,757,550,357,11,659],"GALGSBL":[59,4,11,61,9,72]}}```
TQPS commented 3 years ago

Definitely not working because of this:

2021-04-16 08:57:04.9783 Info MBBSEmu.Module.MbbsModule.LoadModuleDll Loaded MJWPAC 2021-04-16 08:57:04.9783 Debug MBBSEmu.Module.MsgFile..ctor (MJWPACX) Compiling MCV from MJWPACX.MSG 2021-04-16 08:57:04.9939 Debug MBBSEmu.Module.MbbsModule..ctor (MJWPAC) Located _INIT__: 0003:0000 2021-04-16 08:57:04.9939 Info MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC) Adding Module... 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:1) Segment 2 (424 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:2) Segment 3 (12717 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:3) Segment 4 (2772 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:4) Segment 5 (754 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:5) Segment 6 (2324 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:6) Segment 7 (5308 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:7) Segment 8 (152 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC:MJWPAC.DLL:8) Segment 9 (0 bytes) loaded! 2021-04-16 08:57:04.9939 Debug MBBSEmu.Module.MbbsModule.Execute (MJWPAC) Exhausted execution Units, creating additional 2021-04-16 08:57:04.9939 Debug MBBSEmu.Module.MsgFile..ctor (MJWPACX) Compiling MCV from MJWPACX.MSG 2021-04-16 08:57:04.9939 Debug MBBSEmu.Btrieve.BtrieveFileProcessor.LoadSqlite Opening sqlite DB C:\Boards\MBBSEMU\Modules\MJWPAC\MJWPACHI.DB AUDIT SUMMARY: Pacdude V3.01-2 demo 1/10 AUDIT DETAIL: Pacdude V3.01-2 (c)1991-95 Majorware Inc. (800)321-3774 2021-04-16 08:57:04.9939 Warn MBBSEmu.HostProcess.ExportedModules.Majorbbs.f_open (MJWPAC) Unable to find file C:\Boards\MBBSEMU\Modules\MJWPAC\MJSPAC.MDF 2021-04-16 08:57:04.9939 Info MBBSEmu.HostProcess.MbbsHost.AddModule (MJWPAC) Module Added!

Cant create a .MCV file.

enusbaum commented 3 years ago

Super interesting.

So that code there, where it looks for the file MJSPAC.MDF looks to be code to ensure you're not running an older version of the module (which I guess was named MJSPAC). When you create a file named MJSPAC.MDF you get the following CATASTRO:

image

So I think in this case we can disregard the missing MDF warning, as technically the file shouldn't exist 😄

enusbaum commented 3 years ago

A couple things are going wrong her that need to be investigated:

  1. The ANSI being written to the output looks corrupted/incomplete? It stops while trying to send an ANSI control sequence and that's what is left on the screen.
  2. PacDude appears to use deferred execution by injecting status 240 using CHIINJ. I'm unsure if we're handling this properly, as there is a difference between setting the status to 240 within STTROU and using GSBL and CHIINJ to inject the status into the channel. It might result in immediate execution of STSROU, but I'm not clear on that yet.