MegaPCM for the Github Disassembly

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

  1. DarkexNaru115

    DarkexNaru115 Active Member Member

    Joined:
    Mar 26, 2021
    Messages:
    36
    Location:
    Kino Der Toten
    19/01/2025 Edit: DO NOT USE THIS, This version of MegaPCM is outdated and this guide was made when I didn't know almost nothing about romhacking (neither about english), follow this other guide to install MegaPCM2, a new version with support for the Github AS disassembly and a lot of other cool stuff.
    Just in case that someone needs this for an old ASM68K hack or just wants to reinstall MegaPCM 1, I'm leaving the original guide here:

    (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: Jan 19, 2025
  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. DarkexNaru115

    DarkexNaru115 Active Member Member

    Joined:
    Mar 26, 2021
    Messages:
    36
    Location:
    Kino Der Toten
    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:
    93
    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. DarkexNaru115

    DarkexNaru115 Active Member Member

    Joined:
    Mar 26, 2021
    Messages:
    36
    Location:
    Kino Der Toten
    I dont know... if nothing happens I will publish a solution soon
     
  6. Sin_

    Sin_ flesh Staff

    Joined:
    Jul 30, 2016
    Messages:
    108
    Location:
    Gay People
    @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.
     
  8. RobiWanKenobi

    RobiWanKenobi The one with the dog Member

    Joined:
    Sep 10, 2022
    Messages:
    152
    Location:
    Idaho
    The MegaPCM_v11 7zip link is broken, here's a better upload
     

    Attached Files:

  9. TheSunsetHacker

    TheSunsetHacker Active Member Trialist

    Joined:
    Feb 13, 2024
    Messages:
    25
    Location:
    Emerald Coast
    It seems someone has forgotten to make a AS GitHub version.