First off, thank you for considering contributing to ViceMCP! It's people like you that make ViceMCP such a great tool for the Commodore community.
By participating in this project, you are expected to uphold our Code of Conduct:
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on what is best for the community
- Show empathy towards other community members
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, please include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Your environment details (OS, .NET version, VICE version)
- Any relevant error messages or logs
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- A clear and descriptive title
- A detailed description of the proposed functionality
- Example use cases
- Why this enhancement would be useful
- Fork the repository and create your branch from
main - Follow the coding standards (see below)
- Add tests for any new functionality
- Ensure all tests pass by running
dotnet test - Update documentation as needed
- Write a good commit message using conventional commits format
-
Install prerequisites:
- .NET 9.0 SDK
- VICE emulator
- Git
-
Clone your fork:
git clone https://github.com/barryw/ViceMCP.git cd ViceMCP -
Build the project:
dotnet build
-
Run tests:
dotnet test
- Use 4 spaces for indentation (no tabs)
- Use
PascalCasefor public members and types - Use
camelCasefor private fields and local variables - Prefix private fields with underscore (
_privateField) - Use meaningful variable and method names
- Keep methods small and focused
- Use async/await for all I/O operations
- Write self-documenting code
- Add XML documentation for public APIs
- Avoid magic numbers - use constants
- Handle errors gracefully
- Log important operations
- Keep cyclomatic complexity low
- Write unit tests for all new functionality
- Maintain code coverage above 75%
- Use descriptive test names that explain what is being tested
- Follow the Arrange-Act-Assert pattern
- Mock external dependencies
We use Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation only changesstyle: Code style changes (formatting, etc)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system changesci: CI configuration changeschore: Other changes that don't modify src or test files
Examples:
feat(tools): add disassemble command for code analysis
fix(memory): handle buffer overflow in memory operations
docs: update README with new installation instructions
When adding new MCP tools:
- Add the tool method to
ViceTools.cs - Use the
[McpServerTool]attribute - Add proper parameter descriptions
- Handle errors gracefully
- Return user-friendly messages
- Add unit tests for the new tool
- Update the documentation
Example:
[McpServerTool(Name = "new_tool"), Description("Description of what the tool does.")]
public async Task<string> NewTool(
[Description("Parameter description")] string param)
{
await EnsureStartedAsync();
try
{
// Implementation
return "Success message";
}
catch (Exception ex)
{
throw new InvalidOperationException($"Failed to execute: {ex.Message}");
}
}To test your changes with VICE:
-
Start VICE with binary monitor:
x64sc -binarymonitor -binarymonitoraddress 127.0.0.1:6502
-
Run ViceMCP:
dotnet run --project ViceMCP/ViceMCP.csproj
-
Use an MCP client to test your changes
- Update README.md if adding new features
- Update CLAUDE.md for AI-specific guidance
- Add XML documentation to public methods
- Include examples in documentation
Feel free to open an issue for any questions about contributing. We're here to help!
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT).