Skip to content

Releases: ryanwisemanmusic/Rosette

Rosette

Choose a tag to compare

@ryanwisemanmusic ryanwisemanmusic released this 05 Jul 00:34

Version 0.07 is one of the biggest updates, providing a Mach-O Container processor/disassembler and Rosetta 2 fallbacks. This project has been integrated partially with Xenia Canary, reaching over 100 million valid instructions without reaching an invalid instruction. AVX/SSE compatibility is not fully integrated, however, support for these instructions have been significantly improved to where 100 million x86 Instructions being executed through NEON is possible.

The significant improvements to Rosette's own low-level backend is pushing this project in a very positive direction. Pulling off an update like this took much longer due to the scope of this update. While the aim was to create a valid window, reaching ImGui is a significant milestone worthy of a new version. In addition, the Installer is much more lightweight compared to before, ensuring only the essential Rosette related files are packaged.

CS218 projects should also be handled more appropriately, and less likely to reach an invalid instruction issue

Rosette

Choose a tag to compare

@ryanwisemanmusic ryanwisemanmusic released this 21 Jun 00:40

This update strengthens the x86 backend considerably. A more flexible ELF parser now exists, where it avoids hardcoding particular memory addresses regarding entry, so if there's some compiler offset, that is accounted for. The Assembly decoder handles more instructions broadly when it's interpreting an ELF object file, particularly when this object file contains C++ code. The ISA layer now accounts for about 500 different instructions, meaning that more x86 behaviors are covered and translated in NEON. JWasm was also swapped to an official version without weird licensing requirements, enabling full commercial usage if ever requested

Global shell updates include better handling of the kernel to avoid critical problems leading to stalling. This avoids the shell getting stuck, as processes are moved to a different stack so the terminal has no risk of indefinitely stalling, where a restart was once required to resolve these issues (that is how stuck the global shell once could get). This stalling-handling is done through a PID manager/killer that also aims to kill zombie processes and deal with any leftover processes. Userland better handles how PIDs are spun up by looking into parent/child processes and tackle how they begin and end. Now hooks establish various mechanisms in hopes of preventing unkillable processes, however, this is a WIP that still has many issues involved with it. In addition, Rosette now offers fallback to Rosette 2, so any unhandled processes does not segfault/abort trap the user, however, this can be turned off

Xenia Canary is an official target for good reason, enabling Rosette to be developed quicker and in more critical areas. For example, a resolved issue deals with the angle bracket/quotes header discrepancies you see with Windows and macOS based code. Third party libraries under x86 often use angle bracket includes, which Apple protests like a toddler, and hence, allowing Rosette to accept angle bracket header includes is a major system update that will help improve running Windows based code. Additionally, Rosette now handles when data needs to be statically cast on macOS when it does not need said casting on Windows. Dealing with issues like this means that porting Windows code to macOS means less preprocessor substantiation. The aim is to eventually tackle all these tiny issues that should not require preprocessor macros. It is a better use of time if a developer has to only configure differences in functionality, like a JIT or AOT compiler needing specific code that pertains to how the code itself executes, not errors because a variable was not properly cast

Version 0.07 aims to get rid of my .patch system required by my Xenia Canary port, or a substantial portion. Since Rosette aims to handle broad patterns and not hardcoded specifics (as in, if the library changes variable names but still utilizes the same logic), this will benefit more codebases with similar logic under the hood

Rosette

Choose a tag to compare

@ryanwisemanmusic ryanwisemanmusic released this 16 Jun 09:09

Introducing a global shell! Rosette now utilizes a shell that silently runs in the background when an x86 environment is detected. Purse .asm files, with reasonable instructions that are supported by the decoder, can be ran. This is a huge accomplishment, since it allows the testing of instruction sets. More instructions have been added to the ISA layer, with 350+ x86 to NEON ported instructions.

This is also the first release that is purposefully designed for CS218 students at UNLV. With embracing this class and its requirements, it requires development of additional systems that would've otherwise been ignored. ELF Parsing is one of those new features, enabling users to see the output of their .asm files

Low level systems require time to development, are not flashy, but they prevent significant bugs from popping up later. Version 0.05 pushes Rosette closer to being integrated into other projects and use in academic environments.

Rosette

Choose a tag to compare

@ryanwisemanmusic ryanwisemanmusic released this 11 Jun 10:09

