Coder Social home page Coder Social logo

x16-web-debugger's Introduction

Release License: BSD-Clause

This is an experimental remote debugger for the Commander X16 emulator. It is tailored for CA65 assembler code and needs a patched version of the emulator available here

Design

          http://*:9009            http://localhost:8000           http://*:8000
+---------+----------+                +---------+                  +-----------+
|         |MicroHTTP | <------------> | Browser | <--------------> | server.py |
|         |----------+                |         |                  +-----------+
|         | Remote   |                +---------+                    |       |
|         | Debugger |                                     Project <-+       +-> Debugger 
| mainloop-----------+                                     Folder               Folder
|         |
|         |
+---------+
  x16-emulator

Features

  • Debug 65c02 instructions
  • Debug CA65 source code
  • Memory & VRAM dump
  • Code breakpoints
  • Memory & VRAM breakpoints
  • Display memory as structure (format extracted from source code)

Memory & VRAM dump

  • Dump 256 bytes of memory from the address provided in hexadecimal
  • Highlights bytes changed
  • Add memory breakpoints on individual bytes
  • Monitored memory bytes are highlight
  • Change size of monitored bytes on the fly (byte, word, long)
  • display tiles per layer (first 16x of the tile list)

Source code

  • Syntax highlighting

Code breakpoints

  • Set breakpoints on instructions on the source code

Memory & VRAM breakpoints

  • Trigger a breakpoint as soon as the content of the memory changes (byte, word, long)

Memory watches

  • Display memory as a structure defined in the source code (.STRUCTURE / .ENDSTRUCTURE)
  • indirect access register base (r0),y
  • memory indirect access ($0002),y
  • highlights attributes changed

Todo

  • Display memory as byte, word, long
  • Conditional code breakpoint
  • Trigger a breakpoint when the memory content reaches a predefined value

Configuration

Update config.json to point to the source code folder and the debug files

{
    "root":"d:/dev/x16/x16-uncharted",      // home folder of the project
    "sources":"/src",                       // sub folder with sources
    "remote":"http://localhost:9009",       // address of the emulator
    "debuginfo":"/bin/test.dbg",            // local path of the debug info file
    "symbols":"",                           // local path of the symbol files (if there is no debuginfo)
    "binary":"bin/test.prg"                // local path for the binary
}

Usage

  • Compile the source code with debug options

    • ca65 --debug-info -t cx16 main.asm -o main.o
    • cl65 -t cx16 -o ../bin/test.prg main.o -Wl --dbgfile,../bin/test.dbg
  • Start the debugger server

    • cd x16-web-debugger
    • python server.py
  • Start the emulator in remote debug mode

    • x16-emulator.exe -rom rom.bin -remote-debugger -prg test.prg
  • point your web browser to the remote debugger

  • Detect bug

  • Fix the bug in your editor

  • Compile

  • The debugger will detect the new version and propose to load source (on the debugger) and PRG (on the emulator)

A word about security

There is none ! Communications are in clear text over HTTP, there is no credentials to log in.

External libraries

Mandatory screenshot

IDE screenshot

x16-web-debugger's People

Contributors

deckfln avatar

Stargazers

 avatar  avatar

Watchers

 avatar

x16-web-debugger's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.