Cookie
Gotta eat 'em all!
- Gender
- Male
Writing scripts in qedit can be annoying in 2018 (imo), so I wanted to make that a bit easier for me and hopefully for some of you guys, too.
What I did:
http://koalacuddleparty.com/pso/
#1 Syntax highlighting in Notepad++:
The result for me looks something like this.
View media item 1261
What you need to do:
If you want to change the color of comments, click on the Comment & Number tab. If you want to change the color of strings, click on the Operators & Delimiter tab. Delimiter 1 style are single quote strings, Delimiter 2 style are double quote strings.
One important note regarding strings. To have propper syntax highlighting for strings, you need to escape the character that is used for limiting the string.
Example:
'You've earned 1000 Meseta.'
This will break the syntax highlighting because of the single quote character after "You". Change it to...
'You\'ve earned 1000 Meseta.'
Don't worry, if you use my python syntax checker, the escape backslash will be removed.
#2 Parsing and syntax checking in Python:
You need to have Python installed on your system. To use the script, simply type in command line:
python pasm.py [options] <pasm_file>
Options:
-q This will remove all the comments, take care of the correct formatting for qedit and create a new pasm file with a 'qe_' prefix.
-f This will add any missing function labels with a simple ret statement. (Like: 800: ret)
Note: Only single line comments starting with '//' are supported for now. (// my comment...)
Some syntax errors that get detected:
As I'm still new to qedit and pasm, it's possible that some stuff isn't working properly. Please let me know if you discover any bugs or anything qedit can't handle after the import.
What I did:
- Syntax highlighting in Notepad++.
- Parser and syntax checker in python, that will "convert" scripts into an import friendly format for qedit.
http://koalacuddleparty.com/pso/
#1 Syntax highlighting in Notepad++:
The result for me looks something like this.
View media item 1261
What you need to do:
- open Notepad++
- click language > define your language
- click on the import button and select the pasm.xml file from pasm_notepadpp.zip
If you want to change the color of comments, click on the Comment & Number tab. If you want to change the color of strings, click on the Operators & Delimiter tab. Delimiter 1 style are single quote strings, Delimiter 2 style are double quote strings.
One important note regarding strings. To have propper syntax highlighting for strings, you need to escape the character that is used for limiting the string.
Example:
'You've earned 1000 Meseta.'
This will break the syntax highlighting because of the single quote character after "You". Change it to...
'You\'ve earned 1000 Meseta.'
Don't worry, if you use my python syntax checker, the escape backslash will be removed.
#2 Parsing and syntax checking in Python:
You need to have Python installed on your system. To use the script, simply type in command line:
python pasm.py [options] <pasm_file>
Options:
-q This will remove all the comments, take care of the correct formatting for qedit and create a new pasm file with a 'qe_' prefix.
-f This will add any missing function labels with a simple ret statement. (Like: 800: ret)
Note: Only single line comments starting with '//' are supported for now. (// my comment...)
Some syntax errors that get detected:
- misspelled opcodes (if you use syntax highlighting, you'll already see when there's something wrong)
- invalid opcode arguments
- registers that don't exist (R256...)
- warns about missing function labels in any jump statement (this includes switch cases like 2:100:101)
- invalid switch case definitions like 3:100:101 (needs 3 elements, not just 2)
- some more...
As I'm still new to qedit and pasm, it's possible that some stuff isn't working properly. Please let me know if you discover any bugs or anything qedit can't handle after the import.
Last edited: