There are two parts to the ENIO project - the EXP board, which is the breakout for the NES Expansion Port:

http://enio.chykn.com/wiki/index.php/ENIO_EXP_Board

and the CPU board, which translates between the NES and USB / Ethernet:

http://enio.chykn.com/wiki/index.php/ENIO_CPU_Board

the problem is the lack of software written to support the CPU board, not a lack of hardware... in terms of what else you would possibly want to connect to the EXP breakout board, try every Famicom Expansion peripheral ever! smile

http://en.wikipedia.org/wiki/List_of_Ni … ccessories

Nick, did you ever get any further with this project?!

99

(18 replies, posted in Nintendo Consoles)

HeavyW8bit wrote:

uXe I am down and would love to collaborate on this!

Awesome!! big_smile

HeavyW8bit wrote:

Just brainstorming but would you be able to send a second value out? Then we could use controller 2 to change some settings via midi as well.

Yes, emulating two controllers at once shouldn't be a problem at all - in fact, with the extra I/O of something like an Arduino Mega attached to 6 shift registers you could emulate all four controllers and the Four Score interface itself at the same time!

Sync with cynthcart sounds exciting too! Another project I had in mind was using the Family Basic keyboard for a NES-based cynthcart-type synth! smile

100

(18 replies, posted in Nintendo Consoles)

HeavyW8bit - I was wondering if you would be interested in adapting NESK-1 to make a MIDI version for use with my FamiiDI code? What I have in mind is that instead of reading in the 8 bits of Controller 1 as an eight note scale, I could tweak the FamiiDI code to assign a byte containing a MIDI Note Number to the eight controller buttons - immediately increasing NESK-1's range from 8 notes to 128 notes! smile

So when reading from Controller 1, bits 6 to 0 would represent a MIDI Note value between 0 and 127, and then bit 7 could be used to represent Note On / Off - what do you think?

I was making plans to write my own MIDI-controlled NES synth from scratch, and realised I would want to include all of the features of NESK-1 - so I figured it couldn't hurt to see if you would be open to collaborating on an adapted version? I would be more than happy to do all of the work on the Arduino side of things!

http://www.ebay.com/itm/301070111106

(not mine!)

Limitbreak wrote:

Thanks, I'll check out the links. I was thinking I might have been able to put the files on the disk via my Windows computer at work...but it seems like thats not the case...

Start here:

http://www.d81.de/

103

(19 replies, posted in Releases)

LOVED IT! big_smile

http://nintendoage.com/forum/messagevie … did=118153

105

(32 replies, posted in Nintendo Consoles)

yogi wrote:

This is too awesome! With uXe's AVR hardware and your sync code it's like the 'Perfect Storm', rolling in your Atari Seq Kit mod and my head is swimming smile What a New Years
Yogi

Yogi, when / if you do end up building an interface based on that code we finally settled on in the FamiiDI thread, all you'd need to add to generate Nanoloop clock (12 pulses per quarter note) from MIDI clock (24 ppqn) is:

if (MIDI.getType() == Clock)
  DDRB ^= bitMask[0]; // Toggle 'Start Button' Bit

big_smile

Edit: Oh, and get rid of the 'MIDI.getType() < B11110000' condition! (I added that in to filter out System messages because I was only interested in Note / Pitch Bend messages)

106

(32 replies, posted in Nintendo Consoles)

HeavyW8bit wrote:

Would also be cool to see what else could be used to clock the NES with as well.

Sweet! ...it would be easy to tweak the code in my FamiiDI project to take MIDI clock messages and translate them into 'trigger' button presses for FamiSlayer!

Also, by tweaking the FamiSlayer code a little to read control messages from Controller 2 as well, I could easily assign MIDI Start / Stop etc messages to:

    A    Play/Pause
    B    Stop
    UP    Increase Song Number
    DOWN    Decrease Song Number
    START    *Restart Song from begining
    RIGHT    *Fast Forward (Jumps to the begining of the next frame)
    LEFT    *Rewind (Resets back to the begining of the current frame)

(and I guess move the 'trigger' button to be Select instead of Start)

Can I ask though - if you have the Arduino holding a pin low to simulate a button press, and then you actually press the same button on the joypad and short it to ground, nothing is going to explode is it?! hmm

Which makes the code:

#include <MIDI.h>

int unmappedBend;
byte mappedBend;
static byte bitMask[] = {1, 2, 4, 8, 16, 32, 64, 128};

void setup()
{  
  pinMode(0, INPUT); // MIDI IN

  pinMode(11, INPUT); // 4021 D7 (A Button)
  pinMode(10, INPUT); // 4021 D6 (B Button)
  pinMode(9, INPUT); // 4021 D5 (Select)
  pinMode(8, INPUT); // 4021 D4 (Start)

  pinMode(A3, INPUT); // 4021 D3 (Up)
  pinMode(A2, INPUT); // 4021 D2 (Down)
  pinMode(A1, INPUT); // 4021 D1 (Left)
  pinMode(A0, INPUT); // 4021 D0 (Right)

  PORTB &= ~B00001111; // pins 8, 9, 10 and 11
  PORTC &= ~B00001111; // pins A0, A1, A2 and A3
  
  MIDI.begin(MIDI_CHANNEL_OMNI);
}

