The Legend of Kage + Game Genie = Input Lag Tester

You can talk about almost anything that you want to on this board.

Moderator: Moderators

Post Reply
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

The Legend of Kage + Game Genie = Input Lag Tester

Post by Dwedit »

edit: Corrected the post back to what actually works:

Use these two game genie codes:

AZUZIGPA
ONEPNPZE

Now US version of "The Legend of Kage" becomes an Input Lag tester. It copies your joypad into PPUMASK every frame. Hold A to toggle the monochrome bit.
Last edited by Dwedit on Wed Oct 03, 2018 11:57 am, edited 3 times in total.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: The Legend of Kage + Game Genie = Input Lag Tester

Post by Dwedit »

This is what NES+CRT input lag looks like:

Taken with phone camera in "8x slow motion", recording at 120FPS.
Notice how on the third frame, finger makes contact with the button, and the screen is instantly illuminated at the top.

0 lag whatsoever.
inputlag_nes.gif
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
pubby
Posts: 583
Joined: Thu Mar 31, 2016 11:15 am

Re: The Legend of Kage + Game Genie = Input Lag Tester

Post by pubby »

Huh that's neat. What's the story behind coming up with this?
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: The Legend of Kage + Game Genie = Input Lag Tester

Post by Dwedit »

AZUZIGPA: A435?01:20

First code patches the joypad loop to write its result to $2001 (PPUMASK) instead of the joystick state variable.

Code: Select all

 00:A40C: A2 07     LDX #$07
>00:A40E: AD 16 40  LDA JOY1 = #$00
 00:A411: 29 03     AND #$03
 00:A413: C9 01     CMP #$01
 00:A415: 6E 03 01  ROR $0103 = #$00
 00:A418: AD 17 40  LDA JOY2_FRAME = #$00
 00:A41B: 29 03     AND #$03
 00:A41D: C9 01     CMP #$01
 00:A41F: 6E 04 01  ROR $0104 = #$00
 00:A422: CA        DEX
 00:A423: 10 E9     BPL $A40E
 00:A425: A5 C2     LDA $C2 = #$00
 00:A427: 30 1A     BMI $A443
 00:A429: AD 03 01  LDA $0103 = #$00
 00:A42C: A6 C4     LDX $C4 = #$00
 00:A42E: F0 03     BEQ $A433
 00:A430: AD 04 01  LDA $0104 = #$00
 00:A433: 8D 01 01  STA $0101 = #$00 <- Patch to STA $2001 (PPUMASK)
Next patch makes a branch loop back to the joypad polling code.
ONEPNPZE: 9987?02:F9

Code: Select all

 00:9981: 20 F7 A3  JSR $A3F7
 00:9984: E6 21     INC $21 = #$00
 00:9986: D0 02     BNE $998A        <- Patch to become BNE $9981
Last edited by Dwedit on Wed Oct 03, 2018 12:02 pm, edited 2 times in total.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: The Legend of Kage + Game Genie = Input Lag Tester

Post by rainwarrior »

Heh, that's an interesting hack.
User avatar
James-F
Posts: 13
Joined: Fri Nov 03, 2017 11:54 pm

Re: The Legend of Kage + Game Genie = Input Lag Tester

Post by James-F »

Patch a rom with GG codes permanently:
https://www.romhacking.net/utilities/1054/
Post Reply