I give up!

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

I give up!

Post by psycopathicteen »

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.
Attachments
Gunstar Heroes Source.zip
(122.03 KiB) Downloaded 252 times
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: I give up!

Post by psycopathicteen »

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.
Attachments
Gunstar Heroes Source (2).zip
(122.62 KiB) Downloaded 239 times
DoNotWant
Posts: 83
Joined: Sun Sep 30, 2012 3:44 am

Re: I give up!

Post by DoNotWant »

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.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: I give up!

Post by psycopathicteen »

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.
User avatar
Hamtaro126
Posts: 785
Joined: Thu Jan 19, 2006 5:08 pm

Re: I give up!

Post by Hamtaro126 »

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: Select all

!DefTest = "$1234"
Use this, It'll work better and it is syntax compatible with other assemblers:

Code: Select all

!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!
AKA SmilyMZX/AtariHacker.
KungFuFurby
Posts: 264
Joined: Wed Jul 09, 2008 8:46 pm

Re: I give up!

Post by KungFuFurby »

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.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: I give up!

Post by psycopathicteen »

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.
Last edited by psycopathicteen on Tue Jun 03, 2014 10:40 am, edited 1 time in total.
KungFuFurby
Posts: 264
Joined: Wed Jul 09, 2008 8:46 pm

Re: I give up!

Post by KungFuFurby »

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.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: I give up!

Post by psycopathicteen »

For BBBB it was XMSNES.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: I give up!

Post by psycopathicteen »

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.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: I give up!

Post by psycopathicteen »

I organized the code a little more. Now the metasprite routine and animation routine are separated from the main routine.
Attachments
Gunstar Heroes Source.zip
(123.26 KiB) Downloaded 215 times
Post Reply