Microsoft Paint Emulator

0 views
Skip to first unread message

Bridget Peral

unread,
Aug 5, 2024, 12:00:36 PM8/5/24
to dabcyverry
Didyou know that you can use MS Paint within your terminal? ? textual-paint is a program that emulates MS Paint within your terminal. To try it out, install it via pip (a package manager for Python) using pip install textual-paint. Then, run the command textual-paint within your terminal. Check out a demo below!

Fast forward to today, where everything unfolds within a single machine, and we find pairs of file descriptors forming the PTY. These file descriptors effectively serve as the two ends of the metaphorical wire, transmitting user-entered input into programs and relaying program output back to the user. If you're intrigued and eager to delve deeper into the workings of the PTY, I encourage you to check out our blog on the subject!


The PTY can only transmit bytes. Therefore, every instruction or event must manifest as a sequence of characters. To standardize this, terminal protocols have delineated "special sequences", commonly referred to as ANSI escape sequences. Terminal emulators harness them in their input/output, deciphering them as commands, not merely text. For instance, \u001b[31m is used to render red text in your terminal output. To print red text to the terminal, you could use the following Python code:


During our journey to iron out the hover functionality, we stumbled upon another intriguing challenge. Warp was inadvertently dispatching surplus mouse events, leading to anomalies in hover and drag behaviors. To be precise, we were generating synthetic mouse motion events. Why? To sustain consistent product behavior in particular scenarios.


Post the meticulous implementation of mouse-motion reporting, we unlocked a delightful achievement. Fancy sketching on MS Paint via Warp ?? We made it possible! Check out our demo with our brand-new hover effects:


I've got a couple of really old MSDos based paint programs. They work on palette indexed image buffers. They have a number of spectacular shape drawing tools, brushes and effects that simply do not exist in any modern paint program- Particularly not whilst staying within the "bounds" of a low color palette indexed image. I would like to reproduce many of these wonderful tools in a modern program, to perhaps make them more accessible to myself and the general public again, without having to boot up an emulator like dosbox. But I have a problem.


While a lot of these brushes and tools and things have obvious functions, whose implementation should be fairly straightforward. But with other tools, their principles of operation are not so obvious. I would be stuck determining a correct or faithful algorithm to implement those.


If you were me, what approach would you take? Are there decompilers/disassemblers readily available that can handle old programs like this? Or would you take some different approach, such as methodically testing the algorithms on different inputs to sort of infer the underlying function? Some combination of different techniques? In the case of one line of these programs, the original author of these (commercial) programs is known, and is now a rabid open source advocate. Should I just try to contact them directly and ask? I'm not particularly experienced with reverse engineering, so I'm at a loss at where to start on this.


Beyond that, disassembly and debugging are going to be your friends. In some cases you may be able to decompile a piece of software if you know what it was compiled with originally. But disassemble it, and run it in a debugger to find the overarching structure, and look for the obvious functions that do the actual brush work.


I'm still using Rocketlauncher specifically for the Bezels, because I don't use Retroarch for a few of my systems, and that way I can have a uniform look across everything. Heck there's even a Switch Bezel for Rocketlauncher lol.


It may take some tweaking, but once it's all set up, there's really no issues. It would really be nice if the people over at Rocketlauncher would just donate their Bezel code to Launchbox to see if it can be integrated into the frontend directly. But probably will never happen that way.


The issue with integrating something like that into LaunchBox is in your preceding sentence. However, I think you downplayed it a little [a lot?] when you said "It may take some tweaking."


Really, there's no way to just say "Ok bezel program, here's the path to the emulator and here's the path to the bezels. Make it work." Even with the plugin that @bundangdon recommends, there's some manual setup that needs to take place. Though from what I've seen compared to RL, it's a walk-in-the-park.


My guess it that the LaunchBox team doesn't want to integrate something that, for a new user, will never work. At least not until they (the new user) get some working knowledge of how to do 'some tweaking'. For and about each and every emulator they wish to use this on.


@Jabb3rJaw there are multiple N64 cores available in Retroarch. the one you used is messed up for at least this one game (possibly more) and you should use another core, or different settings on same core at very least. you can assign cores and settings on a per game basis. using a different emulator all together is not required.


Actually for the Switch bezel i just tried out for fun, it was only a matter of putting the image and .ini file in the folder, setting bezel enable to "true" in RL, and having the emulator run in windowed mode. The tweaking is only daunting if you have to do the x,y coordinate stuff manually. I struggled with that a lot in the very beginning. But eventually there's enough people who make the bezel files (image and .ini) already and share them, that you can just plug 'n play. Eventually it would all be covered. It already sort of is covered on the RL side. I mean, if I donated everything from my setup alone it would cover at least half of new users who just want to play the most popular systems.


I don't think it's a good idea to say things will never work. Launchbox has so many features that I have no idea how to use or get to work. I don't even know the first thing about them. But they are there for some reason lol. If someone can't figure out how to use a feature then it just doesn't get used I suppose. Heck, if Launchbox doesn't auto-fill the command line parameters I'm already lost as to what to do. I have no idea what to ever put in autohotkey,...There's so much I don't know how to use. But I've been using RL for the past 10 years for Bezels, and past the initial setup of a platform, it has worked on everything I have. It seems like there must at least exist some sort of decent framework there for it to function. I'm sure it could eventually be integrated. I mean, look at everything launchbox has done since its inception. Very impressive stuff. I'm going to hold out hope that eventually it will be possible. However, this plug-in does look like it can do a good job. I may have to try it someday. I guess I'm just so damn used to RL that there's no point for me to mess with anything else just yet.


Well, after a tenure of ten years of working with it, figuring it out and getting it to work, I'd probably stick with it too. My issue was (granted this was about 5-ish years ago) I spent about 3-4 days attempting to set it up. I gave up, deciding "I don't need no stinking bezels." lol Then someone came to me 6 months ago asking about creating a plugin to show bezels on emulators (other than MAME and RetroArch). [For me,] that was way easier than I recall how setting up RL was. But you're most likely correct in that with end-user support, it's become a lot easier. BTW, I still don't use bezels for anything other RA and MAME).


How to use : Check first if the bezel is working with retroarch, add reshade to your other emulator, it will add a bezel.fx shader, activate it and you are done. (at least for most emulators, some needs tweaking to adjust the bezel when the size of the rendering screen is not exactly the same as retroarch)

And as a bonus, it also greatly improve bezel matching for retroarch if you have file naming that are not exactly the same as redump name.


Yeah, I definitely beat my head against the wall in the first few months, because I was trying to find the coordinates manually for some stuff and it never seems to be drawing the bezel on top properly when I did it. But with everyone else's .ini files it worked just fine. So yes, thankfully there was a lot of end user support. The same thing with MAME actually. I couldn't ever figure out how to actually make a .lay file, so I'm glad I was able to find a huge pack years ago that basically covers every game I'd ever want to play. The end-users have really filled in the gaps for so many things out there in the emulation/artwork realm. It's pretty frickin' cool, and has helped out so many people get their collections looking graet. I've done some photoshop to edit some bezels to align better with my mednafen setup. But that was just altering the image and not the coordinates. So that was easy. What I was getting at, is that once it was set up, it hasn't just up and stopped working. It's been going strong for that entire time-span. But yes, you definitely have a point there. If anything can help people get some cool bezels up there, then that's a WIN.

3a8082e126
Reply all
Reply to author
Forward
0 new messages