So I'm experimenting with this awesome player and I have a couple questions.

I've hooked up a simple cmos clock up to the controller and found that hooking it straight up to the brown and yellow wires works. I couldn't really tell what pin on the shift register you had the clip connected to, and while prodding around I found the out wire (yellow) made it work for me.

Which leads me to my question... Is that going to distort the timing at all away from the nanoloop standard? is the shift register actually doing anything, or can I just ditch the controller and use the raw wire?

On a side note, you were right about the functions that wouldn't work with the MML NSFs. play/stop/reset/song change work fine. Nothing else does though, which I'm 100% ok with.  One thing I'm battling with is these nsfs are conflicting with the ram location of the sprites.

wow cool.

TylerBarnes wrote:

I've hooked up a simple cmos clock up to the controller and found that hooking it straight up to the brown and yellow wires works. I couldn't really tell what pin on the shift register you had the clip connected to, and while prodding around I found the out wire (yellow) made it work for me.

You want the 'Start' button pin on the shift register, here is the relevant part of the FamiSlayer source:

LDA b_state2    ;GET BUTTON STATE OF CONTROLLER 2
AND #%00001000  ;CHECK IF TRIGGER BUTTON IS PRESSED
BEQ chk_joy     ;IF TRIGGER BUTTON NOT PRESSED THEN SKIP AND READ CONTROLLER 1
JSR PlayAddy    ;RUN NEXT STEP OF NSF

The yellow wire is the 'data' signal being sent to the NES, so if you are sending a continuous clock down that wire then it will appear to the NES as if every button on the controller is being pressed - but since FamiSlayer only cares if the 'Start' button is being pressed, it will ignore seven out of every eight of your clock pulses...

Ah, that is what I was afraid of tongue. Ok. Well I'm going to be building a control box for my two NES' and I'll definitely make a post here when it's done. Currently waiting on parts to arrive, but if any one want's to play along with me or maybe even correct me on any assumption I may have wrong heres my plan....

I will be taking one controller pcb and adding a second cable to fit into both 'player 2' jacks on two NES'. I'm then going to be building a MIDI to nanoloop clock converter (decade counter method) and connecting it to the shift register. Will also have just a simple cmos clock (40106) that I can switch to incase I don't have or don't want to use midi. Also it wouldn't be complete without a DMG cable or link port on there wink. The box will take power from the controller's 5v rail. Oh, I forgot to mention I'll be omitting the 5v wire from the second controller cable, but keeping the grounds connected so the two incoming voltages don't conflict. At least i THINK thats what I am spose to do. not 100% on that one.

Thats the base idea. Been brainstorming 'bout some bells and whistles like a soft latch for toggling between half time or normal speed. Thinking just a cmos divider or binary counter will do the work and MOSFET's will do my latching.

Edit: Oooo, I just had a better idea. By grabbing a 4021 and some pullup resistors I can just build a nes controller right into my circuit. I'd first connect the Clock, Latch, Data, 5v, and GND wires to there apropriate places on the 4021, and then pull up P1-P8 to 5v. then have the nanoclock pulling P5 (pin 13 aka 'start') to ground thus activating the 'button'. Which leads me to another question. Looking at the schematic it looks like a key is activated with ground since all the pins are pulled high and every button is tied to ground on one side. If the LSDj's notes are starting on an upward rising edge wouldn't it be ever so slightly off time? I'm guessing it's probably negligible but I think it interesting to note non the less.

Last edited by TylerBarnes (February 21, 2014 12:56 pm)

Hmmm, whilst poking around and experimenting, I've come to discover that all the nanoloop sync devices on the web are using SI pin 3 for syncing with nanoloop. yet the pulse that Famislayer is using comes out of the SO pin 2. I'm not sure how that will affect my plans to move forward but it most likely means the Midi to Nanoloop sync circuit I had in mind wont work correctly. Still waiting on some parts to arrive so I'll have more details when I've gotten to actually solder something up and test it.

At the very least I've come up with the base for my circuit and heres a quick preview of it.

Am I right in assuming that the pulse being sent by pin2 (SO) is a 12ppqn signal? when I slow the tempo right down to 40 in lsdj and stare at the LED blinking, it looks like for every 2 ticks inside a table I get one blink on the led. I'm still unsure if the even number ticks (0, 2, 4, 6, etc.) are a low or a high. If it is a 12ppqn pulse being used, maybe some of you avr guys could code a simple MIDI to 12ppqn pulse generator for me? I might be thinking the wrong way as I often do, but I'm assuming the signals from a raw Midi cable aren't 5v logic.

hmmmm.... I wish I knew more about midi, could it be possible to just divide it using cmos logic in some way? Would just opto isolating and feeding it into a divider work?

P.S. I hooked up lsdj to pin 13 on the shift regiter and it behaves exactly like hooking straight up to the Data Out wire. I might just abandon the 4021 if it becomes unnecessary. Going to proceed as if I need it though just in case.

Last edited by TylerBarnes (February 22, 2014 3:34 pm)

Stupid question here.... what's an nsf. .....

Oh wait, is it a nintendo sound file?

Payday wrote:

Stupid question here.... what's an nsf. .....

http://en.wikipedia.org/wiki/NES_Sound_Format

Found this by googling "what is a nsf nes"

Sorry tongue

So could you make one by exporting a famitracker?

Oh my gosh I'm stupid... sorry to bother everyone......

I just tried famislayer in nestopia emulator. I get no sound at all...
I know I am supposed to drive the clock with controller 2 button presses, but I tried with autofire on nestopia, and... no sound....
I have tested the same nsf successfully with vegaplay...
Do you have any hint?

you need at least 60 'presses' per second to play the NFS at it's native rate. So depending on the auto fire rate, the NFS is probable running at a  VERY slow rate. If there is a second or two of silence at the start of the NSF, this could take minutes to get to the first sound. Try letting it run awhile with the autofire, if the NFS was compiled into the base code correctly, you should hear some sound at some point. Also make sure that you are triggering the right button on the correct pad.
yogi

you need at least 60 'presses' per second to play the NFS at it's native rate. So depending on the auto fire rate, the NFS is probable running at a  VERY slow rate. If there is a second or two of silence at the start of the NSF, this could take minutes to get to the first sound. Try letting it run awhile with the autofire, if the NFS was compiled into the base code correctly, you should hear some sound at some point. Also make sure that you are triggering the right button on the correct pad.
yogi

Thanks for your answer
But:
- When the rom loads, is the song started, or stopped? do I have to press start on the first controller ? (it would be great to have the status displayed on screen)
- The doc says 'Key presses on controller 2 act as the clock input, and will run the next step of the NSF'. So what key is it?
Thx

Last edited by cyberic (May 15, 2016 9:03 pm)

cyberic wrote:

Tahnks for your answer
But:
- When the rom loads, is the song started, or stopped? do I have to press start on the first controller ? (it would be great to have the status displayed on screen)
- The doc says 'Key presses on controller 2 act as the clock input, and will run the next step of the NSF'. So what key is it?
Thx

Here are my notes:
FamiSlayer V6.66:
    Controller 2:
        Start = Sync Pulse input, in play mode
    Controller 1:
        A = PAUSE/PLAY TOGGLE
        B = STOP PLAYING
        UP = INCREASE SONG#
        Down = DECREASE SONG#
        LEFT = REWIND - reset to the beginning of the current frame
        RIGHT = FAST FWD - skip to the beginning of the next frame
        START = RESTART SONG from  the beginning
Believe that it boots in the Stop mode.  So press A on pad1, then toggle Start on pad2. Think these are correct
yogi