Basic Questions and Answers Thread

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

  1. Mr. Joker 27 Music prod.

    Mr. Joker 27 Music prod. Musician, composer, remixer. Member

    Joined:
    Aug 26, 2016
    Messages:
    158
    Perfect, I'm only going to report the post in any case if necessary, sorry if I sounded rude or something, but I just said he don't laugh and be aware next time, a thousand apologies if anyone was offended.
     
    DeltaWooloo likes this.
  2. FruitcakeDog

    FruitcakeDog Newcomer Member

    Joined:
    May 28, 2020
    Messages:
    21
    Location:
    United Kingdom
    I had a think about what you said there and I found out that there were indeed loads more tiles in the new art than the original credits file had and that the garble seemed to start about half way through the first line that uses the extra tiles. So I went back into sonic.asm and discovered that where I'd dummied out the line that loads the graphics for the 'Sonic Team Presents' text there was still empty space in VRAM being reserved for it. I dummied out that line as well, built the rom and the new graphic loads perfectly now.

    Thanks for the help! :) (should have used the advice from the first reply way sooner...)
     
    MainMemory likes this.
  3. GottaGoFast

    GottaGoFast Newcomer Trialist

    Joined:
    Jan 15, 2021
    Messages:
    9
    I understand, I dont wanna get banned.

    Edit: also good morning i guess, i hope everyone has a great day today!
     
  4. Speems

    Speems Active Member Member

    Joined:
    Mar 14, 2017
    Messages:
    29
    Location:
    Rochester Hills, MI
    [​IMG]
    An insanely common problem for Sonic 1 hacks importing the S2 level select is a specific crash that happens during the transition to said level select. Nobody tends to notice a lot of the time since most hacks using it were played on emulators like Kega Fusion or Gens. However, Blastem, Regen, and real hardware make the game crash. Thanks to the advanced error handler, it seems like the cause is due to MainGameLoop in the sonic1.asm file. The question is though, how can this error be fixed now that we know where to look?
     
  5. DeltaWooloo

    DeltaWooloo Up up up down down down left right left right Member

    Joined:
    Aug 7, 2019
    Messages:
    262
    Location:
    England
    This is an easy fix:

    Go to s2_menu.asm and search for this:

    Code:
    ;-------------------------------------------------------------------------------
                              move.w #$0000,($FFFFF7B8).w ; Inicializa os quadros das animações do menu
                               move.w #$0000,($FFFFF7B9).w ; Inicializa o contador das animações do menu
                               jsr Dynamic_Menu ; Chama a rotina de animação
    ;-------------------------------------------------------------------------------
    replace it with this:

    Code:
    ;-------------------------------------------------------------------------------
                               clr.l ($FFFFF7B8).w ; clear RAM adresses $F7B8 to $F7BA
                               jsr Dynamic_Menu ; Chama a rotina de animação
    ;-------------------------------------------------------------------------------
    The reason for the bug is due to some emulators unable to clear RAM addresses using longwords (i.e. Regen, BlastEM and real hardware)

    Hope this helps you with the fix!

    Credit to Selbi for the original fix.
     
    Last edited: Feb 15, 2021
    Samey and Speems like this.
  6. Kilo

    Kilo Foxy Fren Member

    Joined:
    Oct 9, 2017
    Messages:
    394
    Location:
    A warm and lovely place~
    That explanation makes it sound like the fix doesn't actually work and makes things worse. A better explanation - You cannot use word access on odd RAM addresses, inaccurate emulators like Kega Fusion can though, which because a lot of people use those emulators, the S2 level select guide ends up breaking a lot of hacks.
     
  7. Dewar

    Dewar Newcomer Member

    Joined:
    Dec 14, 2018
    Messages:
    11
    Does anyone have any idea how to put custom music in the AMPS driver? I am currently using AMPS on Sonic 2, I tried using MDmusicPlayer and then did a manual editing, but when building the ROM whenever I try to listen to the music the game crashes.
     
    DeltaWooloo likes this.
  8. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    881
    Location:
    Orono, Maine
    I think you might have an error in the formatting of the sound file. Compare yours with a working sound file. One simple error that tends to cause a crash is not subtracting 1 from the FM channel count in the header. You need to do this because SMPS counts the DAC channel, while AMPS doesn't.
     
    Samey, DeltaWooloo and Dewar like this.
  9. Samey

    Samey Le Bored Hedgie Member

    Joined:
    May 3, 2017
    Messages:
    56
    I was getting a crash when I first ported the Sonic 2 Level select too, however I noticed $FFFFF7B9 was an odd address and changed it to $FFFFF7BA

    This looks to be a much cleaner fix though, and I kinda wish I knew about this a few years ago :D
     
    Painto likes this.
  10. Cass10

    Cass10 Active Member Member

    Joined:
    Nov 29, 2008
    Messages:
    30
    Location:
    General Mines.
    After 10 years, I found in my old computer a Sonic 1 disassembly (2005) with my old hack, and I got a problem: Sonic don't touch anything except springs, signpost, etc.. I don't remember what I have edited. Maybe some Obj41: code or else...I tried to put the original code, but it didn't fix it What do you recommend? Copy the files to a new disassembly or find the problem?
     
  11. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    912
    You could use something like kdiff3 to compare your asm file with the original, and try to find anything you may have broken through that.