Super User CMD v1.2.2

I made some improvements to my tiny utility, Super User. I added native support for ARM64 systems, removed an unnecessary restriction on command length, and achieved an even more compact executable, exactly 4096 bytes for all builds of su.exe. Perfection!

However, I've long wanted to address the issue of Windows Defender often flagging my executables as suspicious due to the lack of a digital signature. Recently, I subscribed to Azure Trusted Signing and started signing my programs. It turned out that a digital signature adds almost 16 kilobytes of data. It significantly undermines my hobby of creating minimal executables! Because of the digital signature, su.exe is now nearly 20 kilobytes. Well, I'll have to accept it, as Windows Defender's warnings have been annoying me for ages on every new system. With the digital signature, these warnings should become much less frequent.

Download: sucmd.7z (18KB). Project page →

Hosts Commander v1.6.3

  • A non-zero error code is returned if an error occurs.
  • Command show is renamed to unhide to better reflect what it does.
  • Command list treats show as an alias.
  • Command empty is renamed to reset.
  • Optional argument shell to run the hosts interactive shell.
  • Host arguments ignore mistakenly passed http:// protocol prefix.
  • The program is executed as a native 64-bit process on 64-bit Windows (AMD64 and ARM64).
  • Other cosmetic changes.
  • [2024/11/12] Added digital signature.

Download: hostscmd.7z (30KB). Project page →

Neat defer macro for C++

Manual resource management in low level C-style C++ code might be annoying. It's not practical to create good enough RAII wrappers for every single C API you use, but approaches with goto cleanup or loads of nested if (success) hurt readability.

A Go-inspired defer macro to the rescue! The usage is as simple as that:

void* p = malloc(0x1000);
defer [&] { free(p); };

The deferred lambda will be executed on scope exit, no matter how it happens: you can return from any point, throw an exception (if allowed), or even use a goto to an outer scope.

Macro implementation is concise and relies on basic features of C++17 (Clang 5+, GCC 7+, MSVC 2017+):

#ifndef defer

template <typename T>
struct Deferrer
{
	T f;
	Deferrer(T f) : f(f) { };
	Deferrer(const Deferrer&) = delete;
	~Deferrer() { f(); }
};

#define TOKEN_CONCAT_NX(a, b) a ## b
#define TOKEN_CONCAT(a, b) TOKEN_CONCAT_NX(a, b)
#define defer Deferrer TOKEN_CONCAT(__deferred, __COUNTER__) =

#endif

It is truly zero-cost and doesn't rely on C runtime or standard library, so it can be used even in kernel development.

Continue reading

Unchained Nostalgia v1.5

A Famicom/NES/Dendy demo based on the notorious 9999-in-1 pirate multicart with Unchained Melody in its menu.

In 2023, I was preparing an anniversary update: 10 years since the first version of the demo, 30 years since the first multicarts with Unchained Melody and the Dendy itself, and 40 years of the original Famicom. But I got distracted by something at the end of the year, so it remained unreleased. I'm releasing it now retroactively in the state the project was in November 2023.

  • Shooting stars effect on the night slides.
  • When automatic demonstration mode is enabled by pressing Start, the most suitable slide is immediately displayed.
  • Automatic demonstration mode is activated automatically after a long idle time (5 minutes) on a suitable slide.
  • More precise synchronization of automatic slide switching with the music beat, resolving a 6-frame deviation error.
  • Input handling is more responsive to rapid slide switching.
  • Standard NROM vertical mirroring is used (instead of non-standard 4-screen) for better compatibility.
  • Lightweight version of the sound engine in the NSF.
  • NSF file size: 1632 bytes.

Download: unchained_nostalgia.zip (20KB). Project page →

Finnish Duolingo Guidebook

I started to learn Finnish a few months ago. There is a great intro-level Finnish course on Duolingo that is quite entertaining and lets you try the taste of Finnish before you'll be ready to make a deep dive into the language. But it provides just exercises and doesn't explain anything, you are supposed to guess what is right just based on provided examples. It mostly works, but sometimes you are left with an open question "why?" without a chance to get an explanation.

