IPB

Welcome Guest ( Log In | Register )


 

Recent Changes | Random | Help | Special Pages | Upload
home | info | forums | svn | irc | podcast | about

SCHG How-to:Separate title art from GHZ/make GHZ load alternate art

From Sonic Retro

(Original guide by MKAmeX)

This guide assumes you have already merged the two GHZ files to make a single file (In this case, it should be 8x8GHZ.bin), this is actually a really easy thing to do.


First, load _inc/Main level load blocks.asm

You should see something like:

	dc.l Nem_GHZ_2nd+$4000000
	dc.l Blk16_GHZ+$5000000
	dc.l Blk256_GHZ

Change it into:

	dc.l Nem_GHZ+$4000000  ;changed from Nem_GHZ_2nd
	dc.l Blk16_GHZ+$5000000
	dc.l Blk256_GHZ

Next, open sonic1.asm and look for:

Blk16_GHZ:	incbin	map16\ghz.bin
		even
Nem_GHZ_1st:	incbin	artnem\8x8ghz1.bin; Now only title screen and ending use this.
			even 
Nem_GHZ_2nd:	incbin	artnem\8x8ghz2.bin; Title Screen and ending only.
		even
Blk256_GHZ:	incbin	map256\ghz.bin
		even
Blk16_LZ:	incbin	map16\lz.bin
		even

add this above Nem_GHZ_1st::

Nem_GHZ:	incbin	artnem\8x8ghz.bin	 ; New GHZ file.
				even

It should look like:

Blk16_GHZ:	incbin	map16\ghz.bin
		even
Nem_GHZ:	incbin	artnem\8x8ghz.bin	 ; New GHZ file.
				even
Nem_GHZ_1st:	incbin	artnem\8x8ghz1.bin; Now only title screen uses this.
			even 
Nem_GHZ_2nd:	incbin	artnem\8x8ghz2.bin; Title Screen only.
		even
Blk256_GHZ:	incbin	map256\ghz.bin
		even
Blk16_LZ:	incbin	map16\lz.bin
		even

Next, go to _inc/Pattern load cues.asm and find:

PLC_GHZ:	dc.w $B
		dc.l Nem_GHZ_1st; GHZ main patterns
		dc.w 0
		dc.l Nem_GHZ_2nd; GHZ secondary	patterns
		dc.w $39A0

Change Nem_GHZ_1st into Nem_GHZ and remove Nem_GHZ_2nd. Next, you have to change $B into $A so it knows how many files to load. You code should look like this.

PLC_GHZ:	dc.w $A
		dc.l Nem_GHZ; GHZ main patterns
		dc.w 0

Load up your rom and it should load Correctly. You won't be able to tell if it worked or not unless you edit the art.

Also, If you're going to be editing the art, it's best that you make a seperate file for the title screen. To do this, open sonic1.asm and look for Title_LoadText: and scroll down until you see:

		lea	(Blk16_GHZ).l,a0; load	GHZ 16x16 mappings
		move.w	#0,d0
		bsr.w	EniDec
		lea	(Blk256_GHZ).l,a0; load GHZ 256x256 mappings

change it into:

		lea	(Blk16_title).l,a0; load title 16x16 mappings
		move.w	#0,d0
		bsr.w	EniDec
		lea	(Blk256_title).l,a0; load title 256x256 mappings

Now scroll down a little more to:

lea	(Nem_GHZ_1st).l,a0; load GHZ patterns

change it into:

lea	(Nem_title).l,a0; load title patterns

Now go to Blk16_GHZ and you should see:

Blk16_GHZ:	incbin	map16\ghz.bin
		even
Nem_GHZ:	incbin	artnem\8x8ghz.bin; GHZ primary patterns
		even
Nem_GHZ_1st:	incbin	artnem\8x8ghz1.bin; GHZ primary patterns
		even
Nem_GHZ_2nd:	incbin	artnem\8x8ghz2.bin; GHZ secondary patterns
		even
Blk256_GHZ:	incbin	map256\ghz.bin
		even

