![]() ![]() While describing this architecture, I made the executive decision to reduce three instructions: "end", "uradar", "noop".Īny "end" is equivalent "set 0", "uradar" can be mapped back and forth to "radar" with instead of the turret (while this usage won't work in Mindustry, it fits more info into radar), and "noop" is equivalent to "op" with an invalid argument.Īll opcodes that don't end in a byte-divisible value must be padded with data.įor the sake of forwards compatibility with additional instructions AND comments, any metadata starting with 1 will imply a 4bit counter immediately leading it describing how many variables are expected after it. MISA has 16 instructions with configurable parameters. If there is a 1 after a senseable enum, it is writable. Example: "pulverizer4"ġ1111111 | 11 100011 | 0111 0000 | 00000011Įnum mappings to names are written in the end of this file (with their prefix removed). This is what a block link's structure is. This is what a string literal's structure is. These would be regular mlog decimals (IEEE754 double-precision), strings (followed by 6 bits encoding length), and integers such as 0xFEDCBA9876543210. All senseables, other enums must be appended to the list below after also defined 3 header variables to convey constant values. The following enums were appended to the end of the list generated by, in the following order to successfully map mlog to mISA. However, redefining these can only do so much, due to how fluid Mindustry's code is. The third element in this list is what I mapped these enums to (with their prefix removed).Ġ00000011 - null - undefined - (constant IEEE754 number header)ġ11111101 - undefined - (string literal header)ġ11111110 - undefined - (constant 64-bit integer header)ġ11111111 - undefined - (constant block link header) Any undefined enums must preserve their value via getting their ID from (at build 123, also that class is private - make it public manually and read it). There are also 512 potential enums and constants defined. This isn't to say that you *can't* use more than 512 registers at once: just that this is the minimal amount for ALL code to be valid, and code using more registers can be optimized to ≤512. To use all 512 registers, say, as individually addressable RAM, you would *really* be storing 511, and with that using up 511*2 4 = 1026 instructions, which is just over the limit of 1000 and thus perfectly legal no matter what code is stuffed into an instruction. ![]() The reason for this is the maximum amount of instructions you can store in-game is 1000. There must be 512 unique, user-addressable registers (aka logic variables) in any processor executing this ISA. This means that the variable 1000110111 can be equally interpreted as the user register 567, or the enum - the latter behavior is advised due to the nature of enums. User-addressable registers have a prefix of 0, while enums and constants have a reserved prefix of 1. Every U 000A "\n" (newline) must be interpreted as 2 characters "\" and "n", regardless of line ending and even if "\n" represents one UTF-8 character (which it does). This will also be a good target architecture for any compilers, and a decent ISA for message block (blocks containing up to 220 characters) outputs.Īs I (router) am unable to describe the hardware's exact requirements to run such code due to lack of experience with hardware engineering, I will define the minimum criteria for interpreting mISA here.Įvery variable is 10-bit, or in the case of string literals, 16-bit long for just the header followed by up to 34 (maxTokenLength-2) UTF-8 characters. This document describes an ISA capable of being translated into mlog interpretable code. Basically "if enemies are present, go to "point a", once every unit is at point a turn the switch off until no enemies remain and repeat", so it pulls the unit away from harm's way in the beginning of each wave, but still lets them rebuild/repair after regrouping.The Mindustry Logic ISA (mISA, "miss-uh") Manual Honestly, solution for OP would be a switch that makes all specified units to gather at and/or a radar check for enemies maybe. Originally posted by TheNightglow:yea i wish there was a unit control command option for 'Default Behaviour' in the processors, that would make a lot of things vastly easierYou can just use switch and check if it's disabled then jump to the end instruction immediatly, this should return to the default behavior. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |