It is currently Wed Sep 19, 2018 5:06 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Sun Feb 10, 2013 9:15 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
In this post, tokumaru wrote:
Other aspects of the NES that might be random (such as register and memory contents) are probably not random enough for seeding a pseudo-random number generator.

Something glitchy this way comes.

¿Pretendo? ¿Innuendo? No entiendo.

Wintendo? Nesticle? Nintendon't.

Kevtris clued me in on how to get randomness before the player presses anything, without using a battery circuit. I'll have something to show you later this week.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 2:02 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7517
Location: Chexbres, VD, Switzerland
No offence, but are you getting senile or something ?

I was on the point to report this as spam, when I suddenly saw : oh, this post was made by tepples ?

If you bump a 4 year old thread, at least write something sensible in it.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 6:53 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10811
Location: Rio de Janeiro - Brazil
Bregalad wrote:
If you bump a 4 year old thread, at least write something sensible in it.

The nonsensical links are expected from tepples, but I'd expect more than a "teaser" to justify the necrobump.


Top
 Profile  
 
 Post subject: Re: Re:
PostPosted: Mon Feb 11, 2013 7:50 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
tepples wrote:
Kevtris clued me in on how to get randomness before the player presses anything, without using a battery circuit.

What was unclear about this post?

Let me explain further: Last night I was in #nesdev with kevtris, and I asked about potential sources of randomness to choose one of six opening cut scenes before the player has a chance to press Start. He told me about a way to read values resulting from analog effects in the PPU.


Top
 Profile  
 
 Post subject: Re: Re:
PostPosted: Mon Feb 11, 2013 10:10 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10811
Location: Rio de Janeiro - Brazil
tepples wrote:
What was unclear about this post?

Nothing was unclear, it's just that it had no actual content, it's a teaser for content you intend to post in the future.

Not that it bothers me or anything, I just found it weird.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 10:15 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7517
Location: Chexbres, VD, Switzerland
Quote:
Let me explain further: Last night I was in #nesdev with kevtris, and I asked about potential sources of randomness to choose one of six opening cut scenes before the player has a chance to press Start. He told me about a way to read values resulting from analog effects in the PPU.

Oh, and we were supposed to guess this by looking at your jargon post ?

I guess the time between reset and the first VBlank could be random... on real hardware but most (if not all) emus will not simulate this.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 10:36 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
Think back to that topic about Young Indiana Jones. Reading from $2007 during rendering causes the PPU to skip a line and possibly a byte. Young Indy and the title screen of Zelda II use this to skip some scanlines, and I had made a demo called Boing 2007 that uses this same effect to stretch a background.

As for the value itself, Kev tells me a whole bunch of things get enabled at once inside the PPU, which causes not-very-predictable "analog" effects. So I used a CRC16 routine to take a hash of 256 reads from $2007 in order to establish a random seed. I'll post a demo with source later, and I'll need people's help to test it on an NES without the PowerPak menu getting in the way.

Oh, and by now, I'm starting to agree that the necro-bump might not have been the best choice here.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 11:02 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7517
Location: Chexbres, VD, Switzerland
I completely forgot about this, but I guess this was because you can't really do things that writes to $2005/6 can't do with this effect, so I quickly forgot about it.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 11:44 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
* Initial RAM contents
* Initial timing of things (how many cycles until first event)
* Indeterminate hardware behavior (double write to $2007)

If you have battery RAM, keep RNG's state in it or even just a reset counter, then no need for HW randomness


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 12:15 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 2083
Location: WhereverIparkIt, USA
blargg wrote:
If you have battery RAM, keep RNG's state in it or even just a reset counter, then no need for HW randomness


Or flash that's writable via the NES. Flash is the only reasonable memory choice if something is going to be produced in sizable quantity. Admittedly though, a solution that would allow writing to it would need to be devised.


Tepples wrote:
I'll post a demo with source later, and I'll need people's help to test it on an NES without the PowerPak menu getting in the way.


I can help you out.

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 2:16 pm 
Offline

Joined: Wed Feb 17, 2010 5:42 pm
Posts: 383
blargg wrote:
* Initial RAM contents

When I start reading this topic, I had same idea. But it is not emulated, is it?


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 2:22 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
http://pics.pineight.com/nes/pretendo-0.01.zip

Does it have the same 4-digit number every time?


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 3:31 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7517
Location: Chexbres, VD, Switzerland
The initial RAM content will vary from NES to NES, but will be likely the same at power up on the same console.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 3:34 pm 
Offline

Joined: Wed Feb 17, 2010 5:42 pm
Posts: 383
Denine:Tepples
0:1

So, RAM viewer in FCEUX just shows 00's and FF's?

At any rate, this may be very useful information, thanks!

EDIT:
Bregalad wrote:
The initial RAM content will vary from NES to NES, but will be likely the same at power up on the same console.


yeahh... So player need to reset the game to have different initial value.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 3:44 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7517
Location: Chexbres, VD, Switzerland
Yes but then I think a soft reset is assimilable to a "button press".


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 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