Finding Atari Games in Randomly Generated Data
bbenchoff.github.io
Finding Atari Games in Randomly Generated Data
1–10 of 38 posts
Re: Finding Atari Games in Randomly Generated Data
#2Re: Finding Atari Games in Randomly Generated Data
#3Instead of adjusting the azimuth and retrying, I decided to take my chances and typed RUN to execute the one-line BASIC bootloader that starts the actual machine-code game.
To my surprise, the game started, but there was something odd. Even though I should have lost all my lives, the game kept going. Somehow the loading error had modified a few bytes in the game that were responsible for checking the game-over condition.
I finished the game several times without ever seeing the Game Over message. Well, the probability isn't as low as accidentally writing a game from scratch, but it's certainly interesting when you think about it.
Re: Finding Atari Games in Randomly Generated Data
#4I would say, however, given the staggering space of possible ROMs, it's not particularly cheating to change from using the acceptance criteria to judge random ROMs, to using the acceptance criteria in the generation phase. It's fine to do things like generate random opcodes instead of purely random numbers for the first 1KB, for instance.
It's really just an optimization of what you're already doing; it's equivalent to randomly generating a lot of options then rejecting the ones that don't fit, except it goes much faster and produces a lot more output of interest instead of burning energy on things that are just going to be rejected anyhow.
Re: Finding Atari Games in Randomly Generated Data
#5When I was a kid, I had a ZX Spectrum 48K with a cassette tape as the storage unit. Tapes are notoriously unreliable. One day I loaded a game [1] and got the dreaded "R tape loading error". Instead of adjusting the azimuth and retrying, I decided to take my chances and typed RUN to execute the one-line BASIC bootloader that starts the actual machine-code game. To my surprise, the game started, but there was something…
Re: Finding Atari Games in Randomly Generated Data
#6When I was a kid, I had a ZX Spectrum 48K with a cassette tape as the storage unit. Tapes are notoriously unreliable. One day I loaded a game [1] and got the dreaded "R tape loading error". Instead of adjusting the azimuth and retrying, I decided to take my chances and typed RUN to execute the one-line BASIC bootloader that starts the actual machine-code game. To my surprise, the game started, but there was something…
Anyway, in Elite, you can save and restore your progress, so I did that because I felt like I'd accomplished something. However, after a week or so, I was getting pretty bored that I was just flying from place to place, trading, but not a lot else was happening. I had the occasional fight with another ship on my way to a new planet, but only maybe every 2nd or 3rd flight. It was basically a trading game and nothing much else.
I returned the game to my friend a couple of weeks later and told him how I found it pretty boring. He was surprised and said you get attacked almost every flight. We loaded it up on his CPC, and sure enough, I played for about an hour, and there was lots of combat. Borrowed the game from him again, and this time didn't load up my old save game, and had the same - lots of combat. Reluctantly, I started again, losing all my credits from trading, but suddenly the game was actually fun again.
My best guess is that some data that controlled how much combat action I got had been corrupted in a way that wasn't detected by the checksum, and once that was reloaded it got persisted in every subsequent save. It sounds implausible, but actually most checksum schemes on the CPC don't differentiate between runs of 00 bytes or runs of FF bytes, as they're usually done as mod-255. [0]
[0] checksum code is often a bit like this: IN: A byte that was written, HL previous CRC. ADD A,H: ADC A,0: LD H,A: ADD A,L: ADC A,0: LD L,A [1]
[1] Often called Fletcher-16, it's much simpler on an 8-bit CPU than the pseudo-code on Wikipedia suggests [2] if you pre-initialise the counters to 1 instead of 0
Re: Finding Atari Games in Randomly Generated Data
#7If you want to increase your chances of finding something but still generating a "complete" rom, then limit the size to 2k.
Re: Finding Atari Games in Randomly Generated Data
#8Re: Finding Atari Games in Randomly Generated Data
#9Re: Finding Atari Games in Randomly Generated Data
#10If you do the math based on the specs given in the story (and crucially, you assume that each possible book appears once) you end up with a library several times larger than the observable universe.