XRoar API ?!?
XRoar API ?!?
What's about to add a API in XRoar, so that e.g. a Python script can interact with the simulated machine?
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: XRoar API ?!?
Well the GDB interface already exists...
https://sourceware.org/gdb/onlinedocs/g ... tocol.html for the general approach and check the top of gdb.c for XRoar specifics.
You'd doubtless want more hardware inspection commands - outside the CPU, the only one there at the moment is query/set of the SAM register, but more can be added.
https://sourceware.org/gdb/onlinedocs/g ... tocol.html for the general approach and check the top of gdb.c for XRoar specifics.
You'd doubtless want more hardware inspection commands - outside the CPU, the only one there at the moment is query/set of the SAM register, but more can be added.
Re: XRoar API ?!?
GDB is very low level and more for debugging. Isn't it?
I mean something like:
* stop/resume machine
* read/write machine RAM/ROM
* raise software reset
I mean something like:
* stop/resume machine
* read/write machine RAM/ROM
* raise software reset
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: XRoar API ?!?
It's low level, but it'll do what you want:jedie wrote:GDB is very low level and more for debugging. Isn't it?
Send an BREAK (0x03), send continue ('c').I mean something like:
* stop/resume machine
'm' and 'M' - though if you want to write ROM, I'd need to extend that.* read/write machine RAM/ROM
Not directly supported at the mo, though you could obviously set PC to an appropriate value. Extending to support a particular signal type could impose a full reset.* raise software reset
GDB itself is the program that does the debugging - it does it by stopping/starting the target and reading/writing memory in the way you want.
The GDB packet format is very simple, and operates over a simple TCP connection.
..ciaran
Re: XRoar API ?!?
Hm. Seems to be interesting. I will take a look, thanks!
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: XRoar API ?!?
I have no experience in this.
I created a first test script in Python, here: https://github.com/jedie/PyDragon32/blo ... b_tests.py
I just send a "g" and get '$S02#b5' back. This seems to be wrong.
Can you give some examples?
I created a first test script in Python, here: https://github.com/jedie/PyDragon32/blo ... b_tests.py
I just send a "g" and get '$S02#b5' back. This seems to be wrong.
Can you give some examples?
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: XRoar API ?!?
As an alternative path, you might be interested in gdb's support for python scripting: https://sourceware.org/gdb/current/onli ... tml#Python In this case you would run python scripts from inside gdb and you wouldn't need to take care of the low-level communication.
Your m6809-gdb will have to be compiled with python support (Ciaran's binaries are not).
Your m6809-gdb will have to be compiled with python support (Ciaran's binaries are not).