The truth is, originally the course had proper lessons with explanations of basic grammar mixed with some jokes about Finnish culture. The lessons were removed in 2022 for some mysterious reason, and just exercises are left since then. Duolingo fans from the duome.eu preserved all these materials on a single page. I didn't like that the page doesn't allow to track progress of learning, so I made my own pirated version with blackjack and bells and whistles.

Finnish Duolingo Guidebook →

It's mobile-friendly and can be added to the home screen as an app. You can mark chapters that you already learned, and they will become green. Overall progress is displayed in the Table of Contents on the top of the page. You can quickly scroll to your current chapter by using the "triangle down" button. Each chapter mentions section and unit where you can find related exercises on Duolingo today. Each unit on Duolingo corresponds to a chapter in the guidebook, and they go in the same order, so it's convenient to read the guidebook and do the exercises in parallel. Just bookmark the guidebook page and visit it whenever you move to a next unit on Duolingo to read the next portion of grammar. No more guessing what the green owl wants from you!

Learning any new language is always a long road and it's important to find something that would help you to keep up for a few years. Tracking progress of learning might help with keeping motivated. Sometimes you might not feel your progress (that is quite subjective and can be discouraging), but tracking your daily progress does the trick and makes it visible so you can actually see it. This is why I also track how much time I spent on learning Finnish. Each lesson makes me closer to my target of 1600 hours.

Keep in mind that Duolingo alone is not enough. It's a great intro into the language, but you'll eventually need to take quite a few more courses if your goal is actually to start speaking. The Duolingo course is just roughly first 100 hours of this journey.

Sound Keeper v1.3.1

  • A potential deadlock when audio devices are being added or removed has been fixed.
  • Fluctuate treats non-PCM output formats (like Dolby Atmos) as 24-bit instead of 16-bit.
  • Frequency parameter F is limited by half of current sample rate to avoid generation of unexpected noise.
  • More detailed logs in debug build. Debug output is flushed immediately, so it can be redirected to a file.

Download: soundkeeper.7z (23KB). Project page →

Sound Keeper v1.3.0

  • Fluctuate is 1 fluctuation per second by default. Frequency can be changed using the F parameter.
  • Periodic playing of a sound (parameters L and W) with optional fading (parameter T).
  • New White, Brown, and Pink noise signal types.
  • Self kill command is added. Run soundkeeper kill to stop running Sound Keeper instance.
  • Analog switch was added. It works as the opposite of Digital.
  • Ignores remote desktop audio device (this feature can be disabled using the Remote switch).
  • New OpenOnly mode that just opens audio output, but doesn't stream anything.
  • New NoSleep switch which disables PC sleep detection (Windows 7-10).
  • Work as a dummy when no suitable devices found.
  • Sound Keeper shouldn't prevent PC from automatic going into sleep mode on Windows 10.
  • The program is not confused anymore when PC auto sleep is disabled on Windows 10.
  • The workaround that allowed PC to auto sleep had to be disabled on Windows 11.

Download: soundkeeper.7z (23KB). Project page →

Sound Keeper v1.2.0

  • Sound Keeper doesn't prevent PC from automatic going into sleep mode.
  • New Sine stream type which can be useful for analog outputs or too smart digital outputs.
  • When a user starts a new Sound Keeper instance, the previous one is stopped automatically.
  • Fluctuate stream type considers sample format of the output (16/24/32-bit integer, and 32-bit float).
  • Command line parameters are supported. Example: SoundKeeper64.exe sine -f 1000 -a 10.
  • The workaround for the Audio Service memory leak is enabled on affected Windows versions only (8, 8.1, and 10).

Download: soundkeeper.7z (17KB). Project page →

Hosts Commander v1.6.2

  • Fixed an error which may cause a freeze on a malformed hosts file.
  • The list command uses --all as an argument instead of all, and it can be before and after mask.
  • More understandable messages from the add command when you are trying to add already existing hosts.
  • Unset Read Only flag from the hosts file before changing it.
  • New command aliases: unset for rem, and erase for empty.
  • Source code is moved to GitHub.

Download: hostscmd.zip (21KB). Project page →