This version is a massive update with regards to the internals of Rosette. Before in previous builds, only a handful of Assembly instructions were supported. Now, a very much improved ISA layer exists, and 175 different x86 instructions are supported. Whilst the only addition of a new program is partial success of Notepad, the newest Assembly instructions being supported mean that .exe files can be parsed better than before.

Rosette

Choose a tag to compare

@ryanwisemanmusic ryanwisemanmusic released this 07 Jun 06:08

This build is the most comprehensive update to Rosette. Whilst you have full freedom to look at the codebase, I have provided a .dmg file that will allow you to install the application, a key new change that makes installing Rosetta easy. Version 0.03 adds a stricter ABI Handshake layer, truly ensuring that every step of the way, there are checks to ensure macOS behavior mirrors Windows. This helped get rid of so many bugs. In addition, using this to test programs allows me to see what is now missing from the codebase, since a strict ABI handshake layer means that I must update the codebase accordingly to support new applications, and I can see exactly what lacks support.

Additionally, support for x86 instructions has only gotten better, with a new ISA layer that will be heavily updated by next update. This layer ensures that we are following the direct logic behind how x86 functions work due to some amazing documentation. Many additional inheritance checks also ensure that macOS is abiding by the rules that Windows abides by, which significantly also helps reduce the potential for Assembly problems to occur. A math system, and a check to that system, has been implemented to deal with any weird edge cases that may pop up involving operations. Situations like overflow, certain weird instruction documentation situations to keep track of, and more edge cases, are integral to check, so that when there are that cases via x86, we don't create subtle bugs that are very difficult to trace

Version 0.03 is a very comprehensive update that adds a lot of needed functionality. The game works best with Console-Tetris, in which the .exe file is contained within this project. You can launch Rosette and play this game, and it runs smoothly, outside of 2 annoying bugs I've yet to tackle. This is the first build I really feel proud of publishing, because whilst it lacks the ability to run the majority of apps, this is the first update in which a substantially good backend has been built out. It was difficult before to fix bugs due to a lack of a strict ABI layer, and now that Windows and macOS are able to be on the same page in terms of expectations (and how that translates equivalently on NEON) because of abort trap enforcement, it will be much easier to fix future problems

Next up is ensuring more x86 instructions are covered (some AVX and SSE instructions are covered), and finding new places to abstract inheritance via Zig. If you wish to only test things from the application, download the .dmg and the source code. In /assets/exe_examples/, are a list of .exe files. Console Tetris is the best application to run, and many Assembly files will/should run.

Version 0.04 will improve upon the current support layer, and making sure it truly handles the majority of Assembly instructions that users are likely to encounter (so more .exe files can run, hopefully). This is such a comprehensive version, that I really want to take my time on the next version. This may take significantly longer to make happen

Rosette

Choose a tag to compare

@ryanwisemanmusic ryanwisemanmusic released this 04 Jun 10:16

Whilst still much to be desired, this version improves the functionality of test games that already were working. A more aggressive error checking system ensures that x86 code and ARM64 code are identical (while their machine code is different, with normalized values, they are identical states).

Between and after function calls an ABI handshake happens to ensure our values remain the same, else we give the user an abort trap. These are particularly useful, since you can trace the point of failure, and find the Assembly discrepancy that needs to be fixed, which is the fastest way to solving bugs as they pop up. This improvement will allow development to go much quicker, and the handshake system will be expanded to catch more bugs via abort traps.

More research will be required regarding what is needed next, given that working with x86 code successfully is difficult

Rosette

Choose a tag to compare

@ryanwisemanmusic ryanwisemanmusic released this 31 May 05:50

This version of Rosette provides basic x86-64 support, enabling four easy game titles to be ran: snax86 (ASM), basic_snake, tetrisx86 (ASM), Console-Tetris

To test the applications without creating a .exe, you can run: 'make prodder', and test each game individually.
You can also do: 'make app-exe-run APP_SUITE=Console-Tetris', and that will build you the executable and then run said executable

Simple games are a great test involving x86 to ARM64 compatibility, given they help ensure support for a new title without breaking the previous one.

Rosette aims to offer an x86 to ARM64 translation layer before Rosetta 2 gets deprecated on macOS 28. There are also quite a few needed additions that will be added on that Rosetta 2 lacks, with more details to come in later releases