Skip to content

Conversation

@glektarssza
Copy link

The current language of the game allows the following types for devices in instructions:

  • Devices (d#)
  • Registers (r#)
  • Device IDs (???)

The current code base does not understand the concept of a device ID at all so I've added a minimal concept of it. It also does not accept a register as a valid input for a device-related instruction despite the in-game documentation saying it's allowed (as a pointer to which device to access).

Screenshot of the in-game documentation showing registers as an acceptable input for devices:

image

Screenshot of the LSP in action inside of the amazing awilliamson/ic10-language-support VSCode extension:

image

@Xandaros
Copy link
Owner

So, let me make sure I understand this. Whenever a device is given, you can now, in addition to d# and dr#, also give it a register containing a device ID, or a device ID directly?
What makes a device ID different from a normal value? Can you give a literal device ID, or is it some kind of opaque type you need to acquire with other instructions?

I haven't really been keeping up with changes to IC10, so if you could point me at an announcement where this was introduced, that would be greatly appreciated.

@glektarssza
Copy link
Author

glektarssza commented Nov 17, 2025

The "direct device ID" capability was part of the last major update (the "Biggest Update Ever" update). See: https://store.steampowered.com/news/app/544550/view/533235259603419415.

To quote the update itself for brevity:

Streamlined Code with Direct Addressing

We've fundamentally streamlined how you reference devices. Previously, to read a variable from a specific device, you often had to load that device's ID into a register and then use a dedicated instruction like ld.

Now, core instructions like l (load), s (store), and all device branching instructions have been upgraded to support Direct Addressing. This means the instruction itself is smart enough to know if you're giving it a register, a device screw (like d0), or a raw Device ID. In short, you can skip the middleman, which makes your code cleaner and more intuitive.

Here's a practical example:

# THE OLD WAY
# You had to use 'ld' after moving the ID into a register.
move r0 123456789  # Move the Reference ID of a switch into r0
ld r1 r0 Open      # Load the 'Open' state

# THE NEW, SIMPLER WAY
# The 'l' instruction now does it all.
# You can use the ID directly, or an alias.
alias myswitch 123456789
l r1 myswitch Open # Load the 'Open' state directly

The device ID needs to be retrieved via a tablet with the configuration cartridge installed is my understanding at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants