Giter VIP home page Giter VIP logo

ic10emu's Introduction

IC10Emu

An Stationeers IC10 Emulator and code Editor

Complete with an in built LSP running locally in your browser!

Built with ๐Ÿฆ€๐Ÿ•ธ

About

This project is divided into four parts:

๐Ÿšด Usage

Visit https://ryex.github.io/ic10emu/

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

ic10emu's People

Contributors

ryex avatar emilgardis avatar computerdruid avatar

Stargazers

Davide Steduto avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ic10emu's Issues

`s db On 0` not working

repro

Expected:

  • IC should turn off (at next yield, I think)

Actual:

ic encountered an error: Error on line 0:
device has no field 'On'

Feature Request: "Save As" on Ctrl+S (or CMD+S on mac)

When developing scripts in ic10emu, I often want to trigger save before importing into the game. Usually that's to put it in a git repository before running the optimizer on it. (Very important to save before running optimizer -- since the optimized version isn't meant to be edited, I have to save the original somewhere)

So a keyboard shortcut for save would be really handy. It doesn't seem like it would be very hard to do, either with https://stackoverflow.com/questions/4446987/overriding-controls-save-functionality-in-browser or https://stackoverflow.com/questions/31801274/is-there-an-event-for-a-keyboard-initiated-save-in-ace-editor

If no one else picks this up I'll probably eventually spend the time to do it myself, but I figured I'd open an issue instead of just leaving those links open in web browser tabs.

Autocomplete messes up spans

Using autocomplete seems to place the span for replacement wrong, where the last character entered before pressing enter will be put before the completion. undoing the complete makes the wrong selection

image

Recording.2024-03-29.124402.mp4

I've reproduced this in FF and Edge

Suggestion: Add Simulation IC10 to write Read-Only Parameter

Idea: Add a Checkbox to the IC-Housing/Code/Watever can be associated with IC10-Code
To allow it to also write Read-Only Properties.
This way we can write our own "Simulation" of the environment as an extra IC10-Code.

Additionally this Code could also allow to execute more than 128 Lines/have more than 128 Lines.
But this would only be secondary, as we could just add more "simulation Housings".

This, together with the Share-Links, could allow someone to create a predefined environment, in which others could test their own code.
Examples:

A basic Airlock which adds/Subtracts Pressure based on the Vent-"On"/"Mode"-State. (two Vents, a GasSensor and two Doors)
Maybe every x Idle Ticks it could simulate door-Button presses.

A Plant simulation, which counts the time the GrowLight is on/off and simulates the SolarSensor.
Based on "if the Plant would be alive" it could also set the ON-State of a Lamp or such, which could be somewhat easy to see.

Error in Virtual Machin RuntimeError

I tried to use multiple IC10's in the emulator and got the error:

Error in Virtual Machin RuntimeError
unreachable

Other error Behaviour:

  • I can't set the 'Pins' on the new IC-Housing
  • the "Register"-Tab only contains a checkmark (When the new IC10 "SimHousing" is selected)
  • the "Fields"-Tab of the new Housing ("SimHousing") takes very loong to load
  • the IC10-Device Dropdown doesn't always show the new IC (Actually with this share-link it always only shows one device)
  • the "Slots" Tab doesn't even show a "processing-circle" (but may be connected to the "Fields" Tab not loading)
  • Running the Code Throws an:

Error in Virtual Machine Error
ic with id '6' does not exist

