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:
    31
    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:
    264
    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:
    882
    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:
    31
    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.
     
    Cass10 likes this.
  12. Stdh

    Stdh Newcomer Trialist

    Joined:
    Jan 11, 2021
    Messages:
    7
    so what im trying to do is skip the ending sequence and go directly to the credits
    but there is nothing i have found witch points to that
    so what im saying is: how do you remove the ending sequence and go directly to the credits?
    again i'm using asm68k.
     
  13. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    882
    Location:
    Orono, Maine
    At loc_1A248, the Hivebrain disassembly has:
    Code:
            move.b    #$18,($FFFFF600).w
    $FFFFF600 is the RAM location for the game mode and $18 points to the ending sequence.
    To make it go directly to the credits, change it to:
    Code:
            move.b    #$1C,($FFFFF600).w
    If you're using the Github disassembly, it's at the same location and in the file "_incObj\85 Boss - Final".
    For future reference, which assembler you're using isn't that important to how your code looks. It's more important to specify which disassembly you're using since there are two commonly used Sonic 1 disassemblies and the GitHub one uses labels for constants and variables as well as some macros, while the Hivebrain one is more bare bones.
     
  14. Cass10

    Cass10 Active Member Member

    Joined:
    Nov 29, 2008
    Messages:
    31
    Location:
    General Mines.
    Thank you very much. I'll tell you later if it worked.
     
  15. Speems

    Speems Active Member Member

    Joined:
    Mar 14, 2017
    Messages:
    31
    Location:
    Rochester Hills, MI
    When it comes to S1 hacks importing the S2 level select, I feel having the S1 debug code would be pointless because of the Sound Test being able to input the code for debug. Is there a way to disable the S1 debug cheat (Up C Down C Left C Right) in disassemblies?
     
  16. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,827
    Location:
    italy
    There are various ways to do that, but I think that this one is the most appropriate for your specific request.
     
    Speems likes this.
  17. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    540
    Location:
    France
    Hi, it's been a long time since I've had this problem but I still haven't found a solution, so I'm turning to you.

    I'm doing my SMPS on my pc using the midi driver "mid2smps".

    This allows me to have the real sound of the console instruments on my MIDI sequencer. The problem (which I'm not the only one to have encountered) is that the DACs don't work properly. Whether it's on Anvil, FL Studio or Sekaiju, only the hit-hats sound right. Toms, snare and kick are silent. I tried several times to reinstall the driver in vain.

    I'm on Windows 7 64 bit. I remember it worked fine at one time but not anymore and it hasn't worked for a long time.

    If anyone has a solution I'll take it!
    Thank you for your help.
     
  18. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    160
    Did you set a valid DAC.ini file in the mid2smps configuration?
    Does that DAC.ini file work with SMPSPlay?
     
  19. JerTH

    JerTH Newcomer Trialist

    Joined:
    Jan 25, 2021
    Messages:
    11
    So I'm looking at the Sonic 1 Github Disasm and I see these values at the top of sonic.asm:

    Code:
    EnableSRAM:    equ 0    ; change to 1 to enable SRAM
    BackupSRAM:    equ 1
    AddressSRAM:    equ 3    ; 0 = odd+even; 2 = even only; 3 = odd only
    
    ; Change to 0 to build the original version of the game, dubbed REV00
    ; Change to 1 to build the later vesion, dubbed REV01, which includes various bugfixes and enhancements
    ; Change to 2 to build the version from Sonic Mega Collection, dubbed REVXB, which fixes the infamous "spike bug"
    Revision:    equ 1
    
    ZoneCount:    equ 6    ; discrete zones are: GHZ, MZ, SYZ, LZ, SLZ, and SBZ
    
    OptimiseSound:    equ 0    ; change to 1 to optimise sound queuing
    What do these values do once changed?
     
  20. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    540
    Location:
    France
    SmpsPlay works fine!
    That's why i don't understand

    Édit: I just replaced the officiel dac.ini from mid2smps files with the dac.ini in SMPS Play and it work perfectly, thanks!
     
    Last edited: Mar 3, 2021 at 5:14 PM