Refactoring and optimisation process …

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

Driver license.

July 24th, 2008

I finally got my driver license today on the second try. I will now be able to travel around with the whole family.

I’m so happy …

See ya, Lint

PS : Barely no time to advance on my snes project. I many “real life” stuff to handle currently, and this weekend I will attend the #gbadevfr BBQ in Paris. Expect something (level 1 finished with full ennemies) for mid august right before I leave for my vacations.

2000 visitors …

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

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

VRAMLoad + CGRAMLoad updates

July 8th, 2008

Yesterday I returned to the PPU.c code. I knew that the VRAMLoad and CGRAMLoad needed to be reworked. The DMA transfer routine we were always getting data from bank $01. Since I start to having lots of ressource, I got stuck while implementing the score/status board. Here is the revised code :

void VRAMLoad(word far *src, word vramDst, word size) {
	// set address in VRam for read or write ($2116) 
	// + block size transfer ($2115)
	*(byte*)0x2115 = 0x80;
	*(word*)0x2116 = vramDst;
	
	// set DMA control register (1 word inc)
	// and destination ($21xx xx -> 0x18)
	*(word*)0x4300 = 0x1801;	

	// DMA channel x source address offset 
	// (low $4302 and high $4303 optimisation)
#asm
	lda %%src;					
	sta $4302;					
#endasm
	// DMA channel x source address bank
#asm
	lda %%src+2;				
	sta $4304;
#endasm

	// DMA channel x transfer size 
	// (low $4305 and high $4306 optimisation)
	*(word*)0x4305 = size;	

	// Turn on DMA transfer for this channel
	setINIDSPDirectValue(0x80);
	*(byte*)0x420b = 0x01;
	setINIDSPDirectValue(0x00);
}

I’m now using far pointer, here is a part of the ressource.h :

extern word far score_pic[];
extern word far score_pal[];
extern word far score_map[];

So now I can copy from anywhere in ROM to VRAM or CGRAM  without any problem.

++ Lint

Level 1 is ready to scroll

July 4th, 2008

I finished the level 1 map this morning and really wanted to share it with you (click for full level) :

Level 1 teaser

It’s now been a few days that I’m mostly playing with MAME and Gimp to rip the gfx and create the tiles to use on my Kung Fu Master port for the SNES. I still need to do some work in the score to create the tile and be ready to write them on the screen.

I just discovered that the tool I use to convert my pcx isnt supporting big files like the one i show you here. Anybody know a good map editor compatible with the SNES ? I will anyway first concentrate on the scoring part.

NSF Replayer status : The code is now more stable but i still have issue with the NES code that is accessing some part of memory that should remain untouched. I need to trace it more deeply … I keep you updated anyway but I will not work on that issue that much or I will never have something to show on the end of July.

++ Lint

Full screen redesign

July 3rd, 2008

A received a few suggestion after yesterday post. The switching of player and ennemy life bar was causing some trouble to some of my friends, so I switched it back and changed the life counting. Here is the full screen redesign of the Level 1 start.

Level 1 screen redesign

 

I will now start to rip the full Level 1 gfx and start to implement the background scroll and update of the score and status. I think it can be done for start of next week.

See ya, Lint

Redesigning the screen to fit.

July 2nd, 2008

Yesterday night I redesigned the top part of the game screen si the whole play area fit in the SNES screen. The original arcade title have a 256 x 256 screen while the SNSE have 256 x 224. I need to crop 32 pixels. SO here is the result of my work :

Original score

Redesigned score

I still need to finish the map of the first level. I hope to finish that by tomorow or later if i decide to implement the score part first.

See ya,

Lint

Native Vs Emulation mode

July 1st, 2008

This morning I think I finally found why the NSF Replayer isn’t working. Here is the piece of code :

        sec
        xce             ; 6502 mode
        ldx #0
        txy
        ;jsr ($1013,x) <- commented for testing purpose
        clc
        xce             ; native mode

The problem is when I switch the 65816 execution mode from native to emulation (6502). This code is part of a routine that is called in memory at address 7F5006 with a jsl instruction and the routine return with a rtl to code in bank 0. When I’m removing the xce instruction everything run fine, with the xce instruction the rtl return in the middle of nowhere. Is there something that xce instruction modify that I’m not aware of ?

I will continue to investigate, but usual shoot your ideas in the comments section.

++ Lint

EDIT: The problem is that when comming back emultation mode the stack address is modified. So now as a quick patch I’m saving it somewhere in RAM and restore it. Thanks D4S for spotting this. 

SNES Central news + NSF Replayer status

June 30th, 2008

This morning I discovered that one of the site that I consider as the best SNES ressource (especially about proto and alpha/beta release) did a small news on myself. Go check it : www.snescentral.com

Thanks guys, it is a good gift for me. Yeps, It’s my birthday today. I’m 34 years old today.

A little update on my SNES work : sound engine is soon going to be able to run. I already corrected many lines of code that were causing trouble. The whole NSF init process is almost finished (I hope tonight or tomorow morning 😉 ). Then I will attack the player itself, but since it’s based on the same process so it will be painless.

I still hope to finish this week my NSF Replayer work. I will try to make a package and a small doc so anybody can use it or improve it.

++ Lint