To reproduce just open:
https://ic10emu.dev/#H4sIAAAAAAAACu1ZSW_bOBT-K8TzYS4MIHmJE90KpzMJ0MSduGgPlhHQ4rPDiUS6JOUFgf_7gJS3BHYtGU1nMBPwIotvIb-38BP9DNMMomcQiYGo_wwcpyJBiEIKgkNUp6BxLIxF7ebrYUCPjgEFMYEoPKcgEojaFIxlyRNE_RLK7-N9vI__5hhQYKlgBo3rOJxZ9mUxQYjglk2AwpSlOULU74NWKuuhNEoDfYYr35J6E0y82qpBPcNdng1RI4coWFJIlJSYWKHkK-O55DgSEjksl8sB7cOMGYtfUdpyxsPyxgdLCsXvYzvM2PyzRmNyjUDDIPCqEyFdk23QJj3k5CdODHxftn63H7VW2j3g-uEeGe_KdPG7wJRDBJvVLimkQroT4nzpkeHOro8r2caN8CCWxcsN3ISHsYxXCyA7CJAwCNzMruyt4ki8vLFM2yiWC7cS9yIlOth1tTYTSzO2fi7Ytf7SblcS7Z3Fslar1YgRGbnpnHUUx-jHxlOiwxeGYlkjGjM1RTJ2SU3EiEzdlDBESUqUfUQ9EwYJ4zyWBlNMrDOiQ3JWD0grlozz1YJ1GMuMzVe_AlIjXMnfLBkrMsRUzUjg3PUYTxckBiOyGM4c9iRhTmymhUWikfEzJdMF8ZkWua3v2csKAb9_lHwXA_f-L-Ihj6XPkaIkCnLgGEFIQbLMxTxjQgKFicYRGz6sXvaszhOba-wIneTCXqvcCDkGCiZVtjBjFxOfUWqsWZaxYYqdR-HqQyVJPmHSekJSsI-Ri_qxarpiGRujK2cv_mALMZfDW7nAF_8nIbGo7b3i3xyOW53w3CvdsvmfOZNW2MURJ6GX_-whuWbm8Yj4WbvZDC4vmheFXiUnPaWtkONOyow5vvWBb347jawIRcehf4d2pvSTA1mi9SEuQnTFLIOlayF75Q62nHWE1Qw1eL-lwlgetrB-0Ww32u22R-Iev-dCIy_8lcmCHlrrs_J4ChTY0SIhG5vk3z2iDpXAH8xsRNbZf2oMymLYUdkwN_6kKgNEFchb9cuLxnnQXCuuTq8fqtWDws89s0J1mB4qeSXUXPBy1erVrhdcqzGW25DX-CS-54Kf6K5QPtXpnbCn6-Wme8pau_PFCR4_qzTNLStoUBXFryplVqRYouusFaujchoeVZE4AYNCBfk3Zks2G6_Ws8iy8uInYFxhQThCjTLBG15K_gtmE9TMHi_3F82yuWmWO4z7UK_8kFgxXcu8pgquB14J8_SKIhzg4ZVbrD83Pki-Pu6g65gblG25BXkuRT5U8lTyzClYh8jycknj6HIpQuOlu_tLZL_s5EBB7V1z-SO4wskT1i-brUbYfHnyfJxb1JKlFRa30ryRVTV9gb1Jbf067tLalCPKaU9kb0vdz8vylXL0lf5Mkr-n0Cox7-5qryWSN9gqCCyXEb_k46Fqmv7zHxvhqV8VFdpzpW_DoEIrfcPm-OpL6F_XfQbUxc-F8sUdwvZaoUFD2qStAYWJW8WDu7-AqO9eJI9MSkxX_0xsQ7wO0toT3LG71zdd_y-ZQXFVM2J5ah_kunTc1SXzxOqmA1Fr-TdwfQKZ7RkAAA

I Used
Chrome Version 124
(Which should be the current Version)

Error: unknown device ID

image
Error

Error in Virtual Machine Error
ic encountered an error: Error on line 61: unknown device ID '4'

Device with id is present.

Present numbers in hex/oct/binary

I think it should be possible to show registers, stack values and fields in other formats depending on some mechanism. This would help with the upcoming (currently on beta, see Stationeers discord) changes with operators on devices like the logic sorter.

Feature request -> save project as project file

It would be a great feature if you could save the entire project alongside the code.
(code + devices , device configuration...)

Especially if you build somewhat more complex scripts, it would be really nice if you could save and load your working environment with the devices.

  1. with devices
  2. with device configurations (including stack of the IC10)
  3. Emulator State (variables, instruction pointers etc...) (Maybe it would also be helpful for bug reports.)

best regards
Christian

`aliases.keys().forEach is not a function` on live site in firefox

On https://ryex.github.io/ic10emu/ , in the javascript console:

Uncaught TypeError: aliases.keys().forEach is not a function
    update webpack://ic10emu/./src/js/virtual_machine/index.js?:243
    update webpack://ic10emu/./src/js/virtual_machine/index.js?:127
    update webpack://ic10emu/./src/js/virtual_machine/index.js?:89
    updateCode webpack://ic10emu/./src/js/virtual_machine/index.js?:51
    VirtualMachine webpack://ic10emu/./src/js/virtual_machine/index.js?:27
    <anonymous> webpack://ic10emu/./src/js/index.js?:32
    setTimeout handler*docReady webpack://ic10emu/./src/js/index.js?:24
    <anonymous> webpack://ic10emu/./src/js/index.js?:30
    a https://ryex.github.io/ic10emu/main.js:696
    <anonymous> webpack://ic10emu/./src/js/index.js?:1
    js https://ryex.github.io/ic10emu/src_js_index_js.main.js:68
    __webpack_require__ https://ryex.github.io/ic10emu/main.js:633
    promise callback* webpack://ic10emu/./src/js/main.js?:12
    js https://ryex.github.io/ic10emu/main.js:609
    __webpack_require__ https://ryex.github.io/ic10emu/main.js:633
    <anonymous> https://ryex.github.io/ic10emu/main.js:1043
    <anonymous> https://ryex.github.io/ic10emu/main.js:1045

And (presumably relatedly), the editor isn't showing up at all

:)

Good afternoon, I am a developer of a similar project. ic 10.dev
I am watching your project with interest.
If you need data from the game on devices, objects and the rest, with images - you can use my gist.github.com

I also have a question, since I'm using browser javascript, the result of my operations with bits is not the same as in the game
Have you managed to solve this problem?

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.