ROM Hack [Release] Online Gateway To CTRPF Code Converter

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,146
Trophies
2
Location
Ohio
XP
4,624
Country
United States
Online Gateway To NTR Code Converter
What is this?
This is a program I started working on 2 days ago that will automatically convert Gateshark codes to NTR. The converter itself was written completely from scratch with no code taken from Nanquitas' Gateshark2NTR or from any other converter. I wrote one in Python a while ago, but it wasn't very good due to my limited knowledge of that language. This one is a major improvement over it. However, I am still a beginner at programming, so the source code is very dirty (which means don't comment on it, because I already am aware of how it isn't very well-written). I could improve it a lot, although it isn't really necessary as the program functions optimally for the end-user. If you are seriously trying to convert codes (not putting in random stuff to try and mess with the converter) it should work almost all of the time.

Features:
-Code Checker, to see if your codes will convert properly
-Help pages, such as the NDS Codetype documentation
-Optimization, to clean up the code once it's converted to NTR
-Plugin builder, build the plugin file with one click
-Copy to Clipboard, to easily copy all of the converted codes

Advantages over other converters:
-Online support for all plugins created using this converter
-Can convert codes into either CTRPluginFramework plugins or lib 2 plugins
-Menu features, such as folders and notes
-Open Source
-The source code of your plugin will be openly available inside of the /pluginMenu or /ctrpfMenu directory
-Complete UI
-Type/copy codes as text or load them from a file
-All of the things listed above under "Features"

Planned Improvements:
-Improve the Code Checker to check for more potential errors

upload_2017-12-26_22-24-1.png


upload_2017-12-26_22-24-44.png



(Leave a like to show support)


v2.0.3 (Current version):
-Fixed 0xDB codetype
-Support for CTRPluginFramework
-New button activator generator function for CTRPF
-Built in updater
-Various fixes and improvements

v1.0.5:
-Added notes
-Improved help page to give more detailed help information
-Added titles to all popup information boxes

v1.0.4:
-Added support for spoilers
-Improved support for E codetypes (almost all codes will work now)
-Updated code checker to accommodate for these new changes
-General bug squashing by testing many different types of codes

v1.0.3:
-Added support for 0xE codetype (unfinished; however most codes will work)
-General improvements

v1.0.2:
-Added more code name exceptions
-Added support for loops (0x0C codetype)
-Added support for D1 codetype
-Improved code checker

v1.0.1:
-Fixed a bug with button activators

v1.0.0:
-Initial Release

Enclose codes in a spoiler by adding +Spoiler Name above the first code in the left inputbox. Nested spoilers work just as you would expect. You can close off the most recent spoiler by typing - below the final code in the spoiler.
Code:
+Spoiler with this name
+Nested Spoiler with this name
[Code 1234]
D3000000 14000000
B0001234 00000000
20000008 000000FF
D2000000 00000000
-
-You don't need to put anything next to the hyphen, but it will close the most recent spoiler.
Add a note for a code by typing *Your note here below the code. To create a multi-line note, you have to use the newline seperator: \n

Code:
[Code 1234]
D3000000 14000000
B0001234 00000000
20000008 000000FF
D2000000 00000000
*This is a note for Code 1234\nAnd this is another line of the note

Download: https://github.com/DarkFlare69/Gateway-To-NTR-Converter/raw/master/Gateway To NTR Converter/Release/Gateway To NTR Converter.zip

Source Code: https://github.com/DarkFlare69/Gateway-To-NTR-Converter

Enjoy! :)
 
Last edited by DarkFlare69,

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,146
Trophies
2
Location
Ohio
XP
4,624
Country
United States
And for those of you who are wondering why the "optimize code" button exists in the first place, it is there only to improve readability. For beginners, seeing all of the 0's there can help them to create a bridge to understand exactly how the code was converted, while the "optimized" code will remove those. It won't really change anything during compilation; as I said it's only for readability.
 

ninjistix

Well-Known Member
Member
Joined
Aug 8, 2016
Messages
306
Trophies
0
Age
35
XP
1,425
Country
United States
And for those of you who are wondering why the "optimize code" button exists in the first place, it is there only to improve readability. For beginners, seeing all of the 0's there can help them to create a bridge to understand exactly how the code was converted, while the "optimized" code will remove those. It won't really change anything during compilation; as I said it's only for readability.
you just got yourself a subscriber congrats :D, and great work... i look forward to doing a lot of testing with this, providing i can find codes for Pokemon games, both original and non vc copies.
 
  • Like
Reactions: DarkFlare69

Vermil

I don't need a SENPAI to notice me, Right SENPAI?
Member
Joined
Aug 21, 2017
Messages
298
Trophies
0
Age
23
Location
Nightcore -Rockefeller Street
XP
397
Country
Philippines
Is it only me or I really can't convert codes with button combinations (0xDD000000 XXXXXXXX)?
Cuz it gives me a message on cmd:

.\Sources\cheats.c: In Function 'Name_Of_Cheat' :
.\Sources\cheats.c:19:4: error: expected ')' before '{' token
{
^
.\Sources\cheats.c:24:3: error: expected expression before '}' token
}
^