Copy Blk16_GHZ: and BLk256_GHZ: and past them both above Blk16_GHZ:.

Blk16_GHZ:	incbin	map16\ghz.bin
		even
Blk256_GHZ:	incbin	map256\ghz.bin
		even
Blk16_GHZ:	incbin	map16\ghz.bin
		even
Nem_GHZ:	incbin	artnem\8x8ghz.bin; GHZ primary patterns
		even
Nem_GHZ_1st:	incbin	artnem\8x8ghz1.bin; GHZ primary patterns
		even
Nem_GHZ_2nd:	incbin	artnem\8x8ghz2.bin; GHZ secondary patterns
		even
Blk256_GHZ:	incbin	map256\ghz.bin
		even

Change it so it looks like this:

Blk16_title:	incbin	map16\title.bin
		even
Blk256_title:	incbin	map256\title.bin
		even
Blk16_GHZ:	incbin	map16\ghz.bin
		even
Nem_GHZ:	incbin	artnem\8x8ghz.bin; GHZ primary patterns
		even
Nem_GHZ_1st:	incbin	artnem\8x8ghz1.bin; GHZ primary patterns
		even
Nem_GHZ_2nd:	incbin	artnem\8x8ghz2.bin; GHZ secondary patterns
		even
Blk256_GHZ:	incbin	map256\ghz.bin
		even

Then add:

Nem_title:	incbin	artnem\8x8title.bin
		even

Add that right above Blk16_title:. You should have:

Nem_title:	incbin	artnem\8x8title.bin
		even
Blk16_title:	incbin	map16\title.bin
		even
Blk256_title:	incbin	map256\title.bin
		even
Blk16_GHZ:	incbin	map16\ghz.bin
		even
Nem_GHZ:	incbin	artnem\8x8ghz.bin; GHZ primary patterns
		even
Nem_GHZ_1st:	incbin	artnem\8x8ghz1.bin; GHZ primary patterns
		even
Nem_GHZ_2nd:	incbin	artnem\8x8ghz2.bin; GHZ secondary patterns
		even
Blk256_GHZ:	incbin	map256\ghz.bin
		even


Now you have to add those files. Go to artnem and copy 8x8ghz1.bin and rename it into 8x8title.bin Then, go to map16 and copy ghz.bin and rename that into title.bin. Do the same thing for map256.

If you did it correct, congratulations! Your ending background might get messed up if you edit GHZ's art, so let's fix that. Go to _inc/Main level load blocks.asm and edit:

 
	dc.l Nem_GHZ_2nd	; main load block for ending
	dc.l Blk16_GHZ
	dc.l Blk256_GHZ
 

into:

 
	dc.l Nem_title_2nd	; main load block for ending
	dc.l Blk16_title
	dc.l Blk256_title
 

Next, go to artnem and make a copy of 8x8ghz2.bin and rename it into 8x8title2.bin. Open sonic1.asm and look for:

 
Nem_title:	incbin	artnem\8x8title.bin
		even
Blk16_title:	incbin	map16\title.bin
		even
Blk256_title:	incbin	map256\title.bin
		even
 

change it into:

 
Nem_title:	incbin	artnem\8x8title.bin
		even
Nem_title_2nd:	incbin	artnem\8x8title2.bin
		even
Blk16_title:	incbin	map16\title.bin
		even
Blk256_title:	incbin	map256\title.bin
		even
 

Next, go to Pattern load cues.asm and look for:

 
PLC_Ending:	dc.w $E
		dc.l Nem_GHZ_1st	; GHZ main patterns
		dc.w 0
		dc.l Nem_GHZ_2nd	; GHZ secondary	patterns
		dc.w $39A0
 

Change it to:

 
PLC_Ending:	dc.w $E
		dc.l Nem_title_1st	; title main patterns
		dc.w 0
		dc.l Nem_title_2nd	; title secondary patterns
		dc.w $39A0
 

And it should fix your ending art. OR you could do what you did with the title screen and make the ending load totally different art all together.