npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rt4k-profile

v1.0.1

Published

A Typescript Library for Reading and Writing RetroTINK-4k .rt4 Profiles

Downloads

6

Readme

rt4k-profile ૮₍ • ˕ - ₎ა

npm version codecov build

A Typescript Library for Reading and Writing RetroTINK-4k .rt4 Profiles

Overview

The RetroTINK-4k is a video scaler primarily intended for processing signals from retro gaming consoles, enabling display at 4K resolution while maintaining an authentic visual experience.

It features a well-designed, on-screen menu for manipulating settings and a profile system for persisting configurations of parameters such as input type, color settings, and resolution preferences, allowing users to tweak, save and apply them for consistent performance on their equipment, across different consoles.

The profiles are stored on an SD Card and can be copied, renamed and organized on a computer, but they are stored in a binary format that isn't easily editable by hand. This means that - as nice as the remote control and on-screen menus are - it can be tedious to, for instance, apply a specific set of CRT scanline / mask settings to a large set of pre-existing profiles.

rt4k-profile was built to fill that need, providing a convenient API for programmatically manipulating RetroTINK-4k profiles. Although it is a work-in-progress, it is designed to be immediately functional and is under continuous development to support more settings.


Prerequisites

  • NodeJS >= 14.15

Install

npm install rt4k-profile

Usage

import { RetroTinkProfile } from 'rt4k-profile';

// Load the "default" profile, asynchronously
const profile = await RetroTinkProfile.build();

// Load the "default" profile, synchronously
const profileSync = RetroTinkProfile.buildSync();

// Print a list of the currently supported profile settings
const settingsNames = profile.getSettingsNames();
console.log(settingsNames);

// Print a (pretty) JSON representation of the Profile Settings' values
const prettyJSON = profile.serializeValues(true);
console.log(prettyJSON);

// Print a list of the valid values for the `input` setting
console.log(RetroTinkProfile.get('input').validValues());

There are several different approaches you can use for manipulating settings...

// Set the `input` setting to "SCART|RGBS (75 Ohm)" using the setting.path / value interface
profile.setValue('input', 'SCART|RGBS (75 Ohm)')

// Set the `output.resolution` setting by mutating a RetroTinkSettingValue object, and setting it on the Profile
const outputResolutionSetting = profile.getValue('output.resolution');
outputResolutionSetting.set('1440p120');
profile.setValue(outputResolutionSetting)

// Set the `output.transmitter.deep_color` setting using a Plain Javascript Object
profile.setValue({ output: { transmitter: { deep_color: true } } })

Now, putting it all together, let's remix some profiles.

// Load my existing "target" profile, asynchronously
const targetProfile = await RetroTinkProfile.build('/path/to/my/snes_profile.rt4');

// Load a profile with a great set of CRT scanlines/mask settings I found online
const scanlinesProfile = await RetroTinkProfile.build('/path/to/other/crt-scanlines.rt4');

// Some ad-hoc settings, I'm going to add with the others
const myCustomSetting = { input: 'Front|S-Video' }

// Grab all of the values underneath the path of `advanced.effects` from the scanlinesProfile
// Set my own `input` setting
const outputProfile = targetProfile.merge(scanlinesProfile.getValues('advanced.effects'), myCustomSetting);

// Now, lets write the merged profile to disk
await outputProfile.save('/path/to/my/new_snes_profile.rt4');

// or, synchronously
outputProfile.saveSync('/path/to/my/new_snes_profile.rt4');

See ./examples for more

API Documentation

[TODO]

Roadmap

[TODO]

Changelog

Version 1.0.1 (2024-07-03)

  • Documentation update

Version 1.0.0 (2024-07-03)

  • Support Advanced -> System -> OSD/Firmware -> On Screen Display
  • Implement header as a RetroTinkReadOnlySetting
  • Fixed Critical Bug https://github.com/boatmeme/rt4k-profile/issues/26 preventing files saved with this library from loading on RetroTink4k devices

Version 0.1.0 (2024-06-29)

  • Initial release
  • Added support for the following settings:
    • advanced.effects.mask.enabled
    • advanced.effects.mask.strength
    • advanced.effects.mask.path
    • input
    • output.resolution
    • output.transmitter.hdr
    • output.transmitter.colorimetry
    • output.transmitter.rgb_range
    • output.transmitter.sync_lock
    • output.transmitter.vrr
    • output.transmitter.deep_color

Contributing

Right now, this is the side-project of a single developer and I'm limited to the amount of time I can spend reverse engineering the binary .rt4 profile format. Feel free to open an issue requesting specific settings, or better yet, contribute directly:

  1. Fork repo
  2. Add / modify tests
  3. Add / modify implementation
  4. Open PR
  • (Optional) link to your development soundtrack

License

The MIT License (MIT)

Copyright (c) 2024 Jonathan Griggs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Soundtrack

IMAGE ALT TEXT HERE