Tutorial  Updated

Using ShinyQuagsire's Splatoon 2 Post Printer

Posted this guide originally in the Nintendo Switch specific forums, and gonna post it here too since there's no Switch-specific tutorials section.

Disclaimer: This is not an easy guide to use! It's not as simple as placing some files in certain spots and running "make"; there are certain things you need to install, environment variables you need to set, etc. A *lot* of troubleshooting will most likely be necessary.I'm happy to help if you need some assistance, however.

Seeing as nobody else has made a guide like this, and I've figured out how to get it running, I figured I'd make a guide to help out. This guide is not for beginners; you'll need at least a bit of knowledge on how to add programs to your path, use the command line, etc. This is also assuming you're using Windows.

For those who don't know, this is the post printer:
It uses a Teensy 2.0++ (and possibly other microcontrollers with USB HID compatible AVRs, such as the ATMega32u4) to mimic a Hori Pokken pad for the WiiU, which now works on the Switch due to update 3.0.0 allowing more controllers to be used.

You'll need:

Hardware:
- A Teensy 2.0++ (the one with the AT90USB1286)
- A USB C male to USB female adapter like this one
- A Nintendo Switch
- Splatoon 2

Software:
- Teensy Loader (Windows binary)
- LUFA
- Atmel AVR 8-bit and 32-bit GNU Toolchain (You'll need to create an account on the site to download)
- The Splatoon 2 post printer, of course (Hit "Clone or download" and download a .zip)
- If you have an ATMega32u4 board, use this repo instead for the post printer
- Python 2.7 (Not Python 3)
- GIMP 2
- MinGW (the .exe installer)

Section 1: Preparation

First, you'll need to get all the software installed and everything.
  1. Download the Teensy Loader
  2. Download and install Python 2.7.
  3. Download and install Atmel's AVR 8-bit Toolchain (extract this to a folder like C:\development\AVR-Toolchain or something)
  4. Download and install GIMP. (Seeing a pattern here?)
  5. Download and install MinGW. If it wants to install any addons for the program itself, say yes.
  6. Create a folder somewhere on your PC (I made mine in C:\development\SwitchFightstick)
  7. Open up the .zip file for the post printer (whould be called Switch-Fightstick-master.zip) and open the folder inside that so you can see all the files. Extract all those into the folder you made in the last step. Delete the "image.c" file since you'll be making a new one later.
  8. Open up your system PATH by hitting the windows key and searching for "Edit the system environment variables", clicking "Environment variables...", and double clicking "Path" in the bottom system variables section.
  9. Open up Windows Explorer and find the folder where you installed the AVR toolchain in step 3. Once there, find the "bin" folder and go into that. Then copy your current path by clicking the top bar, selecting it all, and hitting ctrl+C.
  10. Go back to the Path window you opened in step 7 and hit "New". Paste the directory to the toolchain's bin folder there. While you're there, also add the directory "C:\Python27" (without quotes) to make sure Python will work properly. Apply and exit.
  11. Browse to the folder where you extracted the atual post printer, and open up the LUFA zip file. Find the folder inside the zip file titled "LUFA" and copy the folder itself to the same directory as the post printer
  12. If you're using an ATMega32u4 board, open the makefile in a text editor (preferably Notepad++) and replace the "MCU = at90usb1286" with "MCU = atmega32u4"
Section 2: Preparing the image for printing
  1. Open up GIMP and hit ctrl+N to make a new canvas. Make it 320px wide and 120px tall.
  2. Paste your image onto this new canvas and resize it to fit however you want.
  3. On the top toolbar, select "Image" then hit "Mode" and select "Indexed". When the window pops up, hit "Use black and white (1 bit) pallet", and make sure dithering is set to normal. Your image should now be in just black and white, no grey or anything in between.
  4. Hit File > Export As... and export the image as "raw image data (.data)" and save it inside the post printer's folder alongside all the other files. Name it whatever you want, as long as it ends in ".data".
  5. Open up a command window and browse to the post printer's folder. Next you'll want to run the command "python bin2c.py [name of your image] > image.c". If successful, nothing will happen in the command line itself, but you should have a new file called "image.c"
  6. Run the command "make all". If you did everything correctly, it should now compile!
Section 3: Actually running it from the Teensy

I don't actually have my Teensy yet (ordered it last night), but I do have some experience using similar boards in the past. The following may not be 100% accurate, but it should be close enough that you can get it to work if I mistype something.
  1. Plug in your Teensy 2.0++ and open the Teensy Loader.
  2. Extract the .exe file to the post printer's directory. Don't run it.
  3. Open a command window and navigate to the post printer's directory.
  4. Run the command "teensy_loader_cli -mmcu=at90usb1286 -w Joystick.hex". If nothing happens, try pressing the button on the Teensy.
  5. If you're using an ATMega32u4 board, replace the "at90usb1286" portion of the above command with "atmega32u4"
  6. Make sure your Switch is charged fully; this will take a while. Like, an hour or more. It's not very fast, but still faster than doing it by hand.
  7. Open Splatoon 2 and go over to the post box. Select the smallest pencil with L. Hold up and right until the cursor is at the very top right corner, then press left and down once each. The cursor won't look like it moved. This is because the cursor actually goes one pixel out outside the boundaries, and pusing left and down brings to exactly the corner. You can tell by pressing left or down again; it should move instead of staying still. Just put it back to the corner again.
  8. Now you should be able to unplug your Teensy, plug your USB C to USB adapter into the Switch (in handheld mode), plug in the Teensy, and go! The reason you need to do it in handheld mode is because there are sync issues when just using the dock's USB ports in docked mode.
If I made a mistake in any portion of this guide, please correct me! The above should get it working properly, but if it doesn't I need to know what I wrote wrong and what to correct. Again, I don't actually have my Teensy board itself so I can't fully test it, but I was able to successfully do sections 1 and 2.

Anyone who has a Teensy 2.0++ and is willing to test this, please do and let me know if it works!
ATMega32u4 compatibility was achieved already by _______ .
 
Last edited by dj505,

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
Finally got the .hex to upload to an atmega32u4. problem is the chip needs to be reset over serial before it can be programmed so using the command. It is also a clone Arduino Pro Micro that I am using so there is no built in reset/program button.

"avrdude -p atmega32u4 -c avr109 -P COMx -U flash:w:<filename>.hex -v" will upload the code, but you have to short the reset and ground pins just before hitting enter. Now although the code did get uploaded and was verified, nothing happened when plugged in via a USB Micro-USBA-USBC-Switch. I don't know if it is a software thing or a hardware thing but the switch should be able to recognize the board. I will probably keep working on getting this working in the next few days as getting a $5 ebay arduino clone working would be fantastic.
Alright, good to know! It's likely a software issue. If you do end up getting it to work, let me know so I can add a portion to the guide!
 

Tomtortoise

Member
Newcomer
Joined
Aug 7, 2017
Messages
12
Trophies
0
Age
28
XP
51
Country
United States
IT WORKS!!!

I looked at your other post with the guy trying on the leonardo where you posted this file

http://www.mediafire.com/file/pt9txl57q35dkce/Joystick.hex
http://www.mediafire.com/file/pt9txl57q35dkce/Joystick.hex
I uploaded it using the same method as I did before with that command line code and plugged it in. Took about 3 seconds and it started right up, no need to reset it after plugging it in. As of now it is 100% confirmed that the Arduino Pro Micro 16 Mhz boards using the ATMega32u4 chipset work with the switch and this program. All I need to do now is figure out how to make the .hex files. Could you post anything you did differently on that last Joystick.hex you made? the one I linked on this post?
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
IT WORKS!!!

I looked at your other post with the guy trying on the leonardo where you posted this file

http://www.mediafire.com/file/pt9txl57q35dkce/Joystick.hex
I uploaded it using the same method as I did before with that command line code and plugged it in. Took about 3 seconds and it started right up, no need to reset it after plugging it in. As of now it is 100% confirmed that the Arduino Pro Micro 16 Mhz boards using the ATMega32u4 chipset work with the switch and this program. All I need to do now is figure out how to make the .hex files. Could you post anything you did differently on that last Joystick.hex you made? the one I linked on this post?
Sweet! Nice job! Only thing I did differently with that one was use the alternate repo instead of ShinyQuagsire's haha
 

Arck

Well-Known Member
Member
Joined
Mar 13, 2016
Messages
955
Trophies
0
XP
878
Country
- Atmel AVR 8-bit and 32-bit GNU Toolchain (You'll need to create an account on the site to download)
Do you have a mirror for this ?
I can't download it, when it sent me a link to confirm my account it gave me a broken link...
Code:
http://?utm_campaign=AtmelUserRegistrationEmail&utm_medium=email&utm_source=Eloqua&p=aOG8pLs6jiolN0P5E78umZUcCiJF9WXbkakEC9K3q+mOG1cGZCYDHEKGbz3XWNH
is what they sent to me.
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
Do you have a mirror for this ?
I can't download it, when it sent me a link to confirm my account it gave me a broken link...
Code:
http://?utm_campaign=AtmelUserRegistrationEmail&utm_medium=email&utm_source=Eloqua&p=aOG8pLs6jiolN0P5E78umZUcCiJF9WXbkakEC9K3q+mOG1cGZCYDHEKGbz3XWNH
is what they sent to me.
Here you go
 
  • Like
Reactions: Arck

Tomtortoise

Member
Newcomer
Joined
Aug 7, 2017
Messages
12
Trophies
0
Age
28
XP
51
Country
United States
And I got the rest of it working, .hex files are being created. I found a reddit post where someone gave links to different versions of the LUFA and fight stick repositories which I will link here

LUFA
https://github.com/abcminiuser/lufa/tree/0c3cc140065851b10a697ffc6467f1ec8a018b6a

Fightstick
https://github.com/shinyquagsire23/Switch-Fightstick/tree/38463d695e5e81039ad72903fdc6dbc9f7fec86a

I am currently writing up the steps for uploading onto the 32u4 so I will have that all set by tomorrow. it will include the new links and how to upload it. I will post that on this thread when its done.
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
And I got the rest of it working, .hex files are being created. I found a reddit post where someone gave links to different versions of the LUFA and fight stick repositories which I will link here

LUFA
https://github.com/abcminiuser/lufa/tree/0c3cc140065851b10a697ffc6467f1ec8a018b6a

Fightstick
https://github.com/shinyquagsire23/Switch-Fightstick/tree/38463d695e5e81039ad72903fdc6dbc9f7fec86a
https://github.com/shinyquagsire23/Switch-Fightstick/tree/38463d695e5e81039ad72903fdc6dbc9f7fec86a
I am currently writing up the steps for uploading onto the 32u4 so I will have that all set by tomorrow. it will include the new links and how to upload it. I will post that on this thread when its done.
Ok, sweet! Awesome work!
 

Tomtortoise

Member
Newcomer
Joined
Aug 7, 2017
Messages
12
Trophies
0
Age
28
XP
51
Country
United States
So I am finally able to make my own HEX files that actually print. In its current form, this project is unusable to pretty much any user that doesn't have some level of comfort with this stuff and patience.

I have no idea what steps that I took actually had a positive effect on getting this working. Maybe a linux VM with everything all set to go would be the easiest, all you have to do is copy/paste some command line stuff or even have it all automated.
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
So I am finally able to make my own HEX files that actually print. In its current form, this project is unusable to pretty much any user that doesn't have some level of comfort with this stuff and patience.

I have no idea what steps that I took actually had a positive effect on getting this working. Maybe a linux VM with everything all set to go would be the easiest, all you have to do is copy/paste some command line stuff or even have it all automated.
Perhaps. Still, no matter what, it's not exactly a beginner friendly project and likely won't be for a while. A GUI version would be cool, but would still require all the same dependencies.
 
D

Deleted User

Guest
upload_2018-7-9_23-3-29.png
thanks!
 

Sebasgl1

New Member
Newbie
Joined
Dec 27, 2018
Messages
1
Trophies
0
Age
33
XP
43
Country
Colombia
So I am finally able to make my own HEX files that actually print. In its current form, this project is unusable to pretty much any user that doesn't have some level of comfort with this stuff and patience.

I have no idea what steps that I took actually had a positive effect on getting this working. Maybe a linux VM with everything all set to go would be the easiest, all you have to do is copy/paste some command line stuff or even have it all automated.
Can you help men, sharing your modify versions of the project, i'm trying to do it on windows and always say that it has errors with joystick.c:54 and also make:*** [Joystick.o] error 1

BTW i'm trying to use a arduino UNO r3
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=W6ckbBpSKhw