It is currently Fri Jul 28, 2017 11:56 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: Wed Nov 02, 2011 5:26 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1846
Location: WhereverIparkIt, USA
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 05, 2011 12:37 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
Here is a picture of the board for the compo cart.
http://membler-industries.com/memblers/pics/IMG_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:
Quote:
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-for-nokia-n1200-1208-1650-2630-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).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 06, 2011 8:08 pm 
Offline
User avatar

Joined: Tue Jul 03, 2007 1:49 pm
Posts: 964
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 20, 2011 11:51 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18695
Location: NE Indiana, USA (NTSC)
Anything new over the past two weeks?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2011 12:48 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2011 1:26 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 743
Location: Shelton, Washington.
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?

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2011 4:44 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 27, 2011 4:17 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 27, 2011 1:55 pm 
Offline
User avatar

Joined: Tue Jul 03, 2007 1:49 pm
Posts: 964
Was/is there a prize estimate?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2011 2:42 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3444
Location: Indianapolis
For the NES-USB cable, I was thinking $15 or $16


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 09, 2012 11:43 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2874
Location: Tampere, Finland
Updates? :)

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 30, 2012 1:11 pm 
Offline
User avatar

Joined: Wed Nov 24, 2010 12:51 am
Posts: 44
Location: Finland
thefox wrote:
Updates? :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group