It is currently Mon Jun 18, 2018 12:24 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Thu Feb 14, 2013 6:15 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
Many emulators will not randomize the RAM, and the microphone is not always available, but I might call a random number generator several times per frame until a button pushed, but also using the initial contents of RAM and microphone, to do random numbers generation; it works very well even in emulator but should work on real hardware too, a bit better, and perhaps even a bit more better on the RF Famicom. (This is what I have used, with ARCFOUR as the random number generator.)

_________________
.


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 12:28 am 
Offline

Joined: Sat Aug 28, 2010 9:01 am
Posts: 219
zzo38 wrote:
Many emulators will not randomize the RAM,
In 2013? You might be right, but I thought (and hoped) that modern emulators had gotten past such trivial, and easily fixable things. I wouldn't use an emulator that doesn't randomize RAM, because it's very likely to emulate most other things inaccurately too.


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 12:53 am 
Online
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3076
Location: Tampere, Finland
nitro2k01 wrote:
zzo38 wrote:
Many emulators will not randomize the RAM,
In 2013? You might be right, but I thought (and hoped) that modern emulators had gotten past such trivial, and easily fixable things. I wouldn't use an emulator that doesn't randomize RAM, because it's very likely to emulate most other things inaccurately too.

Randomizing and initializing are two different things though. Even the real system isn't random. When it comes to emulators, I know FCEUX initializes RAM to a pattern of $00 and $FF, Nestopia initializes to some other pattern (including at least $FF, possibly based on these results) and Nintendulator initializes to 0.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 4:54 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20158
Location: NE Indiana, USA (NTSC)
A lot of emulator authors are trying to serve the TAS crowd, who want a defined state of the machine at power-on so that the movie will sync.


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 8:58 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
nitro2k01 wrote:
zzo38 wrote:
Many emulators will not randomize the RAM,
In 2013? You might be right, but I thought (and hoped) that modern emulators had gotten past such trivial, and easily fixable things. I wouldn't use an emulator that doesn't randomize RAM, because it's very likely to emulate most other things inaccurately too.

Care to share an algorithm that accurately emulates the power-up state of the RAM in a NES of your choosing? I've got to be able to write my own tests that your algorithm is able to fool into thinking it's on a NES.


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 3:38 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6342
Location: Canada
nitro2k01 wrote:
I wouldn't use an emulator that doesn't randomize RAM, because it's very likely to emulate most other things inaccurately too.


There's no advantage to randomizing RAM for the vast majority of users (i.e. anybody who isn't using it to develop NES software).

For developers, it's extremely trivial to initialize the NES RAM on startup. In the rare case where this is not appropriate for your software, randomizing the RAM on startup is still not a very effective tool for finding problems. A much better thing to do is to use a R/W access log to check what you have and have not initialized, and check for reads that occur before any writes to a location. So... in my opinion even for the developer the use of a randomized RAM feature is kind of pitiful.

Really all it does is randomize the behaviour of uninitialized variable bugs. I don't think that's particularly helpful, especially if you have a bug that's caused by a very specific byte value in RAM. Good luck reproducing that one.

How could this possibly be a make-or-break feature for your choice of emulator?


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 7:29 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
tepples wrote:
A lot of emulator authors are trying to serve the TAS crowd, who want a defined state of the machine at power-on so that the movie will sync.
Perhaps the playback file should have optional RAM initialization block? I don't know if that can sometimes be considered as cheating?

_________________
.


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 7:50 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20158
Location: NE Indiana, USA (NTSC)
Call a "RAM initialization block" what it is: a save state. Yes, that is considered cheating in a TAS, as it isn't something the player has control over from the exterior of the machine.


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 8:39 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
A RAM initialization block (and starting the NES up with known timing synchronizations where they can vary) is a necessary evil for almost all TAS plays to work, otherwise games can respond unpredictably to the same sequence of presses. One can look at this in a charitable way: that TAS was possible when the NES powered up that particular way. Perhaps to be more realistic they would choose a starting state that a NES was actually observed to start up into, rather than RAM cleared to zero or whatever they use.


Top
 Profile  
 
PostPosted: Sun Mar 10, 2013 3:00 am 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
tepples wrote:
Call a "RAM initialization block" what it is: a save state.
An entire save state, though, also contains the CPU flags and registers (such as the program counter), while TAS always will start from reset, instead. So it is like a partial save state, I guess.

_________________
.


Top
 Profile  
 
PostPosted: Sun Mar 10, 2013 5:32 am 
Offline

Joined: Thu Aug 12, 2010 3:43 am
Posts: 1589
But not all games initialize variables on reset (i.e. only power on), and many of those do the check by looking at some value in RAM, you could easily force a predefined status with those variables to give you an unfair advantage (e.g. to enable cheats and such).

The whole point of a TAS is that it can be recreated on stock real hardware.


Top
 Profile  
 
PostPosted: Sun Mar 10, 2013 9:10 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
TAS is about something that could be done in real-time if one were superhuman. We could put the game in, power up a NES, then play it in an unbelievable way, all through the controller.

Since we aren't superhuman, we use tools to give us those powers as far as the NES and game are concerned. Our tools essentially allow time travel. We can stop time and think about the next buttons to press/release. We can also let time go forward, see what would happen, then go back and use that information in choosing what to press. We can also of course go back and redo something that we realize was an error.

So, to make a TAS, we put the game in, power up the NES, freeze time, make a note of the entire state of the NES, then construct our controller states while we run the NES forward and backward. When we're finally done, we rewind time back to the initial power-up state and play our TAS movie in real-time while everyone enjoys it. If someone wants to see it again, they can go back in time to this NES in its same initial state and replay the TAS.

Since this requires an actual time machine, we can approximate stopping time by stopping the NES clock or something similar, and approximate going back in time by restoring the same initial state to the NES before replaying the TAS. Rather than leave the NES on while we make the TAS, we might turn it off and then restore the state when we want to play it back for the first time. These, like the TAS tools, we are overcoming our own limitations when restoring the initial state before playback, not altering the essential TAS process.

Thus, I don't see the initial NES state issue as being a violation of TAS at all. It's still turning on a NES and feeding it just a series of button presses, created with the assistance of tools, that result in an unbelievable play.


Top
 Profile  
 
PostPosted: Sun Mar 10, 2013 7:32 pm 
Offline

Joined: Thu Aug 12, 2010 3:43 am
Posts: 1589
I meant that it should be theoretically possible to do it on stock real hardware as-is =P Of course in practice you'll need some sort of superhuman for that, though I believe somebody was making a TAS player with an Arduino that'd just press buttons on the controller.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 12:12 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 985
Sik wrote:
I meant that it should be theoretically possible to do it on stock real hardware as-is =P Of course in practice you'll need some sort of superhuman for that, though I believe somebody was making a TAS player with an Arduino that'd just press buttons on the controller.
Since it matter the initial RAM, then to do that, would require first you put one cartridge which initialize the RAM, and then jumps to RAM and then you remove the ROM cartridge and insert a different one, and then push RESET. Doing this requires that the RAM contains a machine code for a loop to please wait forever, so it cannot be all zero.

_________________
.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 12:25 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20158
Location: NE Indiana, USA (NTSC)
What about holding Reset while swapping cartridges? Reset is level sensitive; otherwise, battery-backed MMC1 games couldn't have used it for RAM protection during power off.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group