Giter Site home page Giter Site logo

Comments (7)

GeorgRottensteiner avatar GeorgRottensteiner commented on June 20, 2024 1

Syntax highlighting and directives would be easy.
You can already configure a "custom" build step, which would call Kick Assembler.

Note that debugging is probably pretty off then, as soon as scripting is added, as that requires C64Studio to know exactly which address maps to which part of the code. Unless KickAss could emit a code mapping file, similar to what Emscripten does.

from c64studio.

GeorgRottensteiner avatar GeorgRottensteiner commented on June 20, 2024 1

Nice! That looks easy enough to read, and also something C64Studio could provide for C64Debugger itself. Thanks!

from c64studio.

GeorgRottensteiner avatar GeorgRottensteiner commented on June 20, 2024

It kinda depends how far the support should reach. The basic syntax is easily doable.
Basically all the extended scripty stuff is nigh on impossible, it would require to re-implement all that; and that usually goes with lots of subtle differences.

from c64studio.

chrisgleissner avatar chrisgleissner commented on June 20, 2024

Would it be possible to perform syntax highlighting for Kick Assembler preprocessor directives (they all start with "#", see http://theweb.dk/KickAssembler/webhelp/content/apas02.html) and assembler directives (they all start with ".", see http://theweb.dk/KickAssembler/webhelp/content/apas04.html) and then add an option in C64 Studio to configure the location of the Kick Assembler executable? This executable would then need to be called when building the assembly via any of the build options in the Build menu.

This will probably leave KickAssembler not as tightly integrated as the other assembly dialects you already support, but it would already be usable and a good alternative to Visual Studio Code and its Kick Assembler extensions.

from c64studio.

chrisgleissner avatar chrisgleissner commented on June 20, 2024

I'll have a look at the "custom" build step that you mentioned to get a feel for the current integration. Debug support is of course quite important, i.e. being able to step through the code line by line and watch the registers and how it affects a simultaneously running Vice.

There is a Visual Studio Code extension which supports a debugger. I am not sure how it's done on a low level, but maybe this very same approach is something that C64 Studio could support as well in order to work around the debug problem that you pointed out, see https://marketplace.visualstudio.com/items?itemName=paulhocker.kick-assembler-vscode-ext#:~:text=Kick%20Assembler%208%2DBit%20Retro%20Studio%20is%20an%20open%2Dsource,using%20the%20awesome%20Kick%20Assembler%20.

I used to do a lot of assembly coding in the early 90s - just getting back into it and comparing IDEs. Ideally I'd want to use a single IDE. Thanks for explaining what's possible and what would be problematic.

from c64studio.

chrisgleissner avatar chrisgleissner commented on June 20, 2024

Hi,

I had another look at how the aforementioned Visual Studio handles Kick Assembler, Vice and C64 Debugger integration.

When you start the compilation run in Visual Studio, it launches Kick Assembler. This generates both the .prg file as well as a debug dump file. The latter corelates the generated bytes and assembly source, see http://theweb.dk/KickAssembler/webhelp/content/cpt_QuickReference.html. This debug dump is then read by the C64Debugger.

Here's an example.

test.asm:

*= $0801
BasicUpstart(main)

*= $0810
main:
.break
		inc $d021
l1:	
		inc cntlo
		bne l1
		inc cnthi
		bne l1
		jmp main
cntlo:	.by 0
cnthi:  .by 0

Assembly run:
java -jar KickAss.jar test.asm -debugdump

Resulting test.dbg file for the C64 Debugger:

Relevant is the Segment section. Start and end (inclusive) byte ranges are in cols 1 and 2, whereas the corresponding source line section is found in cols 4 and 6, respectively.

<C64debugger version="1.0">
   <Sources values="INDEX,FILE">
      0,KickAss.jar:/include/autoinclude.asm
      1,C:\Dev\C64\Tmp\test.asm
   </Sources>

   <Segment name="Default" dest="" values="START,END,FILE_IDX,LINE1,COL1,LINE2,COL2">
      <Block name="Unnamed">
         $0801,$0802,0,38,2,38,6
         $0803,$0804,0,39,5,39,9
         $0805,$0805,0,40,5,40,9
         $0806,$0809,0,41,2,41,6
         $080a,$080a,0,42,2,42,6
         $080b,$080c,0,44,5,44,9
      </Block>
      <Block name="Unnamed">
         $0810,$0812,1,7,3,7,5
         $0813,$0815,1,9,3,9,5
         $0816,$0817,1,10,3,10,5
         $0818,$081a,1,11,3,11,5
         $081b,$081c,1,12,3,12,5
         $081d,$081f,1,13,3,13,5
         $0820,$0820,1,14,8,14,10
         $0821,$0821,1,15,9,15,11
      </Block>
   </Segment>

   <Labels values="SEGMENT,ADDRESS,NAME,START,END,FILE_IDX,LINE1,COL1,LINE2,COL2">
      Default,$0810,main,1,5,1,5,5
      Default,$0813,l1,1,8,1,8,3
      Default,$0820,cntlo,1,14,1,14,6
      Default,$0821,cnthi,1,15,1,15,6
      Default,$080b,upstartEnd,0,43,1,43,11
   </Labels>

   <Breakpoints values="SEGMENT,ADDRESS,ARGUMENT">
      Default,$0810,
   </Breakpoints>

   <Watchpoints values="SEGMENT,ADDRESS1,ADDRESS2,ARGUMENT">
   </Watchpoints>

</C64debugger>

from c64studio.

chrisgleissner avatar chrisgleissner commented on June 20, 2024

Glad it helped. If I can be of any further help with this, please let me know. I am keen to use Kick Assembler both as the Microsoft Visual Studio extension and as part of your excellent C64 Studio since you offer much more tooling around sound and image generation that the Visual Studio approach lacks. So would be really nice being able to open the same .asm files from both.

from c64studio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.