News: 11 March 2016 - Forum Rules

Author Topic: SNES Controller Addresses  (Read 2454 times)

skides

  • Guest
SNES Controller Addresses
« on: December 29, 2011, 06:25:51 am »
Hi. I just started messing around with some tutorials, and found tried changing the controller used for a tutorial.

According to a file I found on this site, Anomie's Register Doc, the SNES controller registers are here:

4218 r l++++ JOY1L - Controller Port 1 Data1 Register low byte
4219 r h++++ JOY1H - Controller Port 1 Data1 Register high byte
421a r l++++ JOY2L - Controller Port 2 Data1 Register low byte
421b r h++++ JOY2H - Controller Port 2 Data1 Register high byte
421c r l++++ JOY3L - Controller Port 1 Data2 Register low byte
421d r h++++ JOY3H - Controller Port 1 Data2 Register high byte
421e r l++++ JOY4L - Controller Port 2 Data2 Register low byte
421f r h++++ JOY4H - Controller Port 2 Data2 Register high byte

For some reason, when I try to pull a byte from the joy3 memory address ($421d), It responds to controller 4, and vice versa. I am using zsnes to test it, if that matters.

Does anyone know why it would be doing this? Did I not set something up correctly?

Thanks for your time and insight.

Lenophis

  • Discord Staff
  • Hero Member
  • *****
  • Posts: 971
  • The return of the sombrero!
    • View Profile
    • Slick Productions
Re: SNES Controller Addresses
« Reply #1 on: December 30, 2011, 01:05:56 pm »
If you did LDA #$421D and grabbed port 4's lower byte, you were likely reading in 16-bit mode. Try reading $421C in 16-bit mode instead, as that will grab both bytes of controller 3. :thumbsup:


https://ff6randomizer.codeplex.com/ - Randomize your FF6 experience!