Telling LYs? (Input timing test ROM)

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Telling LYs? (Input timing test ROM)

Post by tepples »

This program, a port of a test ROM for Game Boy, tests a Super NES emulator's input entropy.

The Super NES CPU can read the system's controller ports more often than once per video frame, which is 50 or 60.1 Hz. The state of the controller ports can change at any time in the frame: top, middle, bottom, or in the vertical blanking between frames. A program can see exactly when the interrupt fired by polling the controller repeatedly during a frame and latching the HV counter to find the position in the frame. For instance, a game could wait for a press at its title screen and then seed a random number generator from the time it took.

But simple emulators always change inputs at the same time each frame, such as the start or end of vertical blanking. The lack of variance in timing is telling about whether an emulator was used; hence the name.

How to use

Starting at the title screen, press all four directions on the Control Pad and all eight buttons (A, B, X, Y, L, R, Select, and Start) of controller 1, one after another in any order. The arrow at the right side tells exactly when, relative to the PPU frame, the last button changed from not pressed to pressed.

Image
(NES screenshot; Super NES appearance is nearly identical)

Once you have pressed all 12 keys, a screen for passing or failing appears.

Test results

An NTSC Super NES (version 1/1/1) with SNES PowerPak passes. All three of these emulators reach the "Incorrect behavior" screen, with the arrow remaining usually just below the screen throughout the test:
  • bsnes-plus 05 (November 2019, Compatibility profile)
  • Mesen-S 0.3 (October 2019)
  • NO$SNS 1.6 (2016)
Attachments
tellinglys-0.01.zip
(36.66 KiB) Downloaded 249 times
Screwtape
Posts: 8
Joined: Wed Jul 10, 2019 11:34 pm

Re: Telling LYs? (Input timing test ROM)

Post by Screwtape »

The test passes for me in bsnes v112.7, as long as "run ahead" mode is disabled. With "run ahead" enabled, the game immediately leaps from the title screen to a screen that looks like this:

Image

...and although pressing buttons causes the arrow to move, no amount of pressing buttons can progress to the result screen.
User avatar
FitzRoy
Posts: 144
Joined: Wed Oct 22, 2008 9:27 pm
Contact:

Re: Telling LYs? (Input timing test ROM)

Post by FitzRoy »

It passes with the scanline PPU disabled. Is it even something that can be fixed in that renderer?
Post Reply