├── .gitignore ├── .vscode └── launch.json ├── .vscodeignore ├── README.md ├── images ├── logo.png └── theme.png ├── language-configuration.json ├── package.json ├── syntaxes └── n64asm.tmLanguage.json └── themes └── N64AweSoMe-theme.json /.gitignore: -------------------------------------------------------------------------------- 1 | /*.vsix 2 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # N64 Assembly 2 | 3 | A Visual Studio Code extension that provides a color theme and N64 MIPS Assembly language support. 4 | 5 | ## Features 6 | 7 | N64 Assembly extension provides: 8 | 9 | ### N64AweSoMe color theme 10 | 11 | 12 | 13 | ### N64 MIPS Assembly language support 14 | 15 | You can write specific N64 MIPS Assembly instructions and have great support in syntax coloration! 16 | 17 | ## Release Notes 18 | 19 | ### 1.1.5 20 | 21 | - Added cfc2, ctc2, mfc2, mtc2, vsar missing instructions 22 | 23 | ### 1.1.4 24 | 25 | - Fixed tab colors in theme (thanks to [Hazematman](https://github.com/Hazematman)) 26 | 27 | ### 1.1.3 28 | 29 | - Fixed (again) macro calls in every indentation cases. 30 | 31 | ### 1.1.2 32 | 33 | - Fixed macro calls detection (address offsets are not caught anymore). 34 | - Added `cache` and `subi` instructions. 35 | 36 | ### 1.1.1 37 | 38 | Added some missing RDP instructions for triangle drawing. 39 | 40 | ### 1.1.0 41 | 42 | Added the RSP vector instructions into the language grammar. 43 | 44 | ### 1.0.0 45 | 46 | This is the very first version of this N64 Assembly Support, I hope it will help you make awesome N64 games! 47 | -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/is06/n64-assembly/6f2fcef45e521dfc8c7e627dd2c528879a2cf4c8/images/logo.png -------------------------------------------------------------------------------- /images/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/is06/n64-assembly/6f2fcef45e521dfc8c7e627dd2c528879a2cf4c8/images/theme.png -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": "//" 4 | } 5 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "n64-assembly", 3 | "displayName": "N64 Assembly Support", 4 | "description": "An extension to have N64 Assembly support on vscode!", 5 | "version": "1.1.5", 6 | "publisher": "is06", 7 | "icon": "images/logo.png", 8 | "homepage": "https://github.com/is06/n64-assembly", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/is06/n64-assembly" 12 | }, 13 | "bugs": { 14 | "url": "https://github.com/is06/n64-assembly/issues" 15 | }, 16 | "engines": { 17 | "vscode": "^1.44.0" 18 | }, 19 | "categories": [ 20 | "Programming Languages", 21 | "Themes" 22 | ], 23 | "contributes": { 24 | "languages": [ 25 | { 26 | "id": "n64asm", 27 | "aliases": [ 28 | "N64 MIPS Assembly" 29 | ], 30 | "extensions": [ 31 | ".asm", 32 | ".inc", 33 | ".n64asm" 34 | ], 35 | "configuration": "./language-configuration.json" 36 | } 37 | ], 38 | "grammars": [ 39 | { 40 | "language": "n64asm", 41 | "scopeName": "source.n64asm", 42 | "path": "./syntaxes/n64asm.tmLanguage.json" 43 | } 44 | ], 45 | "themes": [ 46 | { 47 | "label": "N64AweSoMe", 48 | "uiTheme": "vs-dark", 49 | "path": "./themes/N64AweSoMe-theme.json" 50 | } 51 | ] 52 | } 53 | } -------------------------------------------------------------------------------- /syntaxes/n64asm.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "N64 MIPS Assembler", 3 | "scopeName": "source.n64asm", 4 | "fileTypes": [ 5 | "*.asm", 6 | "*.inc" 7 | ], 8 | "patterns": [ 9 | { 10 | "name": "support.n64asm.instructions.bass", 11 | "match": "\\b(arch|endian|output|fill|origin|base|include|insert|db|dh|dw|dd|float32|while)\\b" 12 | }, 13 | { 14 | "name": "support.n64asm.instructions.arithmetic", 15 | "match": "\\b(mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|abs\\.d|abs\\.s|add|add\\.d|add\\.s|addi|addiu|addu|and|andi|ceil\\.w\\.d|ceil\\.w\\.s|div|div\\.d|div\\.s|divu|eret|floor\\.w\\.d|floor\\.w\\.s|mul|mul\\.d|mul\\.s|mult|multu|neg\\.d|neg\\.s|nop|nor|or|ori|round\\.w\\.d|round\\.w\\.s|sll|sllv|slt|slti|sltiu|sltu|sqrt\\.d|sqrt\\.s|sra|srav|srl|srlv|sub|sub\\.d|sub\\.s|subi|subu|trunc\\.w\\.d|trunc\\.w\\.s|xor|xori)\\b" 16 | }, 17 | { 18 | "name": "support.n64asm.instructions.register", 19 | "match": "\\b(li|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|mfc0|mfc1|mfhi|mflo|mov\\.d|mov\\.s|movf|movf\\.d|movf\\.s|movn|movn\\.d|movn\\.s|movt|movt\\.d|movt\\.s|movz|movz\\.d|movz\\.s|msub|mtc0|mtc1|mthi|mtlo|sw|swc1|swl|swr|sb|sc|sdc1|sh)\\b" 20 | }, 21 | { 22 | "name": "support.n64asm.instructions.jumps", 23 | "match": "\\b(b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|j|jal|jalr|jr)\\b" 24 | }, 25 | { 26 | "name": "support.n64asm.instructions.general", 27 | "match": "\\b(seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|mfc1\\.d|l\\.d|l\\.s|s\\.d|s\\.s|bc1f|bc1t|break|cache|c\\.eq\\.d|c\\.eq\\.s|c\\.le\\.d|c\\.le\\.s|c\\.lt\\.d|c\\.lt\\.s|clo|clz|cvt\\.d\\.s|cvt\\.d\\.w|cvt\\.s\\.d|cvt\\.s\\.w|cvt\\.w\\.d|cvt\\.w\\.s|madd|maddu|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu)\\b" 28 | }, 29 | { 30 | "name": "support.n64asm.instructions.rsp.vector.operation", 31 | "match": "\\b(vnop|vrndp|vrndn|vabs|vrcp|vrcpl|vrcph|vmov|vrsq|vrsql|vrsqh|vextt|vextq|vinst|vinsq|vinsn|v056|v057|v073)\\b" 32 | }, 33 | { 34 | "name": "support.n64asm.instructions.rsp.vector.logical", 35 | "match": "\\b(vlt|veq|vne|vge|vcl|vch|vcr|vmrg|vand|vnand|vor|vnor|vxor|vsar)\\b" 36 | }, 37 | { 38 | "name": "support.n64asm.instructions.rsp.vector.operation.multiply", 39 | "match": "\\b(vmulf|vmulu|vmulq|vmuld|vmudm|vmudn|vmudh|vmacf|vmacu|vmacq|vmadl|vmadm|vmadn|vmadh)\\b" 40 | }, 41 | { 42 | "name": "support.n64asm.instructions.rsp.vector.operation.add", 43 | "match": "\\b(vadd|vaddc|vaddb|vaccb|vacc)\\b" 44 | }, 45 | { 46 | "name": "support.n64asm.instructions.rsp.vector.operation.sub", 47 | "match": "\\b(vsub|vsut|vsubc|vsubb|vsucb|vsuc)\\b" 48 | }, 49 | { 50 | "name": "support.n64asm.instructions.rsp.cp", 51 | "match": "\\b(cfc2|ctc2|mfc2|mtc2)\\b" 52 | }, 53 | { 54 | "name": "support.n64asm.instructions.rsp.vector.load", 55 | "match": "\\b(lbv|lsv|llv|ldv|lqv|lrv|lpv|luv|lhv|lfv|lwv|ltv)\\b" 56 | }, 57 | { 58 | "name": "support.n64asm.instructions.rsp.vector.store", 59 | "match": "\\b(sbv|ssv|slv|sdv|sqv|srv|spv|suv|shv|sfv|swv|stv)\\b" 60 | }, 61 | { 62 | "name": "support.n64asm.instructions.rdp", 63 | "match": "\\b(Set_Color_Image|Set_Texture_Image|Set_Z_Image|Set_Tile|Load_Tile|Load_Block|Set_Tile_Size|Load_Tlut|Edge_Coefficients|Shade_Coefficients|Texture_Coefficients|Z_Buffer_Coefficients|Fill_Triangle|Fill_ZBuffer_Triangle|Shade_Triangle|Texture_Triangle|Texture_ZBuffer_Triangle|Shade_ZBuffer_Triangle|Shade_Texture_Triangle|Shade_Texture_Z_Buffer_Triangle|Fill_Rectangle|Texture_Rectangle|Texture_Triangle|Texture_Rectangle_Flip|Set_Combine_Mode|Set_Other_Modes|Set_Env_Color|Set_Prim_Color|Set_Blend_Color|Set_Fog_Color|Set_Fill_Color|Set_Prim_Depth|Set_Scissor|Set_Convert|Set_Key_R|Set_Key_GB|Sync_Full|Sync_Load|Sync_Pipe|Sync_Tile|No_Op)\\b" 64 | }, 65 | { 66 | "name": "support.n64asm.label", 67 | "captures": { 68 | "1": { 69 | "name": "entity.name.function.label.n64asm" 70 | } 71 | }, 72 | "match": "\\b([A-Za-z0-9_]+):" 73 | }, 74 | { 75 | "name": "support.n64asm.definition.constant", 76 | "match": "\\b(constant)(\\s)([A-Za-z0-9_]+)\\(", 77 | "captures": { 78 | "1": { 79 | "name": "support.n64asm.instructions.bass" 80 | }, 81 | "3": { 82 | "name": "support.n64asm.constant" 83 | } 84 | } 85 | }, 86 | { 87 | "name": "support.n64asm.definition.macro", 88 | "match": "\\b(macro)(\\s)([A-Za-z0-9_]+)\\(", 89 | "captures": { 90 | "1": { 91 | "name": "support.n64asm.instructions.bass" 92 | }, 93 | "3": { 94 | "name": "support.n64asm.macro" 95 | } 96 | } 97 | }, 98 | { 99 | "name": "support.n64asm.use.macro", 100 | "match": "^(([^,])?(\\s*)([A-Za-z0-9_]+))\\(", 101 | "captures": { 102 | "1": { 103 | "name": "support.n64asm.macro" 104 | } 105 | } 106 | }, 107 | { 108 | "name": "support.n64asm.number.hexadecimal", 109 | "match": "\\b(0(x|X))([a-fA-F0-9]+)\\b" 110 | }, 111 | { 112 | "name": "support.n64asm.number.hexadecimal", 113 | "match": "(\\$)\\b([a-fA-F0-9]+)\\b" 114 | }, 115 | { 116 | "name": "support.n64asm.number.decimal.integer", 117 | "match": "(\\-)?\\b([0-9]+)\\b" 118 | }, 119 | { 120 | "name": "support.n64asm.number.decimal.float", 121 | "match": "(\\-)?\\b([0-9\\.]+)\\b" 122 | }, 123 | { 124 | "name": "string", 125 | "begin": "\"", 126 | "beginCaptures": { 127 | "0": { 128 | "name": "punctuation.definition.string.begin.mips" 129 | } 130 | }, 131 | "end": "\"", 132 | "endCaptures": { 133 | "0": { 134 | "name": "punctuation.definition.string.end.mips" 135 | } 136 | }, 137 | "patterns": [ 138 | { 139 | "match": "\\\\[rnt\\\\\"]" 140 | } 141 | ] 142 | }, 143 | { 144 | "name": "comment", 145 | "begin": "(^[ \\t]+)?(?=//)", 146 | "beginCaptures": { 147 | "1": { 148 | "name": "punctuation.whitespace.comment.leading.mips" 149 | } 150 | }, 151 | "end": "(?!\\G)", 152 | "patterns": [ 153 | { 154 | "name": "comment.line.number-sign.mips", 155 | "begin": "//", 156 | "beginCaptures": { 157 | "0": { 158 | "name": "punctuation.definition.comment.n64asm" 159 | } 160 | }, 161 | "end": "\n" 162 | } 163 | ] 164 | } 165 | ] 166 | } -------------------------------------------------------------------------------- /themes/N64AweSoMe-theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "vscode://schemas/color-theme", 3 | "type": "dark", 4 | "colors": { 5 | "activityBar.background": "#333355", 6 | "activityBar.activeBackground": "#555577", 7 | "activityBarBadge.background": "#c22b6a", 8 | "editor.background": "#333355", 9 | "editor.foreground": "#eeeeee", 10 | "editor.lineHighlightBackground": "#513066", 11 | "editor.selectionBackground": "#555577", 12 | "sideBar.background": "#222244", 13 | "sideBarSectionHeader.background": "#333355", 14 | "statusBar.background": "#222244", 15 | "menu.background": "#222244", 16 | "titleBar.activeBackground": "#333355", 17 | "badge.background": "#c22b6a", 18 | "dropdown.background": "#222244", 19 | "list.hoverBackground": "#333355", 20 | "list.activeSelectionBackground": "#444477", 21 | "list.inactiveSelectionBackground": "#333355", 22 | "input.background": "#222244", 23 | "input.border": "#666699", 24 | "button.background": "#777799", 25 | "notifications.background": "#222244", 26 | "tab.inactiveBackground": "#222244", 27 | "editorGroupHeader.tabsBackground": "#222244" 28 | }, 29 | "tokenColors": [ 30 | { 31 | "name": "Comment", 32 | "scope": [ 33 | "comment", 34 | "string.comment", 35 | "support.n64asm.comment" 36 | ], 37 | "settings": { 38 | "foreground": "#999999", 39 | "fontStyle": "italic" 40 | } 41 | }, 42 | { 43 | "name": "Function name", 44 | "scope": [ 45 | "entity.name.function", 46 | "support.function", 47 | "function", 48 | "function.support.builtin", 49 | "function.support.core", 50 | "support.n64asm.label" 51 | ], 52 | "settings": { 53 | "foreground": "#8bdf64" 54 | } 55 | }, 56 | { 57 | "name": "Function call", 58 | "scope": [ 59 | "entity.name.function-call", 60 | "support.n64asm.macro" 61 | ], 62 | "settings": { 63 | "foreground": "#fd9f24" 64 | } 65 | }, 66 | { 67 | "name": "Constant", 68 | "scope": [ 69 | "constant.language", 70 | "constant.character", 71 | "constant.other", 72 | "variable.language", 73 | "support.constant", 74 | "support.n64asm.constant" 75 | ], 76 | "settings": { 77 | "foreground": "#f05286" 78 | } 79 | }, 80 | { 81 | "name": "Number", 82 | "scope": [ 83 | "constant.numeric", 84 | "support.n64asm.number" 85 | ], 86 | "settings": { 87 | "foreground": "#f481ff" 88 | } 89 | }, 90 | { 91 | "name": "String", 92 | "scope": [ 93 | "string", 94 | "string.template" 95 | ], 96 | "settings": { 97 | "foreground": "#dfd65d" 98 | } 99 | }, 100 | { 101 | "name": "Keyword", 102 | "scope": [ 103 | "keyword", 104 | "keyword.operator", 105 | "keyword.operator.logical", 106 | "keyword.operator.constructor", 107 | "entity.name.tag", 108 | "support.dictionary.json", 109 | "support.n64asm.instructions", 110 | "storage.type", 111 | "storage" 112 | ], 113 | "settings": { 114 | "foreground": "#58c2ff", 115 | "fontStyle": "bold" 116 | } 117 | }, 118 | { 119 | "name": "Secondary Keyword", 120 | "scope": [ 121 | "support.n64asm.instructions.bass" 122 | ], 123 | "settings": { 124 | "foreground": "#22dabb", 125 | "fontStyle": "bold" 126 | } 127 | }, 128 | { 129 | "name": "Other", 130 | "scope": [ 131 | "support.n64asm.definition.identifier" 132 | ], 133 | "settings": { 134 | "foreground": "#eeeeee" 135 | } 136 | } 137 | ] 138 | } 139 | --------------------------------------------------------------------------------