void loop()
{
  if (MIDI.read() && (MIDI.getType() < B11110000))
  {
    if (MIDI.getType() == NoteOn && MIDI.getData2() > 0)
    {
      if (MIDI.getData1() == 60) // C4
        DDRB |= bitMask[3]; // A
      else if (MIDI.getData1() == 62) // D4
        DDRB |= bitMask[2]; // B
      else if (MIDI.getData1() == 64) // E4
        DDRB |= bitMask[1]; // Select
      else if (MIDI.getData1() == 65) // F4
        DDRB |= bitMask[0]; // Start
      else if (MIDI.getData1() == 67) // G4
        DDRC |= bitMask[3]; // Up
      else if (MIDI.getData1() == 69) // A4
        DDRC |= bitMask[2]; // Down
      else if (MIDI.getData1() == 71) // B4
        DDRC |= bitMask[1]; // Left
      else if (MIDI.getData1() == 72) // C5
        DDRC |= bitMask[0]; // Right
    }

    else if (MIDI.getType() == NoteOff || (MIDI.getType() == NoteOn && MIDI.getData2() == 0))
    {
      if (MIDI.getData1() == 60) // C4
        DDRB &= ~bitMask[3]; // A
      else if (MIDI.getData1() == 62) // D4
        DDRB &= ~bitMask[2]; // B
      else if (MIDI.getData1() == 64) // E4
        DDRB &= ~bitMask[1]; // Select
      else if (MIDI.getData1() == 65) // F4
        DDRB &= ~bitMask[0]; // Start
      else if (MIDI.getData1() == 67) // G4
        DDRC &= ~bitMask[3]; // Up
      else if (MIDI.getData1() == 69) // A4
        DDRC &= ~bitMask[2]; // Down
      else if (MIDI.getData1() == 71) // B4
        DDRC &= ~bitMask[1]; // Left
      else if (MIDI.getData1() == 72) // C5
        DDRC &= ~bitMask[0]; // Right
    }

    else if (MIDI.getType() == PitchBend)
    {
      unmappedBend = (int)((MIDI.getData1() & B01111111) | ((MIDI.getData2() & B01111111) << 7));
      mappedBend = map(unmappedBend, 0, 16383, 165, 5); // Arkanoid Paddle range, centered at 170 (+/-80)

      // Paddle Position
      if (mappedBend & bitMask[7]) // A
        DDRB |= bitMask[3];
      else
        DDRB &= ~bitMask[3];
      if (mappedBend & bitMask[6]) // B
        DDRB |= bitMask[2];
      else
        DDRB &= ~bitMask[2];
      if (mappedBend & bitMask[5]) // Select
        DDRB |= bitMask[1];
      else
        DDRB &= ~bitMask[1];
      if (mappedBend & bitMask[4]) // Start
        DDRB |= bitMask[0];
      else
        DDRB &= ~bitMask[0];
      if (mappedBend & bitMask[3]) // Up
        DDRC |= bitMask[3];
      else
        DDRC &= ~bitMask[3];
      if (mappedBend & bitMask[2]) // Down
        DDRC |= bitMask[2];
      else
        DDRC &= ~bitMask[2];
      if (mappedBend & bitMask[1]) // Left
        DDRC |= bitMask[1];
      else
        DDRC &= ~bitMask[1];
      if (mappedBend & bitMask[0]) // Right
        DDRC |= bitMask[0];
      else
        DDRC &= ~bitMask[0];
    }      
  }
}
yogi wrote:

void setup ()
{
  pinMode(x, INPUT); // for all the CD4021 pins
  PORTB &= b00000000; // Arduino pins 8, 9, 10 and 11; PB0:PB3 to Hi-Z inputs
  PORTC &= b00000000; // Arduino pins A0, A1, A2 and A3; PC0:PC3 to Hi-Z inputs
}

Not to nit-pick, because I know you were just typing this off the top of your head, but I think what you mean is:

PORTB &= ~B00001111;
PORTC &= ~B00001111;

to set only those pins to '0'

yogi wrote:

DDRB = (1 << PBx) // Change pin to output
DDRB = (0 << PBx) // Change pin to Hi-Z input

again:

DDRB |= (1 << PBx);
DDRB &= ~(1 << PBx);

to affect only that pin, otherwise you are changing all of the bits on that port, and with Arduinos that can be bad when some of them are permanently assigned as reset or crystal pins...

Although reading in the buttons would have its advantages too - you could write code to implement 'turbo' modes etc!

yogi wrote:

Going through your sketch, occurred to me, if you toggle the Arduino pins between button Press = 'Outputing' a 0 and button Release = tri-state Input , would be open collector. Not sure how much the AT can drain, but it would work as long as the pad's pull-ups  are high values (low current flow). Not sure if you could Read the buttons, but think you could send button presses to the NES easy.
Will cobble together a test sketch to try this out.

Good thinking! Will be interesting to see if it works - the 'resistors' on the joypad are 38kOhms.

The way I've re-written the code is to have a toggle switch on pin 12 to choose between MIDI or Joypad mode, so the two modes would never be running at the same time, and there wouldn't be any slow-down to worry about... it seems like having the two modes running at once would cause issues / conflicts with both of them wanting to have control of the same 8 bits?

Also, the code is written with the Duemilanove in mind, so the pin / port values may need to be adjusted for a Teensy - all of the 'genuine' Teensy boards seem to have more than just 18 pins available?