| |
TWW
Registered: Jul 2009 Posts: 514 |
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? |
|
| |
Krill
Registered: Apr 2002 Posts: 2533 |
Just use a different hammer, for once, like the shell.
Something likejava -jar KickAss.jar disktest.asm && x64sc.exe [...] |
| |
TWW
Registered: Jul 2009 Posts: 514 |
Quoting Krilljava -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)? |
| |
Groepaz
Registered: Dec 2001 Posts: 10589 |
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? |
| |
Stone
Registered: Oct 2006 Posts: 158 |
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" |
| |
TWW
Registered: Jul 2009 Posts: 514 |
@ 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. |
| |
Groepaz
Registered: Dec 2001 Posts: 10589 |
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. |
| |
Frantic
Registered: Mar 2003 Posts: 1605 |
Yes, it is good to know how to use makefiles. |
| |
TWW
Registered: Jul 2009 Posts: 514 |
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. |
| |
bepp
Registered: Jun 2010 Posts: 258 |
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... |