programs: Add Uxn emulator #272

Merged
Burer merged 1 commits from iyzsong/kolibrios:main into main 2025-10-13 09:52:33 +00:00
Contributor

To build this, a zig compiler (tested: 0.14.1) is needed, run zig build --release=fast.

It will download https://github.com/chmod222/zuxn when building.

To build this, a zig compiler (tested: 0.14.1) is needed, run `zig build --release=fast`. It will download https://github.com/chmod222/zuxn when building.
iyzsong added 1 commit 2025-07-19 03:19:14 +00:00
programs: Add Uxn emulator.
Some checks failed
Build system / Build (pull_request) Has been cancelled
Build system / Check kernel codestyle (pull_request) Has been cancelled
603f643f67
Owner

Hello!

You can configure associations to run .rom files in this config:
https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/data/common/settings/assoc.ini

Also, you probably would like to configure icons for .rom files and additional associations (for some file managers), using config files in this folder:
https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/data/common/File%20Managers

All available icons and numbers can be found in /sys/@reshare app, ICONS16/W section.

Hello! You can configure associations to run `.rom` files in this config: https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/data/common/settings/assoc.ini Also, you probably would like to configure icons for `.rom` files and additional associations (for some file managers), using config files in this folder: https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/data/common/File%20Managers All available icons and numbers can be found in `/sys/@reshare` app, `ICONS16/W` section.
iyzsong force-pushed main from 603f643f67 to a826c724ee 2025-07-20 13:39:43 +00:00 Compare
Author
Contributor

Add association and icon for .rom files, thanks.

