Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
nielsm
Jun 1, 2009



thehustler posted:

So any resolution will require a major reworking unless I can find space (either a register or another chip or something) to hold the current state. But then it would need to run every tick and not every chip does. Gah!
code:
+ mov 0 acc
+ jmp end
- mov 0 acc
- jmp end
That sequence does the same regardless of the condition flags, you could save some instructions there. And consider if you can't restructure your timeout check so the "jmp end" there is also unnecessary. You can even save the "jmp count" by moving something else around.

Either way, your output-controlling MC also does a lot of unnecessary work, like a "tcp" whose flags result is never significant, and consider if you can't use two registers with "dst" instead of testing the value of one register and then jumping around. If you save enough instructions in your output-controlling MC, you could perhaps add a special command meaning "shut everything off".

Adbot
ADBOT LOVES YOU

thehustler
Apr 17, 2004

I am very curious about this little crescendo
I see that I can save space there. Thanks. I have real trouble unravelling the logic into something clever and always start with a methodical branching system which just eats lines up.

Then I forget to fix it :)

That's some power saved but doesn't solve the problem of where to hold that current state though. I'd have to store it from chip two which has a few lines left...

Ben Nerevarine
Apr 14, 2006

zedprime posted:

It seems reading on the xbus side clears the IO expander's previous xbus input which means you can stick a not gate on the end and make a volatile flipflop that reinitializes after reading. I bet that's useful... somewhere?

VR Buzzer maybe? I've been on a quest to solve it in 2 or maybe even 1 line, I really want to believe it's possible. I've been trying to leverage the PGA and so far it's been a journey to nowhere, but that tip there gives me an idea.

nielsm
Jun 1, 2009



thehustler posted:

I see that I can save space there. Thanks. I have real trouble unravelling the logic into something clever and always start with a methodical branching system which just eats lines up.

Then I forget to fix it :)

That's some power saved but doesn't solve the problem of where to hold that current state though. I'd have to store it from chip two which has a few lines left...

You're way overthinking it. You need one bitfield worth of state (the current outputs) and one register of temporary storage (for the first value arriving from input reader MC).

Here's a very useful sequence for that second MC: mov x0 dat; dst x0 dat; mov acc x3 - you can keep the current outputs state in acc all the time, you never need to use it as temporary storage for anything. And you don't need any conditionals unless you add an extra "command" to that MC, to reset all.

nielsm fucked around with this message at 19:07 on Dec 4, 2016

thehustler
Apr 17, 2004

I am very curious about this little crescendo
:aaa:

That's insane. I get so hung up on bringing in a variable and doing conditionals that I never see an opportunity to just skip that step.

thehustler
Apr 17, 2004

I am very curious about this little crescendo

nielsm posted:

Either way, your output-controlling MC also does a lot of unnecessary work, like a "tcp" whose flags result is never significant, and consider if you can't use two registers with "dst" instead of testing the value of one register and then jumping around. If you save enough instructions in your output-controlling MC, you could perhaps add a special command meaning "shut everything off".

Yeah, understood. I managed to rework it and it wasn't too big a hint. With these things you're usually half way there already.

thehustler
Apr 17, 2004

I am very curious about this little crescendo
Wow. Considering how hard some of the other puzzles are around it Carbine Target Illuminator was piss easy. It's odd.

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS

thehustler posted:

Wow. Considering how hard some of the other puzzles are around it Carbine Target Illuminator was piss easy. It's odd.
Yeah that one seems pretty out of place to me though my solution still has room for improvement.

I keep optimizing puzzles as goons talk about them and got remote kill switch down to 188 for best power, 9 lines for line count. (Someone got 7 :drat:)

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
I think it's different for everyone, some of the "hard" puzzles like original sandwich maker i found easy, but i only just realised how to do infrared sensor after the updates

thehustler
Apr 17, 2004

I am very curious about this little crescendo
Ugh bitcoin ATM is kicking my arse. I have an MC6000 to count the money and store it in acc (runs every tick though) and an MC6000 to read the card number and store it in RAM.

I need to get this all synced up so that the -1 can get all the info and send it on to the 3rd chip which can send the data, but I'm not sure how to trigger that. If the I/O expander was blocking and only read inputs I think it'd work fine but nope.

zedprime
Jun 9, 2007

