Sonic and Sega Retro Message Board: Blue Balls - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Blue Balls Sonic 3 Special Stage Editor

#1 User is offline nineko 

  Posted 22 October 2009 - 07:52 AM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
As I posted in Varion's Cybernetic Outbreak thread, I developed a program to edit Sonic 3 Special Stages when they come in individual files, opposed to ESE which edits them directly in the rom.
I wanted to delay the release of this until a split disassembly of Sonic 3 was released, but I changed my mind, for a couple of reasons. For one, since I wrote this in literally two hours, it's not to be considered "final" by any mean (even if it completely works) and I'd like to hear some comments/feedback/opinions about the editor itself, if it's user friendly, and so on; furthermore, it's not that hard to use it without a disassembly anyway, as Sonic 3's Special Stage Layouts start at location 2531552 ($26A0E0) in the S3&K rom, and they take 1032 ($408) bytes each (1024 ($400) bytes for the 32x32 ($20x$20) field, plus 8 ($8) bytes of header, which interestingly enough is after the data).
Sonic & Knuckles' Special Stage Layouts instead are compressed according to Varion's words, so they're not directly editable yet. I'm 95% sure that they're compressed in Kosinski so you should be able to use TSDC, though I wouldn't bet money over that.



Now, how to use it. Type the filename of the stage you want to edit and press "Load". To create a blank new stage just give it a filename that doesn't exist yet and press "Load" anyway. It will create a new blank layout with that filename. To save a layout just type the filename (or keep the one you loaded) and press "Save". This was easy.
Below there are three "palettes", to say so. You can assign a kind of ball to both the mouse buttons and to the wheel. This should allow for fast editing. Sonic's icon isn't a placeable object but it's used to set up the starting position. Note that nothing prevents you from setting the start position inside a ball, but don't do that, it's stupid.
Then you can decide the starting orientation, and there is another way to change the starting position if for whatever reason you don't like to click on the layout. Finally, you can set the rings needed to achieve a perfect. Yup, that's not automatically calculated so have fun with that. Right now I limited it to 255 because all the existing stages store it as a byte, but I think it can be extended to 65535 999 if it's proven that it's actually a word even if no stages make use of that right now (and no, stages like this don't count). This still needs to be investigated. [EDIT: I investigated it. It's a word. The next version will allow you to set the perfect up to 999]
The exit button is huge for a reason, it helps you remember where the Special Stage ends, otherwise one would be tempted to put stuff in the wrong place.

Well, make sure that your resolution is higher than 1123x793, and have fun.

DOWNLOAD LINK (1.00)
DOWNLOAD LINK (1.01) (updated 2009/10/24)
DOWNLOAD LINK (1.02) (updated 2009/10/25)
Note: this program, like all my other programs, requires MSVBVM50.dll, and can run in Windows 95 or better.
This post has been edited by nineko: 24 October 2009 - 05:41 PM

#2 User is offline MainMemory 

Posted 22 October 2009 - 08:07 AM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2671
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Great, now I have to update my trainer argh.gif
Even if nobody uses it, I won't be able to sleep until I get import/export added.

Seriously though, thank you for this. Now I don't have to make my own editor!
I'll try this later (leaving now).

Hmm, I wonder, how does this handle unusual values? Like, if I export a stage from RAM, it might have a ring sparkle in it. What would happen then?

#3 User is offline nineko 

Posted 22 October 2009 - 08:12 AM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
QUOTE (MainMemory @ Oct 22 2009, 03:07 PM)
Hmm, I wonder, how does this handle unusual values? Like, if I export a stage from RAM, it might have a ring sparkle in it. What would happen then?
Right now it will crash, complaining that it can't find (number).gif for number > 5, though if you manually create gif files for those unusual values, the program will be able to load and save them just fine (though you won't be able to place them because they're not in the "palette").

To be honest I didn't think about this eventuality, thanks for pointing this out smile.png
In the next version I will definitely add a check and set them to the blank tile when loading.

#4 User is offline Selbi 

Posted 22 October 2009 - 08:30 AM

  • Obligatory new year's avatar remake.
  • Posts: 1374
  • Joined: 12-May 08
  • Gender:Male
  • Location:Northern Germany
  • Project:Sonic ERaZor
  • Wiki edits:320
2 hours? NO FUCKING TRUE! :O
Seriously, it's awesomeness in the word itself (or whatever). If I ever going to make a S3K hack, I will use it. However, there's another missing .dll problem like they were in STE: MSVBVM50.dll is a file you need (at least on my computer). Oh, here a funny thing, this appears if the file is missing:

This post has been edited by Selbi: 22 October 2009 - 08:31 AM

#5 User is offline nineko 

Posted 22 October 2009 - 08:34 AM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
I didn't mention that it requires MSVBVM50.dll because that file is needed by all my programs (it's the MicroSoft Visual Basic Virtual Machine 5.0) and I assumed it was implied by default. I take you're not an xm3smps user anymore. Still, my fault, I will add it to my first post.

And yes, the program description is "Oh hi I can type stuff in the description box" :P

#6 User is offline SonicVaan 

Posted 22 October 2009 - 09:24 AM

  • The probably one and only cybergoth in this community. '_'
  • Posts: 362
  • Joined: 16-May 08
  • Gender:Male
  • Location:Germany, Cologne
  • Project:Betatesting, Various hacking projects, programming synthesizers, music production
  • Wiki edits:52
Haven't you said that you will release it when Varion's S3K disassembly is out?
Anyways, thanks for the program so far. Also I want your special stage. colbert.png

#7 User is offline nineko 

Posted 22 October 2009 - 09:27 AM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
As I stated in the first post, I decided to release this sooner to get some feedback on the editor itself so it can be in perfect shape for when the disassembly is actually out. In fact, MainMemory already pointed out a very valid point, which should be taken care of.
Let's say this is a public beta, ok? smile.png

#8 User is online Spanner 

Posted 22 October 2009 - 09:54 AM

  • I used to go by SOTI too...
  • Posts: 2659
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic the Hedgehog Hacking Contest, Other Stuff
  • Wiki edits:2,193
Hmm, if you know where the stuff is in Stealth's disassembly, you could include the files there except the disassembly can be bitchy. I think andlabs is working on a split, so maybe he'd know more about this.
Good work anyway, nineko. smile.png

#9 User is offline Selbi 

Posted 22 October 2009 - 11:57 AM

  • Obligatory new year's avatar remake.
  • Posts: 1374
  • Joined: 12-May 08
  • Gender:Male
  • Location:Northern Germany
  • Project:Sonic ERaZor
  • Wiki edits:320
Draw feature plz. To place every single object by click is annoying and takes a damn long time.

Btw, for the guys using the SK disasm the first time, where do I need to place the layouts?

EDIT: Just finished an excact copy of nineko's special stage (because I wasn't having any ideas D:): LINK
This post has been edited by Selbi: 22 October 2009 - 01:19 PM

#10 User is offline Overlord 

Posted 22 October 2009 - 12:57 PM

  • "I am Death, not Taxes. I turn up only once."
  • Posts: 12397
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
Wow. I could never get to grips with graphics layout in VB - how are you doing this? Is the grid filled with picture boxes that you're filling on clicks or are you dynamically generating the picture boxes?

#11 User is online MarkeyJester 

Posted 22 October 2009 - 01:07 PM

  • A word in your shell-like, pal
  • Posts: 1304
  • Joined: 22-July 08
  • Gender:Male
  • Location:Japan
  • Wiki edits:16
Cool, great work on this, I'm sure it'll be useful for S3&K hackers, I think I'll have a play with this my self infact.

*Runs off to use it*

EDIT: the "MSVBVM50.dll" link you provided is broken, Searching google for it.
This post has been edited by MarkeyJester: 22 October 2009 - 01:09 PM

#12 User is offline nineko 

Posted 22 October 2009 - 01:14 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
QUOTE (Overlord @ Oct 22 2009, 07:57 PM)
Wow. I could never get to grips with graphics layout in VB - how are you doing this? Is the grid filled with picture boxes that you're filling on clicks or are you dynamically generating the picture boxes?
I am using an array of Image controls, from Image1(0) to Image1(1023). When you load a stage, or when you edit them, they're filled with a LoadPicture command.

#13 User is offline RGamer2009 

Posted 22 October 2009 - 01:42 PM

  • True Blue
  • Posts: 2320
  • Joined: 27-November 08
  • Gender:Male
  • Location:Wherever life takes me...
  • Wiki edits:3,086
.. HOLY HELL You did this in VB?!

...Outstanding work. I learned the basics of VB, and wasn't sure if I could edit a ROM with those skills, but it seem you did just that!

How do you tie the VB interface to mess with a Rom?

Now if only Level Editors were this user friendly...
This post has been edited by RGamer2009: 22 October 2009 - 01:43 PM

#14 User is offline Overlord 

Posted 22 October 2009 - 03:02 PM

  • "I am Death, not Taxes. I turn up only once."
  • Posts: 12397
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
QUOTE (nineko @ Oct 22 2009, 07:14 PM)
QUOTE (Overlord @ Oct 22 2009, 07:57 PM)
Wow. I could never get to grips with graphics layout in VB - how are you doing this? Is the grid filled with picture boxes that you're filling on clicks or are you dynamically generating the picture boxes?
I am using an array of Image controls, from Image1(0) to Image1(1023). When you load a stage, or when you edit them, they're filled with a LoadPicture command.

Ah, fair enough. That IS how I'd have probably done it, and using external files as the pictures. SonED always throws me (yes, I know it's not a VB app, hush) in that it loads ALL the data from within the ROM, so I keep assuming every other app on Earth of this type does it =P

QUOTE
How do you tie the VB interface to mess with a Rom?


CODE
With CommonDialogBox
    .DialogTitle = "Select a ROM..."
    .CancelError = False
    '.Filter = "All files (*.*)|*.*"
    .Filter = "ROM Files (*.bin)|*.bin;*.gen"
    .FilterIndex = 1
    .ShowOpen
End With
RomPath = CommonDialogBox.Filename
CommonDialogBox.Filename = "" 'Clears the box =P


Once you've got the ROM path, you can just read it and write it using hex start addresses and lengths to read/write. It's no different than any other binary file, really.

#15 User is offline MainMemory 

Posted 22 October 2009 - 04:28 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2671
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
QUOTE (nineko @ Oct 22 2009, 01:14 PM)
QUOTE (Overlord @ Oct 22 2009, 07:57 PM)
Wow. I could never get to grips with graphics layout in VB - how are you doing this? Is the grid filled with picture boxes that you're filling on clicks or are you dynamically generating the picture boxes?
I am using an array of Image controls, from Image1(0) to Image1(1023). When you load a stage, or when you edit them, they're filled with a LoadPicture command.

Wow, thats a lot of controls! I would have just drawn everything onto a panel control's graphics object, probably saving memory but increasing draw time because you have to redraw everything when anything is changed. In fact, that's how all of my graphical programs work (SS viewer in trainer, SETedit's preview, S&KC Level Editor).

As a side note, I'm probably going to have my Level Editor use split files as well, and support the Genesis games. So when we get the disassembly, we'll at least have some kind of level editor.

Edit: Hey nineko, could you tell me what the header looks like? I just realized that I have no idea what to do about it in my trainer.
This post has been edited by MainMemory: 22 October 2009 - 05:32 PM

  • 4 Pages +
  • 1
  • 2
  • 3
  • Last ►
    Locked
    Locked Forum

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