| |
Compyx
Registered: Jan 2005 Posts: 631 |
VICE: attach disk image and run .prg file from OS filesystem
With VICE (2.4.27 on Linux), I'm trying to figure out how to attach a D64 image to drive 8 (with TDE) while running a .prg file from my OS file system.
I've tried a wide variety of command line options, but I either get a message about extra arguments on the command line, or VICE tries to load the .prg file from the attached disk image, which obviously fails as well.
Does anyone know how to do this? I'm trying to keep my assemble-run-debug cycle as fast as possible.
/Compyx |
|
... 56 posts hidden. Click here to view all posts.... |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
Well, after adding `echo 'g fce2' | nc localhost 6510` before any load commands to my Makefile, everything seems to work fine.
When I issue 'reset 0' (soft reset) through the remote monitor using netcat I need to `sleep 3` to allow the reset to finish, otherwise VICE hangs on subsequent monitor commands.
Never knew how easy it was to use the remote monitor ;)
And -autostartprgmode 1 does indeed work with files over $cfff, so that takes care of the $d000-$ffff problem. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
however, injecting to RAM does introduce its own set of quirks. been there :) |
| |
Perplex
Registered: Feb 2009 Posts: 255 |
You should be able to do a reset without sleep (or at least with a much shorter sleep duration) using a patched kernal like iAN CooG described in post #34. |
| |
Slajerek
Registered: May 2015 Posts: 63 |
You can use my just released C64 Debugger, I copy PRG directly to RAM not using virtual devices there.
Something like this should work:
C64Debugger -prg "full path to file.prg" -d64 "full path to disk image.d64" -jmp x0810 -wait 500
Will wait 500ms to ensure kernel settle, then attach disk, then load PRG into RAM and finally JMP to $0810.
By the way I have included a patch for fast kernel boot, but forgot to add command line setting :) |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
Looks promising, I'll check it out.
But what I'm after is controlling VICE from my editor of choice, VIM, without having to boot x64 every time I change some code. I now have that working using a Makefile, netcat, telnet and a VIM plugin. Still need to patch the kernal like iAN suggested though for quicker reset.
So far it's working fine, but I still kind of expect it to blow up in my face at any moment ;) |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
After patching the kernal like iAN suggested, I now have an assemble & run time of less than a second. Pretty sweet!
If it still works fine after a few days, I might as well put my findings in an article on codebase64. |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
After playing around with the remote monitor some more, I noticed that by ignoring the BASIC interpreter, any code I run that doesn't set up IRQ's results in the code executing with a nice blinking cursor on screen (the BASIC interpreter's IRQ is still in edit mode).
This of course has to do with skipping the interpreter, so I now inject a BASIC program with the remote monitor and set the proper pointers in $2b/$2c (can probably be omitted) and $2d/$2e. I can now LIST the program and RUN it in VICE. But I don't seem to be able to find the correct location in BASIC/KERNAL to execute a proper RUN from the monitor.
So my question is, how do I properly hook into the BASIC interpreter so I can RUN a program as if I typed 'RUN' and, after executing my program, get the interpreter back in edit mode? |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
jsr $a659
jmp $a7ae |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Compyx: Yes, please write something about it for Codebase! Should go into the cross development part of the wiki I suppose:
https://codebase64.org/doku.php?id=base:crossdev |
| |
Compyx
Registered: Jan 2005 Posts: 631 |
Nope, I get a nice READY prompt, but my program isn't executed, nor is it there any more when I do a LIST.
You might be onto something though, I don't get stuff like ?undef when I tried jumping straight into the handlers for GOTO, GOSUB and RUN. Probably need to set a few more pointers. |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |