Swoffa / SublimeKickAssemblerC64

Sublime Package for C64 development with Kick Assembler.
47 stars 15 forks source link

A way to specify the "main" project file to be compiled regardless of active file #51

Closed og2t closed 5 years ago

og2t commented 5 years ago

Hi Swoffa,

I am not sure if this has been addressed already – the case is that I like to have multiple .asm files per one intro/demopart (e.g. main.asm, assets.asm, tables.asm etc.)

Is there a way to specify a "main" file (in this case main.asm) that will always get compiled no matter which file is actually active in Sublime? Very often I am tweaking some values in tables.asm and that file would be compiled when F7 is pressed, which doesn't make much sense.

Thanks! Digger/ESM

Swoffa commented 5 years ago

Yes, there is.

If you use Build Startup (Super+Shift+B / Ctrl+Shift+B), Build and Run Startup (F5) or Build and Debug Startup (Shift+F5) the file Startup.asm will get compiled regardless of which file is currently active in sublime. The name Startup is configurable thru the kickass_startup_file_path setting. The startup-file needs to be in the same folder as the currently active file, but configuration for this is coming (#38).

Maybe confusing that the term startup is used, should probably be the term main.

og2t commented 5 years ago

Ah yes, that's what startup means, I thought it was something to do with // @kickass-build "file-to-run": "filename.prg". What is this one doing?

Also, would it be possible to configure the kickass_startup_file_path per project in any way? Just want to avoid tons of startup.prg files ;-)

Tack!

Swoffa commented 5 years ago

Also, would it be possible to configure the kickass_startup_file_path per project in any way? Just want to avoid tons of startup.prg files ;-)

Thats what PR #38 is all about, to configure where to find the startup file of you have many folders. Will try to finish it soon.

Ah yes, that's what startup means, I thought it was something to do with // @kickass-build "file-to-run": "filename.prg". What is this one doing?

The file-to-run annotation is a way to tell the build system which prg to start, if several are created (using Kick Assembler segments):

// @kickass-build "file-to-run": "StartupSegment.prg"

.segment Startup [outPrg="StartupSegment.prg"]
:BasicUpstart2(startup)
startup:
inc $d020
jmp *-3

.segment Another [outPrg="AnotherSegment.prg"]
:BasicUpstart2(another)
another:
inc $d021
jmp *-3
BacchusFLT commented 5 years ago

Digger,

Isn't this more a KickAssembler question?

There are many ways;

Taking my own recent example of a make.bat:

java -jar %c64%"\tools\KickAssembler\KickAss.jar" "main.asm"

"%c64%/cld" -x -oIntro\main-pack.prg -Xjmp=0x0804,load=0x4000,sysless -v "intro\main-runnable.prg"

java -jar %c64%"\tools\KickAssembler\KickAss.jar" "intro\goldenintro.asm"

"%c64%/exomizer.exe" sfx $1800 -B -x1 "intro\mainintro.prg" -o "crunched\main-game.prg"

java -jar %c64%"\tools\KickAssembler\KickAss.jar" "buildd64.asm"

This piece

/Pontus Berg Bergatrollet AB CEO & Owner Tel/SMS: +46 735 082860 Skype: BacchusBerg Hangout: pontus.bergatrollet@gmail.com www.bergatrollet.se

Den ons 16 jan. 2019 kl 22:42 skrev Tomek Augustyn <notifications@github.com

:

Hi Swoffa,

I am not sure if this has been addressed already – the case is I usually have multiple .asm files per one intro/demopart (e.g. main.asm, assets.asm, tables.asm etc.) Is there a way to specify a "main" file (in this case `main.asm) that will always get compiled no matter which file is actually active in Sublime?

Digger/ESM

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Swoffa/SublimeKickAssemblerC64/issues/51, or mute the thread https://github.com/notifications/unsubscribe-auth/AbNsys5ikDyqTPMhhkXyzE8YYNH8Jh9jks5vD5zhgaJpZM4aEA1o .

og2t commented 5 years ago

Thanks Bacchus. Yeah, I am using #import a lot, I've sorted it out with F5 and custom kickass_startup_file_path setting for the main file.

When you do F8 with custom make file, does it still execute default_pretbuild_path/default_postbuild_path scripts?

BacchusFLT commented 5 years ago

F8 runs make.bat. The bat file must contain an asm file that builds the d64. F8 doesn't do any d64 by itself.

On Fri, 18 Jan 2019, 09:51 Tomek Augustyn <notifications@github.com wrote:

Thanks Bacchus. Yeah, I am using #import a lot, I've sorted it out with F5 and custom kickass_startup_file_path setting for the main file.

Your stuff runs as default_pretbuild_path/default_postbuild_path I assume?

Is F8 used to compile to .d64 then?

It would be good to add these PR manuals to the README at once, there's a lot of undocumented features ;-)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Swoffa/SublimeKickAssemblerC64/issues/51#issuecomment-455471439, or mute the thread https://github.com/notifications/unsubscribe-auth/AbNsyqS9YYRWu9iGwiZJw6cPB4HGb3DZks5vEYsogaJpZM4aEA1o .

BacchusFLT commented 5 years ago

Tomek,

To qualify the answer.

I posted the make.bat so show what I ran using F8. The last line assemblers "build d64.asm" .. When I did Count Duckula last week, that file contains this:

.disk [filename = "release\count duckula.d64", name = "COUNT DUCKULA", id ="FLT"] { [name ="CT.DUCKULA+5/FLT", type="prg", prgFiles = "crunched\main-game.prg"], [name ="CT.DUCKULA DOCS ", type="prg", prgFiles = "Crunched\docs.prg"], [name ="CT.DUCKULA PIC ", type="prg", prgFiles = "Crunched\picview.prg"],

[name = @"\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0", type="del"], [name = @"\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0", type="del"], [name = @"\$d5\$c3\$c4\$c5\$c5\$c9\$d5\$c5\$c9\$d5\$c3\$c4\$c5\$c5\$c4\$c9", type="del"], [name = @"\$ca\$c9\$ac\$c6\$d2\$cb\$c2\$20\$c7\$c7\$20\$20\$20\$af\$d2\$cb", type="del"], [name = @"\$a4\$c8\$c8\$a4\$a4\$a4\$c7\$20\$a5\$ca\$c4\$b7\$a5\$c7\$a4\$a4", type="del"], [name = @"\$d5\$cb\$ad\$c4\$c9\$af\$a5\$a7\$af\$af\$af\$af\$d4\$c2\$af\$af", type="del"], [name = @"\$ca\$ae\$b0\$c6\$cb\$b9\$a5\$c8\$b9\$b9\$b9\$b9\$a5\$aa\$b9\$b9", type="del"], [name = @"\$a2\$c7\$c8\$a2\$a2\$aa\$20\$c2\$af\$d2\$c6\$c9\$a5\$20\$a5\$a2", type="del"], [name = @"\$a2\$d4\$d9\$a2\$a2\$c8\$20\$b7\$20\$20\$20\$c8\$c7\$20\$c7\$a2", type="del"], [name = @"\$b8\$ca\$cb\$b8\$b8\$ca\$c3\$c4\$c5\$c4\$c3\$cb\$ca\$c6\$cb\$b8", type="del"], [name = @"\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0\$c0", type="del"], }

Again, this is purely a Kick Assembler question. Sublime allows to to edit the file and Simon's "glue" gives you access to the function (F8) that runs a named bat file. You need to define that make file of course, so this is merely saving you running it via shell och clicking it.

/Pontus Berg Bergatrollet AB CEO & Owner Tel/SMS: +46 735 082860 Skype: BacchusBerg Hangout: pontus.bergatrollet@gmail.com www.bergatrollet.se

Den fre 18 jan. 2019 kl 09:51 skrev Tomek Augustyn <notifications@github.com

:

Thanks Bacchus. Yeah, I am using #import a lot, I've sorted it out with F5 and custom kickass_startup_file_path setting for the main file.

Your stuff runs as default_pretbuild_path/default_postbuild_path I assume?

Is F8 used to compile to .d64 then?

It would be good to add these PR manuals to the README at once, there's a lot of undocumented features ;-)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Swoffa/SublimeKickAssemblerC64/issues/51#issuecomment-455471439, or mute the thread https://github.com/notifications/unsubscribe-auth/AbNsyqS9YYRWu9iGwiZJw6cPB4HGb3DZks5vEYsogaJpZM4aEA1o .