Archive for the ‘Snes’ Category

Finally a new teaser release …

Friday, November 14th, 2008

I know it’s been a long time now that I’m promising new stuff …


The rom is available here.

Source code still need a bit of cleanup, so you need to wait a bit more… Don’t hesitate to report bug or any comments.

See ya, Lint

A new wiki discovered …

Thursday, October 16th, 2008

I just landed on this site while looking for software debugging info on the 65816

http://6502org.wikidot.com/software-65816

The wiki  is more about the 6502 but is some pages dedicated to the 65816.

++ Lint

Real life …

Monday, October 6th, 2008

Currently my real life is taking me a lot of time … We are gooing to move to another home soon, so we need to put everything in boxes and prepare for the transportation of them.

I just discovered a nice blog today from someone that did a lot of C64 and a bit of SNES : http://dailly.blogspot.com/

I will try to start coding again in the train … currently I use that time to play Metal slug 7 and Dragon Quest IV on my DS fat.

See ya,

Lint

First big optimisation in sprite functions.

Tuesday, September 16th, 2008

It’s been a while that I’m working on various optimisation to some functions to copy tables of data. I found out that the C compiler wasnt optimizing it at all. Here is the original piece of code :

    counter = data[frame].spriteNum;
    for(i=0; i<counter; i++) {
        //x = data[frame].data[i].nameLow & 0x0f;
        //y = data[frame].data[i].nameLow >> 4;

        spriteData.data[i+offset].HPos =
            data[frame].data[i].HPos + 0x76;
        spriteData.data[i+offset].VPos =
            data[frame].data[i].VPos + 0x80;
        spriteData.data[i+offset].nameLow =
            data[frame].data[i].nameLow;
        spriteData.data[i+offset].priority =
            data[frame].data[i].priority;
        spriteData.data[i+offset].color =
            data[frame].data[i].color;
    }

    // set big sprite
    spriteData.prop[offset].properties = 0xaa;
    spriteData.prop[offset+1].properties = 0xaa;

This was consuming almost 25% of the cpu time between each Vblank. The new code is going about 30 times faster :

    heroPreparedSpriteData *myData;
    OBJECTData *myObjectData;
    OBJECTData *currentSpriteData
    OBJECTProp *currentSpriteProp;

    // init with base address
    myData = data;
    // set to current frame
    for(i=0; i<frame; i++) {
        myData++;
    }

    // init with base address
    currentSpriteData = (OBJECTData*) &spriteData.data;
    currentSpriteProp = (OBJECTProp*) &spriteData.prop;
    // set to current frame
    for(i=0; i<offset; i++) {
        currentSpriteData ++;
    }

    counter = myData->spriteNum;

    // init start of the data array
    // we assume we always starts at 0 index
    myObjectData = (OBJECTData*) &(myData->data);

    for(i=0; i<counter; i++) {
        currentSpriteData->HPos = myObjectData->HPos + 0x76;
	currentSpriteData->VPos = myObjectData->VPos + 0x80;
	currentSpriteData->nameLow = myObjectData->nameLow;
	currentSpriteData->priority = myObjectData->priority;
	currentSpriteData->color = myObjectData->color;

	// update myObjectData Adress
	myObjectData++;
	currentSpriteData ++;
    }

    // set big sprite for the 8 first sprites
    currentSpriteProp->properties = 0xaa;
    currentSpriteProp++;
    currentSpriteProp->properties = 0xaa;

C compilers seems to something really handle the table really badly.

So now I’m going to finish writing the sprite routines since now I have acceptable performance going on. Why acceptable ? Because I’m sure there is a relly more effecient way to perform all this. It’s basically just copying data, so I should get myDta in ROM and DMA it to RAM and from there just updating some values like HPos and VPos.

I keep you updated anyway …

See ya, Lint

Source code of a commercial SNES game leaked …

Monday, September 15th, 2008

I have found yesterday a site that give a link to the source code of a commercial SNES game. I hadn’t have a close look yet but me for me I thinks it’s the first time that the source code of a full game is available on the net. If I’m wrong don’t hesitate to contact me …

Here is the link the the blog.

++ Lint

F-Zero VS

Sunday, September 14th, 2008

I discovered a few days ago a blog explaining how to play a multiplayer mode in F-Zero running in a modified version of snes9x.

I hope that one day such feature will be possible on hardware with a action replay like device to patch the game and a way to communicate between two SNES.

Here is the F-Zero VS blog.

++ Lint

Back from vacation …

Wednesday, September 3rd, 2008

It’s been almost 5 days that I’m back from vacation.I have almost no time for myself …

Hard time at work since we have a major release on next wednesday. I’m still able to find some time while on the train. So I’m still optimising sprite stuff. I dicovered that the WDC Compiler is very bad at handling structure and tables. It’s don’t optimize the code at all and it’s a real loss of CPU cycle for nothing and finally always recalcaulating the exact same memory offsets.

I’m in the process to completely rewrite that code in pure ASM.

++ Lint

Refactoring and optimisation process …

Wednesday, August 6th, 2008

It’s been a while that I haven’t posted anything. So here is a little update on my work.

It’s now almost 2 weeks that I’m working on a better way to handle sprites and trying to do it the most effective way. Thing are starting to work so i might have it finished in about 1 week.

Then I’m not really sure what to do next. I was thinking about implment ennemies with scripting, but I feel like it’s going to be boring for me. The other thing that still need work is the NSF Replayer port. That is going to be a good challenge and something that other people will find interest in it …

That’s all for this time,

See ya later, Lint

2000 visitors …

Friday, July 18th, 2008

Thanks you for visiting my site. In a bit more than 4 months you have been 2000 to come visit my blog.

Stats 2000 visitors

++ Lint

It’s time for a pre-release

Wednesday, July 16th, 2008

It’s been a while I’m busy preparing my “end of July release”. That release may not be the complete level 1 as expected. I have loose a lot of time and energy to try making the NSF Replayer to work without success. After that I got stuck with my Gfx converter and switched to mappy (so I needed to write the lua script to export the map and tile correctly). And then again getting problems with BG mode 3 that I decided to use.

So now .. It’s the perfect time for a pre-realease. I got all I need for the score board to run and got the entire level 1 in rom and got it scrolling. The pre-release is just that… Enjoy !

Rom 5 pre release 1

The rom is available here is usual.

Next step is putting the main character sprite back with all possible movement. That mean a lot of Gfx work, so I hope that it will be ready by sytart of next week.

See ya, Lint