Hacking [Tutorial] Printing Spla2n Posts with an Arduino/Teensy Board!

Which AVR are you using?


  • Total voters
    55
D

Deleted User

Guest
I'm having a problem. When I try to type "make" in the SwitchFightstick directory, It says "
'make' is not recognized as an internal or external command, operable program or batch file." I have MinGW installed and added to the path and I have rebooted several times. How can I fix this?
 

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
look, I'm gonna be honest with you. this guide is a mess. you didn't even mention the splatmeme repo past the fact that it's required. you also confused usb type a and usb type micro-b (which is what the Teensy ACTUALLY uses). you then failed to mention the required adapters/cables for the other two boards, as well as which (if any) extra packages would be required when installing minGW. please, put more work into your guides next time. the only reason I got it to work is because I already knew what I was doing.
I think you mixed up the USB bit; The Teensy has a Mini USB port on the board itself, which you plug a Mini USB to USB type A cable into. You then plug the USB type A end into the USB A to C adapter to plug into the Switch. Here's a handy diagram.

And did you miss the part where I specifically said to extract the repo into a folder? Literally the first step, I say to extract the contents into a folder of your choice. In fact, that's what the entire first section of the guide is specifically setting up. I already had MinGW and everything installed and could not remember the name of the packages necessary, and most people should be able to figure out what I meant by the "basic package".

so Ive followed everything and when I try to make it shows

makefile:30: ../LUFA/LUFA/Build/lufa_core.mk: No such file or directory
makefile:31: ../LUFA/LUFA/Build/lufa_sources.mk: No such file or directory
makefile:32: ../LUFA/LUFA/Build/lufa_build.mk: No such file or directory
makefile:33: ../LUFA/LUFA/Build/lufa_cppcheck.mk: No such file or directory
makefile:34: ../LUFA/LUFA/Build/lufa_doxygen.mk: No such file or directory
makefile:35: ../LUFA/LUFA/Build/lufa_dfu.mk: No such file or directory
makefile:36: ../LUFA/LUFA/Build/lufa_hid.mk: No such file or directory
makefile:37: ../LUFA/LUFA/Build/lufa_avrdude.mk: No such file or directory
makefile:38: ../LUFA/LUFA/Build/lufa_atprogram.mk: No such file or directory
make: *** No rule to make target `../LUFA/LUFA/Build/lufa_atprogram.mk'. Stop.

Everything is done properly so far, only confusing part is the MinGW part where it gives a list of packages
Path for LUFA is likely incorrectly configured in the makefile. Open the makefile in a text editor and replace "../LUFA/LUFA" with "./LUFA/LUFA", and if that doesn't work just type "./LUFA"

I'm having a problem. When I try to type "make" in the SwitchFightstick directory, It says "
'make' is not recognized as an internal or external command, operable program or batch file." I have MinGW installed and added to the path and I have rebooted several times. How can I fix this?
I noticed a typo that I had saying that the path was "C:\WinGW" and not "C:\MinGW", that might be the problem. Fixed it in the guide itself for future reference
 
Last edited by dj505,

Hopeywolf

Member
Newcomer
Joined
Jun 26, 2017
Messages
6
Trophies
0
Age
34
XP
53
Country
United States
Ok i got that sorted but now i ran into another error

[GCC] : Compiling C file "Joystick.c"
avr-gcc -c -pipe -gdwarf-2 -g2 -mmcu=at90usb1286 -fshort-enums -fno-inline-small-functions -fpack-struct -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections -I. -DARCH=ARCH_AVR8 -DF_CPU=16000000UL -mrelax -fno-jump-tables -x c -Os -std=gnu99 -Wstrict-prototypes -DUSE_LUFA_CONFIG_HEADER -IConfig/ -I. -I./LUFA/LUFA/.. -DARCH=ARCH_AVR8 -DBOARD=BOARD_NONE -DF_USB=16000000UL -MMD -MP -MF obj/Joystick.d Joystick.c -o obj/Joystick.o
Assembler messages:
Fatal error: can't create obj/Joystick.o: No such file or directory
make: *** [obj/Joystick.o] Error 3​
 
D

Deleted User

Guest
When I try to make, I get

The system cannot find the path specified.
'avr-size' is not recognized as an internal or external command,
operable program or batch file.
'avr-size' is not recognized as an internal or external command,
operable program or batch file.
' [INFO] :' Begin compilation of project \"Joystick\"...
""
process_begin: CreateProcess(NULL, avr-gcc --version, ...) failed.
make (e=2): The system cannot find the file specified.
LUFA/LUFA/Build/DMBS/DMBS/gcc.mk:154: recipe for target 'build_begin' failed
mingw32-make: *** [build_begin] Error 2
 

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
Ok i got that sorted but now i ran into another error

[GCC] : Compiling C file "Joystick.c"
avr-gcc -c -pipe -gdwarf-2 -g2 -mmcu=at90usb1286 -fshort-enums -fno-inline-small-functions -fpack-struct -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections -I. -DARCH=ARCH_AVR8 -DF_CPU=16000000UL -mrelax -fno-jump-tables -x c -Os -std=gnu99 -Wstrict-prototypes -DUSE_LUFA_CONFIG_HEADER -IConfig/ -I. -I./LUFA/LUFA/.. -DARCH=ARCH_AVR8 -DBOARD=BOARD_NONE -DF_USB=16000000UL -MMD -MP -MF obj/Joystick.d Joystick.c -o obj/Joystick.o
Assembler messages:
Fatal error: can't create obj/Joystick.o: No such file or directory
make: *** [obj/Joystick.o] Error 3​
-snip-
 
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
Is there a reason why this is only for Ardunio/Teensy board? Or does it also works on a Raspberry PI?
Teensy and (some) Arduino boards use chips like the atmega32u4, at90usb1286, atmega16u2, etc. which are all programmable via USB, and act as USB HID decides. The Raspberry Pi is a full computer and not just a programmable AVR, so it won't work.
 

Hopeywolf

Member
Newcomer
Joined
Jun 26, 2017
Messages
6
Trophies
0
Age
34
XP
53
Country
United States
So I was able to get it working but it seems that the brush it selects is the larger one which the image turns into a mess after. How can i fix that
 

HamBone41801

Vipera’s Alt
Member
Joined
Jan 16, 2017
Messages
1,083
Trophies
0
Age
23
XP
974
Country
United States
Is there a reason why this is only for Ardunio/Teensy board? Or does it also works on a Raspberry PI?
technically, the raspberry pi is a usable device, just not via this method. (and also, the method that would use it will never exist.) you would need to write, build, and install a bare-bones program to do everything, which is impossible unless you are familiar with asm.
 

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 was able to get it working but it seems that the brush it selects is the larger one which the image turns into a mess after. How can i fix that
You'll need to select a different tool beforehand instead of setting it to the smallest one so that when the tool does change, it changes to the smallest one automatically. It's a weird thing that happens sometimes, not sure why.

Edit: I see you got it working lol
N0c86K0.png
 
Last edited by dj505,
D

Deleted User

Guest
I managed to fix it by adding C:\Program Files (x86)\Arduino\hardware\tools\avr\bin to my PATH with the arduino IDE installed. I also used the command mingw32-make instead of make and added my flip installation folder as the driver location for my arduino uno while in DFU mode in device manager. It all worked and it's drawing as we speak.
 

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
I managed to fix it by adding C:\Program Files (x86)\Arduino\hardware\tools\avr\bin to my PATH with the arduino IDE installed. I also used the command mingw32-make instead of make and added my flip installation folder as the driver location for my arduino uno while in DFU mode in device manager. It all worked and it's drawing as we speak.
Alright, good to know! I'll add this to the guide when I have a few minutes
 

crk14341

New Member
Newbie
Joined
Aug 30, 2017
Messages
3
Trophies
0
Age
26
XP
51
Country
United States
So I've managed to fix a few of the issues that I've been having however I've come across a new problem that I can't figure out. What should I do to fix this?
 

Attachments

  • Capture.PNG
    Capture.PNG
    12.1 KB · Views: 593

Vverg

Member
Newcomer
Joined
Jan 5, 2017
Messages
22
Trophies
0
Age
33
XP
68
Country
Netherlands
Well.. I'm trying to do this stuff with a ATMEGA32U4.

Anyways you talk about Joystick.hex but I dont see anywhere in the tutorial how I can make this (as in making it for the stick i have). I do read something about makefile thing... but no idea how I exactly can run this.

And my guess is that I eventually have to put this in cmd?

Code:
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega32u4 -cavr109 -PCOM4 -b57600 -D -Uflash:w:E:\SwitchFightstick/Joystick.hex:i
 

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
Well.. I'm trying to do this stuff with a ATMEGA32U4.

Anyways you talk about Joystick.hex but I dont see anywhere in the tutorial how I can make this (as in making it for the stick i have). I do read something about makefile thing... but no idea how I exactly can run this.

And my guess is that I eventually have to put this in cmd?

Code:
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega32u4 -cavr109 -PCOM4 -b57600 -D -Uflash:w:E:\SwitchFightstick/Joystick.hex:i
Everything you need to do is in the guide. Install the necessary things and read it step by step. When you get to the part where there are 3 different boards, use the atmega32u4 section. You can just copy/paste the commands I have in the guide.

You get joystick.hex by compiling the program, which you do by editing the makefile to compile for the atmega32u4. The .hex file is the actual code you flash to the AVR once compiled.
 
Last edited by dj505,

Vverg

Member
Newcomer
Joined
Jan 5, 2017
Messages
22
Trophies
0
Age
33
XP
68
Country
Netherlands
Well I really can't see in the guide where I have to compile it.

Anyways, I decided to investigate it myself trough Google and found out that "mingw32-make" in CMD in the Switch folder did the trick. Had to download the joystick.o stuff but I finally got my Joystick.hex.

(Edit: I see GomiHiko had the same issue, stupid I dind't see it before.)

But then the issue came for writing the stuff to the Arduino stick, it simply dind't want to "reset" it... I don't have a reset button on my "Beetle atmega32u4 mini dev board". After some searching (+ give it some of my own touch) I discovered that if I change the baudsetting in Devicemanager to 1200 Baud... then change the command line also to 1200 Baud... (the one where you write the hex) I hear the connect/disconnect sound from Windows. But it jumps to other COM port after the reset, so I have to use that cmd line first with the first COM port (which was COM5 for me) and then the second (COM7).

Though I dind't needed to change stuff in the Arduino IDE program, it simply switched the COM port automatically for me after the first reset.

Now I have to wait for my USB C > USB A (female) stick (cant find the one I had). So I expect I can test the result tomorrow.
 
Last edited by Vverg,

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
Well I really can't see in the guide where I have to compile it.

Anyways, I decided to investigate it myself trough Google and found out that "mingw32-make" in CMD in the Switch folder did the trick. Had to download the joystick.o stuff but I finally got my Joystick.hex.

(Edit: I see GomiHiko had the same issue, stupid I dind't see it before.)

But then the issue came for writing the stuff to the Arduino stick, it simply dind't want to "reset" it... I don't have a reset button on my "Beetle atmega32u4 mini dev board". After some searching (+ give it some of my own touch) I discovered that if I change the baudsetting in Devicemanager to 1200 Baud... then change the command line also to 1200 Baud... (the one where you write the hex) I hear the connect/disconnect sound from Windows. But it jumps to other COM port after the reset, so I have to use that cmd line first with the first COM port (which was COM5 for me) and then the second (COM7).

Though I dind't needed to change stuff in the Arduino IDE program, it simply switched the COM port automatically for me after the first reset.

Now I have to wait for my USB C > USB A (female) stick (cant find the one I had). So I expect I can test the result tomorrow.
You can use the dock USB ports to test (won't work 100% right but it's possible for now) until your adapter arrives.

And the make instructions are in the guide, yes. Once everything is installed it's as simple as typing "make"; again, everything is in the guide. You have to read it in order, start to end, without skipping parts.
 

Vverg

Member
Newcomer
Joined
Jan 5, 2017
Messages
22
Trophies
0
Age
33
XP
68
Country
Netherlands
Once everything is installed it's as simple as typing "make";

But that simply dind't work for me, if you look up GomiHoki had the exact same issue as me.
I pretty much read and checked all your steps 10x to make sure I did exactly everything you said.

Aaah yeah I do see it "working" in dockmode, so guess I'm ready for now :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
    +1
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Samsung SD format can sometimes fix them too
  • Purple_Heart @ Purple_Heart:
    yes looks like an faulty sd
  • Purple_Heart @ Purple_Heart:
    @Psionic Roshambo i may try that with my dead sd cards
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's always worth a shot
  • TwoSpikedHands @ TwoSpikedHands:
    @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the mail lol
  • I @ I-need-help-with-wup-wiiu:
    i need help with nusspli failed downloads, can someone respond to my thread? pretty please:wub:
  • Sheeba- @ Sheeba-:
    I can't wait to hack my 11.00 PS4 pro
    Sheeba- @ Sheeba-: I can't wait to hack my 11.00 PS4 pro