MBBSEmu News - December 19th, 2020

First News Update to the new News section of the website! Exciting! 😊

As some of you might already know, I'm shutting down the project Patreon and moving alll news updates over here to the official website. The primary reason for this change is that MBBSEmu is now a community owned and run project. Members of the BBS community are testing, submitting issues, submitting pull requests, and making enhancements at this point much more frequently than I am individually, so it just felt right to shift gears into an open, community run model vs. a Patreon for my own benefit of running the project.

That being said, we have some really great updates to share that have been worked on over the past month since our previously tagged Alpha release of MBBSEmu, so let's get into it!

Btrieve & Caching Enhancements

@paladine continues with his 🧙‍♂️Btrieve Wizardry🧙‍♂️ by implementing a LRU Cache for the Btrieve SQLite objects within MBBSEmu. The "LRU" stands for "Least Recently Used", which defines a finite number of cache "slots", and as new items are added, items that are used less frequently are removed from the cache. In relation to MBBSEmu, Btrieve records that are stored within SQLite tables are cached in memory to make retrieval even faster for MajorBBS & Worldgroup Modules.

Where previously MBBSEmu would cache every record read/written to with no limit, now it only holds on to records that are frequently used. The screen shots on the left highlight the before and after impact on an MBBSEmu instance running 32 distinct MajorBBS Modules on Windows. Very cool! You can check out these enhancements in Pull Request #329

Additionally, with Pull Request #320, MBBSEmu now also enforces the "Non-Modifiable Key" flag when set within a Btrieve Schema. This is accomplished using a SQLite trigger thanks to the new blazing fast SQLite engine MBBSEmu uses to process Btrieve API requests. With these latest enhancements, MBBSEmu is essentially feature complete when it comes to Btrieve compatibility. This also means that we don't expect any more Schema updates to the SQLite tables for Btrieve files -- so no more having to delete your .DB files between Alpha releases.😃

MBBSEmu Memory Usage before LRU Cache
MBBSEmu Running 32 Modules before LRU Cache
MBBSEmu Memory Usage after LRU Cache
MBBSEmu Running 32 Modules after LRU Cache

DOS EXE Support

One thing we've talked about since the inception of MBBSEmu is the eventual needing to support DOS Executables. Several modules make use of the MajorBBS/Worldgroup offline utility feature, where EXE files can be called during cleanup or startup to handle data tasks -- the majority of the time being Btrieve related. This introduces some complexities because these traditional DOS programs communicate with Btrieve via DOS Interrupts, meaning you would need a full DOS OS running with the Btrieve TSR running in the background while the EXE executed.

The two major hurdles for this support are (1) writing a loader that supports MZ EXE Files and (2) supporting the DOS API layer within MBBSEmu via CPU Interrupts. Several modules (who were most likely ported from their DOS DOOR game counterparts) make use of the DOS API INT 21h to perform some operations, so we've had CPU Interrupt Handling in MBBSEmu for a while now -- but only for a handful of DOS APIs.

With the changes in Pull Request #315, MBBSEmu is now able for the first time to run a DOS EXE file, in any platform, within the context of MBBSEmu! The test program in the screen shot was is a small "Hello World" program written in C and compiled using Borland Turbo C++ 3.0! This is a small, but significant step in making MBBSEmu a feature complete emulator for MajorBBS/Worldgroup modules.

MBBSEmu Running a DOS EXE
MBBSEmu runing a DOS EXE

.NET 5 Upgrade

With Pull Request #314 we've updated MBBSEmu to use Microsoft's latest version of .NET, .NET 5 as well as C# 9.0. The primary benefit of this upgrade is the performance improvement .NET 5 brings to MBBSEmu across multiple hardware platforms including both x86 and ARM. The MBBSEmu CPU Benchmark shows a ~20-25% performance increase in x86 CPU Emulation speed thanks to performance tuning on native platforms within .NET 5. This means MBBSEmu, even running on a low powered computer such as the Raspberry Pi 4, is able to maintain the same performance as if you were running them within MajorBBS or Worldgroup on a 486 processor! MBBSEmu now has enough horsepower, even on the smallest of modern form factors, to run your favorite MajorBBS and Worldgroup Modules wherever you might want!

As a fun test, I was even able to get the MBBSEmu CPU Benchmark working on a Raspberry Pi Zero W using the latest version of Mono. While the performance wasn't earth shattering, even on a $29 computer the size of a stick of gum, MBBSEmu was able to maintain ~430,000 instructions per second, which is similar to an Intel 8086 processor. While experiments like this aren't practical in the real-world, it's fun as a demonstration of the flexibility, and portability of MBBSEmu.

MBBSEmu Emulated x86 Benchmark running on a Raspberry Pi Zero W
MBBSEmu Emulated x86 Benchmark running on a Raspberry Pi Zero W

Latest MBBSEmu Alpha

The latest tagged Alpha has 18 Pull Requests that have been merged in over the past month and represents the work of several folks all contributing to the project through testing as well as development.

You can get the latest Alpha release on GitHub (Link)