Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,87 @@
# CodeDesignerAI VSCode [![CI](https://github.com/TylerDev888/CodeDesignerAI/actions/workflows/ci.yml/badge.svg)](https://github.com/TylerDev888/CodeDesignerAI/actions/workflows/ci.yml)
CDS Assembler
![CodeDesigner screenshot](./Screenshot.png)

Disasm
![CodeDesigner screenshot](./Screenshot_2.png)
![CodeDesigner screenshot](./Screenshot_3.png)
![CodeDesigner screenshot](./Screenshot_4.png)

## Description
A MIPS64 (PS2 Emotion Engine) assembler / disassembler with extended pseudo-commands and directives for custom CDS scripts. Used to create custom patches for the playstation 2. Make sure to use github co-pilot with this vs code extension.

## Example CDS script
```asm
/*
This is a test cds script
*/
address $20694d48
hexcode $00010000

address $20c49788
hexcode $ffffffff

address $200c0000
print "this is a string"
nop
___OnRoomExit:
addiu sp, sp, $FFd0
sw ra, $0000(sp)
sw s0, $0004(sp)
sw s1, $0008(sp)
sw at, $000C(sp)

setreg at, $002CED04
setreg s1, $03e00008
sw s1, $0000(at)

setreg at, $000A0000
sw zero, $0000(at)
sw zero, $0004(at)
sw zero, $0008(at)

// load pointer
lui s0, $0044
lw s0, $0c38(s0)
beq s0, zero, :EndOnRoomExit
nop
lw s1, $0010(at)
sw s1, $0014(s0)
lw s1, $000C(at)
sw s1, $0028(s0)

EndOnRoomExit:
lw ra, $0000(sp)
lw s0, $0004(sp)
lw s1, $0008(sp)
lw at, $000C(sp)
j $00204438
addiu sp sp, $0030
```

## Planned Enhancements / Future Work

- **VS Code Disassembler Views**
- Add disassembler-style windows that mirror *PCSX2Dis*, including address, opcode bytes, labels, operations, and annotations.

- **PCSX2 Integration**
- Native integration with PCSX2 for live memory inspection, breakpoint-style workflows, and runtime code injection.

- **Cheat Engine Integration**
- Optional interoperability with Cheat Engine for scanning, validation, and memory manipulation workflows.

- **Expanded Pseudo Syntax**
- Introduce richer, higher-level pseudo-instructions to simplify common patterns and improve readability.

- **AI / Code Generation Integration**
- Deeper integration with GitHub Copilot and/or a custom LLM for:
- Code generation
- Pattern recognition
- Automatic code discovery and suggestion

- **Multi-Platform Emulator Support**
- Extend support beyond PCSX2 to additional consoles and emulators as the architecture matures.

## Projects and READMEs
- CLI & tooling
- [CodeDesigner.ConsoleApp](CodeDesigner.ConsoleApp/ReadMe.md) — Console front-end / CLI
Expand Down Expand Up @@ -36,3 +114,7 @@ Each project README contains sections marked with the letters above when applica
- Add changelogs or release notes where appropriate.
- Prefer small, focused PRs and include test or verification steps in the PR description.

## Branching Strategy
- Define and document a clear Git branching model (e.g., `main`, `dev`, `feature`, `bug`)
- Establish pull request requirements, review expectations, and CI validation rules

Binary file added Screenshot_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshot_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshot_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vscode/cds-assembler/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vscode/cds-assembler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "CDS Assembler",
"description": "CDS Assembler sidebar panel with custom commands",
"version": "0.0.1",
"publisher": "antix-fatality",
"publisher": "tylerdev888",
"engines": {
"vscode": "^1.107.0"
},
Expand Down
9 changes: 9 additions & 0 deletions vscode/cds-assembler/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ class CDSAssemblerPanelProvider implements vscode.WebviewViewProvider {
});
}

private getWorkspaceRoot(): string | null {
const folders = vscode.workspace.workspaceFolders;
if (!folders || folders.length === 0) {
return null;
}
return folders[0].uri.fsPath;
}

private runCds(option: string) {

const editor = vscode.window.activeTextEditor;
Expand All @@ -73,6 +81,7 @@ class CDSAssemblerPanelProvider implements vscode.WebviewViewProvider {
outputChannel.clear();
outputChannel.show(true);
outputChannel.appendLine(`> ${command}\n`);
//outputChannel.appendLine(this.getWorkspaceRoot() ?? 'No workspace root');

exec(command, (error, stdout, stderr) => {

Expand Down
4 changes: 3 additions & 1 deletion vscode/cds-assembler/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"lib": ["ES2020"],
"sourceMap": true,
"rootDir": "src",
"strict": true
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
},
"exclude": ["node_modules", ".vscode-test"]
}
5 changes: 5 additions & 0 deletions vscode/cds-dis/cds-dis/.vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
8 changes: 8 additions & 0 deletions vscode/cds-dis/cds-dis/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}
21 changes: 21 additions & 0 deletions vscode/cds-dis/cds-dis/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
11 changes: 11 additions & 0 deletions vscode/cds-dis/cds-dis/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
20 changes: 20 additions & 0 deletions vscode/cds-dis/cds-dis/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
11 changes: 11 additions & 0 deletions vscode/cds-dis/cds-dis/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/eslint.config.mjs
**/*.map
**/*.ts
**/.vscode-test.*
9 changes: 9 additions & 0 deletions vscode/cds-dis/cds-dis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "cds-dis" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

- Initial release
71 changes: 71 additions & 0 deletions vscode/cds-dis/cds-dis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# cds-dis README

This is the README for your extension "cds-dis". After writing up a brief description, we recommend including the following sections.

## Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

\!\[feature X\]\(images/feature-x.png\)

> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.

## Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

## Extension Settings

Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.

For example:

This extension contributes the following settings:

* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.

## Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

## Release Notes

Users appreciate release notes as you update your extension.

### 1.0.0

Initial release of ...

### 1.0.1

Fixed issue #.

### 1.1.0

Added features X, Y, and Z.

---

## Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)

## Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.

## For more information

* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)

**Enjoy!**
27 changes: 27 additions & 0 deletions vscode/cds-dis/cds-dis/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import typescriptEslint from "typescript-eslint";

export default [{
files: ["**/*.ts"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint.plugin,
},

languageOptions: {
parser: typescriptEslint.parser,
ecmaVersion: 2022,
sourceType: "module",
},

rules: {
"@typescript-eslint/naming-convention": ["warn", {
selector: "import",
format: ["camelCase", "PascalCase"],
}],

curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",
},
}];
8 changes: 8 additions & 0 deletions vscode/cds-dis/cds-dis/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"comments": {
"lineComment": ";"
},
"brackets": [],
"autoClosingPairs": [],
"surroundingPairs": []
}
Loading
Loading