Separating title from GHZ/making GHZ load 8x8GHZ.bin

Discussion in 'Tutorials Archive' started by MKAmeX, Aug 8, 2008.

Thread Status:
Not open for further replies.
  1. MKAmeX

    MKAmeX Newcomer Member

    Joined:
    May 11, 2008
    Messages:
    4
    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:



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


    Change it into:





    Code:
    	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:





    Code:
    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::



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


    It should look like:





    Code:
    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:





    Code:
    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.





    Code:
    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:





    Code:
    		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:





    Code:
    		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:





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


    change it into:





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


    Now go to Blk16_GHZ and you should see:





    Code:
    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:.





    Code:
    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:





    Code:
    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:





    Code:
    Nem_title:	incbin	artnem\8x8title.bin
    
    		even


    Add that right above Blk16_title:.

    You should have:





    Code:
    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:





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


    into:





    Code:
    	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:



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


    change it into:





    Code:
    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:





    Code:
    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:



    Code:
    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.
     
    Last edited by a moderator: Aug 11, 2008
  2. sonic

    sonic Well-Known Member Member

    Joined:
    Mar 27, 2008
    Messages:
    62
    Location:
    Michigan
    Very good info!
     
  3. Qjimbo

    Qjimbo Well-Known Member Member

    Joined:
    Feb 27, 2008
    Messages:
    850
    Location:
    Vancouver, BC
    Nice guide, ties in very well with the video tutorials!
     
  4. MKAmeX

    MKAmeX Newcomer Member

    Joined:
    May 11, 2008
    Messages:
    4
    Thanks guys! Also, I added something to the very end, since I found a problem with fixing the ending. The first post is updated now.
     
Thread Status:
Not open for further replies.