NESMaker 6502 syntax highlight improvements.

Post Reply
User avatar
Mugi
Posts: 717
Joined: Thu Dec 27, 2018 8:30 pm

NESMaker 6502 syntax highlight improvements.

Post by Mugi » Mon Jul 01, 2019 4:47 pm

This thing popped up in a conversation over at nintendo age and i figured that might aswell put this thing here in the off-chance that someone didnt realize this is editable.
the syntax highlight (the thing that makes the opcodes and whatnot show up as different colors in the script editor) can be edited from the asmlang.xml file located in the root folder of the software.

the default one does it job pretty decently, although there is definitely room for improvement in it, for starters, it is missing a lot of opcodes, so it doesnt always highlight what it should.
also, you might just want to change the colors and/or styling of the text if all else fails.

here's a copy of my asmlang.xml that has all the missing opcodes filled in and the color names have been relabeled so that you know what changes when you change them, instead of being "red" or "blue"
the colors are now things like "opcodes" or "labels"

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<doc>
  <brackets left="&lt;" right="&gt;" />
  <style name="comment" color="#D97B54"/>
  <style name="label" color="#FF80FF" fontStyle="Italic" />
  <style name="quote" color="#40FF40"/>
  <style name="opcode" color="#4B9BBE"/>
  <style name="Red" color="#FF4040" backColor="#f5f5e5" />

  <rule style="comment" options="Multiline">;.*$</rule>
  <rule style="label" options="Multiline">^.*:</rule>
  <rule style="label">.include|.incbin</rule>
  <rule style="quote">".*"</rule>
  <rule style="opcode">ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|\.db</rule>
  <folding start="&lt;div" finish="&lt;/div&gt;" options="IgnoreCase"/>
</doc>
the above produces the following color configuration, however, it is worth noting that my windows has a dark background by design. so change the color accordingly if you use this yourself,
my color setup most likely looks terrible on a white background.

Image
"what are you up to?" "Oh, not much... just... Parallaxing"
- Raftronaut
User avatar
dale_coop
Posts: 4238
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: NESMaker 6502 syntax highlight improvements.

Post by dale_coop » Mon Jul 01, 2019 8:44 pm

Cool thanks. Mihoshi shared one too some time ago: http://nesmakers.com/viewtopic.php?f=23&t=1019
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
Mugi
Posts: 717
Joined: Thu Dec 27, 2018 8:30 pm

Re: NESMaker 6502 syntax highlight improvements.

Post by Mugi » Mon Jul 01, 2019 8:54 pm

heh, should have dug around more first i guess :P
but yeah, it's much nicer when it actually recognizes all the ops instead of skipping some :)
"what are you up to?" "Oh, not much... just... Parallaxing"
- Raftronaut
User avatar
dale_coop
Posts: 4238
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: NESMaker 6502 syntax highlight improvements.

Post by dale_coop » Mon Jul 01, 2019 8:57 pm

Yep... it's better, I agree :)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
Post Reply