Offline
Milwaukee, WI

Couldn't we just use Batsly's PC NES device using the arduino?

Offline
WOW MAN!

I need to do some experimenting. Some things here can be ruled out immediately because either a) it's just not possible on a NES or b) it's just not possible because of how much processing time it takes to update PR8 (worst case).

Could do with a hardware heavyweight such as Batsly or blargg getting involved in this discussion.

Offline
Brooklyn, NY

Looks like I'm late to the party!

As far as I know you can read the controller port at any time - especially this way since we use the D0 line like a digital-in - no latching involved (which as a bonus means it's immune to any of the DMC false read problems). That external NSF thing I had done worked pretty much the way you described. It was simple for me since I didn't have to worry about the NMI - I didn't have to update the display or really worry about the engine. I just polled constantly in an infinite loop - the only thing in my NMI was an RTI.

The code pretty much went like this:

InfLoop:
LDA $4017    ; Checking for the first bit (A button) - this is basically used as a digital in
CMP oldState
BEQ +      ; If it's the same as the old state (0->0, 1->1) then skip (creates a rising-edge detect)
STA oldState
CMP #$01     ; Being here implies that there was change, if it was 0->1 then play a "frame"
BNE +
JSR PlayNSF
+ JMP InfLoop

So on any rising edge signal the NSF would step to the next frame - in the PR8 case a rising edge would trigger a step. If we were using 24ppqn we can just divide down pretty simply using some 7400 logic as suggested earlier. The big gotcha is monitoring that line enough so that we don't miss a transition.

I'll mull it over when I get home from work and post back- excellent job as always Neil.

Last edited by Batsly Adams (Dec 7, 2010 12:08 am)

Offline
WOW MAN!

I think the best suggestion so far would be to just have a key combo that would put PR8 into slave mode and the screen (and screen updates) would get turned off then the code can just sit in a background loop waiting for sync/triggers until you press another (same) key combo to kick it out of slave mode and back into the editor.

It would probably be safe to assume this would work but on the other hand it would be a shame as it would be so good to be able to still edit parameters in PR8 as it's playing.

Offline
Los Angeles
spriteful wrote:

As a minor point, midi output from a PC does in fact exhibit jitter, and usb ones are often the worst kind-
See e.g.
this forum thread

Just so you know I hate gearslutz. its like 90% of the people there just like to pretend they know what they are talking about.
*edit *
Yeah, line noise != jitter. God I hate that place hehe.
And yes we are pretty much talking the same, I was just being uber clear cause I hate when people bitch about MIDI being lame because it has a "delay" ... When really 98% of the time, if you hear a delay, its not MIDI, its the setup. smile

Offline
Los Angeles
neilbaldwin wrote:

I think the best suggestion so far would be to just have a key combo that would put PR8 into slave mode and the screen (and screen updates) would get turned off then the code can just sit in a background loop waiting for sync/triggers until you press another (same) key combo to kick it out of slave mode and back into the editor.

It would probably be safe to assume this would work but on the other hand it would be a shame as it would be so good to be able to still edit parameters in PR8 as it's playing.

So thre is no other port that is accessible in any way? Whats on that little pin out on the bottom of the nes?

Offline
trash80 wrote:

gearslutz

Indeed!
It is possible to find useful information there, but man is there a lot of bollocks.

Offline
Matthew Joseph Payne

Bumping this because I've been thinking about NES sync - ideally from a native tracker, either to LSDJ, or MIDI in general. It seems like we've gotten so close to it a few times, but nobody's actually made it work yet. Is that because we're just waiting for the Blargg/arfink cart? wink

Either way, I wanted to poke and prod about maybe getting this worked into, say, Pulsar and/or NTRQ? I feel like it would really make some already amazing software that much more truly delightful. I've been dreaming about 9 channel composition lately...

Offline
WOW MAN!

Batsly kindly sent me some Arduino bits and pieces for me to have a play with (though I am totally out of my depth with electronics - what's the worst that could happen...)

I just haven't had time to really look at it recently but I really want to get something working.

Offline
Milwaukee, Wisconsin USA

i'm still available for help on this if there's anything i can do lemme know

Offline
WOW MAN!
low-gain wrote:

i'm still available for help on this if there's anything i can do lemme know

Thanks l-g. Ideas would be good at this stage... smile

With the absence of any other ideas of how to approach this, my first instinct is to try to get the advance-the-pattern-each-time-the-NES-receives-a-note-on method working.

As the NES lacks arbitrary timers I'm not sure that any other method is feasible?

Offline
Matthew Joseph Payne

Neil, have I told you lately that I love you?

edit: l-g, you too :3

Last edited by kineticturtle (Mar 2, 2011 6:03 pm)

Offline
Milwaukee, Wisconsin USA

well i think for starters a simple +5V clock pulse OUT of the NES Player 2 controller port might be a good start.. could be a common 24ppqn or something.
So things could at least slave to the NES.

Last edited by low-gain (Mar 2, 2011 6:47 pm)

Offline
WOW MAN!
low-gain wrote:

well i think for starters a simple +5V clock pulse OUT of the NES Player 2 controller port might be a good start.. could be a common 24ppqn or something.
So things could at least slave to the NES.

Any ideas how you might output 24 evenly-spaced pulses per note?

Offline
Milwaukee, Wisconsin USA

lol. i'm not the code guy. you are. wink

Offline
WOW MAN!

LOL

OK, put it another way - if you couldn't output 24 evenly-spaced pulses per note, what then?