I give up!

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
I give up!
by on (#129448)
Here's the source code for my Gunstar Heroes port. Anybody else can finish it, or at least clean up sloppy code. It's Summer time and I want to get out and have fun. I need a break from this.
Re: I give up!
by on (#129484)
Here's a slightly more organized version of the source code. I cleaned up the dynamic animation routine a little, since it was horrible spaghetti code due to sloppily implementing dynamic sprite slots with variable width and height, because squeezing sprites into a 64x16 slot was a pain in the butt.

I hope, somebody plays around with it, or asks questions.
Re: I give up!
by on (#129493)
I have been looking at it a little since yesterday, thanks!
Gonna see if I can understand it all this weekend, and hopefully be able to contribute something.
Re: I give up!
by on (#129497)
Here's how to add an object:

1: Draw a sprite using a graphics editor.
2: In "animation.txt" write the metasprite data for the sprite. I'll explain the format when I have time.
3: In "object.txt" write the object's routine. All that needs to be done in the routine is store the address of the metasprite data in the "requested metasprite" variable.
4: Look for the list of level objects, and insert the name of the object routine there, along with a few other things that I'll explain Tomorrow.
Re: I give up!
by on (#129506)
Oh My Gosh, I know how XKAS syntax works, but the symbols and quoteations (some symbols are basically unicode quotations) are NOT needed for XKAS 0.06!

Instead of this, for example:

Code:
!DefTest = "$1234"


Use this, It'll work better and it is syntax compatible with other assemblers:

Code:
!DefTest = $1234


Also, ASAR is compatible with XKAS 0.06 code, It's a compatibility fix and a feature split from Bass (was XKAS 0.14 before the name change!)

Plus, XKAS and ASAR GUI is really not recommended, as they fail to work after a while, even SMW Central hates it!
Re: I give up!
by on (#129514)
I actually have a curiosity with some data that accidentally got left over. I also found this in the earlier Busty Baby Blows Bots ROMs that I have.

Did you ever attempt to create a sound driver? I noticed some sound data in the ROM (ROM banks 2 and 3), although clearly a major component of it is overwritten.
Re: I give up!
by on (#129516)
I used MOD to SPC converter for BBBB.

Something I just realized is that porting an existing game doesn't give as much room for creativity as making a new game. Busty Baby was a little bit more creative with it's cannon-on-legs boss, and the dash-and-bounce-off-enemies idea was pretty original.

Another thing I realized in regards to gameplay, is how many different uses there are for the same movement patterns. How many game objects have you seen that either:
-move in a straight line
-move back and forth
-move in a circle
-move in a wave
-move in a gravitational arch
-follow the contour of the ground

I'm thinking instead of rewriting a new routine for every object, I can have the engine perform basic movement patterns automatically.
Re: I give up!
by on (#129524)
My two guesses would have been XMSNES or the one from N-Warp Daisakusen. But so far, I think it's neither, and therefore I have no clue what the original sound driver is.
Re: I give up!
by on (#129526)
For BBBB it was XMSNES.
Re: I give up!
by on (#129669)
Okay, here is the metasprite format:

word 0: ROM address of patterns
word 1: ROM bank of patterns
word 2: width of vram slot (unit = 2 8x8 cells)
word 3: hight of vram slot (unit = 8x8 cell)
word 4: see below
-$0000 end of metasprite
-$0001 draw 8x8 sprite
-$0002 draw 16x16 sprite
-$8000-$ffff address of recycled metasprite
word 5: x-offset
word 6: y-offset
word 7: oam attributes (name is relative to vram location of animation slot)
word 8: same as word 4

There is also a value called "vram size" but is not stored in the metasprite format, instead it is loaded when an object is spawned. It originally did the job of words 2 and 3, but now it is only used for checking if there is enough DMA time, and if there is enough space in vram to spawn an object in the first place. The "vram size" should be the maximum amount of 16x16 patterns the object ever takes up. Having a "vram size" of 0 allows for non-dynamic animation.

Also there is a "animation by graphics address" mode that bypasses words 0 and 1, and instead uses a memory variable to point to the address. It's accessed by setting "animation_mode" to 1.
Re: I give up!
by on (#130096)
I organized the code a little more. Now the metasprite routine and animation routine are separated from the main routine.