Giter Site home page Giter Site logo

buttonswap3ds's Introduction

Limitations

  • I don't hook the IR service yet, so no zl/zr or c-stick. However, it is why I started this, so I'll be looking into it.
  • Home and Power cannot be mapped the same way. They are processed by the MCU.

Credits

Memory patching code taken from BootNTR

Shinyquagsire for his writeup on redirecting input over WiFi.

Stary & Kazo for InputRedirector, upon which almost all of this is based.

How to Use

Install the ButtonSwapNTR cia on your 3ds.

Not really configurable right now, but can be changed if you know ASM.

You will need a working setup of the devkitARM toolchain for 3DS, follow this guide for help.

You will also need the ScenicRoute library by Stary2001. Clone it, then run make install in the ScenicRoute directory. Finally, clone this repository.

The instructions for each type of mapping are provided in source/injected.s. I've provided a Java program to generate the correct button masks and coordinate values. When you have saved your mappings into this file, you will need to compile it. To build, change to the ButtonSwap3DS directory in a terminal, then run make.

Each data field, and how to get it

Button Masks

This is the data that defines which buttons will activate the remapping and which buttons will be pressed. Either use the provided program, or manually calculate the mask using this table. For example, this code would swap A and B:

ldr r4, =0x1
ldr r5, =0x2
bl .button
ldr r4, =0x2
ldr r5, =0x1
bl .button
The next two data fields are six digit numbers. The first 3 digits are the Y coordinate data, and the last 3 digits are the X coordinate data.

Touchscreen Data

The data that will be sent as the touchscreen. Use the provided tool to generate this data.

C-pad Data

Data that will be sent as the c-pad. This data is a bit harder to calculate. The default value for the C-pad is 0x800800. To calculate this value, you will need to use the developer mode on your calculator. Xor 0x800800 by the value you want the C-pad to have. For example, if you want to have the C-pad pushed to the right, you would xor 0x800800 by 0x800FFF, giving you 0x7FF. Pad this with 3 zeroes in front (0x0007FF), and you have your data!

buttonswap3ds's People

Contributors

stary2001 avatar mikahjc avatar kazo avatar

Watchers

Sarah Loos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.