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 > D64 from KickAssembler -> Autorun in Vice
2023-02-08 11:51
TWW

Registered: Jul 2009
Posts: 541
D64 from KickAssembler -> Autorun in Vice

Can someone point me in the right direction to autostart .d64 images made in KickAssembler in Vice;


When creating a D64 file from within KickAssembler, you would go about doing it like this;

"disktest.asm" file:
	.disk [filename="test.d64", name="AAARGGGHHH      ", id="FOOKK" ] {

		[name="File1",            type="prg",  segments="File1_PRG" ],
		[name="File2",            type="prg",  segments="File2_PRG" ],
		[name="----------------", type="rel"                        ],
	}


.segment File1_PRG []
    BasicUpstart2(Main)
    Main:
        lda #$00
        sta $d020
        rts

.segment File2_PRG []
    BasicUpstart2(Main)
    Main:
        lda #$01
        sta $d020
        rts


You the assemble it with:

java -jar KickAss.jar disktest.asm - which will create the file "test.d64"

How do i add the command line option to:

-execute "x64sc.exe"

to make Vice autostart the test.d64 file we just assembled without manually adding the "test.d64" to the -execute command (I want it to work for all D64 files i Assemble without having to change this command every time?
2023-02-08 11:56
Krill

Registered: Apr 2002
Posts: 2839
Just use a different hammer, for once, like the shell.

Something like
java -jar KickAss.jar disktest.asm && x64sc.exe [...]
2023-02-08 12:46
TWW

Registered: Jul 2009
Posts: 541
Quoting Krill
java -jar KickAss.jar disktest.asm && x64sc.exe [...]


It's the [...] part I'm asking about :)

To reiterate:

"I want it to work for all D64 files i Assemble without having to change this command every time"

So how do I take the filename "test.d64" (which was produced by KickAssembler, based on the "filename" parameter in the .disk function) and make it run when launching Vice (by whatever hammer used)?
2023-02-08 13:09
chatGPZ

Registered: Dec 2001
Posts: 11108
Quite obviously you'll have to pass the filename to the emulator somehow...

I smell XY problem. Is this a commandline to be used in some IDE or sth like that?
2023-02-08 13:17
Stone

Registered: Oct 2006
Posts: 168
You're already changing the input filename "each time", so why not the output filename as well?

If whatever IDE you're using has some kind of macro facility, you could agree with yourself on some naming convention and make a generic build-and-execute rule like

java -jar KickAss.jar $(InputName).asm -execute "x64sc -autostart $(InputName).d64"
2023-02-08 13:42
TWW

Registered: Jul 2009
Posts: 541
@ GPZ: Yes, I use NP++ and NppExec plugin. Currently this works for autoinjecting .prg files and cartridge files and also to supercpu emulator by choosing the appropriate script when i "F6" to assemble/run. Conveniant. However I ran into this issue with D64 files due to the way KickAss creates the files.

Therefore agreed, it's a question of how to pass the appropriate file name and hence more of a Assembler / IDE issue. Chapter 12.1 of the KA manual illustrates how you can pass command line arguments to the script, but here is the XY smell issue. What i need is a way to export the filename from the source when assembling it.

@ Stone:
Yes, this is how I got it to work by using the assemblers autolaunch command but then I had to have the source name (test.asm) equal to the output name (test.d64) and the filname parameter in the .disk directive as well. In addition (since test.d64 is only a file, no "regular output" was created by the assembler) I had to add a simple .pc = $0801 ; nop thnig just to produce some data. Looked like this was overwritten by the .disk directive and allowed Vice to be started. If I omitted this part, Vice would just open/close as no info was passed. So it was basically a hack and very restrictive.
2023-02-08 14:05
chatGPZ

Registered: Dec 2001
Posts: 11108
So what stone suggested is the solution. Use the Macros your IDE provides. And don't use weird assembler features to name output files, always pass filenames to the assembler from command line.

That said, for a more complex setup with multiple input and output files, use a makefile.
2023-02-08 15:52
Frantic

Registered: Mar 2003
Posts: 1627
Yes, it is good to know how to use makefiles.
2023-02-17 09:49
TWW

Registered: Jul 2009
Posts: 541
This works but you need to save a new script and change the D64 filename for each project (NP++ allows this, no problem):
    java -jar "PATH\KickAss.jar" "$(FULL_CURRENT_PATH)" -showmem
    cmd /c "PATH\x64sc.exe "DISKNAME.d64"" >vice.txt

And you could just use a standard filname across all projects as suggested above.
2023-02-19 02:05
bepp

Registered: Jun 2010
Posts: 263
I can highly recommend Paul Hocker's extension for Visual Studio Code + Kick Assembler.

Not being an expert, it took me 5 mins to set it up. And it will compile and start Vice with a keystroke. It has full intellisense for all the instructions, tooltips for variables etc. Adding breakpoints is very simple and it will launch the C64Debugger and stop in the right place, and then you can step instructions etc.

In my opinion Notepad++ does not excel as a programming editor =)

Check it out!
https://marketplace.visualstudio.com/items?itemName=paulhocker...
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
Didi/Laxity
Ko-Ko
AMB/Level 64
Freeze/Blazon
Paul Bearer
apprentix
MCM/ONSLAUGHT
pcollins/Quantum
Medicus
Gildan Jondal/Suicyc..
Board Rider/Commodor..
A3/AFL
Britelite/Dekadence
Krill/Plush
Guests online: 126
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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