评论
主题: OutRun 2019
New ZealandTakuikaNinja7 months ago

I've learnt my lesson. I apologise for the accusation.

New ZealandTakuikaNinja8 months ago

Oh, I almost forgot about the relevant variable locations:

$C1E1 = RNG output
$C695 = level skip flag
$C6A4 = # of remaining enemies
$C676 = level from level select screen
$C67D = next level (level skip flag applied here)
$C67E = current level (incremented on level clear)
NoHeadZedd 喜欢这个
New ZealandTakuikaNinja8 months ago

A few more details about the RNG:

  • The output cycles back to 0 on the 256th call.
  • All values from 0~255 are present in said cycle.

Essentially, this RNG routine is best described as obtaining values from a shuffled list of size 256.

I ported the routine to Python to see how many calls are required from the title screen to obtain the smiley face & level skip items:

#!/usr/bin/env python3

class Random:
	def __init__(self):
		self.rng = 0
	
		def next(self):
		self.rng = (self.rng * 5 + 1) % 256
		return self.rng
		
		if __name__ == "__main__":
	random = Random();
	x = random.rng
	values = []
	for i in range(256):
		if i > 0:
			x = random.next()
		print(f'Call {i}: {hex(x)}')
		values.append(x)
		if x == 0x15:
			print("Smiley face")
		elif x == 0x55:
			print("Level skip")

The 94th call after initialisation gets the level skip. The 157th call gets the smiley face. The cyclical nature means that 256 calls must happen before the same value is picked again. So I was correct about the early manipulation idea. Get a semi-consistent level skip in the first set of floors, then hope for the best afterwards.

NoHeadZedd Edo_87 喜欢这个
New ZealandTakuikaNinja8 months ago

NoHeadZedd reached out online to investigate the requirements to spawn the level skip object. I obliged and reverse-engineered the item drop logic. The smiley face and level skip items are allowed to be dropped by an enemy under these conditions:

  • The number of remaining enemies is 1, OR
  • The number of remaining enemies is 2 AND there is at least 1 active snowball AND the current level is outside of the 11~20 range (B40-B31F)

The smiley face has a 1/256 chance of spawning. If the check fails, then the level skip object gets a 1/256 chance of spawning. (An enemy is considered defeated once it drops an item, or the snowball containing it has been destroyed.)

Once the level skip object is collected, extra logic is run after level completion to decide if the level skip should occur. This is a simple division+modulus of the next level number by 10. If the next level is a boss level, the modulo is 0 and the level skip is aborted. Otherwise, the next level is set to (division result) * 10 + 9. This translates to the floor numbers B?2F & 09F as observed by others.

The pseudorandom number generator (RNG) in this game is very crude:

The value is only ever set to 0 on the title screen.
Every call to the RNG routine multiplies the value by 5 and adds 1. Only the lower byte of the result is saved, so this is effectively modulo 256.

A more formal definition:
RNG(0) = 0 on title screen
For n >= 1:
RNG(n) = (RNG(n-1) * 5 + 1) % 256

The smiley face requires the RNG output to be exactly $15 after one call for it to spawn. Likewise, the level skip item requires a value of $55 after another call.

I would say that the randomness is "good enough" to not be too predictable throughout a casual playthrough. Since the starting seed is consistent, manipulating the output for the first few levels to get a level skip to B42F seems doable in my opinion. Beyond that, you're pretty much at the mercy of the RNG since many things use it.

主题: OutRun 2019
New ZealandTakuikaNinja9 months ago

Hi. I don't run this game (I only own a PAL plug'n play) but I wanted to inform this place about a concern I have. This game contains codes to enable/disable debug features: https://tcrf.net/OutRun_2019

The main menu code (the Start/Options/Records screen) checks for two codes that turn on and off several interesting features.
- To turn these features on, press Up twice, A once, B twice, and C seven times.
- To turn these features off, press Up twice and C once.

After entering a code, press Start to confirm. These must be the only buttons you press on the main menu before pressing Start, and you can press the buttons in any order. Once you press Start, if you entered a code correctly, the sound effect you hear when you select an item from the main menu should be different, and you should be taken to the Options screen (since that option is selected since you pressed Up twice in both cases).

Once the debug features are enabled, the options screen allows access to additional settings:

  • stage - 0 is normal gameplay, 1 is ending sequence. Other values select the route to start at. This could be useful for practice.
  • mode - A 4-bit value (0-15) which can disable most car collisions, enable infinite time, and/or override the horizontal display resolution.
  • control - A 2-bit value which can enable a debug HUD and/or disable the retire prompt in the pause menu.

While these could be useful for practicing specific routes in each stage, my concern has to do with the mode value. Disabled collision and infinite time grants an unfair advantage. If done right, the only visual indication of any debug features being enabled is in the options menu. Quite a few runs here seem to start from the "try again/next stage" menu, which means there is no guarantee of their legitimacy anymore. The rules make no mention of them, either.

That aside, the debug features should be listed in the guides section for future reference. I may do it myself if no one else does it first.

主题: StarTropics
New ZealandTakuikaNinja1 year ago

Hmm, I just noticed that there's an MMC3 patch for StarTropics on RHDN. Perhaps you should try that one out too?

主题: StarTropics
New ZealandTakuikaNinja1 year ago

This is a well-known issue in emulation. StarTropics 1 & 2 use MMC6 but iNES headers conflate it with MMC3 as mapper 4 (this is what the most common dumps use). This causes the name register screen to fail as you've described. NES 2.0 headers allocate submapper 004:1 to mitigate this. The N8 Pro (not the original) appears to have partial NES 2.0 support. I don't own one myself so I can't confirm if StarTropics works properly. If you want to try getting it to work on the original N8 anyway (or just mess with other patches on accurate emulators), I've made a patch which corrects the mapper a while ago. I won't directly link it here but you should be able to find it on RHDN. Edit: Could someone check if said patch works on other flashcarts? Like I said, I don't own any flashcarts yet.

TakuikaNinja的介绍
加入时间
4 years ago
在线
3 days ago
记录
0
关注的游戏
Indiana Jones and the Infernal Machine
Indiana Jones and the Infernal Machine
最近一次访问时间 5 months ago
1
访问
Pole Position
Pole Position
最近一次访问时间 3 months ago
1
访问
Jetpac
Jetpac
最近一次访问时间 3 months ago
1
访问
Dizzy Prince of the Yolkfolk
Dizzy Prince of the Yolkfolk
最近一次访问时间 3 months ago
1
访问
The Hobbit Software Adventure
The Hobbit Software Adventure
最近一次访问时间 4 months ago
1
访问
Bruce Lee (ZXSpectrum)
Bruce Lee (ZXSpectrum)
最近一次访问时间 3 months ago
1
访问
Atic Atac
Atic Atac
最近一次访问时间 3 months ago
1
访问
Snow Bros. Jr.
Snow Bros. Jr.
最近一次访问时间 7 months ago
4
次访问