Page 3 of 3

Posted: Wed Nov 02, 2011 5:26 pm
by infiniteneslives
How exactly is the USB planned to work? Sounds like through the controller port somehow? What kind of chip or mcu is between the two handling the comms?

Posted: Sat Nov 05, 2011 12:37 pm
by Memblers
Here is a picture of the board for the compo cart.
http://membler-industries.com/memblers/ ... G_2090.jpg
Just a 74HC161 for the mapper, it's such a simple setup that I'm surprised only one game ever used it.
tepples wrote:
As for mouse support, that depends on the software. I guess the SNES mouse adapter being discussed would work, but since the NES only has 2 control ports you'd have to either disconnect a controller, or disconnect the USB.
That or put a switch on the adapter between controller 2 and the USB.
Actually, since I'll be using NES extension cables (that contain 7 wires), I really wanted to pass the controller through at the same time. But the real problem is that the adapter circuit is inside the USB connector hood - having the NES controller plug in near the PC's USB connector would be exceedingly weird. Cutting into the wire and splicing the controller in seems possible, but may be kinda ugly and more work to build. Adding a box where it can be spliced or switched inside wouldn't look too bad, but then that adds a need for 3 strain reliefs - maybe I'll take a look into doing that.

Unfortunately the camera we have here quit working, it can take videos but not pictures anymore. The pics I've posted so far I took at work. But the USB adapter as designed now looks great, just a cable with NES connector on one end and USB on the other - proper strain relief and everything, it looks professionally made. I'd hate to ruin the aesthetics of it, but for developers who want to use it make/debug a 2-player game, some kind of Y-adapter would surely be convenient.

infiniteneslives: Yep controller port, and the chip used is a PL-2303 (or clone, it's under an epoxy blob so who knows). I'm getting it from these: http://www.dealextreme.com/p/usb-cable- ... 2670-13638 Just been ordering 10 at a time for the discount, but sometime I may ask them if there is a better discount for ordering 100 or something. Blargg, other folks, and I in the past have previously made RS232 adapters (that would be mostly compatible with this) using the MAX202/MAX232.

To handle the communications, because writing a software UART on the NES is only half-duplex, I've came up with a protocol layer so that arbitrary data could be sent both ways without data loss. There is overhead involved of course, but I've also integrated run-length encoding in the hopes that it will make up for it in some cases (would make a huge difference on ROMs that include lots of padding, as most in-development stuff tends to be). My communication protocol is sorta inspired by XMODEM, ZMODEM, and SLIP - none of those were really suitable on their own for this use.

For the fun of it (and to make testing easier hopefully), I've chosen to write the protocol in C and build it with CC65 and GCC. I'm finally delving into CC65 (the KNES template by thefox was a huge help), but of course on the NES side the vital parts will still be written in asm (send/receieve and CRC calculations).

Posted: Sun Nov 06, 2011 8:08 pm
by Jeroen
Man this cart looks sweeeeet. Also the compo cart looks pretty ;-)
I like the punchout style irq...I mean it could be more ideal but its a decent tradeoff between costs and game capability.

Posted: Sun Nov 20, 2011 11:51 am
by tepples
Anything new over the past two weeks?

Posted: Tue Nov 22, 2011 12:48 am
by Memblers
I've had some trouble with CHR-RAM on my test cart, has been annoying me so I'm working on a new test program to narrow it down. Mostly I've been getting used to using a C compiler with NES, and sorting through my old Squeedo code for things to re-use, like the NSF loader. That's probably the first thing useful I'll try to get working. CC65 has been pretty cool to use.

One thing I have been able to verify, is that the program appears to be booting in my configured start-up bank. That is still a concern, because the CPLD would need to be awake before the NES CPU is. It starts at a lower voltage, but does need time to load it's configuration. Banking seems OK so far, haven't tried the CHR-hit IRQ because of the tile corruption.

BTW, for a cycle-counter IRQ, the setup I've done is to change a couple registers to be address and data ports. So, in this mode there are 16 registers indirectly available. Since they are only 4-bits wide, you need 4 of them of them just for setting the IRQ trigger time (16-bits). Though maybe I could do an auto-inc the register index to make the writing faster.

Posted: Tue Nov 22, 2011 1:26 pm
by Hamtaro126
Memblers wrote:I've had some trouble with CHR-RAM on my test cart, has been annoying me so I'm working on a new test program to narrow it down. Mostly I've been getting used to using a C compiler with NES, and sorting through my old Squeedo code for things to re-use, like the NSF loader. That's probably the first thing useful I'll try to get working. CC65 has been pretty cool to use.

One thing I have been able to verify, is that the program appears to be booting in my configured start-up bank. That is still a concern, because the CPLD would need to be awake before the NES CPU is. It starts at a lower voltage, but does need time to load it's configuration. Banking seems OK so far, haven't tried the CHR-hit IRQ because of the tile corruption.

BTW, for a cycle-counter IRQ, the setup I've done is to change a couple registers to be address and data ports. So, in this mode there are 16 registers indirectly available. Since they are only 4-bits wide, you need 4 of them of them just for setting the IRQ trigger time (16-bits). Though maybe I could do an auto-inc the register index to make the writing faster.
One question: Will there be Emulator support for the mapper?

Posted: Tue Nov 22, 2011 4:44 pm
by Memblers
Hamtaro126 wrote: One question: Will there be Emulator support for the mapper?
Sure, if I do it myself it will probably be in FCEU, as that is what I tend to use for debugging. This would be an iNES 2.0 mapper, with sub-mappers used for 2 or more different configurations. It should be able to work on the PowerPak, also.

This will be after the board and mapper are both debugged and tested.

Posted: Sun Nov 27, 2011 4:17 am
by Memblers
Found the CHR error before I went to bed, turns out it was a simple error in my verilog. Typical noob error. :)

So, finally my board is verified! Now just to figure out if there's anything in the design that needs to change. I fixed the CHR bus conflict with a wire (no need to even cut traces, thanks to the CHR jumpers).

BTW I've figured that I will go ahead and start producing the NES to USB adapters and starting supplying those first, in December if everything goes well.

Posted: Sun Nov 27, 2011 1:55 pm
by Jeroen
Was/is there a prize estimate?

Posted: Tue Nov 29, 2011 2:42 am
by Memblers
For the NES-USB cable, I was thinking $15 or $16

Posted: Mon Apr 09, 2012 11:43 pm
by thefox
Updates? :)

Posted: Wed May 30, 2012 1:11 pm
by picccca
thefox wrote:Updates? :)