Notepad++ Syntax Highlighting for 6502 and NESASM

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
tragicmuffin
Posts: 2
Joined: Thu Jan 11, 2018 10:11 pm

Notepad++ Syntax Highlighting for 6502 and NESASM

Post by tragicmuffin » Thu Jan 11, 2018 10:38 pm

I started messing with NES programming last month and along the way I tried to find a 6502 assembly syntax highlighting file to use in Notepad++, but the only ones I found were old links on this forum that don't work anymore. (Of course, as I'm about to post this, I scroll down and find DragonDePlatino's post about basically the same thing. Oh well :lol:)
So I ended up making my own, and I wanted to share it here for anyone that might find it useful.

Link: https://github.com/tragicmuffin/6502-npp-syntax

I used NESASM3 to make my game, so I have a file that highlights directives and things for that, but I also included a general file that just highlights 6502 syntax.
If anyone would like highlighting for directives of a different assembler, send me a link to the assembler's commands and I'll make a separate file for it.

Enjoy!

User avatar
samophlange
Posts: 46
Joined: Sun Apr 08, 2018 11:45 pm
Location: Southern California

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by samophlange » Sun Apr 29, 2018 5:06 pm

Thanks for posting this! I just tried to set this up, but in Notepad++ I get "Failed to Import" when I try to import either of the XML files. Unfortunately it doesn't give any further info. I'm using v7.5.6 on Windows (64 bit), is there maybe an updated version available?

User avatar
tokumaru
Posts: 11448
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by tokumaru » Sun Apr 29, 2018 5:09 pm

I don't import anything in Notepad++, I just save the file ("userdeflanguage" or something) in the correct folder and the language starts working.

bleubleu
Posts: 66
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by bleubleu » Sun Apr 29, 2018 5:39 pm

While we are on the topic, I might be late to the party, but Sublime Text's build system is absolutely amazing for NES development.

A few years ago I had given sublime a try and found it to be form over function, it looked good, but wasn't very useful. But I must say this version is really good.

Without any plugins (just a syntax def and a 3-line build script) you get really good syntax highlight, autocomplete (if it finds the same word in the file it will autocomplete) and build errors are highlighted in a really nice way. I have it setup so that F7 builds and F5 runs, VS-style.

-Mat
Attachments
Capture.JPG

User avatar
koitsu
Posts: 4214
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by koitsu » Sun Apr 29, 2018 5:52 pm

Semi-related: for those who use vim (editor) and ca65 (assembler), there's this: https://github.com/maxbane/vim-asm_ca65

User avatar
samophlange
Posts: 46
Joined: Sun Apr 08, 2018 11:45 pm
Location: Southern California

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by samophlange » Sun Apr 29, 2018 6:50 pm

Derp, I munged up the Xml file when I downloaded it. When I got a proper copy of the file, it started working OK. Nothing to see here! :mrgreen:

Post Reply