Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. MarkeyJester

    MarkeyJester

    Vague Memories Resident Jester
    2,055
    149
    43
    Japan
    Alright, so you drag/drop S1 Kick.wav (onto ConvPCM.exe I'm assuming, though you didn't say), after, you had replaced S1 Kick.wav, what do you mean by "and renamed with my sample"? Do you mean, you renamed your sample to "S1 Kick.wav" to replace the old one? Or do you mean you renamed "S1 Kick.wav" to something else? I'm sorry, but I really do need you to be very specific in what you did. Step by step, without leaving out details.

    The only things I can think of right now are:

    1. You either, didn't drag/drop the sample onto ConvPCM, or you didn't assemble afterwards (I'm assuming you did both of these, and in this order, but your video missed one of them, and I'm having trouble understanding your description).
    2. The actual DualPCM sound driver itself is not included into the main game, and you haven't replaced the SMPS sound driver code as described in the thread I released it in. And it's still running the old Z80 driver with the old samples.
    Did you follow this page exactly 100% to the letter?
     
  2. lordxernom

    lordxernom

    Hail Darkness Member
    54
    0
    6
    Kielce
    Tails Adventure LX, Tails Adventure X-L, Sonic Limbo
    Thank you! I finally understand and fixed my issue with sample. I just didn't drag/drop all .wav files into ConvPCM.exe I'm really dumb person. The only thing that bothers me that S1 title screen still plays original S1 music instead of my .bin file in sound folder unlike Github disasm, but in sound test it works, but cuts some seconds of my sample - original has 15 seconds, sound test only plays 4 second, but it seems I must add at least one instrument to make SMPS don't stop after 4 seconds.
     
  3. RetroKoH

    RetroKoH

    Member
    1,660
    15
    18
    Project Sonic 8x16
    IMAGE LINK
    Ok so I'm having a conundrum here... and I'm going to preface this by saying I know very little pertaining to what exactly is going on... or why it is occurring. But in one particular instance of running PaletteFadeIn, as soon as it hits THIS line

    bchg #0,d6

    I get a Line 1111 Emulator error. EVERY time, at this instance, in my title screen mode. Now, I understand what Line 1111 means, but I don't get why it's triggering. Here is the screen from the error handler:
    [​IMG]
     
  4. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    133
    43
    SonLVL
    Correct me if I'm wrong, but it looks to me like "Location: 23000070" means that the program counter was at $23000070, which ignoring the high byte because of the 24-bit address bus, means your game was executing code from address $000070, which is right in the header area. Sounds to me like you have a bad jump, or possibly your interrupt code is broken.
     
  5. RetroKoH

    RetroKoH

    Member
    1,660
    15
    18
    Project Sonic 8x16
    Seems so. Looking over it with Ralakimus now. after fixing an rts in HInt to rte... we found that my ram for the interrupt jump code is being shifted somwhow
    we are looking into why now, so at the very least, THIS exact bug is gone... now for the other one
     
  6. CHRdutch

    CHRdutch

    h Member
    82
    16
    8
    Earth, I think.
    Sonic the Hackable (A.K.A. "A generic Sonic 1 ROMhack")
    Alright, so I've followed this guide on the Sonic Retro wiki and everything was working fine (although I changed some things around because I'm using the GitHub disassembly) until the "ResumeMusic" part.
    For some reason, the music doesn't resume when jumping out of the water and the countdown music keeps playing (except when invincible or when at a boss ???), but the music does resume when grabbing an air bubble.

    Does jumping out of the water resume the music in a different way, or is it my horrible coding? (probably the latter)

    [WARNING THE CODE WITHIN THIS SPOILER MAY CAUSE YOU TO CRY FOR 30 MINUTES STRAIGHT DUE TO MY HORRIBLE MODIFICATIONS TO IT]
    [68k]; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||


    ResumeMusic:
    cmpi.w #12,(v_air).w ; more than 12 seconds of air left?
    bhi.s @over12 ; if yes, branch

    cmpi.b #0,(v_act).w ; is act number 00 (act 1)?
    bne.s @Air_getBgm2 ; if not, branch
    lea (MusicList).l,a1 ; load music playlist
    bra.s @Air_music

    @Air_GetBgm2:
    cmpi.b #1,(v_act).w ; is act number 01 (act 2)?
    bne.s @Air_getBgm3 ; if not, branch
    lea (MusicList2).l,a1 ; load music playlist
    bra.s @Air_music

    @Air_GetBgm3:
    cmpi.b #2,(v_act).w ; is act number 02 (act 3)?
    bne.s @Air_getBgm4 ; if not, branch
    lea (MusicList3).l,a1 ; load music playlist
    bra.s @Air_music

    @Air_GetBgm4:
    cmpi.b #3,(v_act).w ; is act number 03 (act 4)?
    bne.s @Air_music ; if not, branch
    lea (MusicList4).l,a1 ; load music playlist

    @Air_music:
    move.b (a1,d0.w),d0

    @Air_ChkInvinc:
    if Revision=0
    else
    tst.b (v_invinc).w ; is Sonic invincible?
    beq.s @notinvinc ; if not, branch
    move.w #bgm_Invincible,d0
    @notinvinc:
    tst.b (f_lockscreen).w ; is Sonic at a boss?
    beq.s @playselected ; if not, branch
    move.w #bgm_Boss,d0
    @playselected:
    endc

    jsr (PlaySound).l

    @over12:
    move.w #30,(v_air).w ; reset air to 30 seconds
    clr.b (v_objspace+$340+$32).w
    rts
    ; End of function ResumeMusic[/68k]
     
  7. MarkeyJester

    MarkeyJester

    Vague Memories Resident Jester
    2,055
    149
    43
    Japan
    You have not placed anything into "d0" in that routine, before it reached the instruction:

    Code (Text):
    1.                 move.b  (a1,d0.w),d0
    Thus, you have unknown garbage inside d0. The guide you linked had the instruction written as:

    Code (Text):
    1.                 move.b  1(a1),d0           ; load entry $1 from the playlist
    a1 = the music list address, and in their instruction, it will always load the second slot (LZ's BGM slot, that "1" right before the "(a1)") from any of those four lists.

    In your instruction, it'll load from any of the four lists, but at the slot number of whatever is inside "d0", now, since you don't know what's inside "d0", you could have any slot number from 0000 all the way to 7FFF, or backwards from FFFF all the way down to 8000.

    tl;dr, if you want it to only be LZ, then use their instruction. If you want it to be with any zone (i.e. you have water zones other than LZ's slot). Then clear d0, and load the Zone ID into d0, before your instruction so that it loads the current zone's music, like so:

    Code (Text):
    1.                 moveq   #$00,d0
    2.                 move.b  ($FFFFFE10).w,d0
    3.                 move.b  (a1,d0.w),d0
     
  8. Ali

    Ali

    Member
    14
    0
    0
    For Sonic Adventure DX (PC, non-Steam version), are there any mods or cheats that allow you to go off-camera? I'm looking to do something similar to this.

    Thanks in advance. I want to do it so that I can grab some real-time screenshots of some of the models from different angles.
     
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    133
    43
    SonLVL
    I wish I knew how to make one, but I really have no clue how to hack the camera like that.
     
  10. CHRdutch

    CHRdutch

    h Member
    82
    16
    8
    Earth, I think.
    Sonic the Hackable (A.K.A. "A generic Sonic 1 ROMhack")
    Thanks for the help! I guess I should've read the tutorial more through instead of just copy-pasting the previous part, thinking it would work there too.

    Or maybe I should look at the code itself, instead of just shifting things in the code up and down. :v:
    Anyways, thanks for the help. Again, I really appreciate it.
     
  11. Blue Spikeball

    Blue Spikeball

    Member
    979
    224
    43
    How come there are hardly any mods or hacking guides for the Sonic CD remaster? Is there a technical reason for that, or the community is just too attached to ROM hacking to bother looking into modding the PC version (despite the latter's advantages)?
     
  12. Clownacy

    Clownacy

    Tech Member
    814
    47
    28
    Well, one reason is that the classic games were written in assembly, so disassembling them produced very readable code. The Retro engine was written in a compiled language like C++, so disassembling it would produce some machine-generated code, which can be much harder to understand.
     
  13. Cooljerk

    Cooljerk

    NotEqual Tech, Inc - VR & Game Dev Oldbie
    4,334
    77
    28
    There are a few in the works, actually. I don't think any have been shown publicly, though.

    The Retro Engine runs script-driven logic that is compiled into a custom bytecode, actually. The Engine itself is C++, but the logic is not.
     
  14. Artemis Davar

    Artemis Davar

    Member
    9
    0
    0
    This is a weird question, but still doesn't warrant it's own thread.

    Is the fan made CD port of sonic 1 finished? I was playing it via emulation and it randomly resets in the middle of SBZ act 1, is this supposed to happen or is it a bug?
     
  15. Blue Spikeball

    Blue Spikeball

    Member
    979
    224
    43
    Well, it's too bad that there's so little interest in modding Sonic CD as a whole, especially what's easily the definitive version. It's been years since the port came out and Stealth released this, and there's still no "Knuckles in Sonic CD" :v:
     
  16. ALittleTooFast

    ALittleTooFast

    How about that? Member
    Alright, I've been wanting to edit Sonic's Life Icon, Continue, Continue Screen, and Credits sprites, but I can seem to find the right mappings for them in my disassembly, and the ones I do seem to find screw up the graphics.
    Am I missing something? Or do these just not have maps?
     
  17. Chainspike

    Chainspike

    Stealing rings since 1994 Member
    166
    70
    28
    Death Egg Zone
    S3C Delta
    I have been wanting to hack Sonic 3 (alone) for a very long time. Does anybody know how I would go about this? Any help is appreciated!
     
  18. MarkeyJester

    MarkeyJester

    Vague Memories Resident Jester
    2,055
    149
    43
    Japan
    Well firstly, we need to know what you already know, so we know where to start explaining. But I'll go ahead and state a few minor things to get the ball rolling.

    Most of the "hacking" nower days is done via disassemblies, but, from what I understand, unlike the other Sonic titles, we do not have a Sonic 3 disassembly. The reason is that we have a Sonic & Knuckles disassembly which contains huge portions of Sonic 3, thus, effectively having a Sonic 3 disassembly within reason, but we do not have Sonic 3 on its own. There might be an IDA file on the wiki (I haven't checked) which might be dumpable and useable, but I don't think so.

    Your options are (but likely not limited to) the following:

    1. You hack a raw binary Sonic 3 file with a hex editor or various old tools like those "hacking studios" (yeah, I know, it's so cute now! dX), and if you have some knowledge of the binary pathing formulars to the 68k and/or z80, you should be able to modify the code to your liking.
    2. You could start making a disassembly of Sonic 3 of your own to make the code modifying easier on your part, split everything out, and so forth, and work with that.
    3. You could just work on the Sonic & Knuckles disassembly with Sonic 3 lock-on, but modify it back so it looks and functions like Sonic 3 again, then you'd pretty much have a Sonic 3 disassembly, but it'll also be a little more solid (Sonic 3 had bugs that Sonic & Knuckles fixed).
    What it comes down to is what knowledge you currently already possess, and how much you're willing to learn (for example, I could be talking to you about disassemblies, and you'd probably not know what one is, but I don't currently know that). It also depends on what you're happy to compromise with.

    This is just the beginning though, there are several other aspects to take in mind, but you can learn them all on the way~ The more information you give, the more everyone can help you.
     
  19. Chainspike

    Chainspike

    Stealing rings since 1994 Member
    166
    70
    28
    Death Egg Zone
    S3C Delta
    I didn't think there was a Sonic 3 disassembly. I did find these, but I couldn't open any of them because IDA said the file was corrupted. I also tried hex editing, but I do not have a hex editor that shows the ASM equivalents of hex values. The problem with editors like ESE II is that they can only edit some of the levels in Sonic 3 and do not allow for new objects to be added. (for obvious reasons) I could try to make my own Sonic 3 disassembly, but I have next to no knowledge on how to make a disassembly. Editing the Sonic 3 & Knuckles disassembly into a "Sonic 3 disassembly" could work, but I am looking for the original Sonic 3; not an imitation.
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    133
    43
    SonLVL
    You could possibly use that "ROMulan" tool Stealth made for editing ROMs with SonED2.