Sonic and Sega Retro Message Board: Sonic 1 REV01 BG effects - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

Sonic 1 REV01 BG effects Ported

#1 User is offline jman2050 

Posted 21 June 2006 - 05:26 PM

  • Teh Sonik Haker
  • Posts: 625
  • Joined: 10-December 05
  • Wiki edits:4
This one might take a while, so sit tight.

Looking at the REV01 version of Sonic 1, I can see why it's Rev01. They pretty much completely overhauled the entire BG deformation part of the engine. The drawing system has been changed (and from what I've seen, more similar to the way Sonic 2 does things) and the deformation data for every level has been changed to fit this new code. Also, in every level besides SBZ2, it was used to enhance the deformation effects. To see the difference in your own Sonic 1 rom, you'll have to do the following:

1. Download every text file below. They contain all the ASM you need to perform this conversion. note that if you edited code in any of the code you're about to replace, you're probably not gonna get those edits back without substantial recoding, so be wary.

http://www.cgi101.co...50/lzwobble.txt
http://www.cgi101.co...2050/bgdraw.txt
http://www.cgi101.co...50/bgscroll.txt
http://www.cgi101.co...50/bgdeform.txt
http://www.cgi101.co...blockscroll.txt

2. First, we'll do the easiest change. Go to label Obj0A_WobbleData in hivebrain's 2005 disassembly and replace the entire block with what's in lzwobble.txt. The programmer's extended this array so it would also be usable by the deformation data even though it was designed to be used by the water bubbles.

3. Next, we'll do the BGScroll data. Go to BGScroll_GHZ in the disassembly. Replace everything from there until the end of BGScroll_End with whatever is in bgscroll.txt. The starting deformation data for every stage needed to be changed. To be precise, it prevents bugs that occur in the scrolling in SBZ and SYZ, and prevents a bug that causes GHZ's bg not to appear at all.

4. Next, we'll do the deformation data itself. Go to Deform_GHZ, and replace everything from there until the end of Deform_SBZ, straight down (right before ScrollHoriz) with the contents of bgdeform.txt

5. The new Bg drawing system required a different method of scrolling the BGs themselves. Go to ScrollBlock1 and replace everything from there until the end of ScrollBlock4 with the contents of blockscroll.txt. Don't worry that there are six BGScroll functions now, that's taken cared of.

6. Finally, the biggest part: the BG drawing code. Go to sub_6886 and replace everything from there until the end of LoadTilesFromStart2 (that's a VERY long way, up until MainLoadBlockLoad) with the contents of bgdraw.txt. This should also result in a duplicate label loc_6ED0 in the resize_GHZ3boss routine. Just replace both instances of that label in that area with whatever you like, and you should be good to go.

7. Assuming you haven't changed the backgrounds of your levels, compile it and give it a go!

I'd just like to credit Hivebrain for attempting this first, and Tweaker for his assistance when I had some issues to resolve. Tell me if I forgot anything, and put any questions or comments here.
This post has been edited by jman2050: 21 June 2006 - 05:26 PM

#2 User is offline Tweaker 

Posted 21 June 2006 - 05:58 PM

  • Posts: 12389
  • Joined: 27-June 04
  • Gender:Male
Excellent, now applied to my hack. Glad you got it to work. =)

#3 User is offline Hivebrain 

Posted 21 June 2006 - 08:21 PM

  • Posts: 2658
  • Joined: 15-January 03
  • Gender:Male
  • Location:53.4N, 1.5W
  • Project:HivePal 2.0
  • Wiki edits:6,176
Nice work! My last attempt at doing this was somewhat a failure.

#4 User is offline jman2050 

Posted 21 June 2006 - 10:25 PM

  • Teh Sonik Haker
  • Posts: 625
  • Joined: 10-December 05
  • Wiki edits:4
I should also mention that IIRC, Stealth did in fact do this with KiS1. If so, I credit him as well for actually doing it first :)

#5 User is offline drx 

Posted 22 June 2006 - 02:51 PM

  • <Shade> fuck MJ
  • Posts: 2156
  • Joined: 02-March 04
  • Gender:Male
  • Project::rolleyes:
  • Wiki edits:8
There is an easier way. :P Just look at my hacking cult demo...

#6 User is offline Cinossu 

Posted 22 June 2006 - 04:36 PM

  • inverted with love~
  • Posts: 2795
  • Joined: 21-June 04
  • Gender:Male
  • Location:London, UK
  • Project:Sonic the Hedgehog Extended Edition
  • Wiki edits:474

drx, on Jun 22 2006, 07:51 PM, said:

There is an easier way. :P Just look at my hacking cult demo...

There's the easier way, and then there's the way it's already done. :P I didn't know your demo was open source, anyways. :.

#7 User is offline Tweaker 

Posted 22 June 2006 - 06:37 PM

  • Posts: 12389
  • Joined: 27-June 04
  • Gender:Male

drx, on Jun 22 2006, 03:51 PM, said:

There is an easier way. :P Just look at my hacking cult demo...

Your demos section is broken. =P

#8 User is offline ddrmaxromance 

Posted 22 June 2006 - 10:15 PM

  • Posts: 477
  • Joined: 06-January 06
  • Wiki edits:40
