SHENZHEN I/O - Wireless Game Controller - Solution

preview_player
Показать описание
Final solution is at 1:29.

This solution completely ignores the intended DX300 digital I/O expander. Still works, though, with ¥1 extra cost.

In the inbox, this is titled LITTLE HELP?

Рекомендации по теме
Комментарии
Автор

Wow great solution. I was trying to figure out how to send the xy and the a and b input to the same line. Didn't realize you could chain conditionals and send different data over the same line.


Shenzhen i/o is really cool.

copperwater
Автор

Nice solution with these a/b controls, but if you replace slp 1 in your MC6000 with this code you'll significantly drop your power consumption:

+ slp 4
- slp 1

АлексейСахно-дж
Автор

Thanks for your solution, operations are better than conditions and loops and 2 outputs in tx is a good idea too. I had 21 lines with my solution.


teq x2 0
- jmp a100
a0: teq x3 0
+ mov 0 dat
- mov 2 dat
jmp end
a100: teq x3 0
+ mov 1 dat
- mov 3 dat
end: teq x0 -1
+ mov p0 x1
+ mov p1 x1
+ mov dat x1
slp 1






teq p0 100
+ mov 100 x0
- mov 0 x0
teq p1 100
+ mov 100 x1
- mov 0 x1
slp 1

alexg
Автор

I can't figure out how this is working. `slx` will wait until there's data coming from rx. But then you read it into acc. So now acc says -999. Then you add 1 and 2 when necessary. I assume I'm missing something; can anybody help?

ThomasGiles
Автор

oh man. I didn't know you could use the right side as input. stopped the video after 40 seconds lol

madisonverger
Автор

Could've made this more space-efficient and cost-efficient as well with only MC6000 and DX300.
Connect p0 and p1 of DX300 to a and b respectively.
Then connect radio transmitter's rx and tx to MC6000's x0 and x1 respectively.
Connect x and y to MC6000's p0 and p1 respectively.
And then connect x2 or x3 of your MC6000 to any XBus of DX300.
This is the code for MC6000 (DX300 connected to x2 of MC6000):

teq x0 -1
- jmp end
mov p0 x1
mov p1 x1
teq x2 0
+ mov 0 x1
teq x2 1
+ mov 1 x1
teq x2 10
+ mov 2 x1
teq x2 11
+ mov 3 x1
end: slp 1

epigone
join shbcf.ru