--------------------- MERGED ---------------------------

One of the codes that can't be converted:
 

Attachments

  • README.txt
    506 bytes · Views: 420

Deleted member 411764

Well-Known Member
Member
Joined
Jan 15, 2017
Messages
260
Trophies
0
Age
20
XP
495
Country
United Kingdom
Is it only me or I really can't convert codes with button combinations (0xDD000000 XXXXXXXX)?
Cuz it gives me a message on cmd:

.\Sources\cheats.c: In Function 'Name_Of_Cheat' :
.\Sources\cheats.c:19:4: error: expected ')' before '{' token
{
^
.\Sources\cheats.c:24:3: error: expected expression before '}' token
}
^

--------------------- MERGED ---------------------------

One of the codes that can't be converted:

Here, activators Start + Right

--------------------- MERGED ---------------------------

It seems the converter is writing the activator ID instead of ST, SE, DU etc.
 

Attachments

  • README.txt
    509 bytes · Views: 412
  • Like
Reactions: Vermil

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,146
Trophies
2
Location
Ohio
XP
4,624
Country
United States
Is it only me or I really can't convert codes with button combinations (0xDD000000 XXXXXXXX)?
Cuz it gives me a message on cmd:

.\Sources\cheats.c: In Function 'Name_Of_Cheat' :
.\Sources\cheats.c:19:4: error: expected ')' before '{' token
{
^
.\Sources\cheats.c:24:3: error: expected expression before '}' token
}
^

--------------------- MERGED ---------------------------

One of the codes that can't be converted:
DD codes work fine, I've thoroughly tested them. Can you send me the code you're trying to convert and I'll see if there's some bug with it?

EDIT: I must have messed up that part sometime while working on the program. I fixed activators and updated it. You can redownload it from the original download link
 
Last edited by DarkFlare69,
  • Like
Reactions: Vermil

AJS

Member
Newcomer
Joined
Dec 10, 2016
Messages
9
Trophies
0
XP
59
Country
Netherlands
Hello DarkFlare69,

Sorry for perhaps a dumb question, but I'm very new to the world of programming.
Your program looks very promising, but I run in to a couple of problems I cannot seem to get resolved.

I installed everything I needed from here (and subsequent links from that post): https://gbatemp.net/threads/tutorial-building-ntr-custom-firmware-cheat-plugins-w-cheat-menu.411189/

And tried to run this code in your converter:

[Money]
D3000000 00000000
607DB800 00000000
B07DB800 00000000
00000CDC 000F423F
D2000000 00000000

However, I seem to get different errors as output when I press the "Build cheat plugin" button.
I have attached the cmd output below, perhaps you could shine your light on it?
 

Attachments

  • error.txt
    2.9 KB · Views: 460

DarkFlare69

Well-Known Member
OP
Member
Joined
Dec 8, 2014
Messages
5,146
Trophies
2
Location
Ohio
XP
4,624
Country
United States
Hello DarkFlare69,

Sorry for perhaps a dumb question, but I'm very new to the world of programming.
Your program looks very promising, but I run in to a couple of problems I cannot seem to get resolved.

I installed everything I needed from here (and subsequent links from that post): https://gbatemp.net/threads/tutorial-building-ntr-custom-firmware-cheat-plugins-w-cheat-menu.411189/

And tried to run this code in your converter:

[Money]
D3000000 00000000
607DB800 00000000
B07DB800 00000000
00000CDC 000F423F
D2000000 00000000

However, I seem to get different errors as output when I press the "Build cheat plugin" button.
I have attached the cmd output below, perhaps you could shine your light on it?
Yes, it's because I didn't add many exceptions for the titles, so it lets you put almost any character as the title. Remove any numbers or commas or pretty much anything that isn't a letter and see if it works. In the future I'll make it so you can use more characters
 
  • Like
Reactions: AJS and Vermil

AJS

Member
Newcomer
Joined
Dec 10, 2016
Messages
9
Trophies
0
XP
59
Country
Netherlands
Yes, it's because I didn't add many exceptions for the titles, so it lets you put almost any character as the title. Remove any numbers or commas or pretty much anything that isn't a letter and see if it works. In the future I'll make it so you can use more characters

That worked like a charm, thanks!
 
  • Like
Reactions: DarkFlare69

ninjistix

Well-Known Member
Member
Joined
Aug 8, 2016
Messages
306
Trophies
0
Age
35
XP
1,425
Country
United States
suggestions/request
  • add version info to the program itself, so we know if we need to upgrade or not
  • possible auto update or notification of newer version
  • dark theme
  • support for sorting cheats into menu's and spoilers (i know you mentioned about manually doing it, but if the program can keep you from making mistakes why not)
  • unsure if there's support for cheat comments or info if not that would be great (also ties in with the one above)
 

You may also like...

General chit-chat
Help Users
  • No one is chatting at the moment.
    Shape @ Shape: I think they use tectonic magnets or something.