Jump to content
  • 0
Sign in to follow this  
Yazwho

Embedding the emulator in another application.

Question

I know a few folks have a lot of experience with the emulator code.

Has anyone using Windows managed to wrap it in a way that it can be called by a language like C#? Is the source amenable to that? (Abstractions that could make life easier?)

Specifically I want to experiment with various functions within the X16 itself, but not have to build a UI in it as its considerably easier to do so in C# or other similar languages.

If the emulator is wrapped so that the memory and state can be accessed and changed while it is running, it would yield a powerful way to experiment and develop ideas quickly.

As I feel this will be asked; "but why don't you do this in C" : I don't know C, and the time it would take to learn makes this option redundant. If those who do know C and the emulator think its a easy enough task to turn it into a .dll, then I'll give it a stab. However, if they think it would be a huge lift, then I'll try another approach!

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi,

I am not sure but.
1. Is the code of the emulator not on github, so you can do with it what you want?
2. I think it exists in 2 flavours, C and javascript.

Also, the Web version of it could also "easily" be wrapped into a electron application I think.

Code is here: https://github.com/commanderx16/x16-emulator

Of course read the license agreement and stuff.  The people making the emulator have put quite some time into it I can imagine, I am not sure if they want it branched of into other projects, or if they are cool with that, I think there are some commodore IP's involved there as well for the roms.

/CKs



 

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
52 minutes ago, CursorKeys said:

Also, the Web version of it could also "easily" be wrapped into a electron application I think.

I completely forgot there was a web version. Genius!

 

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, CursorKeys said:

2. I think it exists in 2 flavours, C and javascript.

It's just one source "flavor": C. It can be compiled to different platforms, including WebAssembly, which is how the web version works.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

While the code is on github and is licensed in a way that it would support other flavors of deployment, the team Does Not Like(TM) discussions of alternatives deployments / configurations on this forum. They have licensed it in a way that permits such things, but this forum is not the place for such discussions (as I was told after innocently engaging in similar discussions).

The FAQ in theory covers it, though I think it should be made more explicit. Regardless, consider yourself warned (by someone who has no authority, just experience with the eventual outcome).

In a more generic light: Do not assume that just because code is available on github that it is licensed in such a way that you can do other things with it. There are many licenses in the world, and publicly available code does not mean it is free to use for whatever purpose.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, SlithyMatt said:

It's just one source "flavor": C. It can be compiled to different platforms, including WebAssembly, which is how the web version works.

Wow. I should have known that, but it's new to me.  So C can be compiled to WebAssembly (which is basically Javascript, but optimized), that is pretty nifty. I did not know there was any decent support for that.   What is the cross compiler being used?

 

Share this post


Link to post
Share on other sites
  • 0
2 minutes ago, CursorKeys said:

Wow. I should have known that, but it's new to me.  So C can be compiled to WebAssembly (which is basically Javascript, but optimized), that is pretty nifty. I did not know there was any decent support for that.   What is the cross compiler being used?

 

Probably emscripten: https://emscripten.org/

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
2 minutes ago, CursorKeys said:

What is the cross compiler being used?

There is pretty much only one compiler used for WebAssembly, which is clang, which compiled to LLVM and then Emcripten can take LLVM and make it either WebAssembly (which is not actually JavaScript, but a virtual machine code implemented by all modern browsers) or asm.js (which is a virtual machine implemented in actual JavaScript).

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Please review our Terms of Use