SHENZHEN I/O

SHENZHEN I/O

View Stats:
Inari Oct 10, 2016 @ 4:32am
Fake Security Camera - Single MC4000?
How would you code a single MC4000 to beat the first level if you could connect it to both pins?
< >
Showing 1-13 of 13 comments
furrykef Oct 10, 2016 @ 4:40am 
Since the two signals don't have the same period, I doubt it can even be done.
Inari Oct 10, 2016 @ 4:57am 
Originally posted by furrykef:
Since the two signals don't have the same period, I doubt it can even be done.

Yeah, I thought it might be easy but then realised it is not xD
SL7205 Oct 10, 2016 @ 6:31am 
I believe both of the MC4000 are on seperate boards, so that's impossible, not sure if bridge can goes across boards or not but technically since connecting one trace to 2 I/O pins will throw an error "connected to self" I doubt that's possible.
Inari Oct 10, 2016 @ 6:32am 
Originally posted by lsirawit24:
I believe both of the MC4000 are on seperate boards, so that's impossible, not sure if bridge can goes across boards or not but technically since connecting one trace to 2 I/O pins will throw an error "connected to self" I doubt that's possible.

Hence "if you could connect" :P
Zelgadis Oct 10, 2016 @ 6:33am 
The top signal has a period of 12 and the bottom signal a period of 8, so at 24 cycles they are in the same phase as at 0 cycles. Using a single MC4000 you wouldn't have enough instructions to work with, but maybe it would fit in a single MC6000, or a single MC4000 + a ROM.
Inari Oct 10, 2016 @ 6:34am 
Originally posted by Zelgadis:
The top signal has a period of 12 and the bottom signal a period of 8, so at 24 cycles they are in the same phase as at 0 cycles. Using a single MC4000 you wouldn't have enough instructions to work with, but maybe it would fit in a single MC6000, or a single MC4000 + a ROM.

Yeah but not enough room to fit a MC 6000. Could fit a ROM though
Inari Oct 10, 2016 @ 6:42am 
Would be pretty hard even with that though ^^
Inari Oct 10, 2016 @ 7:43am 
http://akari.in/pinky_bCrHS Mwahahahaha!

Thanks to the assistance of Zelgadis I managed to do it with ROM+MC4000 \o/

I guess that one will be removed though XD Oh well. Wanted to test if it would work, and it does. I already reported the bug anyway~
Inari Oct 10, 2016 @ 7:45am 
The solution, for the curious: http://akari.in/pinky_pMGPc

Comments:
ROM Storage: Basically it is formatted as commands of: ASN A - Active pin value (0/1) S - Sleep time after this command (0-9) N - Network pin value (0/1) Since however the memory pointer advances on a read, the values are mixed up, so that for a command they are spread out like (. being numbers from other commands): A.. ..N .S. the N part occurs before the S part because we need to read it before sleeping. There are 13 real entries and one dummy entry of 000 (doesn't sleep so doesn't matter) The entry data non-shifted is (formatted ANS): Pin-Active (A) Pin-Network (N) Sleep 0 0 4 0 1 2 1 0 1 1 1 1 1 0 4 0 1 2 0 0 1 0 1 1 0 0 2 1 0 2 1 1 2 1 0 1 1 1 1 0 0 0 So the first command is 040 because A is 0, S is 4, and N is 0; formatted ASN -> 040 Spread out into in our format that is 0.. ..0 .4. So using that spreading pattern for the whole table yields the ROM entries: 0 4 0 0 2 0 1 4 1 0 2 1 0 2 1 1 2 0 1 1 0 0 1 0 1 1 1 1 1 1 0 1 1 0 1 0 1 2 0 1 0 0 tlt x1 100 # Our number is only 100 or above if the first digit is 1 # hence we can use this to check what to set the Active-Pin to. # Note that this caused the memory pointer to move on to the second ROM # entry but since we spread out our numbers as we did, we can read the # N-digit from the second entry, and then finally the S-digit from the # third entry. - mov 100 p0 # Set Active-out to 100 or 0 depending on the A-digit + mov 0 p0 mov 0 acc # Clear acc for the next step dst 2 x1 # Read x1, causing the memory pointer to move on. Set the the left-most # digit of acc to the result. # A peculiarity of dst causes the to set the left-most digit of acc to # the right-most digit of the read value, so dst 2 104 would set the # left-most digit of acc to 4. # In our cases, that is why the N is at the end of the command, # it sets acc to either 000 or 100 depending on if N is 0 or 1. mov acc p1 # Now just set the Network-pin/out to our acc value mov x1 acc # Read the next command, which contains the S-digit dgt 1 # Just get the S-digit slp acc # Sleep for the amount of time specified
Last edited by Inari; Oct 10, 2016 @ 8:14am
PsyBlade Oct 11, 2016 @ 3:30am 
and the single mc6000 solution is:
slp 4 gen p1 2 0 mov 100 p0 slp 1 gen p1 1 4 mov 0 p0 gen p1 2 1 gen p1 1 2 mov 100 p0 slp 2 gen p1 2 1 gen p1 1 0 mov 0 p0

Last edited by PsyBlade; Oct 11, 2016 @ 3:30am
Inari Oct 11, 2016 @ 4:00am 
Originally posted by PsyBlade:
and the single mc6000 solution is:
slp 4 gen p1 2 0 mov 100 p0 slp 1 gen p1 1 4 mov 0 p0 gen p1 2 1 gen p1 1 2 mov 100 p0 slp 2 gen p1 2 1 gen p1 1 0 mov 0 p0

Sadly a MC6000 doesn't fit though :D
LePourpre Oct 11, 2016 @ 8:59am 
Originally posted by Inari:
http://akari.in/pinky_bCrHS Mwahahahaha!

Thanks to the assistance of Zelgadis I managed to do it with ROM+MC4000 \o/

I guess that one will be removed though XD Oh well. Wanted to test if it would work, and it does. I already reported the bug anyway~
This explain your 5Y that is trolling me in my leaderboard ^^
Inari Oct 11, 2016 @ 9:12am 
Originally posted by LePourpre:
Originally posted by Inari:
http://akari.in/pinky_bCrHS Mwahahahaha!

Thanks to the assistance of Zelgadis I managed to do it with ROM+MC4000 \o/

I guess that one will be removed though XD Oh well. Wanted to test if it would work, and it does. I already reported the bug anyway~
This explain your 5Y that is trolling me in my leaderboard ^^
Hm? I posted an explanation xD
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Oct 10, 2016 @ 4:32am
Posts: 13