MegaPCM for the Github Disassembly

Discussion in 'Discussion & Q&A' started by DarkexMW, Apr 5, 2021.

  1. DarkexMW

    DarkexMW werhog Member

    Joined:
    Mar 26, 2021
    Messages:
    33
    Location:
    Metarex's Base
    (Credits to Dewmer Dewar for Port the driver for the github disassembly and vladikcomper for the driver)

    Hi, i was talking a days ago with a member of my team (Dewmer Dewar) and he told me that he had created a version of MEGAPCM for github disassembly
    Tutorial for put MegaPCM in the GitHub Disassembly
    Step 1-
    Replace your s1.sounddriver.asm with the file that I upload in the
    MegaPCM GitHub Disassembly Files.zip
    Step 2-Open your sonic.asm and search for SoundDriverLoad:
    Replace this
    Code:
    SoundDriverLoad:
            nop
            stopZ80
            resetZ80
            lea    (Kos_Z80).l,a0    ; load sound driver
            lea    (z80_ram).l,a1    ; target Z80 RAM
            bsr.w    KosDec        ; decompress
            resetZ80a
            nop
            nop
            nop
            nop
            resetZ80
            startZ80
            rts
    ; End of function SoundDriverLoad
    with this

    Code:
    SoundDriverLoad:            ; XREF: GameClrRAM; TitleScreen
            nop
            move.w    #$100,d0
            move.w    d0,($A11100).l
            move.w    d0,($A11200).l
            lea    (MegaPCM).l,a0
            lea    ($A00000).l,a1
            move.w    #(MegaPCM_End-MegaPCM)-1,d1
    
        @Load:    move.b    (a0)+,(a1)+
            dbf    d1,@Load
            moveq    #0,d1
            move.w    d1,($A11200).l
            nop
            nop
            nop
            nop
            move.w    d0,($A11200).l
            move.w    d1,($A11100).l
            rts
    ; End of function SoundDriverLoad
    Last Step-Extract the MegaPCM_v11_Bin_1.7z and put it in the disassembly
    Build and Run

    And that's it! you already have MegaPCM in your hack

    (Yes, i talk with dewar and he gave me authorization to upload this guide)
    (Credits to Dewmer Dewar for Port the driver for the github disassembly and vladikcomper for the driver)
    Edited: added Code Boxes
     

    Attached Files:

    Last edited: Dec 21, 2021
  2. Matt

    Matt Active Member Member

    Joined:
    Jan 31, 2021
    Messages:
    47
    Location:
    Italy
    Thanks for this tutorial, anyway can you insert code boxes, for better code copying-pasting please?
     
  3. DarkexMW

    DarkexMW werhog Member

    Joined:
    Mar 26, 2021
    Messages:
    33
    Location:
    Metarex's Base
    Soon,or soon post the disassembly with the code already in
     
    Last edited: Apr 9, 2021
  4. Speems

    Speems Well-Known Member Member

    Joined:
    Mar 14, 2017
    Messages:
    83
    Location:
    Rochester Hills, MI
    Quick bug report: The timpani sound plays at the Sega screen, rather than the intended choir. What's up with that? The build was successful, but the Sega chant not playing is a cause for concern.
     
  5. DarkexMW

    DarkexMW werhog Member

    Joined:
    Mar 26, 2021
    Messages:
    33
    Location:
    Metarex's Base
    I dont know... if nothing happens I will publish a solution soon
     
  6. Kurk

    Kurk Oh Yeah Member

    Joined:
    Jul 30, 2016
    Messages:
    99
    Location:
    Kurkistan
    @Speems, the "PlaySegaSound" routine seems to be causing your issue. You should try to apply this fix for the Sega sound.
     
  7. OrdosAlpha

    OrdosAlpha RIGHT! Naebody move! Root Admin

    Joined:
    Aug 5, 2007
    Messages:
    1,793
    Location:
    Glasgow, Scotland
    No one word posts, please.