Thus, we all agree this demo will, unintentionally, always show "YOU ARE USING AN EMULATOR" even on both NTSC and PAL hardware, both flash cart and EEPROM, right ?strat wrote: ↑Mon Dec 21, 2020 5:39 pm Here's the intended emulator-detection code from the RTC.nes demo. Even after reading about open-bus behavior on the wiki, I'm stumped here. In both FCEUX and Mesen it writes #$AA to vram address $0001 and the cmp reads from $0002 [Edit: It's actually reading the value in $1 on the read buffer - the problem here is that the emulator doesn't allow writes to chr memory if the header says chr rom]. I guess it's supposed to write #$AA to $2A00 and read it back with the cmp but the inx and the first dummy read ensure it will always hit $2A02.
List of games that use power-on state to seed RNG
Moderator: Moderators
Re: List of games that use power-on state to seed RNG
Useless, lumbering half-wits don't scare us.
Re: List of games that use power-on state to seed RNG
Minor nitpick: the PPU's internal bus would be initialized by the "01:EDA5:AD 02 20 LDA PPU_STATUS = #$00" instruction immediately beforehand, which would set the upper 3 bits based on the VBLANK flag + Sprite 0 Hit + Sprite Overflow (and the lower 5 bits to zero by the PPU_MASK write above it).
In this case, though, those are all still zero (because it's outside of VBLANK and rendering is turned off), so it still behaves as described (i.e. wrongly).
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.
Re: List of games that use power-on state to seed RNG
It's an NROM program that has 8K of chr-rom in the iNES header (yet still writes to chr-memory and reads it back) and clears all ram on startup except the stack. So it probably fails on a flashcart that locks chr memory when it's supposed to be chr-rom (like lidnariq says above).
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: List of games that use power-on state to seed RNG
Oh dear.
"After noticing that you could cause a bug in the saves from Dragon Quest III by increasing the temperature of the cartridge and start at level 99 at a specific temperature, a player has made a speedrun of the game with his console resting on a hot plate."
https://twitter.com/VGDensetsu/status/1 ... 9743085570
"After noticing that you could cause a bug in the saves from Dragon Quest III by increasing the temperature of the cartridge and start at level 99 at a specific temperature, a player has made a speedrun of the game with his console resting on a hot plate."
https://twitter.com/VGDensetsu/status/1 ... 9743085570
Re: List of games that use power-on state to seed RNG
What the...?
Oh well, at least he is just cooking a clone and a cheap and common game.
Oh well, at least he is just cooking a clone and a cheap and common game.
Re: List of games that use power-on state to seed RNG
OK, but because the flash cart can make the 8k of CHR-ROM behave like pre-initialized CHR-RAM (like Nesticle ) it doesn't mean it has to. It can also block writes easily, and I'd definitely make it behave like this if I was designing a flash cart.strat wrote: ↑Mon Dec 28, 2020 5:01 pm It's an NROM program that has 8K of chr-rom in the iNES header (yet still writes to chr-memory and reads it back) and clears all ram on startup except the stack. So it probably fails on a flashcart that locks chr memory when it's supposed to be chr-rom (like lidnariq says above).
Useless, lumbering half-wits don't scare us.
- Broke Studio
- Formerly glutock
- Posts: 181
- Joined: Sat Aug 15, 2015 3:42 pm
- Location: France
- Contact:
Re: List of games that use power-on state to seed RNG
I did something like this in Twin Dragons and Basse Def Adventures.rainwarrior wrote: ↑Wed Dec 16, 2020 6:03 pmWe've deliberately excluded this case from the wiki, so I'm curious: which games do do this?Game bugs: Reliance on RAM values wrote: Note that using power-on RAM content as a seed for random number generation is not a game bug.
Offhand the only one I've heard of is:I made two games leave most bits of the RNG uninitialized at reset so that gathered entropy propagates across each reset. (They don't bother to scan all of RAM at startup for entropy that way, though. I didn't really care too much about methods that don't work well on emulators or PowerPak.)
- Final Fantasy - power-on is used for a usually-consistent startup seed by speedrunners
Does anyone else know any?
- Lizard
- NESert Golfing
I check zeropage on startup/reset and look for a byte different than 0 and use a default one if I can't find anything.
The other byte of the seed is fixed though.
Worked fine enough for the games.
My first game : Twin Dragons available at Broke Studio.
-
- Posts: 160
- Joined: Sat Apr 24, 2021 7:25 am