Also implement the file device (without stat op), and remove the MPL-2.0 license file (which I think should be in the root folder so that each program don't need to store its own).

Add association and icon for `.rom` files, thanks. Also implement the file device (without stat op), and remove the MPL-2.0 license file (which I think should be in the root folder so that each program don't need to store its own).
iyzsong force-pushed main from a826c724ee to 24d245c09b 2025-07-20 13:48:26 +00:00 Compare
iyzsong force-pushed main from 24d245c09b to 3633516f62 2025-07-20 14:55:27 +00:00 Compare
Burer requested review from Burer 2025-07-23 07:13:27 +00:00
Owner

Hi!

Wanted to test it and realized that emulator itself isn't included in image auto-build yet.
To include it, you need to use KolibriOS TUP build system:

  • Add proper Tupfile.lua to emulator source code folder.
  • Add reference entry to general data/Tupfile.lua file.

You can get an example in this commit and adapt it to your Zig building pipeline:
2d9007da32

Hi! Wanted to test it and realized that emulator itself isn't included in image auto-build yet. To include it, you need to use KolibriOS TUP build system: - Add proper `Tupfile.lua` to emulator source code folder. - Add reference entry to general `data/Tupfile.lua` file. You can get an example in this commit and adapt it to your Zig building pipeline: https://git.kolibrios.org/KolibriOS/kolibrios/commit/2d9007da32b11a7a5b7a47d7a828c5a96b52071a
Author
Contributor

To include it, you need to use KolibriOS TUP build system:

  • Add proper Tupfile.lua to emulator source code folder.

Hi, it seems tup doesn't want to work with zig build, which will download 3rd deps and manage some cache itself.

May I commit the built binary into the repo?

> To include it, you need to use KolibriOS TUP build system: > - Add proper `Tupfile.lua` to emulator source code folder. Hi, it seems tup doesn't want to work with `zig build`, which will download 3rd deps and manage some cache itself. May I commit the built binary into the repo?
Owner

May I commit the built binary into the repo?

Yep, if tup can't work with Zig - binary is okay.

> May I commit the built binary into the repo? Yep, if tup can't work with Zig - binary is okay.
iyzsong force-pushed main from 3633516f62 to 6fba27b780 2025-08-03 12:00:50 +00:00 Compare
Author
Contributor

OK, now I commit the built binary.

OK, now I commit the built binary.
Doczom approved these changes 2025-08-03 13:23:02 +00:00
Owner

Your project can be in a separate repo with autobuild. While building the OS, main workflow can just download an artifact from your CI

Your project can be in a separate repo with autobuild. While building the OS, main workflow can just download an artifact from your CI
Owner

@iyzsong hi, and sorry for late response!

I finally tested your emulator, and have some feedback.
Overall, it works pretty fine, but there are some small problems:

  1. I can't open window in full screen, there is some weird top padding.
  2. There are some overdraws of window borders and shifted lines (highlighted in red). Take in account that each window in KolibriOS have a 5 pixel borders, as well as varying header height (depend on current skin).

Is it possible to fix them?

When creating a window, you can set a flag to start drawing coords from window client area (don't overlap borders), and call a separate function to get header height of current skin, and adapt your rendering accordingly.

@iyzsong hi, and sorry for late response! I finally tested your emulator, and have some feedback. Overall, it works pretty fine, but there are some small problems: 1. I can't open window in full screen, there is some weird top padding. 2. There are some overdraws of window borders and shifted lines (highlighted in red). Take in account that each window in KolibriOS have a 5 pixel borders, as well as varying header height (depend on current skin). Is it possible to fix them? When [creating a window](https://wiki.kolibrios.org/wiki/SysFn00), you can set a flag to start drawing coords from window client area (don't overlap borders), and call a separate [function](https://wiki.kolibrios.org/wiki/SysFn48/ru#%D0%9F%D0%BE%D0%B4%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F_4_-_%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C_%D0%B2%D1%8B%D1%81%D0%BE%D1%82%D1%83_%D1%81%D0%BA%D0%B8%D0%BD%D0%B0.) to get header height of current skin, and adapt your rendering accordingly.
Author
Contributor

@iyzsong hi, and sorry for late response!

No problem.

I finally tested your emulator, and have some feedback.
Overall, it works pretty fine, but there are some small problems:

  1. I can't open window in full screen, there is some weird top padding.

Yes, full screen is not supported, it only render at 1x/2x/3x. The weird you see is due to screen is too small for the left editor, run it at 1080p will show the correct border.

  1. There are some overdraws of window borders and shifted lines (highlighted in red). Take in account that each window in KolibriOS have a 5 pixel borders, as well as varying header height (depend on current skin).

I think that's skin drawing, I created the window with skinned, no fill and and relative coordinates. change to another skin show this, which i think is correct:

image.png

> @iyzsong hi, and sorry for late response! No problem. > > I finally tested your emulator, and have some feedback. > Overall, it works pretty fine, but there are some small problems: > 1. I can't open window in full screen, there is some weird top padding. Yes, full screen is not supported, it only render at 1x/2x/3x. The weird you see is due to screen is too small for the left editor, run it at 1080p will show the correct border. > 2. There are some overdraws of window borders and shifted lines (highlighted in red). Take in account that each window in KolibriOS have a 5 pixel borders, as well as varying header height (depend on current skin). I think that's skin drawing, I created the window with skinned, no fill and and relative coordinates. change to another skin show this, which i think is correct: ![image.png](/attachments/b815f2ca-0252-4ab6-ba36-fe025667e1ac)
Owner

I think that's skin drawing, I created the window with skinned, no fill and and relative coordinates. change to another skin show this, which i think is correct:

Oh, got it!
I tried to run KOS with bigger screen resolution, and now this problem is also gone.

Thus, I suppose, all is okay with this PR.
Thank you for your response!

> I think that's skin drawing, I created the window with skinned, no fill and and relative coordinates. change to another skin show this, which i think is correct: Oh, got it! I tried to run KOS with bigger screen resolution, and now this problem is also gone. Thus, I suppose, all is okay with this PR. Thank you for your response!
Burer approved these changes 2025-10-09 12:53:41 +00:00
Burer merged commit c65da0d96f into main 2025-10-13 09:52:33 +00:00
Sign in to join this conversation.
No Reviewers
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#272