Archive for January, 2009

A new wiki discovered … again …

Wednesday, 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.

Enjoy,

++ Lint

Snes Cart Project …

Monday, 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

Wednesday, 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 : http://snesdev.antihero.org/svn/SNES_BaseProject/ . 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 …

Wednesday, 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) \
        __VRAMByteWrite(value,vramdst,v_20,v_80)

#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;          \
}

#endif

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 …

Thursday, 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

Rom release with enemies.

Thursday, January 8th, 2009

It’s been too long I’m promising new stuff. So here is a new rom preview with enemies. The collision system is not done completly so you can’t yet kick the enemies out. One other thing that is yet to be done is the fall of the enemies after you get rid of them when they catch you. So the only thing in this rom are the enemies walking, grabing you and making you loosing energy.

Rom 7 teaser

There is still some work in sprite animation when the hero is facing right.This release is more for the impatient.You can get it here. It was tested on snes9x 1.43 and bsnes 0.037 emulators. If someone can confirm me it’s working on the real hardware that would be nice.Lint ++PS : Eclipse CDT setup is coming real soon…

Happy new year …

Tuesday, January 6th, 2009

A bit late as usual…

I wish you all an happy new year 2009. I have great hope that the snes dev scene will move this year, for the last months I see more and more people getting interested in developping for the Snes. So if you already code the snes please support them. I have also met a few guys on the net that have more or less similar projects : a cart that support sd for playing games. Well playing games or developping games. Now an SD is not going to be really practical but once it’s done I guess I can dream about a USB connection to upload code and maybe even debug feature.

I’m also in the process of switching my IDE. Since I’m working with Eclipse for my Php and Java dev at work, I tought that i should use it too for my snes deving. I installed CDT component. Everything is ok except for the Build process with the makefile I was using with VC Express 2008 that I was using before (getting rid of a microsft software from my computer is also a reason to the Eclipse switch). My problem is that WDC816CC.exe that is the C compiler from WDC always return -1 as return code even if compilation is ok. Here is an example :

C:\65xx_FreeSDK\bin\wdc816cc -wl -wp -sop -MS pad.c
WDC 65816 C   Version Evaluation  Mar 27 2006 16:41:28
       Copyright (C) 1992-2006 by The Western Design Center, Inc.
make: [compile] Error -1 (ignored)

On a real error the return code is 254.

...
D:\JDus\workspace\KFM Snes\main.c:105:
ERROR 34: undefined symbol: counter2 1 errors
make: [compile] Error 254 (ignored)

So this is a call to someone that is familiar with windows programming (thing that I’m not at all). I need either a wrapper that ouput an other return code (translate them) so i can use GNU Make with eclipse. Or even maybe patch WDC816CC.exe (even if i prefer the first solution so we keep WDC binaries intact from distribution.Shout a comment if you need to get in touch with me.

++ Lint

PS : It seems that the free version of the sdk is not more available from WDC. Get in touch with me if you need a copy.