Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logsas input #377

Merged
merged 11 commits into from
Jan 22, 2021
Merged

Logsas input #377

merged 11 commits into from
Jan 22, 2021

Conversation

enusbaum
Copy link
Member

Fixes #340

  • Fixed morcnc() implementation and added Unit Tests
  • Clear VDA on Module Exit
  • Handle Deferred Execution Status when set in BTUCHI
  • Initial Inline Test of CPU sub-functions
  • Added a warning if printf/vsprintf is called with a null formatted (possible issue)
  • Added FillArray that takes variable name for FarPtr

- LOGSAS uses `CHIINP` to manually add Input Characters to the Input Buffer
- Because `BTUCHI` is returning `0`, we did't know when `ENTER` was being received
- Because of this, we split the original character received vs. the processed character throught the pipeline
- This allows us to take the appropriate action based on the character received while still maintaining the processed character
- Added Warning if printf/vsprintf formatter string is null
- Fixed `morcnc`, still needs Unit Tests
- Added Compiler Optimizations for Inlining on Opcode Subroutines
- Added missing Compiler Optimization Flags on several Opcodes
@enusbaum enusbaum merged commit 36b7a54 into master Jan 22, 2021
@@ -258,6 +258,12 @@ private static bool InSpan(ReadOnlySpan<char> spanToSearch, ReadOnlySpan<byte> c
/// <returns></returns>
private protected ReadOnlySpan<byte> FormatPrintf(ReadOnlySpan<byte> stringToParse, ushort startingParameterOrdinal, bool isVsPrintf = false)
{
if (stringToParse.Length == 1 && stringToParse[0] == 0x0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stringToParse.Length > 0 might be better, in case a larger string is sent in that begins with \0

@@ -502,6 +502,9 @@ private void ProcessSTTROU(SessionBase session)
/// <param name="session"></param>
private void ExitModule(SessionBase session)
{
//Clear VDA
session.CurrentModule.Memory.FillArray($"VDA-{session.Channel}", 0x3FFF, 0x0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: FillArray confuses me since the params are different than memset, memset wants value -> length whereas FillArray wants length -> value

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LOGSAS] Swords & Sorcery - Not able to move -- game does not seem to take input
2 participants