yospos
By the time you use RAM, you might as well put everything that needs communicated into it and then a simple memory read program can be triggered by a slx (or embedded in a controller you're already using, reading memory of arbitrary length is like 3 or 4 lines of code?) and do the shuffle out of RAM and into the output.

thehustler
Apr 17, 2004

I am very curious about this little crescendo

zedprime posted:

By the time you use RAM, you might as well put everything that needs communicated into it and then a simple memory read program can be triggered by a slx (or embedded in a controller you're already using, reading memory of arbitrary length is like 3 or 4 lines of code?) and do the shuffle out of RAM and into the output.

Yeah that was my plan but I ran out of room. My counting chip could send an update of the count each tick to the mag stripe reader and then after a -1 is sent it could write it to ram and minuses itself from itself? But that would need an extra register and I use acc already for the card reader loop.

Or it could read an updated count every tick from another chip and send it directly to its slot in RAM... hmm. An extra MC just to get another register is a bitter pill to swallow though.

thehustler
Apr 17, 2004

I am very curious about this little crescendo
No wait I can just read the count each tick in the mag stripe chip I think I have room. The counter is doing the addition already. Ok that's my plan for tomorrow

zedprime
Jun 9, 2007

yospos
Without giving too much away, the most useful feature of RAM is reading the pointer address because it increments on every read or write. In other words its an incremental register if you have the spare ports to connect to the address port.

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS
Man I wanna know how the hell people have under 150 on remote kill switch. I did find the 7 instruction solution but drat, must be a trick I'm missing.

thehustler
Apr 17, 2004

I am very curious about this little crescendo

zedprime posted:

Without giving too much away, the most useful feature of RAM is reading the pointer address because it increments on every read or write. In other words its an incremental register if you have the spare ports to connect to the address port.

Can I connect two things to the same side of a RAM chip? Already got my packet sender connected on the other side. I guess I'll have issues with my SLXs if I do.

Gah this is the same with every puzzle, always so close to doing it but frustratingly far away.

thehustler fucked around with this message at 12:17 on Dec 7, 2016

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
You can totally connect two things to the same side of a memory chip, you just have to be careful that they don't step on each other's toes (since they'll be sharing the address pointer on their side of the memory chip)

And as you've noted, you can't really "double up" and use that same connection for communicating between the two chips.

Guy Axlerod
Dec 29, 2008
I was so frustrated when I realized the Printer puzzle needs to handle the print head going backwards.

GuavaMoment
Aug 13, 2006

YouTube dude

Guy Axlerod posted:

I was so frustrated when I realized the Printer puzzle needs to handle the print head going backwards.

I solved that one by looking at the save file of someone who did beat it just to see what they put in a ROM. Knowing just that was enough to figure it out for myself. And like everything it seemed obvious in retrospect.

Elos
Jan 8, 2009

I did all but the last puzzle right after launch and took a break. Today re-ran my designs and pretty much everything had scores in the middle or better and I didn't even have to redo the card reader one because I'm not a dirty cheater. But then I found this spaghetti masterpiece:



I tried making a better one and welp. Either I'm rusty because of the break or this puzzle is incompatible with my brain because I'm having real trouble with this. I know it's easy and I kinda know what I should do but somehow it's really loving hard. I love this game.

thehustler
Apr 17, 2004

I am very curious about this little crescendo
Gah, still cant do the bitcoin ATM. Nothing syncs up right. I think I need to possibly rethink the loops/timing logic for it all.It's so frustrating since each individual chip seems to do its own task just fine.

I did go back and change the loops/logic for a bunch of earlier levels though and improved a ton :dance:

RGCrab
Aug 23, 2012

Elos posted:

I did all but the last puzzle right after launch and took a break. Today re-ran my designs and pretty much everything had scores in the middle or better and I didn't even have to redo the card reader one because I'm not a dirty cheater. But then I found this spaghetti masterpiece:



I tried making a better one and welp. Either I'm rusty because of the break or this puzzle is incompatible with my brain because I'm having real trouble with this. I know it's easy and I kinda know what I should do but somehow it's really loving hard. I love this game.

I've actually been working through the bonus campaign and finding a number of the puzzles very easy, but for some reason I was never able to make a working solution to that drat scale. I sometimes will open it and stare at it for a while, stick a few parts on... and get absolutely nowhere. It is kind of hilarious since a lot of the harder ones I looked at the specs and was able to write all the code in my head.

thehustler
Apr 17, 2004

I am very curious about this little crescendo
I feel that the fact that 400/50 = 8 is useful in the pollution sensing window puzzle, but I don't know why. I know I will have to use RAM to hold the last 8 values and then have an MC to loop through and do some kind of sum, but I'm not sure exactly WHAT sum I need to do to determine the value.

I fear I may have hit my limit. Meat Printer was so very easy as well :(

homeless snail
Mar 14, 2007

thehustler posted:

I feel that the fact that 400/50 = 8 is useful in the pollution sensing window puzzle, but I don't know why. I know I will have to use RAM to hold the last 8 values and then have an MC to loop through and do some kind of sum, but I'm not sure exactly WHAT sum I need to do to determine the value.

I fear I may have hit my limit. Meat Printer was so very easy as well :(
What if I told you, that you didn't need RAM at all.

thehustler
Apr 17, 2004

I am very curious about this little crescendo

homeless snail posted:

What if I told you, that you didn't need RAM at all.

Ok so we're looking at a running count in a register of a chip then

nielsm
Jun 1, 2009



homeless snail posted:

What if I told you, that you didn't need RAM at all.

You'd still need a delay line at least?

thehustler
Apr 17, 2004

I am very curious about this little crescendo
If I remember the first number in the last 8 with a pointer on one side of RAM I can subtract it later and add the latest value to the end of the chain. Is that the sliding window thing mentioned previously? The other side of RAM can be offset before reading for the size of the range to check?

thehustler
Apr 17, 2004

I am very curious about this little crescendo
(And then I see some simple transposition shows that I can check for a sum > 399 each tick. Neat.)

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS

homeless snail posted:

What if I told you, that you didn't need RAM at all.
uhh....uhh....really? Are you using a bunch of MCs instead? I'm intrigued... Each round is only 2 bits of information, but I think you need at least 14 bits of buffer which is a lot for just MCs.

I assume llamadeus is someone here, they actually crushed everyone on my list on this one recently. I was able to improve mine to get ahead of the pack but I'm nowhere near him.

Jeffrey of YOSPOS fucked around with this message at 21:20 on Dec 11, 2016

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS
e: quote is not edit

Llamadeus
Dec 20, 2005

Jeffrey of YOSPOS posted:

uhh....uhh....really? Are you using a bunch of MCs instead? I'm intrigued... Each round is only 2 bits of information, but I think you need at least 14 bits of buffer which is a lot for just MCs.

I assume llamadeus is someone here, they actually crushed everyone on my list on this one recently. I was able to improve mine to get ahead of the pack but I'm nowhere near him.
It's me! This is literally my one solution that sits untied at the top of any of my scoreboards.

thehustler
Apr 17, 2004

I am very curious about this little crescendo
http://imgur.com/a/25G8t

So close I can almost smell it.

Problem: I need to trigger the last chip somehow so that it can read and output the data, but it has to do it in sequence after the keypad receives the -1 but also after the current money total has been sent to RAM. Therefore I think that I need to trigger the sending from the counting chip.

Except there's no pins left. Or space, really. What can I do here? I feel I'm so close so I want to make this solution work and then go back to improve it.

GuavaMoment
Aug 13, 2006

YouTube dude

thehustler posted:

http://imgur.com/a/25G8t

So close I can almost smell it.

Problem: I need to trigger the last chip somehow so that it can read and output the data, but it has to do it in sequence after the keypad receives the -1 but also after the current money total has been sent to RAM. Therefore I think that I need to trigger the sending from the counting chip.

Except there's no pins left. Or space, really. What can I do here? I feel I'm so close so I want to make this solution work and then go back to improve it.

As far as space goes: you're checking dat against all three inputs (001, 010, and 100) in that middle chip. Any way you can do it all at once with one check?

tcp dat 10
add 20
-add 30
+add 80

thehustler
Apr 17, 2004

I am very curious about this little crescendo
poo poo, yes! Because before I was sending a command into that pin as well so I needed to explicitly check for them all. But now I don't need to!

Still short on board space but that gives me code space to work with. Does that handle the zero values between money inputs as well? You're doing some maths there to compensate I think.nope i see why you did it. The unsigned command always runs.

Anyway, no, it doesn't handle zero values and adding a check for that would take up lines again. :(

thehustler fucked around with this message at 23:54 on Dec 12, 2016

thehustler
Apr 17, 2004

I am very curious about this little crescendo
I moved some things around and now it works great!

http://imgur.com/a/Zu5dw

Managed to do a sneaky send/receive in the card reader chip to send the value, saving me an xbus chip to initiate the sending process.

The ocean sensor grid looks very doable. I already have some values going to RAM and I think the sliding window trick I learnt in this thread will help to read those values. Only caveat is that it wants the current one as well but the values get written so early in the step that I don't think that's an issue.

Edit: indeed it isn't. My pointer is at the right place and ready to go in each RAM chip. Now to see if I can implement a read/send function in a single MC6000

Edit 2: ahahah massively ran out of lines. OK. this is pretty tough...

thehustler fucked around with this message at 01:10 on Dec 13, 2016

Sillybones
Aug 10, 2013

go away,
spooky skeleton,
go away
My Aquaponics solution:


Had many solutions for this but all ended up one line short because of resetting to 50 on p1. Feels good to find a solution in these pieces. No idea how someone did it for less than this.

Dieting Hippo
Jan 5, 2006

THIS IS NOT A PROPER DIET FOR A HIPPO
i started a chatroom on SynIRC for talk about cheap virtual electronics chat, join #goontronics and talk about how slx is the worst instruction ever.

Guy Axlerod
Dec 29, 2008
Finished the last puzzle. I generally got frustrated and gave up on the last puzzle in previous games.

thehustler
Apr 17, 2004

I am very curious about this little crescendo
It seems that on some puzzles where you use RAM you can replace using ACC in a loop as a counter with a simple conditional on the address line. That way you need no add 1 and you save a bit of power. Also you gain ACC back.

Annoyingly I can't seem to get this working on every puzzle I try it with. Seems to be depending on whether I also need to do something with that number. Should I be able to use similar tricks with every puzzle involving RAM?

Adbot
ADBOT LOVES YOU

thehustler
Apr 17, 2004

I am very curious about this little crescendo
In fact is there a repository of standard and useful code fragments that you can incorporate into your designs?

  • Locked thread