Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Impossible Mission

Reply to topic
Author Message
PolestaR
  • Guest
Reply with quote
Impossible Mission
Post Posted: Thu Feb 08, 2001 11:06 am
Anyone know how Impossible Mission randomizes which level you get? I was just wondering which random part they use, maybe its a port or something who knows, anyone?
-Jason Starr-
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Thu Feb 08, 2001 4:50 pm
Quote
> Anyone know how Impossible Mission randomizes which level you get? I was just wondering which random part they use, maybe its a port or something who knows, anyone?
> -Jason Starr-

Generally games needing random numbers count the number of frames (or count -something-) waiting for the user to start a game. That count is used to seed a random number generator. NES Tetris makes you go through about 6 or 7 menu options before starting the game, I wouldn't be surprised if those delays are intentional, to get 'unpredictable' real world data (the user moving the pad around) to get a different value each time to seed the random number generator, random numbers being very important to a game like Tetris (hint: Tetracycline has a very cheesy bad random number generator. But it seems to be playable anyhow.)

Why do you ask, is Impossible Mission giving you the same layout each time in FreezeSMS? Maybe it's using the horizontal scan position (from port $7f) to seed, and if you don't emulate that port, or don't emulate it correctly, it'll always seed with the same value.

I was about to say, "Post me a link to the ROM and I'll poke around and see" but I'm probably taking up too many projects these days.
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
Re: Impossible Mission is it
Post Posted: Fri Feb 09, 2001 1:18 am
Yeah its giving same layout. I'll disassemble it later and have a look at it. HPOS seems to be emulated correctly so I dont know. Maybe its not ;). Anyways thanks for your response, how is the Sound program coming along?
-Jason Starr-
 
  • Joined: 14 Aug 2000
  • Posts: 742
  • Location: Adelaide, Australia
Reply with quote
Re: Random numbers
Post Posted: Fri Feb 09, 2001 5:42 am
one technique is to use the R register for a random (well, pseudo) value. I read this in a Z80 book.

you can also generate a PRBS (pseudo random bin sequence by performing a series of XOR ANDS, etc... on a register to get a
2^8 sequence that doesn't repeat. neat huh!

a s out.
  View user's profile Send private message
PolestaR
  • Guest
Reply with quote
Re: Random numbers
Post Posted: Fri Feb 09, 2001 10:39 am
Yeah, i remember Impossible Mission working before. It could be due to the z80 emullation. Even though Raze says it is a highly compatible and accurate emulator I am starting to have my doubts.
-Jason starr-
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: Impossible Mission is it
Post Posted: Fri Feb 09, 2001 5:25 pm
Quote
> Yeah its giving same layout. I'll disassemble it later and have a look at it. HPOS seems to be emulated correctly so I dont know. Maybe its not ;).


> Anyways thanks for your response, how is the Sound program coming along?

heh, well, you see, I just got a Game Gear, and it has very much affected my efficiency.

I'll work on it today, however. I left my Game Gear at home, and it doesn't look like a busy day, so maybe by later this evening (PST).
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Sun Feb 11, 2001 12:11 am

Quote
> Maybe it's using the horizontal scan position (from port $7f) to seed, and if you don't emulate that port, or don't emulate it correctly, it'll always seed with the same value.

I noticed that when Mike G. ran my port-dumping program on an SMS 2, the horizontal scan position port always returned zero.

On the Genesis, it always returns zero too, no matter what is written to port $3F (which is supposed to affect the light gun in some way)

I'm beginning to think that maybe it only returns meaningful data when the light gun is actually plugged in. Which would explain why no games use it except for the shooting ones.



  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!