Sound Keeper v1.1.0

  • Default behavior can be changed by changing file name of the Sound Keeper executable.
  • Primary audio output is used by default. Add All or Digital to executable file name to enable Sound Keeper on all or digital only outputs.
  • Inaudible stream is used by default. Add Zero to executable file name to use stream of digital zeroes (like it was in v1.0.0).
  • Temporary workaround for a Windows 10 bug which causes a memory leak in the Audio Service when audio output is busy. It will be removed when the bug will be fixed in Windows 10 itself.
  • Fixed a potential memory leak when another program uses audio output in exclusive mode.
  • Even smaller executable size.
  • Source code is moved to GitHub.

Download: soundkeeper.7z (15KB). Project page →

Hosts Commander v1.6.1 — command line hosts editor

Powerful command line hosts editor with support of batch operations, IDN and IPv6. Another piece of my software from 2013 has a minor update. It was rebuilt for .NET 4.0 instead of .NET 3.5, just because at this moment .NET 4 is the preinstalled on modern Windows (8 and 10), and standalone installer of the .NET 4 is a few times smaller than standalone installer of the .NET 3.5 (48MB vs. 232MB).

Download: hostscmd.zip (21KB). Project page →

Super User CMD v1.2.1 — running elevated commands through UAC from command line on Windows

This tiny utility allows you to run elevated commands from Windows Command Prompt. Unlike runas command, where you should enter your password, su just shows UAC dialog instead, and it is much more convenient. Another feature is that it preserves current directory.

Actually, it was written in 2013. Previous version 1.2.0 was published on my other website. Today I rebuilt it with support of 64-bit systems, and publish it here as version 1.2.1.

Download: sucmd.zip (7KB). Project page →

Running image viewer from Windows XP on modern Windows

I have a directory with old images which I collected in the noughties. I move it with all my other files from one computer to another on every upgrade. Every now and then, when I feel a bit nostalgic, I open it and look through the pictures. There are a few GIF files with animation, and every time I notice that the default image viewer from Windows 7 does not support it. I remembered, that the image viewer from Windows XP was able to play GIF animation properly. So, I spent a bit of time to overcome a few obstacles and to run the old image viewer on modern Windows, a small launcher was created for this purpose. Now I can watch these old images in authentic interface of the old image viewer from Windows XP.

Download: shimgvw_xp32.7z (includes a binary and source code of the launcher, and the shimgvw.dll from English Windows XP SP3).

Continue reading

Unchained Nostalgia v1.4

An updated version of the NES demo based on the pirate multicart with a romantic storyline and the Unchained Melody in the menu.

  • Sound engine is rewritten. It consumes less RAM bytes and CPU cycles.
  • Gapless repeat of the melody (there was a frame of silence before).
  • A bit more compact representation of music data (NSF file size: 1720 bytes).
  • NSFe track count is fixed (some NSFe players were erroneously trying to play more than one track).
  • More robust handling of the Konami Code input.
  • Missile reloading takes some time.
  • Up to 6 missiles on screen simultaneously!
  • Respawn other birds and return to the normal mode when you have died.
  • No visible changes in graphics.

Download: unchained_nostalgia.zip (20KB). Project page →

Sound Keeper v1.0.2

  • A problem when the program stops working properly after waking PC up after sleeping had been resolved.
  • Error handling had been improved a bit.
  • 64-bit version of the program had been added into the package.
  • Visual C++ 2017 is used for building of the program.

Download: soundkeeper.zip (19KB). Project page →

My Firefox extensions have been updated

This month I updated all my Firefox extensions. So, if you a Firefox user, maybe you will find some of them useful.

Advanced Locationbar
Linkifies URL segments in your Location bar. Fork of Locationbar² with bugfixes. Includes support of Internationalized Domain Names and separate linkification of domain and subdomain.

Omnibar Lite
Adds default search engine icon to the location bar with an ability to change it quickly. Original Omnibar doesn't work in Firefox 49+. Onmibar Lite supports Firefox 50+. It utilizes built-in Firefox search. Don't forget to remove original Omnibar!

Pure URL
This add-on automatically removes all garbage like "utm_source=*" from URLs. These fields are provided for the Google Analytics and they are not a necessity.

