Activity

Oignon

Alpha 4 (v0.13.0): Switched to LGPL-3.0 License!

I have officially moved the project to the LGPL-3.0 license! LGPL-3.0 allows you to use this library in your own projects without the license “contaminating” your entire codebase. This means your project’s license remains independent of this library.

I have also (mostly) translated all code comments into French, as the NumWorks community is almost exclusively French. Additionally, I’ve added two new functions to input (is_alphanumeric and to_alphanumeric) to easily convert keyboard input into strings.

Attachment
0
Oignon

v1.12.0 is Here! - Important update: Storage sub-module refactor!

After 67 days of working on refactoring the calculator’s storage management sub-module, it’s finally done!
The logic in storage.rs has been entirely rewritten to be faster, more secure, and more modular. It’s been a long journey, but I finally made it!

-> Release here

For this third overhaul of storage.rs, I had to create a new sub-module: epsilon.rs. This module contains the structures and representations of Epsilon’s system objects. Thanks to this centralized logic, fixing a mapping error on an object will now have an immediate effect across the entire project. This is a huge plus!

This refactor forced me to dive even deeper into the calculator’s memory structure and gain a thorough understanding of its layout.

Minor Changes:

  • Updated README
  • Synced justfile
  • Updated example files
  • Added Errors enum
  • Added Rust CI workflow

I can now focus on adding new features to the library’s API !

Attachment
0
Oignon

Seems I’ve fixed the infinite loading issue!


BUT, because why not, I found more major bugs. Most are fixed, but one is a real wall:

Under unknown conditions, the host gets timed out from their own server. I’ve ensured that if the server cuts out, clients now return to the menu with an error message. The base game didn’t handle this, leaving everyone stuck on infinite loads—mind-blowing, since handling connection loss is Networking 101.


Problem is, I can’t find the cause of the host timeout yet. Limited tester availability and the bug’s random nature are slowing me down.


Other issues: Laser Triggers are totally desynced 🤷, and conveyor belts are broken even in solo…

List of fixes/patchs applied:

  • Fix #12: Simplified (removed the code causing HarmonyX warnings)
  • Fix #13: Computer.ReceiveVirtualFunctionExecute() - Checks bounds before access
  • Fix #14: Computer.ReceiveVirtualEventInvoke() - Checks bounds
  • Fix #15: Computer.ReceiveVirtualObjectDestroy() - Checks bounds
  • Fix #16: ObjectManager.ApplyAllGUS() - Absorbs NullRefs during shutdown
  • Fix #17: Automatic recovery and menu return if the server crashes or disappears.
  • Fix #18: Proper disconnection handling (prevents infinite loading and shows clear error reasons).
  • Fix #19: Improved stability and error prevention for Spline/Curve calculations.
  • Fix #20: Added safety nets to prevent crashes during control point processing.
  • Fix #21: Final security layer to catch remaining errors in curve refreshing.

Sorry for the random image, I didn’t really have any ideas for a proper illustration for this devlog.

Attachment
0
Oignon

I wrote a Python script to check the date format in the save files to see if they’ve been patched by the mod

Attachment
0
Oignon

The main issue with Mechanica’s multiplayer is the infinite loading when a player joins a game that has already been created.

I conducted extensive tests and collected logs to identify the causes of this problem. I decompiled the game code and used profiling tools to pinpoint failure points.

This allowed me to discover several major issues, some of which were much harder to identify than others. So far, I have identified and theoretically fixed 12 problems, ranging from simple precautions to logging improvements to help identify new issues in the future.

I also wrote a PowerShell build script to automatically compile the mod and update it in the game.

The patches I applied are as follows:

  1. Date reading issue

    • Fixed saved dates with incompatible formats between players.
  2. New game creation issue

    • Corrected date formats when creating new games.
  3. Save sorting issue

    • Fixed incorrectly sorted saves caused by invalid date formats.
  4. Corrupted lobby data

    • Prevented crashes caused by corrupted Steam data.
  5. Inventory loading issue

    • Prevented crashes when loading inventories with invalid Steam IDs.
  6. Network errors

    • Logged network errors without interrupting sessions.
  7. Premature disconnection

    • Blocked unintentional disconnections when the game is not paused.
  8. Lobby transition issue

    • Prevented UI crashes during lobby state changes.
  9. Lobby refresh issue

    • Prevented crashes during lobby UI refreshes.
  10. Lobby connection issue

    • Prevented crashes when attempting to join a lobby.
  11. Player connect/disconnect issue

    • Prevented crashes during player connection or disconnection events.
  12. Disconnection without saving

    • Logged and validated premature disconnections.
