snes controller trouble
byte vortex
Posts: 2
i have a dilema here i hope you guys can help
I did a project for class with the propeller chip that requires it to mimic the super nintendo systems controller and i have the
problem with the data transmission because it·is way too fast for·spin to·handle·so i downloaded the SPI demo that was
posted here but i have trouble modifying it to make the shiftout routine·from being a master to a slave and·the shiftin routine because
it seem that·anytime i use both of them in the chip i don't see the clock·and instead of the number inputted all i see·a 1·i am also have
trouble with the fact there is a latch involed too and i have seen very little assembler. so do you think you can help me with this with
the deadline for my project is coming up fast.
·····
I did a project for class with the propeller chip that requires it to mimic the super nintendo systems controller and i have the
problem with the data transmission because it·is way too fast for·spin to·handle·so i downloaded the SPI demo that was
posted here but i have trouble modifying it to make the shiftout routine·from being a master to a slave and·the shiftin routine because
it seem that·anytime i use both of them in the chip i don't see the clock·and instead of the number inputted all i see·a 1·i am also have
trouble with the fact there is a latch involed too and i have seen very little assembler. so do you think you can help me with this with
the deadline for my project is coming up fast.
·····
Comments
This is one of my student's, and I haven't dealt with Assembler much, and wasn't able to help him get this going.
All he really needs is Beau's SPI Engine Library to act as a SPI slave instead of a master. I tried modifying the Clock routine in it to wait for a pin state instead of generating a clock pulse, but it didn't seem to work right.
Also. the NES sends a Latch pulse to the controller before doing a shift to latch in the all the button states, but it might be a bit much to add right now without more details os states and such.
If someone could look at the Clock: routine in the SPI engine and give us help how to wait for pulse, it would be appreciated.
Thanks,
Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
i've attached what i have·done and the information i used.
Mike
Andre'
Thanks though,
Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
There is an error in "Controller Engine" just before Clock_ret. You do a
This should be either
or
I think you're making the same mistake in Latch.
I hope this helps. Mike
In trying to test it, the normal SPI engine was taking the place of the SNES by shifting data in. The controller engine would be the slave to it. Interfering? maybe. One thing confused me was that when called from the same cog, the correct value was being passed between the two (which I didn't think it was ready for, and I didn't see any external indication of the clock actually working). When called from in different cogs it didn't work.
Wierd thing is when testing SPI_Demo, I could see clock signals going. When the same code is used in the end_test program, I saw no indication. The master should be clocking regardless of how screwed up the slave is. I looked to see if the slave was setting the output high preventing the master from controlling it, but couldn't see it.
Thanks for the code correction, of course it's not a literal.
We didn't delve too deep in pASM, but thought we might be able to tweak the SPI engine enough.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
Andre'