Talk:Mouse

Timings
The suggested timings for hyperkin-safe mouse code were measured on NES and then multiplied by 12 to get the SNES master clock timings.

Bsaed on a few games that I've tested to work with the hyperkin, I think the actual timings are slightly lower than what I could measure on the NES.

Master clocks measured in Mesen-S: (HBVJOY check to $401X read, between $401X reads)
 * Mario Paint: 820, 190
 * Jurassic Park: 206*, 170
 * Shadowrun patch: 406, 192

(* I think Jurassic Park checks HBVJOY about 1000 clocks after the end of auto-polling, so it probably doesn't matter that it's this low.)

All of these games appeared to work flawlessly with my hyperkin mouse, so based on Jurassic Park, it seems like it might work fine at 10 master clocks faster. Since that's less than 1 "NES" cycle, that could still agree with my NES test which did start to show errors with 1 less cycle.

So, I'll eventually rewrite my NES mouse test ROM for SNES and try and nail down better values for these timings. (Trying to nail down specific master clock values might be a pain...) At which point I'll probably be able to offer better sample code than the one from my shadowrun patch (which has only been tested at slowrom speed).

Anyway, just a note for later that I think what's on the page right now is an "upper bound" safe value, but could use some refinement.

-- Rainwarrior (talk) 04:28, 27 May 2022 (UTC)