System Menu Ex
Extends system menu of the main window. Adds an ability to create a new window (private or general), open the About window and restart the browser. Don't forget to enable the title bar! The menu can be opened using left click on the application icon.

If you like my patches, please consider a donation

Projects like the Need For Seed III Modern Patch require enormous amount of time for developing and support. It is not possible to do such things spending only an hour or two in the evenings. It requires days and weeks of hard work without huge gaps, 8-10 hours per day. Please donate if you like my projects and would like to get some new updates. It is the best motivator to continue working on them.

More info →

Unchained Nostalgia v1.3

NES demo based on the pirate multicart with a romantic storyline and the Unchained Melody in the menu.

What's new?

  • Better handling of quick switching of slides.
  • Darker palette for birds at night.
  • Other insignificant improvements in graphics.
  • Fixed minor bugs in the engine.
  • Music represented in more compact format (takes 40% less space lossless).
  • NSFe file embedded into demo, so it can be easily ripped from the ROM file.
  • The secret mode of the Universe control (but don't tell about it to your psychiatrist).
  • The super secret mode of proud birdie with special effects from the legendary Michael Bay.

Download: unchained_nostalgia.zip (20KB). Project page →

Need For Speed 4 Modern Patch: To be, or not to be...

I have published initial version of the NFS4 Modern Patch. Currently, it has a small amount of fixes. Unfortunately, I had spent more than 150 days during last year on developing of the NFS3 Modern Patch, it is too much, and now I can't afford to spend enough time for porting main useful changes to the NFS4. I recommend you to try the NFS3 Modern Patch to understand how big and useful this NFS4 version of the patch could be.

This kind of work needs much time. It is not possible to do such things spending only an hour or two in the evenings. It requires days and weeks of hard work without huge gaps, 8-10 hours per day. I had started NFS3 Modern Patch a year ago, and little by little this project absorbed all my time and had taken the place of my paid work (freelance). Now I can't continue in the same spirit because I'm almost out of money. It's time to choose what I will do next.

Continue reading

Need For Speed III Modern Patch v1.5.1, v1.5.2, and v1.5.3

  • “Rear View Camera” setting which allows to lock the rear view camera in the car. It greatly increases visibility and reduces the blind spot when the current main camera is not “In Car”.
  • Experimental ini setting AllowHugeTextures which enables huge texture (512×512, 1024×1024, and 2048×2048) support for track elements and cars during gameplay. Useful for the game modding.
  • Fixed a bug of the original game which was a cause of different volume of the race music each race.
  • Added two additional random race music modes: Random (Rock) and Random (Techno).
  • Added two additional random menu music modes: Random (Fast) and Random (Slow). Fast: Romulus 3, Triton, Pi. Slow: Minotaur, Whipped, Whacked.
  • Menu music volume will be used for the movies.
  • Better Rear View Detail setting. Light from the car headlights and cop flashers will be rendered even on Medium value of this setting. View Distance and Car Detail in the Rear View Mirror now depends on Rear View Detail also. So, if you have performance problems with High level of the Rear View Detail setting, just use Medium. It have to be much more usable now.
  • Better compatibility with the Thrash API v107 according to fog. So, the DX7 renderer can render fog in the NFS3 now.
  • Fixed a bug of the original game which was a cause of using player name from the loaded ghost file instead of the current player name.
  • More than 20 changes in these releases. See the readme file for more details.

Download: nfs3_modern_patch.7z (1.5MB). Project page →

Yamaha S-YXG50 Portable VSTi v1.0.0 (a software MIDI synth)

A software MIDI synthesizer for Windows, which functions as a VSTi plugin. Supports both the Yamaha XG and the Roland GS extensions, which is a unique feature of the S-YXG50. The VSTi was a part of the Yamaha SOL2 package. Yamaha discontinued support of this software synthesizer in 2003. As it is abandonware now, a portable version of the VSTi was created (installation and registry keys are not required). It uses embedded (into DLL resources) official 4MB wavetable files, which is the best version of wavetable files for the S-YXG50.

Download: yamaha_syxg50_vsti.7z (3.0MB). Project page →