I need a way to run NES games FASTER

or maybe just more in parallel.

it's taking 15 seconds to run this TAS, with unthrottled/no-display bizhawk. I have half a million runs to do

I switched to a computer that's less in my lap, but that's still ~7s a run.

40 days?

maybe I should just set up some kind of orchestration so I can run it on all my spare computing power. just a lot of simultaneous NES TASes running everywhere
or I could get smarter. I don't want to do that. but it's an option
it turns out being smarter also involves waiting for several hundred NES TASes to finish
man either this game is very resilient to corruption or my script isn't working and I'm corrupting nothing.
or both

the files are identical.

MOTHERFUCKER

yeah I left in one line from an earlier version which broke it. it was carefully calculating the corrupted ROM and then it overwrote the in-memory copy with the original ROM, then wrote that out as the corrupted version

so my plan is that I'm taking an NES ROM and corrupting a kilobyte of it at a time. I'm then running it to a set point, and taking a screenshot.

Every 1k chunk that results in the same screenshot? is uninteresting to my corruption. Everything that breaks or changes? interesting.

Then I'll go through and randomly corrupt those 1k chunks that were found in the interesting pass

the idea is to skip corrupting any chunk that I know can't affect the screen I'm looking at

https://github.com/fhoedemakers/pico-infonesPlus

hmmm. NES emulator for the Pico. I have like 10-15 picos. I could parallelize this and build a dedicated NES emulation cluster

GitHub - fhoedemakers/pico-infonesPlus: NES Emulator with SD card and menu support for the Raspberry PI Pico, Pico 2 and other RP2040/RP2350 based microcontrollers. Play your games from SD card on a HDMI display.

NES Emulator with SD card and menu support for the Raspberry PI Pico, Pico 2 and other RP2040/RP2350 based microcontrollers. Play your games from SD card on a HDMI display. - fhoedemakers/pico-inf...

GitHub
yeah that looks like an Interesting chunk.
These two even moreso
I should automate this completely.
just randomly pick NES roms, figure out how much of them is PRG vs CHR, then randomly corrupt the PRG and take screenshots. if the screenshot doesn't match an unmodified screenshot, post it somewhere
the real trick would be to figure out how to do it to DOS games.
lemme see if TASVideos has a better solution for a DOS emulator since I last did a TAS 15 years ago...
nope
(technically not true: they now also support using libtas+PCem! A horrible hack that scares me!)
I think I made the game orgasm
I found that if you change byte 50647 to 97 in the ROM, bizhawk gets confused and tries to load it as a Playstation ISO
2048 gibberishings later and I think these two are the closest I got to a useful result
automating windows programs is always a nightmare. what does your command line tool do when the command line program calls MessageBox?
when I was automating some visual studio build machines a decade ago I had some code that checked every 60 seconds for unexpected dialog boxes being open, and if found it spammed ESC on the keyboard to close them.

@foone Snarky reply: It uses Brick or debconf-frontend-readline to give a TUI experience?

From there you can use expect (or tintin!) to automate replies.

@foone this is a cool way to do this

@foone
ees
yes
yees!
yess!

The ground is very affirmative and enthusiastic.

@foone "I'll have what she's running."
@foone i spent a few hours making their hacked PCem version compile (only to be met with "obviously, use an undocumented second branch from 4 years ago" as a solution). then i discovered that libTAS uses horrible gnu hacks and won't ever work on musl

every time i try to get into speedrunning...
@foone this could make for an amazing art installation, especially if it could generate corrupted screenshots or gameplay in real time
@foone what game is this?
@CowboyWho Clash at Demonhead
@foone I loved that game even though I was never good at it.
@foone oh, why don't you just port afl to this architecture??? How hard could that be?!?!
@faux that sounds hard and it would need me to be smart. I like computers because they're so fast I don't have to be smart
@foone oh this is really neat
@foone Maybe a bisection approach would be faster? Probably still start with the 1K chunks, but then progressively subdivide the corruption region to zero in on the interesting bits faster. But I dunno exactly what you’re looking for.

@bytex64 possibly, but I'd have to write it, and I'm disinclined to do that when my stupider approach is already running.

as for what I'm looking for: the bytes that determine which portrait gets picked in the dialogue screen of Clash at Demon Head

@foone they’re exactly where you left them?
@yakmoose which isn't what I wanted! I wanted them to CHANGE
@foone Always a tradeoff of latency vs throughput. You could put some effort in getting this finished eariler, but that would take some efforts from other tasks you could otherwise accomplish in parallel. You can't win on both fronts. I know you know that, but I always like to express it as throughput vs latency.
@foone I feel this one, minus the context.