Finally we found a better name for the snesram and renamed it to ‘QuickDev16 USB’. Final PCB layouts are ready and will be send to china soon. So in about 2 weeks we will have our first PCBs.
- 16 MBit Sram for Rom storage
- ATmega644 MCU for housekeeping
- USB connection for ROM upload
- ucon64 software compatibel
- PAL/NTSC CICs are supported
- Lo/Hirom support
- Reset trigger from cartridge possible
- AVR USB Bootloader for quick firmware uploads
- Snes bootloader intro
- Snes powered, no power source needed
Stay tuned for more features, especially debugging helpers
Yeah, its working. Have been playing Super Mario Word last night. Did a few tests with different roms. Mainly Lorom, type 0 without save game ram. Was able to run games up to 16bmit. Couldn’t find any 32mbit type 0 games to test the complete ram area. Anyways its working finally. What de did? Resolder the cart connector and cleaned the contacts 🙂
And some pictures of the OR gate hack:
Now its time to work on the software side. Stay tuned.
Last night i had a long debug session with Max and we tried to track down the problem with the prototype board.The problem is that some homebrew roms are runinng fine, but most commerical games don’t even start. I can start up the game “Mr. Do”, but it hangs directly at the first intro screen.
So we investigated this. We went thru all logic step involving setting up our hardware. Double checked all IO Ports and Input/Output behaviour. Re-wrote all our setup routines and switching functions, like Lo/Hi rom switching and bus driver switching. Did memory pattern checking from the AVR and the SNES side.
Added extra delays to critical area and double checked all IO line on the board.
And guess what. Still the same problem. Nearly everything crashes.
So here are the news, we figured out as soon as a rom start music its crashes. So all homebrew stuff without SPC stuff works fine. But can’t get any homebrew or commerical stuff running thats uses sound.
I don’t have any deep knowledge about the sound sub system of the SNES. I only know its co-processor called SPC, it gets his IPL from the SNES and it has to be setup with code/music via a dedicated 8bit data port. So i assume there is no direct rom access from the SPC to the cartridge. So why is his a problem on our prototype board. We never had this kind of problem with the proof of concept board.
Last options we are thinking are: We either have a problem with the SRAM timings, since we use faster SRAM on the prototype board. The proof of concept board used 70ns SRAMs, now we are running 50ns. Or the capacitors on the SRAMs are to small. I would appreciate if anybody reading this have experienced same problems or knows what causing this problem could leave me a comment or contact me on #snesdev.
Last night we spend atleast 3 hours to track down a little bug in the cpu fuse settings. After running first tests on the hardware we got debug uart and some basic sreg addressing working.
Then we started to implement a sram read/write round trip. We found out that we read for all sram cells the same value as the last value which was written. So we stepped through the schematics and traced all IO lines and logic involved in the sram addressing process. First we analysed the sreg setup and the address counters. Then we checked the busdriver and the sram multiplexer. But this looked all out. Finally we found the problm that the WR line from the AVR to the sram is not pulled high when set in software.
So we looked for shortcircuits but didn’t find anything. Last guess was the mcu is broken, but finally we found out that we had a false fuse setting. So our IO pin was configured to passthru the clock signal on that pin. Fixed that and so basic sram read/write is working.
Tonite we gonna test bulk transfer. Hopefully this time we don’t have so nasty bugs.
These two pictures show the different functional blocks of the prototype design. On the top side you have the MCU and next to it the connector for In-System-Programming and the MMC/SD daughter board. The yellow block marks the usb hardware for emulated software-usb on the mcu, the green block is the ram section. The orange block on top, right under the cart edge connector marks the bus transceivers to connect or disconnect the snes to the ram interface. The blue block overlays the transceiver for data access to the ram from the mcu side. The logic gates are for lo-/hiram switching and to disable write access to the ram section from the snes side.
On the bottom side you have a socket for the cic-lockout chip and the rest of the bus transceivers to connect or disconnect the snes. In the lower half you have shift registers to preset a certain adress to the adress counters. These counters are connected to the ram via bus transceivers, so you can access large memory with only a few io-pins on the mcu side. The red block is a demultiplexer to distribute the 22bit adresses to the 19 bit adresses of the ram ics.
Block diagramm bottom
Block diagramm top
This monday morning the long awaited first prototype PCB arrived from pcb-pool. We had a little UPS problem on friday, so we had to wait till monday to get the PCB. Max just started to solder all the chips, looking forward to get a working usb uploader firmware running till the next weekend.
I think the PCB looks really good and iam looking forward to power it up soon…
Yesterday i learnt from Lint that there is a new Snes toolchain coming down. The Project can be found herehttp://code.google.com/p/snes-sdk/. Right now i have it running under linux. Just working on a patch for os x. Thumbs up to Ulrich Hecht for his work on this project.
- WLA DX Assembler Backend
- 816-tcc C Compiler
- 816-opt ASM Source Code optimizer
- crt0_snes Startup code in asm
- libc.asm Tiny libc in asm
david@slap:[~/Devel/arch...h/snes/snes-sdk]$ ls -l
drwxr-xr-x 2 david david 4096 2009-04-27 13:52 bin/
drwxr-xr-x 3 david david 4096 2009-04-27 14:04 libs/
-rw-r--r-- 1 david david 1387 2009-04-27 13:59 Makefile
drwxr-xr-x 11 david david 4096 2009-04-27 14:01 snes9x/
drwxr-xr-x 3 david david 4096 2009-04-28 09:29 snesc/
drwxr-xr-x 7 david david 4096 2009-04-27 14:14 tcc-65816/
-rw-r--r-- 1 david david 11304 2009-04-27 13:24 TODO
drwxr-xr-x 16 david david 4096 2009-04-27 13:59 wla_dx/
-rw-r--r-- 1 david david 7946 2009-04-27 13:23 crt0_snes.asm
-rw-r--r-- 1 david david 6096 2009-04-27 13:59 crt0_snes.obj
-rw-r--r-- 1 david david 1755 2009-04-27 14:04 hdr.asm
-rw-r--r-- 1 david david 7108 2009-04-27 13:23 libc.asm
-rw-r--r-- 1 david david 12160 2009-04-27 13:59 libc.obj
-rw-r--r-- 1 david david 11087 2009-04-27 13:23 libm.asm
-rw-r--r-- 1 david david 14670 2009-04-27 13:59 libm.obj
-rw-r--r-- 1 david david 6051 2009-04-27 13:23 libtcc.asm
-rw-r--r-- 1 david david 10101 2009-04-27 13:59 libtcc.obj
-rw-r--r-- 1 david david 132 2009-04-27 13:46 Makefile
drwxr-xr-x 6 david david 4096 2009-04-27 13:24 .svn/
Compile run of the demo game
rm -f snesc.smc snesc.sym data.obj graph_asm.obj str.obj
snesc.obj input.obj init.obj graph.obj *.s
/home/david/Devel/arch/snes/devkit/bin/wla-65816 -io data.asm data.obj
/home/david/Devel/arch/snes/devkit/bin/wla-65816 -io graph_asm.asm graph_asm.obj
/home/david/Devel/arch/snes/devkit/bin/wla-65816 -io str.asm str.obj
/home/david/Devel/arch/snes/devkit/bin/816-tcc -I. -o snesc.s.pre -c snesc.c
/home/david/Devel/arch/snes/devkit/bin/816-opt snesc.s.pre > snesc.s
optimization pass 1: 411 optimizations performed
optimization pass 2: 204 optimizations performed
optimization pass 3: 1 optimizations performed
optimization pass 4: 0 optimizations performed
616 optimizations performed in total
/home/david/Devel/arch/snes/devkit/bin/wla-65816 -io snesc.s snesc.obj
/home/david/Devel/arch/snes/devkit/bin/816-tcc -I. -o input.s.pre -c input.c
/home/david/Devel/arch/snes/devkit/bin/816-opt input.s.pre > input.s
optimization pass 1: 5 optimizations performed
optimization pass 2: 2 optimizations performed
optimization pass 3: 0 optimizations performed
7 optimizations performed in total
/home/david/Devel/arch/snes/devkit/bin/wla-65816 -io input.s input.obj
/home/david/Devel/arch/snes/devkit/bin/816-tcc -I. -o init.s.pre -c init.c
/home/david/Devel/arch/snes/devkit/bin/816-opt init.s.pre > init.s
optimization pass 1: 74 optimizations performed
optimization pass 2: 29 optimizations performed
optimization pass 3: 0 optimizations performed
103 optimizations performed in total
/home/david/Devel/arch/snes/devkit/bin/wla-65816 -io init.s init.obj
/home/david/Devel/arch/snes/devkit/bin/816-tcc -I. -o graph.s.pre -c graph.c
/home/david/Devel/arch/snes/devkit/bin/816-opt graph.s.pre > graph.s
optimization pass 1: 7 optimizations performed
optimization pass 2: 4 optimizations performed
optimization pass 3: 0 optimizations performed
11 optimizations performed in total
/home/david/Devel/arch/snes/devkit/bin/wla-65816 -io graph.s graph.obj
/home/david/Devel/arch/snes/devkit/bin/wlalink -dvSo data.obj graph_asm.obj
str.obj snesc.obj input.obj init.obj graph.obj snesc.smc
Section ".libc_misc" was discarded.
Section ".libc_cstd" was discarded.
Free space at $6833-$7fb1.
Free space at $7fb6-$7fbf.
Free space at $7fe0-$7fe3.
Free space at $7ff0-$7ff3.
Free space at $8000-$3ffff.
Bank 00 has 06033 bytes (18.41%) free.
Bank 01 has 32768 bytes (100.0%) free.
Bank 02 has 32768 bytes (100.0%) free.
Bank 03 has 32768 bytes (100.0%) free.
Bank 04 has 32768 bytes (100.0%) free.
Bank 05 has 32768 bytes (100.0%) free.
Bank 06 has 32768 bytes (100.0%) free.
Bank 07 has 32768 bytes (100.0%) free.
235409 unused bytes of total 262144.
../../tool/bsnes/bsnes snesc.smc || xset r on
SNES SDK running a demo game
I had so much fun finding out how good the Snes9x GX Emulator for the Wii is. I never really got into the Wii hacking scene yet, just keept a little and h following the exploiting status of the wii. So when the Homebrew Channel came out, i installed it. But never really did something useful with it. But this weekend i installed Snes9x and it really rocked. Super performance, no framedrops or broken sound. And the GFX looks really crisp. Nothing compared to the last exprience i had when i hooked a Nintendo Jr. to my flatscreen tv. it looked really really crap. Dont get me started NTSC, composite signal and a tv software scaler..uh..really crap, unplayable. But the Emulator stuff looks really good on the big screen.
After testing Mario Kart i got pissed off the Wii Controllers. You are supposed to use them in the same manner as in Wii Mario Kart. Steer with Up and Down button and accel with the  Button. But no R and L buttons. Without them Mario Kart is no fun. After a quick internet research i found a project to connect and orginal Super Nintendo controller via the Gamecube connectors to the Wii. Its a little more complicated than a simple piggy tail, since the protocol used by the Gamecube and Super Nintendo are totally different.The Gamecube uses a more complex protocol so that you need a microcontroller to do the conversion.
Yesterday was DIY sunday, soa friend and me threw this thing together. And it works really good. My friend got so hooked, so he is planing to make some more of the controllers and put them on ebay.