Posts for BryGuy

Experienced Forum User
Joined: 2/22/2017
Posts: 6
Location: Eau Claire, WI
I did get the SD card load working, I'm using a simple microSD breakout board for it using the SPI pins on the Arduino. I do indeed have to use external power now, a USB battery pack works well enough for that. I was able to modify the HappyLee world record to play on a dual cart, it looks very stable to me now.
Experienced Forum User
Joined: 2/22/2017
Posts: 6
Location: Eau Claire, WI
I have a board, NES, and cartridge and had done a project a few years ago communicating with NES controller to control a pong game. I didn't have any grand reason, just had the hardware available and got curious if I could get a working setup that could play SMB. I saw some other projects using shift register chips, but thought I could get it to play without any other extra hardware. I started off writing some FPGA code to burn into the Arduino to handle the controller protocol but found that I didn't need that since I could run the board at 64MHz which is plenty fast for the NES. It is fully functioning now and completes the game, though I am trying to add some features. - I have used a borrowed Saleae logic analyzer to look at my signals, I notice that when I send button data my latch signal fluctuates and I've had to compensate for that by disabling the latch handler until my writes are done - I create my TAS video, get the raw text version of it, and use a perl script to turn it into button state instructions for the Arduino - I'm using the original SMB/Duck Hunt cart that was shipped with the system - I've attached an interrupt for both latch and pulse signals, so I initiate a transaction when the latch signal is seen and send each button's state per pulse - I haven't measured my latency, though I have disabled Arduino's standard timer interrupt and I try to keep my interrupt tasks very tight. I'm writing to the port registers directly instead of Arduino's "digitalWrite" to avoid pin overhead as best I can - I load my frame data before the interrupt so when the signal comes in I can write my data asap - That's interesting, I haven't run into any trouble with the latch signal at power on, but I'll keep that in mind if I see any issue - The bot is loading everything on its own, it isn't connected to the PC at all and even gets its power from the NES controller 5V line. I'm trying to add an SD card for arbitrary loads and it seems like the NES is not able to stably power the board as well as the SD card so it seems like I'll have to change that. Right now my setup is very specific to running SMB and changing the playback is difficult, which is why I'm trying to get the load from SD card working. If things go well, I'd like to try other games and maybe move to a SNES.
Experienced Forum User
Joined: 2/22/2017
Posts: 6
Location: Eau Claire, WI
I did sort out the issue I was struggling with, but didn't really understand the "why," so thanks for the response! I'm checking out the NESDEV wiki, and some of the things I see with chip initial states is making sense, things like "if the NES has been off for less than 20 seconds." A lot of times when I was debugging I ran into strange behavior, and I would unplug the power connector and press power to drain any stored capacitance, which *seemed* like *maybe* it helped, and that seems in line with what I'm reading on the wiki. I know that an emulator will be more ideal conditions, I just really like interacting with the physical hardware and seeing what I can get it to do.
Experienced Forum User
Joined: 2/22/2017
Posts: 6
Location: Eau Claire, WI
I got past my issue, as I was digging into my code to translate emulator input into output code for my TAS board it looked like I actually was losing a frame after world 1-1 and world 4-1. I'm still pretty surprised that this had an effect on world 8-3 but not on world 8-2. My full hardware SMB TAS is working from start to finish now.
Experienced Forum User
Joined: 2/22/2017
Posts: 6
Location: Eau Claire, WI
I'm running into an issue converting my TAS video to run on real hardware using an Arduino board. I've made it all the way through 8-2 and I am performing the Bullet Bill glitch successfully, and I begin 8-3 okay. When I get to the first pair of Hammer Bros., I am expecting the left Bro to be on the middle platform and the right to be on top platform so I can just run under both, based on the video I have made in TAStudio on BizHawk. However, when I arrive in real hardware, the left Bro is on the middle platform as expected, but the right Bro is on the ground, and I run into him and die. Does anybody have an idea what may be causing this difference? On the level before that I'm executing the Bullet Bill glitch which requires frame-perfect execution as well as arriving on a consistent framerule. It seems like it would be a huge coincidence that my framerule would be different before getting to 8-2, so it seems like my framerule changes between 8-2 and 8-3. Thanks for any insight.
Experienced Forum User
Joined: 2/22/2017
Posts: 6
Location: Eau Claire, WI
I know this is an older topic, I'm wondering if anybody can help me with this? I'm interested in TAS running on real hardware and I've had quite a bit of success so far. I have an Arduino board running at 64MHz and I'm using the interrupt pins to capture the pulse and latch signals and sending out controller output to the data line. My goal is to TAS run Super Mario Bros. on real hardware, and I'm a little disappointed right now that it's not consistent. I often get through the first couple levels, but that's not a guarantee. The farthest I have ever gotten is about half way through World 8-1, eventually some frame trigger fails and I have no idea where the randomness is coming from. Does anyone know of what may be causing my frames to be captured incorrectly? I understand lag frames, but is there anything that may cause like a random lag frame?