Basic Questions and Answers Thread

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

  1. Speems

    Speems Well-Known Member Member

    Joined:
    Mar 14, 2017
    Messages:
    63
    Location:
    Rochester Hills, MI
    I am ready to owe up to a really dumb mistake I made the other day. If you're gonna use a direct rom editor tool thingy, then Esrael Sonic Editor II has an option to enable the Press Start Button text in the Miscellaneous section. But much like every other change you make in it, repair the checksum within the app's Checksum Check tool. Even then, it is insanely outdated and disassemblies are much more preferred.
    [​IMG]
     
  2. hebereke

    hebereke opa opa! Member

    Joined:
    May 3, 2012
    Messages:
    31
    In theory, would this approach work with a global instrument bank anyways? I haven't really familiarized myself with how SMPS's commands/flags work, so I'm not entirely sure if there's any different way in which I would specify instruments from a different track, or from a global instrument bank in the ROM.
     
  3. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,875
    Location:
    italy
    Again, what I suggested isn't the proper way to do what you're asking for, it's only an easy workaround. Anyway, let me clarify. In the header of each smps song there is a pointer to the instrument data used by that song. That data usually is at the end of the song itself, but nothing prevents it from being somewhere else (S3&K uses a special word to point to the UVB). The instrument selection flag doesn't really care about where the instrument pointer goes to, it merely picks the instrument located 25×n bytes starting from that pointer, without asking questions. In fact, some songs in S3&K actually use this technique instead of the UVB (ICZ1 and 2 iirc and maybe another pair, I'm going from memory here and I cba to double check).

    So, you can set the instrument pointer of all the songs to the same location, as long as it's within the same bank if you're using Z80 smps. At that point you only need to feed the proper IDs to the instrument selection flags. For example, if your first songs uses instruments 0 to 2, and your second songs uses different instruments, you'll have to renumber them to start from 3. Just make sure not to go beyond the 255 limit and you should be good.
     
    hebereke and ProjectFM like this.
  4. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    547
    Location:
    France
    Hi all, once again I come to solve a problem that seems totally basic to me and it enrages me not to find a solution to the problem after 5 days of investigation.

    First of all, I use the GitHub disassembly.

    It's been a long time now since I used THIS GUIDE.

    Without any problems, it works everywhere correctly.

    So I continued the development of my hack without worries until I had to add water in the other levels, then I used THIS GUIDE.

    That's where the problems started, I noticed that when I loaded water in for example Star Light Zone or Marble Zone, the chunk n°0 (the one that is empty) became solid, and my characters ran into an invisible wall, my Ashuro climbed with his WallJump into the void. Anyway, I removed the water guide until I could find a solution later, but now I discovered a new problem that I think has been there for a LONG time.

    It's about Labyrinth Zone. As you can see on the Screen: https://ibb.co/Mnf7Rkx [​IMG] , when I choose to go to LZ, and I follow Sonic, the level loads correctly without a hitch.

    But as soon as I want to use Ashuro (or my other characters), the level gets stuck on a black screen (https://ibb.co/zNY5NqK)[​IMG] with the Title Card. Nothing loads and nothing happens. The music continues to play, so the game does not crash completely.

    Did I miss something?

    EDIT:
    I see the same problem in Scrap Brain and Final Zone.

    So I think it has to do with whether a zone has a link to LZ or to water... I don't know, help me I'm lost! xD
     
    Last edited: Jan 18, 2022 at 9:58 AM
  5. SuperSayian Zrise

    SuperSayian Zrise Well-Known Member Member

    Joined:
    May 10, 2021
    Messages:
    65
    First of all for the water, you probably didn't optimize it enough for the git disassembly. Even though if it built then I'm maybe wrong. However did you try using some blank chunk that isn't 0 or the tiles it uses for some reason go soild.

    For the second reason, you should install the crash handler v2 and add it to your hack. Even though it feels a bit long, after that your done. (Also, if you don't want this in final release game, just make a copy for that handler and when you update one build, update the handler build as well.
     
  6. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    547
    Location:
    France

    Thank you for your feedback!

    First, yes the porting of Hivebrain to Github went well as I'm used to it and it's nothing difficult, and I also tried to replace with an empty chunk other than "0" but same problem.

    For the second one, I already have this installed and obviously it's not an illegal instruction or anything, it's just the level left on the titlecard, I can't do anything, it crashed, the only thing that works is the music that keeps playing correctly as if nothing happened...
     
    SuperSayian Zrise likes this.
  7. SuperSayian Zrise

    SuperSayian Zrise Well-Known Member Member

    Joined:
    May 10, 2021
    Messages:
    65
    Ok, so thats that likely just a problem with the tile. Is it weridly possible you have to replace it with a newer tile because the tile cant be infected if its attacking star light and marble zone.
    Even though you didn't say it was a problem with the tile, just the chunk. I will have to look into it later.

    Now the second one is a game freeze, could possibly happen because: pattern load cues load number for example:
    If I had 3 things I'm telling it to load, then I put 2. The game will actually freeze due to that. Or the number is like about C or in decimal 12. And the objects loading is only 3.
    Main level load blocks is the next, you probably messed it up in some way. The area in the main asm or the Main Level Load Blocks asm file.
    Palcycle is another point for this. Maybe you were tinkering with it or something.
    Level layout index or object layout index: also, probably possible if your game even builds.

    I know I used basic reasons on why the game may freeze on Level load but thats all I really know of. Or the resizing and stuff like that but yeah.
     
  8. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    547
    Location:
    France
    Thank you for being so involved.

    It is indeed relevant that you try to find "simple" solutions, sometimes I too forget basic things.

    But this is the first time in 8 years of rom-hacking that I'm confronted with this so...

    In fact, it's not a tile problem since the transparent tiles of the other chunks are not solid, it's really only chunk 0 that's buggy.

    And for Labyrinth Zone, the problem with the level not loading happened only with Ashuro or the other characters.

    Only Sonic gets into Labyrinth without any problem, with everything working, but not the others.
     
  9. Tarekboushi

    Tarekboushi Newcomer Prospect

    Joined:
    Jan 24, 2021
    Messages:
    10
    how should i port the mario deja vu from the sonic prototype to the final disassembly? (github)