Perhaps someone could tell me how to make two copies of the background deformation for GHZ. I'm using SLZ graphics for my title screen background in my sonic hack, and it uses the GHZ system. When I load GHZ (the level), it uses SLZ (the title screen)'s deformation, which causes it look funky.

Any tips?

#9 User is offline Rika Chou 

Posted 22 June 2006 - 10:24 PM

  • Adopt
  • Posts: 5172
  • Joined: 11-January 03
  • Gender:Not Telling
  • Location:CA US
  • Wiki edits:4

ddrmaxromance, on Jun 22 2006, 08:15 PM, said:

Perhaps someone could tell me how to make two copies of the background deformation for GHZ. I'm using SLZ graphics for my title screen background in my sonic hack, and it uses the GHZ system. When I load GHZ (the level), it uses SLZ (the title screen)'s deformation, which causes it look funky.

Any tips?

There is probobly a pointer that you need to change.

#10 User is offline drx 

Posted 22 June 2006 - 10:43 PM

  • <Shade> fuck MJ
  • Posts: 2156
  • Joined: 02-March 04
  • Gender:Male
  • Project::rolleyes:
  • Wiki edits:8
Didn't notice that hacks/demos were broken... thanks.

I don't remember if my demo source was released or not, but it's not that hard to disassemble 2kb of code :P

#11 User is offline Caitlin 

Posted 22 June 2006 - 11:57 PM

  • Burning with revenge
  • Posts: 4406
  • Joined: 07-May 05
  • Gender:Female
  • Wiki edits:35

ddrmaxromance, on Jun 22 2006, 10:15 PM, said:

Perhaps someone could tell me how to make two copies of the background deformation for GHZ.  I'm using SLZ graphics for my title screen background in my sonic hack, and it uses the GHZ system.  When I load GHZ (the level), it uses SLZ (the title screen)'s deformation, which causes it look funky.

Any tips?

Title_LoadText:
  ............code............
  bsr.w	LevelSizeLoad
  bsr.w	DeformBgLayer
  lea	($FFFFB000).w,a1


It probably has something to do with that. I'm not sure however.
This post has been edited by ThunderSpeed: 22 June 2006 - 11:57 PM

#12 User is offline ddrmaxromance 

Posted 23 June 2006 - 12:52 PM

  • Posts: 477
  • Joined: 06-January 06
  • Wiki edits:40
Well, I made it so that there are two copies of the 16/256 art so the art could load seperately. The only thing I couldn't find was how to seperate the ghzbg.bin file in the levels folder. Take a look below to what I did (bold=new items):

Quote

; ---------------------------------------------------------------------------
; Compressed graphics - primary patterns and block mappings
; ---------------------------------------------------------------------------
Title_Blk16_GHZ: incbin map16\tghz.bin
  even

Blk16_GHZ: incbin map16\ghz.bin
  even
Title_Nem_GHZ_1st: incbin artnem\t8x8ghz1.bin
  even

Nem_GHZ_1st: incbin artnem\8x8ghz1.bin ; GHZ primary patterns
  even
Nem_GHZ_2nd: incbin artnem\8x8ghz2.bin ; GHZ secondary patterns
  even
Title_Blk256_GHZ: incbin map256\tghz.bin
  even

Blk256_GHZ: incbin map256\ghz.bin
  even


Each art runs off its own file, meaning:
Title Screen: SLZ but hacked a bit (not GHZ)
GHZ: GHZ (but with SLZ's BG file)
SLZ: Still SLZ...intact

Posted Image
Behold, it's happening! :) Yeah, I'll fix the foreground and such later on.

Posted Image
Yeah, this is the end result...Any tips?
This post has been edited by ddrmaxromance: 23 June 2006 - 12:54 PM

#13 User is offline Shadow Fire 

Posted 23 June 2006 - 11:10 PM

  • Ultimate victory!
  • Posts: 1557
  • Joined: 05-February 05
  • Gender:Male
  • Location:The Land of Darkness
  • Project:Sonic: The Lost Land (Series), The GCN (site)
  • Wiki edits:60
I've got a better idea...

USE THE JAPANESE REV01A (02) ROM!

*whistles and walks away*

#14 User is offline Cinossu 

Posted 24 June 2006 - 05:50 AM

  • inverted with love~
  • Posts: 2795
  • Joined: 21-June 04
  • Gender:Male
  • Location:London, UK
  • Project:Sonic the Hedgehog Extended Edition
  • Wiki edits:474

Shadow Fire, on Jun 24 2006, 04:10 AM, said:

I've got a better idea...

USE THE JAPANESE REV01A (02) ROM!

*whistles and walks away*

Okay, but only if you have it all disassembled, split, and fully labelled and commented. :P

#15 User is offline ddrmaxromance 

Posted 24 June 2006 - 01:05 PM

  • Posts: 477
  • Joined: 06-January 06
  • Wiki edits:40

Shadow Fire, on Jun 23 2006, 11:10 PM, said:

I've got a better idea...

USE THE JAPANESE REV01A (02) ROM!

*whistles and walks away*

Well, I'm currently using a Japanese ROM, but I want to be able to finish this title screen port with the disassembler, and then port them over into the JAP ROM.

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users