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

(Lunatix) Lunatix - issues #48

Closed dlightman311 closed 4 years ago

dlightman311 commented 4 years ago

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

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

enusbaum commented 4 years ago

Most likely related to x87 implementation in the CPU Core.

We need to write some Unit Tests for the x87 Opcodes to verify they're processing data properly.

ryanfantus commented 4 years ago

Using linux x64 build 082420-2 I get the following trying to launch MBBSEmu with Lunatix (this is a new issue):

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)
paladine commented 4 years ago

sprintf is crashing on LUN5ELEV\%s

The string should technically be \\%s, but there's an error here. We ought to change the code so that if an escape character isn't matched, it just prints a \ and moves on.

In this case, it should print \ and then start processing the %s

paladine commented 4 years ago

I fixed the sprintf crash, but now it crashes when trying to call fndnxt, which is an unsupported MAJORBBS export

enusbaum commented 4 years ago

Closing, we'll track the new startup crash on #63