X16 Web IDE Project

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
Tmp2k
Posts: 13
Joined: Sun Apr 26, 2020 8:10 pm

X16 Web IDE Project

Post by Tmp2k »


I've really not been paying attention, I completely missed r37, and the evolution of this website/forum, but I'll try and be a bit more useful going forwards ? 



I've added r38 to https://x16.tmp2k.com 



What's a web IDE?

I started this project last year when I discovered WASM (thanks to sebastianvog). Most of the original GUI was pushed back into the main X16 Emulator repo but I carried on at a tangent with some of my own ideas.

https://github.com/Tmp2k/x16wide is a simple Web IDE that allows you to develop BASIC programs from any device with internet access and run them on a web-based emulator. You can also share them with a single click (no signup needed). I've also added a virtual PETSCII keyboard.  By pressing alt, you can see the PETSCII chars on screen and you can either type, or click the keys ...and that's about as far as I got.

I want to add an assembler/compiler to allow people to create PRGs in assembly/c/etc. or even just the ability to load PRGs externally, or from the X16 repo/app-store when that comes along. I have a plan on how to acheve this.

The project is open source and I'd welcome any help, there's a road-map on the github page.

Here's an example of a BASIC program using PETSCII ->  x16.io/petscii

 

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

X16 Web IDE Project

Post by StephenHorn »


Question: Why not submit the changes as PRs to @SebastianVoges's web emulator project, which seems quite similar?

https://www.commanderx16.com/emulator/x16emu.html

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
Tmp2k
Posts: 13
Joined: Sun Apr 26, 2020 8:10 pm

X16 Web IDE Project

Post by Tmp2k »


I did, that's why it seems so similar, I wrote the GUI for it.  But an IDE is a differnt thing altogether. The IDE is a much more complicated setup, it uses frameworks, build tools, node packages, a database etc etc.  It wouldn't make sense to include all this in the main Commader X16 repo, it's a project in itself. 

SebastianVoges
Posts: 33
Joined: Tue Apr 28, 2020 9:14 pm

X16 Web IDE Project

Post by SebastianVoges »


What I have started working on is to have an additional web-assembly library target in the main emulator project. it will produce the webassembly binaries and a core js interface for low-level interactions with the emulator. it won't generate any html/css files. It's meant to be consumed by more complex projects as @Tmp2k is mentioning. The core library would stay vanilla-js with no framework dependencies other than the emscripten compiler. As a proof of concept I am building an Angular web app  which uses the library.  Not sure when this is landing, but hopefully soonish. 

Having said that, i think there are still many features that can and hopefully will be added to the core web emulator, and that should/will be part the main x16emulator repo. or possibly there could be another project under the umbrella of the main x16 repo for a full featured web emulator. I think having it there would probably mean more contributors than forking off. But of course anyone can do how they please through the power of open source ?

Cheers, looking forward seeing x16wide evolve....

Tmp2k
Posts: 13
Joined: Sun Apr 26, 2020 8:10 pm

X16 Web IDE Project

Post by Tmp2k »


I like the idea of the JS interface. I've been playing around with the code Emscripten generates but it seems very unwieldy. 

The main thing I was trying to do was launch/destroy specific WASM binarys on the fly using a simple method with a few params. This would allow you to choose what version of the emulator/rom to run. Meaning that code shared with version X would continue to run when later versions are released. Obviously this would also extend to starting/stopping/inputting data etc

Then if you could load different binaries, you could also load an assembler, have that output a file, use the Emscripten API to transfer that to local storage, then load the emulator with the file etc. 

I found it very difficult to have more than one WASM binary on page, even if only one is running at a time, although it was quite a while ago now I can't remember what the issue was. 

The JS interface you're working on, is the latest version just on the main repo or have you forked your own copy? I'd be happy to help, or if you've already got it up and running/documented I could incorporate it in to the IDE and use it in anger to see how it works out. 

 

 

Post Reply