Attachment
0
Oignon

Version 0.10, 0.11, 0.11.1 and 0.11.2 :

  • Removed conditional imports, unnecessary since std already provides alloc when OS=YES.
  • Cleaned up imports in the setup macro.
  • Switch to 0.11.2-alpha.2
  • Publish 0.11.2 to crates.io
Attachment
0
Oignon

Adding a project initialization automation script, independent of cargo-generate!

By using a simple command:
bash <(curl -s https://raw.githubusercontent.com/Oignontom8283/eadkp_template/main/bootstrap.sh)
(Make sure to have curl and git installed), you can start a new NumWorks application using EADKP in the blink of an eye!

OR use:
git clone https://github.com/Oignontom8283/eadkp_template.git project_name
cd project_name
chmod +x ./bootstrap.sh && ./bootstrap.sh

PS: I was tired of manually reconfiguring everything every time, so here it is! (:

0
Oignon

Improving the application visuals from the default template code!

Changes:

  • feat: Added a subtitle
  • feat: Added a footer
  • fix: Readjusted the centering of the logo, title, and subtitle
  • fix: Moved the rendering code to a pre-display section before the loop to fix a hardware horizontal sync issue.
Attachment
0
Oignon

Refactoring of the default template demonstration code ! (1/2)
AND adding a function (push_image()) to the eadkp library.

Attachment
Attachment
0
Oignon

Testing the simulator on Linux (Ubuntu-based) !

  • Fixed the Docker start command in start.sh from docker-compose to docker compose.
  • Added settings.json and extensions.json to recommend the Rust-Analyzer extension and its specific configuration for Numworks.
Attachment
0
Oignon

Functional Simulator !

The simulator has been tested and debugged :

  • Fixed incorrect app compilation path:
    ./target/release/target/libsimulator.so -> ./target/release/examples/libsimulator.so
  • Updated default app name in source code.
  • Added information message displayed prior to simulator execution.
Attachment
0
Oignon

Testing compilation and exporting the compiled application to NWA format for the calculator 🥳 !

  • In Cargo.toml: The [target] sections for “device” and “simulator” have been replaced with [[example]]. This changes how builds are managed, now using the --example flag instead of --target.
  • In cargo-generate.toml: The justfile has been added to the exclusion list when generating a new project.
  • In justfile:
    • Build, check, and send commands now use --example device or --example simulator instead of the previous --target flags.
    • Added a just target command to ensure the thumbv7em-none-eabihf Rust target is correctly installed before building.
    • The export command now uses the correct path for the generated binary (target/thumbv7em-none-eabihf/release/examples/device).
    • The export command now displays a success or error message depending on whether the file move was successful.
    • Added a target recipe to install the required Rust target.
    • The justfile is now excluded during new project generation.
Attachment
0
Oignon

‘cargo generate’ is finally working correctly 😊.

Update templates and fix docker config :

  • Use {{project-name}} placeholders for better compatibility
  • Enforce snake_case via project_name_case
  • Exclude assets/ from variable substitution
  • Fix docker-compose paths and remove obsolete Dockerfile
Attachment
0
Oignon

Initial template code. Implementation of the Cargo template system (Untested 😕).

Attachment
0
Oignon

Fix MAJOR compilation ISSUES in the eadkp::builder::setup() script and embedded dynamic allocator imports within the setup macro.

Code preview of the future template using the library (after bug fixes):

Attachment
0
Oignon

Moved build script inside the EADKP library:
- The build script has been moved into the EADKP library for easier usage and project integration.

Attachment
0
Oignon
  • C/C++ support testing
  • Binary generation optimization:
    • Unused C/C++ code is no longer compiled or linked, reducing final binary sizes.
  • C/C++ support in the simulator:
    • C/C++ code will now be compiled and linked when running in the simulator, rather than only on the physical device.
  • Support for c/ and cpp/ folders for C/C++ code.
  • EIF file extension change:
    • EIF files now use the .eif extension instead of .bin.
  • Added Micro and Nano text editors to the Docker image to facilitate editing files directly from the shell.
Attachment
0