Sonic 1 Nixed Edition (needs improvement)

Discussion in 'Showroom Archive' started by SamplingMastersNix, Jun 3, 2010.

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

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    Yes, I'm sick and tired of of the beginners, too. And, I, too am a beginner, but I wanted to release a simple Sonic 1 Hack for you to critique. I'm trying to get better, but I want to first go over some problems I'm having in my hack:


    1. The "Static Buzz" noise of the Sega screen plays twice. I don't know why it does that, but that is a cosmetic fix, I'll try to fix it as I transition towards professionality.


    2. The Title Screen Foreground came out with an undesired and unappealing look:


    [​IMG]


    It was supposed to say "NIXED EDITION" below the foreground, and "SMN 2010" below the original copyright. That, again, is a cosmetic fix, but more important than problem one. So I need your help with this.


    These are the problems. Other than that, gameplay is identical with some extras:


    1. S2 Spindash Implemented with nearly all bugs fixed. Examples include: "camera reset" fix, "Boundary_Bottom" fix, and I think the "charging attack" fix. You'll have to test the last one to see if I overlooked that detail.


    2. Miniscule object and Plane A rearrangement on GHZ, MZ, and SYZ.


    COMING SOON:


    Object and Plane A rearrangement on LZ, SLZ, and SBZ.


    Minor palette swap on GHZ.


    I want to upload my rom, but I'm not permitted to do so. Please, critique my work. I wish to learn at the feet of the masters.


    UPDATE:


    Spindash Implementation: Part 2 covered!


    Sega "Static Buzz" Fixed!


    UPDATE 2:


    My first beta release. Who would have thought it needed to be in a zip folder first? Anyway here it is:


    (This has been replaced by the next update)


    UPDATE 3:


    More screenshots! One was done in SonED2.


    [​IMG]


    Another cliff added at the beginning of GHZ Act 1.


    [​IMG]


    Using SonED2's screen capture function I was able to show a secret near the end of Marble Zone Act 3. A room that can only be accessed by the red spring.


    UPDATE 4:


    New upload, new version, new abilities:


    After-image (thanks, Selbi)


    "Nixed" Speedcap (thanks to the people who made it possible)


    Jump-dash (thanks again, Selbi)


    S1NE_v0.2.zip


    Problems, comments, accolades? Leave a post.
     

    Attached Files:

    Last edited by a moderator: Oct 30, 2010
  2. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
  3. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    Fixed! Props to Puto and Lightning (they will be featured in the credits). Now, how do I fix the the text tiles in the Title Screen Foreground? What .asm file, and what lines of assembly do I need to rewrite?
     
  4. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Make sure you have enough VRAM...
     
  5. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    I had the VRAM expansion implemented with the Spindash_Dust bit.
     
    Last edited by a moderator: Jun 4, 2010
  6. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    I'm confused now, text tiles? The copyright text? clear the VRAM and then load the text, also make sure that you aren't using too many tiles as that can bork things up as well.
     
  7. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    Clear the VRAM? How? Delete the subroutine? That's going to screw up my game. Know any alternatives? I think gave the titlefor.bin file too much padding. That must be the problem, because I used my old 16KB padding file that I used to implement the spindash in the game. I tried replacing the letters with the menu text, as of this post. However, it looks worse than before. It looks like its using the Title Screen Sonic Tiles. As if the assembly is overwriting something. Can you figure it out?
     
    Last edited by a moderator: Jun 5, 2010
  8. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Clear the VRAM? How? Delete the subroutine? That's going to screw up my game. Know any alternatives? I think gave the titlefor.bin file too much padding. That must be the problem, because I used my old 16KB padding file that I used to implement the spindash in the game. I tried replacing the letters with the menu text, as of this post. However, it looks worse than before. It looks like its using the Title Screen Sonic Tiles. As if the assembly is overwriting something. Can you figure it out?


    No not delete the sub routine... he means exactly what he says clear the VRAM so it has plenty of room to load the art that makes your text.
     
  9. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    A little tip about programming; "find the quickest way possible"


    It would be better to simply move the data you want to VRam without clearing, the new data you write will overwrite the data that was previously there, rendering the idea of clearing it first, useless. It wastes time not only programming it, but processing it too. It's like having 42 in d0, and you wanna put 89 into it, why move 00 to it first before moving 89, if 89 will replace 42 anyway?


    OK so, enough lecture (Gee I'm such a bastard sometimes =P), there is plenty of VRam space after the location of Sonic's emblem/title sprite art that you can use, though I'm guessing you might lack the understanding of how to control where the art is dumped to, which is no problem, take a look here insted, this should explain it all.
     
  10. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    Is this the Subroutine you're asking about:



    Code:
    ; ---------------------------------------------------------------------------
    
    ; Title	screen
    
    ; ---------------------------------------------------------------------------
    
    
    
    TitleScreen:&#59; XREF: GameModeArray
    
    		move.b	#$E4,d0
    
    		bsr.w	PlaySound_Special; stop music
    
    		bsr.w	ClearPLC
    
    		bsr.w	Pal_FadeFrom
    
    		move	#$2700,sr
    
    		bsr.w	SoundDriverLoad
    
    		lea	($C00004).l,a6
    
    		move.w	#$8004,(a6)
    
    		move.w	#$8230,(a6)
    
    		move.w	#$8407,(a6)
    
    		move.w	#$9001,(a6)
    
    		move.w	#$9200,(a6)
    
    		move.w	#$8B03,(a6)
    
    		move.w	#$8720,(a6)
    
    		clr.b	($FFFFF64E).w
    
    		bsr.w	ClearScreen
    
    		lea	($FFFFD000).w,a1
    
    		moveq	#0,d0
    
    		move.w	#$7FF,d1
    
    
    
    Title_ClrObjRam:
    
    		move.l	d0,(a1)+
    
    		dbf	d1,Title_ClrObjRam; fill object RAM ($D000-$EFFF) with	$0
    
    
    
    		move.l	#$40000000,($C00004).l
    
    		lea	(Nem_JapNames).l,a0; load Japanese credits
    
    		bsr.w	NemDec
    
    		move.l	#$54C00000,($C00004).l
    
    		lea	(Nem_CreditText).l,a0;	load alphabet
    
    		bsr.w	NemDec
    
    		lea	($FF0000).l,a1
    
    		lea	(Eni_JapNames).l,a0; load mappings for	Japanese credits
    
    		move.w	#0,d0
    
    		bsr.w	EniDec
    
    		lea	($FF0000).l,a1
    
    		move.l	#$40000003,d0
    
    		moveq	#$27,d1
    
    		moveq	#$1B,d2
    
    		bsr.w	ShowVDPGraphics
    
    		lea	($FFFFFB80).w,a1
    
    		moveq	#0,d0
    
    		move.w	#$1F,d1
    
    
    
    Title_ClrPallet:
    
    		move.l	d0,(a1)+
    
    		dbf	d1,Title_ClrPallet; fill pallet with 0	(black)
    
    
    
    		moveq	#3,d0; load Sonic's pallet
    
    		bsr.w	PalLoad1
    
    		move.b	#$8A,($FFFFD080).w; load "SONIC TEAM PRESENTS"	object
    
    		jsr	ObjectsLoad
    
    		jsr	BuildSprites
    
    		bsr.w	Pal_FadeTo
    
    		move	#$2700,sr
    
    		move.l	#$40000001,($C00004).l
    
    		lea	(Nem_TitleFg).l,a0; load title	screen patterns
    
    		bsr.w	NemDec
    
    		move.l	#$60000001,($C00004).l
    
    		lea	(Nem_TitleSonic).l,a0;	load Sonic title screen	patterns
    
    		bsr.w	NemDec
    
    		move.l	#$62000002,($C00004).l
    
    		lea	(Nem_TitleTM).l,a0; load "TM" patterns
    
    		bsr.w	NemDec
    
    		lea	($C00000).l,a6
    
    		move.l	#$50000003,4(a6)
    
    		lea	(Art_Text).l,a5
    
    		move.w	#$28F,d1
    
    
    
    Title_LoadText:
    
    		move.w	(a5)+,(a6)
    
    		dbf	d1,Title_LoadText; load uncompressed text patterns
    
    
    
    		move.b	#0,($FFFFFE30).w; clear lamppost counter
    
    		move.w	#0,($FFFFFE08).w; disable debug item placement	mode
    
    		move.w	#0,($FFFFFFF0).w; disable debug mode
    
    		move.w	#0,($FFFFFFEA).w
    
    		move.w	#0,($FFFFFE10).w; set level to	GHZ (00)
    
    		move.w	#0,($FFFFF634).w; disable pallet cycling
    
    		bsr.w	LevelSizeLoad
    
    		bsr.w	DeformBgLayer
    
    		lea	($FFFFB000).w,a1
    
    		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
    
    		lea	($FF0000).l,a1
    
    		bsr.w	KosDec
    
    		bsr.w	LevelLayoutLoad
    
    		bsr.w	Pal_FadeFrom
    
    		move	#$2700,sr
    
    		bsr.w	ClearScreen
    
    		lea	($C00004).l,a5
    
    		lea	($C00000).l,a6
    
    		lea	($FFFFF708).w,a3
    
    		lea	($FFFFA440).w,a4
    
    		move.w	#$6000,d2
    
    		bsr.w	LoadTilesFromStart2
    
    		lea	($FF0000).l,a1
    
    		lea	(Eni_Title).l,a0; load	title screen mappings
    
    		move.w	#0,d0
    
    		bsr.w	EniDec
    
    		lea	($FF0000).l,a1
    
    		move.l	#$42060003,d0
    
    		moveq	#$21,d1
    
    		moveq	#$15,d2
    
    		bsr.w	ShowVDPGraphics
    
    		move.l	#$40000000,($C00004).l
    
    		lea	(Nem_GHZ_1st).l,a0; load GHZ patterns
    
    		bsr.w	NemDec
    
    		moveq	#1,d0; load title screen pallet
    
    		bsr.w	PalLoad1
    
    		move.b	#$8A,d0; play title screen music
    
    		bsr.w	PlaySound_Special
    
    		move.b	#0,($FFFFFFFA).w; disable debug mode
    
    		move.w	#$178,($FFFFF614).w; run title	screen for $178	frames
    
    		lea	($FFFFD080).w,a1
    
    		moveq	#0,d0
    
    		move.w	#7,d1
    
    
    
    Title_ClrObjRam2:
    
    		move.l	d0,(a1)+
    
    		dbf	d1,Title_ClrObjRam2
    
    
    
    		move.b	#$E,($FFFFD040).w; load big Sonic object
    
    		move.b	#$F,($FFFFD080).w; load "PRESS	START BUTTON" object
    
    		move.b	#$F,($FFFFD0C0).w; load "TM" object
    
    		move.b	#3,($FFFFD0DA).w
    
    		move.b	#$F,($FFFFD100).w
    
    		move.b	#2,($FFFFD11A).w
    
    		jsr	ObjectsLoad
    
    		bsr.w	DeformBgLayer
    
    		jsr	BuildSprites
    
    		moveq	#0,d0
    
    		bsr.w	LoadPLC2
    
    		move.w	#0,($FFFFFFE4).w
    
    		move.w	#0,($FFFFFFE6).w
    
    		move.w	($FFFFF60C).w,d0
    
    		ori.b	#$40,d0
    
    		move.w	d0,($C00004).l
    
    		bsr.w	Pal_FadeTo
    
    
    
    loc_317C:
    
    		move.b	#4,($FFFFF62A).w
    
    		bsr.w	DelayProgram
    
    		jsr	ObjectsLoad
    
    		bsr.w	DeformBgLayer
    
    		jsr	BuildSprites
    
    		bsr.w	PalCycle_Title
    
    		bsr.w	RunPLC_RAM
    
    		move.w	($FFFFD008).w,d0
    
    		addq.w	#2,d0
    
    		move.w	d0,($FFFFD008).w; move	Sonic to the right
    
    		cmpi.w	#$1C00,d0; has Sonic object passed x-position $1C00?
    
    		bcs.s	Title_ChkRegion; if not, branch
    
    		move.b	#0,($FFFFF600).w; go to Sega screen
    
    		rts	
    
    ; ===========================================================================
    
    
    
    Title_ChkRegion:
    
    		tst.b	($FFFFFFF8).w; check	if the machine is US or	Japanese
    
    		bpl.s	Title_RegionJ; if Japanese, branch
    
    		lea	(LevelSelectCode_US).l,a0; load US code
    
    		bra.s	Title_EnterCheat
    
    ; ===========================================================================
    
    
    
    Title_RegionJ:&#59; XREF: Title_ChkRegion
    
    		lea	(LevelSelectCode_J).l,a0; load	J code
    
    
    
    Title_EnterCheat:; XREF: Title_ChkRegion
    
    		move.w	($FFFFFFE4).w,d0
    
    		adda.w	d0,a0
    
    		move.b	($FFFFF605).w,d0; get button press
    
    		andi.b	#$F,d0; read only up/down/left/right buttons
    
    		cmp.b	(a0),d0; does button press match the cheat code?
    
    		bne.s	loc_3210; if not, branch
    
    		addq.w	#1,($FFFFFFE4).w; next	button press
    
    		tst.b	d0
    
    		bne.s	Title_CountC
    
    		lea	($FFFFFFE0).w,a0
    
    		move.w	($FFFFFFE6).w,d1
    
    		lsr.w	#1,d1
    
    		andi.w	#3,d1
    
    		beq.s	Title_PlayRing
    
    		tst.b	($FFFFFFF8).w
    
    		bpl.s	Title_PlayRing
    
    		moveq	#1,d1
    
    		move.b	d1,1(a0,d1.w)
    
    
    
    Title_PlayRing:
    
    		move.b	#1,(a0,d1.w); activate cheat
    
    		move.b	#$B5,d0; play ring sound when code is entered
    
    		bsr.w	PlaySound_Special
    
    		bra.s	Title_CountC
    
    ; ===========================================================================
    
    
    
    loc_3210:&#59; XREF: Title_EnterCheat
    
    		tst.b	d0
    
    		beq.s	Title_CountC
    
    		cmpi.w	#9,($FFFFFFE4).w
    
    		beq.s	Title_CountC
    
    		move.w	#0,($FFFFFFE4).w
    
    
    
    Title_CountC:
    
    		move.b	($FFFFF605).w,d0
    
    		andi.b	#$20,d0; is C button pressed?
    
    		beq.s	loc_3230; if not, branch
    
    		addq.w	#1,($FFFFFFE6).w; increment C button counter
    
    
    
    loc_3230:
    
    		tst.w	($FFFFF614).w
    
    		beq.w	Demo
    
    		andi.b	#$80,($FFFFF605).w; check if Start is pressed
    
    		beq.w	loc_317C; if not, branch
    
    
    
    Title_ChkLevSel:
    
    		tst.b	($FFFFFFE0).w; check	if level select	code is	on
    
    		beq.w	PlayLevel; if not, play level
    
    		btst	#6,($FFFFF604).w; check if A is pressed
    
    		beq.w	PlayLevel; if not, play level
    
    		moveq	#2,d0
    
    		bsr.w	PalLoad2; load level select pallet
    
    		lea	($FFFFCC00).w,a1
    
    		moveq	#0,d0
    
    		move.w	#$DF,d1
    
    
    
    Title_ClrScroll:
    
    		move.l	d0,(a1)+
    
    		dbf	d1,Title_ClrScroll; fill scroll data with 0
    
    
    
    		move.l	d0,($FFFFF616).w
    
    		move	#$2700,sr
    
    		lea	($C00000).l,a6
    
    		move.l	#$60000003,($C00004).l
    
    		move.w	#$3FF,d1
    
    
    
    Title_ClrVram:
    
    		move.l	d0,(a6)
    
    		dbf	d1,Title_ClrVram; fill	VRAM with 0
    
    
    
    		bsr.w	LevSelTextLoad
    I tried porting some tiles from "Standard font.bin" in the Sonic 2 Xenowhirl Disassembly to the uncompressed "titlefor.bin" tileset, compressed it in the Nemesis format, used PlaneED to edit the Enigma mapping, and built the ROM. Had the same result! Now, I have some visual resources:


    [​IMG]


    The molestered title screen


    [​IMG]


    The ported tiles from Sonic 2 Final that were meant to be used in the title screen. The question is, how do you expand the cache to use the other tiles?
     
    Last edited by a moderator: Sep 19, 2010
  11. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    Sorry about the double-post, but I come with good news. Did you know that the TM mapping on the title screen had more free VRAM than the Title Screen foreground? So this is what I did to solve the problem:


    1) create 384 bytes of padding


    2) merge padding_s.bin and titletm_old.bin into titletm.bin


    3) used tile molester to port the tiles I want to use


    4) used SonMapEd to modify the TM sprite mapping


    5) fix the "out of range" errors.


    This was the outcome:


    [​IMG]
     
  12. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    This is good to know.


    A little hint when you want to increase the size of a graphic file, rather than using a padding file and merging it, you can duplicate tiles in sonmaped (edit>tiles>duplicate selected tiles). Sonmaped will increase the size of the file accordingly, then select the new tiles and in the options, choose edit>tiles>clear pixels of selected tiles. Just make sure to select tiles up to the last one, because the newly created tiles will be right after your selection.


    The padding method is better if you know exactly how much room you want to add though.
     
  13. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    Here's some footage of my hack. Introduced as my 100 Subs Special.

    ">" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344">​


    Like what you see so far? I'm going to update my previous version. I scrapped some parts of the layout made in the alpha, but I will pick up.
     
  14. MicroChirp

    MicroChirp Wow, I was so stupid a few years ago... Member

    Joined:
    Oct 4, 2010
    Messages:
    366
    Location:
    In the middle of nowhere
    That seems pretty good for a beginner hack, the NIXED EDITION words look brilliant.


    Good work, dude!
     
  15. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Its looks like an ok hack, got long ways to go though. The palatte on ghz I would recommend changing to somthing better. Its nice having after images, though because its not created by you theres nothing more to say on it. Same with the jump dash, all done by selbi so again nothing to say. The nixed edtion is ok, but maybe you could improve the text on it to really make it stand out. Sorry if I sound rude or harsh, I'll accept this is only a beginners hack. But I hope you improve and well, see what your imagination takes you really and have fun.
     
  16. MicroChirp

    MicroChirp Wow, I was so stupid a few years ago... Member

    Joined:
    Oct 4, 2010
    Messages:
    366
    Location:
    In the middle of nowhere
    SamplingMastersNix's next step should be changing music and adding custom tracks to the game.
     
  17. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    Let me guess, Camp Lazlo in Sonic 1 Title Theme? (Note my SSRG Genesis Music Thread Post)
     
  18. MicroChirp

    MicroChirp Wow, I was so stupid a few years ago... Member

    Joined:
    Oct 4, 2010
    Messages:
    366
    Location:
    In the middle of nowhere
    You can use any track you want for title screen, the levels and the ending. It's up to you to choose a track you want.
     
Thread Status:
Not open for further replies.