Notepad++ Syntax Highlighting for 6502 and NESASM

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

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 »

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: 50
Joined: Sun Apr 08, 2018 11:45 pm
Location: Southern California

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by samophlange »

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: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by tokumaru »

I don't import anything in Notepad++, I just save the file ("userdeflanguage" or something) in the correct folder and the language starts working.
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by bleubleu »

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: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by koitsu »

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: 50
Joined: Sun Apr 08, 2018 11:45 pm
Location: Southern California

Re: Notepad++ Syntax Highlighting for 6502 and NESASM

Post by samophlange »

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