Start coding the Fat32 lib for the incomming new homebrew snes devkit.

April 22nd, 2009

Quite a long title that talk for itself …

It’s been now a few months that Scott is developing is snes devkit cart ( ). He’s currently still playing with the hardware but since I’m willing to start coding the Bios for it I decided to modify bsnes to map a few memory registers that I might need for doing the SDCardReader code that will allow the snes to read the SD card and display the menu on the screen.

The registers are :  status(r) $3100 ,data(r) $3103 and 2 for the offset(w) $3101 and $3102.

My code is based on a existing lib and if I continue at this rhythm i might have a basic demo going on by end of next week.

I keep you updated.

++ lint

NSF Replayer : SPC code update

March 31st, 2009

This early morning I started to disassemble the original SPC.BIN that was in the demo released by memblers. It just happened that the faulty file was I just need to make 2 changes that I describe here :

BEFORE : ROR   *       6C 3 NOP 1 
AFTER :  ROR   !*      6C 3 NOP 1

Seems to be a typo …

BEFORE : MOV     *,A     C4 2 NOP 1
         MOV     !*,A    C5 3 NOP 1

AFTER  : MOV     !*,A    C5 3 NOP 1
         MOV     *,A     C4 2 NOP 1

Look again like a typo, just need to swap to the lines…

So not really a big deal, but now I have a SPC source that compile correctly.

I did a bit of code cleanup yesterday and gave the new rom to Tomy and this time it seems to work. I will release a rom for everybody to test either this afternoon or tomorow morning.

++ Lint

NSF Replayer first results.

March 30th, 2009

On friday I finally got to make the NSF Replayer work. After various general code checking and made some minor corrections, the player wasn’t still working. From there the only thing that wasn’t checked was the SPC code itself (the only source that I got complete). I had then the idea to the SPC code directly from memblers code ( SNES NSF Player (32Mbit) ).

And … it worked totally fine. Then is various difference with the original SPC.BIN and the one I compiled. I will In a near future reverse the original SPC.BIN and rewrite the correct source code so it can be compiled by hand and can be used for any enhancement that might come one day.

My code is working right on most emu that handle the sound correctly. The Snes9x debug version is really awfull, but zsnes and bsnes are doing the job really fine.

Currently the code seems to not work on the SNES itself as reported Tomy from TOTOTEK. I have no real ideas on why the code isn’t working on the actual SNES for the moment. Tomy reported that he see nothing on the screen while running my proff of concept ROM. I need to assemble a new ROM to check on wich routine the SNES hang. I mainly have 3 functions : 2 init ones and 1 for playing the song that need to be called once per VBlank (not needed in VBlank).

I keep you all informed and will release full source as soon as it is working on the hardware.

See ya, Lint

Working back on NSF Replayer

March 26th, 2009

Too long again without any post. I’m really sorry about this. Since I have buy our house in october my mind have been a bit somewhere else.

It’s been now 2 weeks that I’m working agin on the port and cleaning of the nsf player for the snes originally made by memblers.  I have made good advancementlately and most of the code is stable now. Still got minor problems with the direct page register when comming back from nes code execution.

So at the moment no sound output yet but get me a couple of weeks and I’m sure everything will run smooth.I will try to keep you updated as soon as possible, and when project it’s I will release a packeged version of the source code so anyone will be able to use it.

See ya, Lint

Fosdem and stats

February 4th, 2009

Every year since about 5 years now I attend the Fosdem. This year again there is no exception. So if you attend Fosdem and want to discuss about some Snes stuff, just let me a comment.

Last month I had a bit more than 1100 unique visitors for this blog. Thanks all for reading me.

++ Lint

A new wiki discovered … again …

January 28th, 2009

While reading the usual blogs and forums as every morning i just landed on Neviksti wiki. It mostly contains the usual docs. The most interesting part is the Schematic page, where you can find the Snes pcb schematics.


++ Lint

Snes Cart Project …

January 26th, 2009

I got an email last week from someone that is deigning a Snes cart that will allow to load roms from an SD card.

Here is the blog abot the project : HACKING THE SUPER NINTENDO

The project is already well advanced and he’s talking about doing some USB communication to a PC possible. This will open the world of debugging on the real hardware too since the developper seems to be interested to integrate such facilities in the cart.

See ya, Lint

Snes Basic Project

January 21st, 2009

I just uploaded a Snes Basic Project to use with my Eclipse CDT tutorial. It’s mostly an empty project with a makefile and the basic to compile your code. In the main.c there is an example that setup the screen orange.

It’s been a few days that I’m configuring a SVN repository for my code. So to be sure to have the last version go check out : . If any of you have project that he want to put on the SVN just post a comment and I will get in touch with you.This code repository is not only for SNES dev with a C compiler, I will also accept pure asm code.

See ya, Lint

Macro definition in WDC tools with embedded asm …

January 21st, 2009

Hi all … I have been working on various stuff lately. On of the thing I’m working on is speed optimisation. For doing that I decided to start to make inline assembler into my code. Take a sneak peek at what i’m doing :

#ifdef __C_MACROS__

#define v_20    #$20
#define v_80    #$80

#define VRAMByteWrite(value,vramdst) \

#define __VRAMByteWrite(value,vramdst,v_20,v_80) asm { \
    sep        v_20;        \
    longa      off;         \
    lda        v_80;        \
    sta        $2115;       \
    rep        v_20;        \
    longa      on;          \
    lda        %%vramdst;   \
    sta        $2116;       \
    sep        v_20;        \
    longa      off;         \
    lda        %%value;     \
    sta        $2118;       \
    rep        v_20;        \
    longa      on;          \


This is an abstract of my new PPU.h include file. The usage of v_20 and v_80 is due to some limitation of the preprocessor comprared to what is possible with GCC by example. If you have an other syntax that work with WDC to include #$20 directly in the asm {} directive, shoot me a comment.

My 2k limit bug is still bugging me, the Eclipse howto might be finished this week since I’m almost done with the SNES_BaseProject. Something else is coming soon too.

++ Lint

2k limit is there …

January 15th, 2009

And it’s totally bugging me …

My sprite control routine for the upcomming source release i finnaly got the 2k limit issue. The freesdk only  allow you to compile object that are going to be less than 2k. And here my function alone is more than 2K so I need to refactor it. This will delay the source code release.

An other issue that I have been facing for a few week now was compiler warning about function that were not prototyped but they were. When you prototype a function with no arguments like :

void ennemyInit();

This will return a warning during compilation. The right syntax to use is :

void ennemyInit(void);

In parallel to the source release, I’m working on the Eclipse CDT Install tutorial. It’s still work in progress but should be finalized by next week.

See ya, Lint