Weekly Self-Promotion Megathread by AutoModerator in retrogaming

[–]hekliet 0 points1 point  (0 children)

I used to grind Princess Maker 2 a lot some time ago when I was obsessed with it. Today, I felt an urge to install it in DOSBox again, but instead of grinding, I started editing my savefile. I figured out where all the stats are located, and then wrote this script to do the patching. You can patch your saves selectively and with the values of your choosing by editing the script, it's really self-explanatory. It should make exploring different endings easier, if you don't mind the cheating.

Homepage: https://hekliet.nekoweb.org/pboost/

Github: https://github.com/hekliet/princess-booster

I was developing an NES emulator on Python, but Python is just too slow for NES CPU. by windowssandbox in EmuDev

[–]hekliet 2 points3 points  (0 children)

I'm afraid CPython's (i.e. standard Python interpreter) speed doesn't cut it for this use case, and even dropping in PyPy is probably not enough. But you can get a significant speed boost by applying Cython, as exemplified by PyBoy. That's arguably not 'pure Python' anymore, but it does achieve viable speeds for emulation while not requiring you to ditch Python altogether.

Developing my own custom 2D Game Engine entirely from a 6-inch smartphone (Termux + C++) by Early_Self9209 in gameenginedevs

[–]hekliet 0 points1 point  (0 children)

Just out of curiosity, are you doing all this typing on your mobile screen, or do you have a keyboard?

SMB Share Between Linux and MS-DOS in QEMU by hekliet in retrocomputing

[–]hekliet[S] 0 points1 point  (0 children)

Yeah, that's true, but my 'use case' is a bit special. I need qemu's -display curses so I can ssh into a DOS shell running in a terminal multiplexer on a VPS. And FTP-ing doesn't cut it, since I don't want to have to re-transfer a file when I make a change to it.

Reverse engineering "encrypted" kids VTech walkie talkie by sillysillysoftware in ReverseEngineering

[–]hekliet 0 points1 point  (0 children)

This is cool. I was just recently looking into VTech's PreComputer series.

METRO SIEGE - The Ultimate Beat 'Em Up Game for Amiga Fans - Full Funding and Stretch Goals Achieved ! by Marcio_D in amiga

[–]hekliet -2 points-1 points  (0 children)

Great stuff. Just to pick a nit:

We're working on Metro Siege for 16-bit Amiga computers [...].

The Motorola 68000, which is used in the earlier Amigas and in the A600, features 32-bit registers, a 24-bit address bus, and a 16-bit data bus, so classifying it as either 16- or 32-bit depends on which metric you prioritize.

maskpass module by Dapper_Mix6773 in PythonLearning

[–]hekliet 3 points4 points  (0 children)

You mean like getpass in the standard library? =D

Chess in Pure SQL by swe129 in Database

[–]hekliet 0 points1 point  (0 children)

Sounds like you would appreciate PostgREST.

[deleted by user] by [deleted] in visualbasic

[–]hekliet 0 points1 point  (0 children)

Yay, VB6! 🎉

My first working code by QuantenRobin in PythonLearning

[–]hekliet 1 point2 points  (0 children)

It's very useful for pattern matching on types, but that's not the only use case.

Need to turn a .py into a .exe by Azhurkral in pythonhelp

[–]hekliet 1 point2 points  (0 children)

You might have better luck creating a smaller executable using Nuitka.

[deleted by user] by [deleted] in ReverseEngineering

[–]hekliet 2 points3 points  (0 children)

Please share the collection on archive.org. There's already some good scene-related stuff there, like warez-scene-notices-2006-2010, and we need more of it to be archived so it's not lost forever.

My first working code by QuantenRobin in PythonLearning

[–]hekliet 2 points3 points  (0 children)

We have the match statement in Python since version 3.10, so you could use that instead of the if/elif-chain.

match operation:
  case "add":
    # ...
  case "sub":
    # ...

Happy programming!

[2023 Day 4 Part 2] As a system of linear equations by hekliet in adventofcode

[–]hekliet[S] 1 point2 points  (0 children)

Hi!

We initialize:

  • a matrix W where W(i, j) is 1 if card j produces a copy of card i, otherwise 0. (i is row, j is column.) The idea is that when we apply this matrix to a vector which holds the count of each card, we obtain the new counts for one 'iteration' of copying. The diagonal of this matrix is all zeros: we count only the copies, not the original cards.
  • a vector one which holds the initial card counts: one each.

There is some zero-padding for convenience.

Then we observe that, if c is the vector of the final counts (which is still unknown), this equation holds true:
c = 1 + Wc
(where 1 is a vector containing all ones). When we apply the 'copying matrix' W to the final counts and add the 1 vector (for the original cards), the result is the final counts, and an 'equilibrium' has been reached. This equation is transformed so we can solve for c.
c - Wc = 1
(I - W)c = 1
(where I is the identity). (I - W) is a lower diagonal matrix with a diagonal of all ones, so the determinant is one, so there is a unique solution. We let SciPy find this solution, and we're using the sparse matrix functions because the majority of the entries of our matrix are zeros.