Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I'm gussing you are refering to trying to read the little widget with the Max Ammo count? If you are getting a Not Sleeping error it means you are looping forever with no SLP command. Note that many devices that have XBus pins (other than the Controlers) are concidered to be always ready, so using the SLX instruction on a port connected to one of these devices will always fail to sleep (basicly same as a SLP 0).
TEQ X1 0
as long as the other side is explicitly sending data which may or may not be zero.
But now I'm stuck on how to integrate x-bus signals into conditional instructions within a larger set of commands- if i enter a 'slx' line the whole thing will be on hold until it reads a signal. I'm trying to come up with an instruction (or combination of instructions) that will do a thing if it reads an xbus signal, and carry on with the rest of the lines it if doesn't.
right now i'm stuck with the x-signal ALWAYS giving a signal to be read, and merely changing that signal from like, a 1 to a 2 to give a different result, but that seems to eat up a lot of power, so I'd be open to suggestions in case anyone has come up with a more power- and line- efficient solution.
here's how I solved the laser tag project - using always-on xbus pins as toggles got the job done, but the terrible score this solution gave me (pretty much bottom of the barrel on all accounts) suggests this is far more convoluted than it should be. If anybody has any tips, I'm all ears!
In the upper left, your first controler tracks the 'alive' state in the Acc (0 or 100), then tests Acc and sends a token to the next controler (1 or 3). That controler looks at the token and reconstructs the value to send to the Alive pin (0 or 100 again). Why not just do an unconditonal Mov Acc X1?
The upper right controler, its only job is to combine and pass on the values of Reload and MaxAmmo to the next controler. but that controler has plenty of pins, why not just connect them directly? The code in the second controler does not even need to change much...
tgt p0 0
+mov x0 acc