Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. Painto

    Painto Samodzierżca Najdłuższego Kija Member

    Joined:
    Mar 24, 2014
    Messages:
    315
    Location:
    Poland
    As for the data, it is at DeformBgLayer: (stuff as branches to screen scrolling code etc.) and just below it there's SwScrl_Index: (list with stage specific routines). There's also SwScrl_Title: for, surprise, title screen's background.
    As for parallax editing, I recommend reading this post.

    [Edit: Added quotation because of page break]
     
    Last edited: Jul 30, 2019
  2. JayKuriN

    JayKuriN Newcomer Trialist

    Joined:
    Jul 27, 2019
    Messages:
    17
    Location:
    HickVille, Oklahoma
    Thank you
     
  3. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    868
    It's not data, it's code. Look for labels starting with SwScrl. There is no alternative to Selbi's editor, other than editing it by hand.
    Edit: yay lag
     
  4. Bobbie

    Bobbie Newcomer Trialist

    Joined:
    Jul 20, 2019
    Messages:
    17
    Does one need any special programs to look at/modify game resources/sprites/etc?
    I'm planning on getting a new laptop soon, and hopefully I'll be able to start experimenting with Sonic ROM Hacking once I actually receive the laptop.
     
  5. Ralakimia

    Ralakimia Pour your misery down on me Member

    Joined:
    Aug 26, 2013
    Messages:
    987
    Here's a basic rundown of currently available tools you can use. These are to be used with disassemblies, which is the best way and most up to date way to make a ROM hack these days due to how easier things are to modify compared to using Esrael Sonic Editor II.

    • Flex 2 or SonMapEd for sprite editing.
    • SonLVL or SonED 2 for level editing.
    • The only tilemap editor that I know of is PlaneEd. I believe Clownacy made an updated version a while ago. However, you can use GetArt.NET to convert image files to plane map data.
    • mid2smps for converting MIDI files (that are already prepared for conversion) to SMPS format (the sound driver used in Sonic 1), although if I recall, more solutions are being made.
    • FW-KENSC Shell Extension for easy access to data compression/decompression tools.
    • Any text editor will do for editing the actual code stored in ASM files. I personally use Sublime Text 3 with a 68000 assembly highlighter, but really anything can do, even Notepad.
    • For testing the hack, I usually run it in Kega Fusion when testing gameplay, and Regen, BizHawk (which uses Genesis Plus GX), and BlastEm for debugging. I also like to run the ROM on hardware to ensure it works properly.
    Here is a nice starting reference for 68000 assembly programming by MarkeyJester, by the way.

    I think it's worth noting that ROM hacking and game development in general will never have instant gratification. It takes time to get skilled in it, but that's okay. Just keep pushin' and you'll may turn out to be a fine ROM hacker. If you need help, then don't hesitate to ask for help. Just note that you probably want to search for your problem first, just in case that it has already been answered before ;)
     
    Last edited: Aug 3, 2019
  6. Iso Kilo

    Iso Kilo Sonic 1 Beta Researcher Member

    Joined:
    Oct 9, 2017
    Messages:
    176
    Location:
    Small Town in BC, Canada
    Here's my personal dump of tools I use, hopefully you'll find it useful too.
    Flex 2, SonLVL, mid2smps, Visual Studio Code (Using Steven Tattersall's M68K extension), HxD, Fusion (For basic testing and video recording), Regen (Advanced testing, mostly looking at VRAM), KENSSharp Fronted, S1SSEdit, SonAni, S1TCG and Rotsprite. Of course 1 or 2 of these may not apply to you depending on what you hack, I focus on Sonic 1, thus the need for S1SSEdit or S1TCG.
    Note to self, get rid of Fusion and start using Blastem.
    Also, I've linked all of them, so you can get them easily. (Note that you can get S1SSEdit and SonAni with SonLVL)
     
  7. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    868
    You really shouldn't use Notepad with large files (such as the main ASM files for any of the disassemblies), it wasn't designed for heavy use.
     
    Natsumi likes this.
  8. MarkeyJester

    MarkeyJester ! % # @ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,796
    Actually, I would like to correct you there.

    I have done a lot of research on this for what appears to be almost a decade now, and I have come to the conclusion that it's not notepad that's the cause. It's the operating system's subroutines.

    Back during the XP days, I had discovered that whether or not Notepad could handle large files, would be determined by whether or not you included multiple languages/keyboard layout files during the installation process. I had used Notepad on Windows XP to edit extremely large source files back in 2006 without even a smidgen of slowdown, it is certainly capable of it, however, I only had the one language I needed installed on the machine.

    It is unfortunate that some of the subroutines notepad uses for text control from the operating system, happen to have an involvement with the language/keyboard files before they can delivery the intended result. For Windows 7 and 8, I had found that the language/keyboard files would always be installed, and that there would be no way to remove them, thus, notepad will always remain slow with larger files.

    On Windows 10 (which I used for about two years), there is actually no issue at all, I believe they optimised quite a few subroutines, and likely indexed the language based routines for quicker access, as well as a slew of other things. Don't get me wrong, I dislike 10 myself, but I did notice and appreciate this specific aspect of the operating system.

    --- --- --- --- --- --- --- --- --- --- --- --- --- ---

    However, I do still agree that people should use an alternative to notepad, specifically for text highlighting and perhaps some multi-tabbing and/or include linking features. These will be an asset to their progress.
     
  9. Jdpense

    Jdpense Custom Title Member

    Joined:
    Jan 2, 2013
    Messages:
    70
    Location:
    No where-ville
    What about Notepad++? I usually use that nowadays to read/edit ASM files instead of regular old Notepad, Notepad++ even has some highlighter for code like for Assembly for instance...
     
  10. Misinko

    Misinko YOU FOOLS! YOU MESSED WITH THE NATURAL ORDER! Staff

    Joined:
    Apr 30, 2013
    Messages:
    690
    Location:
    Ohio
    Visual Studio Code is my go-to text editor because it has a lot of support for a lot of languages, and it has a community-developed M68K syntax highlighter.

    EDIT: Oh, and if you're having issues understanding M68K at first, take a crack at a higher-level language. I know it sounds backwards, but you'll be able to draw parallels between what you're doing in assembly vs what's abstracted in a high-level language.
     
  11. LazloPsylus

    LazloPsylus A Certain Scientific Railgun The Railgun

    Joined:
    Nov 25, 2009
    Messages:
    Location:
    Academy City
    Sublime Text. The software is minor nagware (full feature set, but occasionally kicks up a "please support" notification on save), has some integrated Git status support, and is very plugin-rich. Plus, can be integrated with build system and pretty well-customized. There's also 68k and Z80 highlighters for it floating around that are incomplete, but a certain someone needs to get back to working on them and cleaning them up.
     
  12. Natsumi

    Natsumi Phoenix egg Member

    Joined:
    Oct 7, 2011
    Messages:
    703
    Location:
    Long and dangerous river
    I have made my own highlighter that supports 68k, z80 and ASM68K macros. I can share it if people would like.
     
    AsuharaMoon, Trickster, Pacca and 3 others like this.
  13. RyeBread

    RyeBread Well-Known Member Member

    Joined:
    May 10, 2013
    Messages:
    155
    Location:
    Devon, UK
    Two questions, both music related -

    1) How can I get the BPM of the music to exceed 150? I tried recomposing some music to be half their original speed, but even then they've ended up being an awkward number between the allowed presets for MID2SMPS.

    2) My music's instruments seem to cut off a lot when SFX play, only really sounding good if I stand completely still and don't play the game. Can this be solved by importing a different sound driver? And if so, what ones are good?

    (Oh, let me add a third -)
    3) How do I get more instruments? I'm used to composing with Genny (a vst for FL) / a genesis soundfont, and the instruments.gyb I have doesn't really have many of the instruments I use.

    I kind of expected to just be able to drag up Sonic 1's instruments or something but I have no idea how to work any of that
     
  14. LackofTrack

    LackofTrack Active Member Member

    Joined:
    May 30, 2018
    Messages:
    30
    Question 1: To get the BPM to exceed 150 you have to adjust the tick multiplier and ticks per quarter number. I'd recommend setting the multiplier to one and then adjusting the ticks per quarter by multiples of four depending on your desired BPM. (Start with 12 and go up from there.)

    Question 2: The FM channels Sonic 1 uses the most for SFX are 4 and 5. Try to put the least important part of the song on these channels. (FM1 and 2 are never muted, while 3 is rarely.)

    Question 3: Can you export the instruments you use with your soundfont? If you can then I'm sure you will be able to import then into mid2smps, as it basically supports most of the common instrument files out there.
    If you can't export the instruments, you could also look online for some. Edit: I'd also look into creating your own instruments so you won't be limited to other people's creations and overall have more freedom with your music.
     
    Last edited: Aug 5, 2019
    ProjectFM and RyeBread like this.
  15. SMS Alfredo

    SMS Alfredo Compact Disc Enthusiast Member

    Joined:
    Sep 3, 2018
    Messages:
    27
    Location:
    Little Planet
    1) If you're using midi2smps, mess around with the "Ticks/Quarter" and "TempDiv" values, and then check the "Tempo Calculator" in the Extras Menu. This will show you the possible BPM values corrasponding your current "Ticks/Quarter" and "TempDiv" values. Setting the them to 6 and 3 seems to pull up some decent BPM values, so try that.

    2) SFX in Sonic 1 use FM4, FM5, and all the PSG tracks, overriding any instruments in those channels if they are playing. There really isn't any true way around this. So I'd recommend when making SMPS that you prioritze using certain channels over others. Here's a priority list for you...

    FM1, FM2, FM3: Never Overwritten
    FM4: Sometimes Overwritten (Exception: Rings)
    FM5: Overwritten Often
    PSG1: Overwritten Often
    PSG2: Sometimes Overwritten
    PSG3: Rarely Overwritten

    3) You have 2 options here, either rip them yourself from Genesis VGMs using VGM2Pre, or create them by tinkering with the values in Genny. I'd recommend not using any Genesis soundfonts, as you can't extract vgi from those to use in midi2smps.

    Edit: Aw shoot I got beat to it
     
    RyeBread and LackofTrack like this.
  16. RyeBread

    RyeBread Well-Known Member Member

    Joined:
    May 10, 2013
    Messages:
    155
    Location:
    Devon, UK
    I managed to get the BPM to what I wanted, but there's a weird issue - whatever's in channel 1 won't play. If I set it to any other channel it doesn't seem to play at all. Just setting it to FM4 would make it work perfectly, but of course there's the issue of it being overwritten.
    That, and it works totally fine in FL Studio.
     
  17. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    153
    just a few corrections/additions:
    • FM3 is overridden sometimes (e.g. by the "crumbling platform" sound)
    • FM 4/5 are both used by the ring sound effect (thus those channels are muted pretty often)
    • PSG 1 is used by the jump sound
    • the "skidding" sound uses PSG 2+3
    • PSG 3 is used for any kind of "noise" (explosions, water splash, etc.)
    The true source for MegaDrive/Genesis VGMs is Project2612. Everything else is just mirrors of it.

    "2612edit", the instrument editor included with mid2smps, can import various instrument file formats. The Genny release post mentions that it can export instruments in VGI format, which 2612edit can import.
     
    ProjectFM likes this.
  18. Natsumi

    Natsumi Phoenix egg Member

    Joined:
    Oct 7, 2011
    Messages:
    703
    Location:
    Long and dangerous river
    So it seems like a lot of people asked for it, so here it is. You'll need to copy the .tmTheme into your Sumblime Text 3's Packages/User folder, and extract the folder into the Packages folder, and of course set up Sublime Text 3 to use the text highlighter and theme for .asm and any other applicable file extensions. I can't actually remember how to do this, but iirc there is a tutorial for it online.
     
  19. SMS Alfredo

    SMS Alfredo Compact Disc Enthusiast Member

    Joined:
    Sep 3, 2018
    Messages:
    27
    Location:
    Little Planet
    Try checking the initial volume and instrument values in the header of your SMPS.

    It's easy to miss things like this as Genny doesn't abide to MIDI events for some reason.
     
  20. AsuharaMoon

    AsuharaMoon kakyoin did you lay this egg Member

    Joined:
    Aug 15, 2013
    Messages:
    61
    How can I reduce the HUD's art writing of 8x16 per number to 8x8? (already checked out the lives system as a basis, but there's some stuff that I'm clearly missing)