Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > VICE: attach disk image and run .prg file from OS filesystem
2016-05-30 20:20
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....
 
2016-06-27 17:09
Compyx

Registered: Jan 2005
Posts: 631
Quote: 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


I will, already working on it mentally ;)
2016-06-27 17:20
Burglar

Registered: Dec 2004
Posts: 1101
well I dunno mate, I was just guessing ;)

but why all the basic-fuckage?
2016-06-27 18:16
Compyx

Registered: Jan 2005
Posts: 631
I enjoy it :)

Well, not really. Basically (pun intended) I need VICE to act as if it was doing an auto-start, without actually doing an auto-start since I use a running VICE session, if that makes any sense.

My VICE session works fine with 'demo' code: code that sets up IRQ's and never returns. The problem is code that returns to the interpreter and doesn't alter IRQ's. Since I inject code into VICE and use a 'g $xxxx', BASIC has no idea I just executed a program and remains in interactive mode. With a bloody blinking cursor as result, even for 'jmp *'.
2016-06-27 18:30
chatGPZ

Registered: Dec 2001
Posts: 11386
if you want to behave it like autostart, then you HAVE to issue a reset, and then load/run the program (eg by putting the respective commands into the keyboard buffer). anything else will behave subtle different (unless you put massive effort into putting the machine into the same state).
2016-06-27 18:53
Compyx

Registered: Jan 2005
Posts: 631
Using the keyboard buffer might just work! Last time I did that was in Fisher-Price OS, and since BASIC V2 is also made by that same company, who knows? ;)
2016-06-28 16:31
Compyx

Registered: Jan 2005
Posts: 631
Amazingly, filling the keyboard buffer with 'RUN\r' and setting its length to $04 works.

My little BASIC program executes and returns properly.

Thanks Groepaz!
2016-06-28 20:07
Compyx

Registered: Jan 2005
Posts: 631
Right, put my findings so far into an article on codebase64:
http://codebase64.org/doku.php?id=base:using_a_running_vice_ses..

Unfinished as of now. Any comments and (constructive) criticism are welcome. Especially the Makefile stuff can do with some optimizing, but I didn't want to alienate readers with too much variable substitutions and other make features, it should be readable even for people just above 'lamer' level.
2016-06-29 19:14
Burglar

Registered: Dec 2004
Posts: 1101
nice article :) I didnt know about xxd yet, nice!

# x64 binary
X64 = /usr/local/bin/x64

# Assemble program and output VICE labels file
demo.prg: demo.s
        $(X64) -a -C -o demo.prg demo.s --vice-labels -l labels.txt

uhh, u compile with vice? :P
2016-06-30 09:15
Compyx

Registered: Jan 2005
Posts: 631
Haha, good catch. Some parts of the Makefile snippets I copied from various projects, some I just typed in when writing the article, that one is obviously the latter case.

Should be $(ASM) of course, I'll change that. The article isn't finished yet, the Makefile bits need some cleaning and testing, as you've discovered ;)
2016-06-30 16:56
Compyx

Registered: Jan 2005
Posts: 631
I also noticed that setting the BASIC begin/end pointers isn't needed when loading a file. VICE does that, the problem was my 'reset 0' command followed by 'l demo.prg': Even with a patched kernal the reset still runs while the program is loaded, resulting in the reset doing a 'NEW' of sorts after the program has already loaded.

Using `netcat -q 1` to tell netcat to wait one second after EOF from VICE makes the load command work properly.

Wonderful feature, that remote monitor, you just have to be very careful. Good fun :)
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
cba
cobbpg
fugu/Excess
Guests online: 128
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.04 sec.