Basic Questions and Answers Thread

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

  1. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    OK, so I finnaly got the options menu ported, and I set up a screen mode options. Looking at savestates, I can see that the flag is actually set. The flag increases by 1, but I have to multiply it by 4 to get the screen mode index. So I use this code to do that:



    move.b ($FFFFC90E).w, d0
    add.b d0, d0


    add.b d0, d0


    move.w d0, ($FFFFF600).w ; Go to selected mode



    THe deal here is that I always end up on the Sega Screen. The RAM adress contains a Word, but I read from $C90E to only read the second byte. I have no idea why this doesn't work. This code should work, right? This just kinda confuses me. Thanks for any help!
     
  2. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    You are moving a word to $F600. Change it to move.b
     
  3. Goonie

    Goonie Active Member Member

    Joined:
    Jun 14, 2010
    Messages:
    47
    Location:
    Australia
    sonic2 questions!!


    Level order, i know how to do it...but is there a way of making ËHZ"not the first zone?


    Adding zones i found a guide for s1, not s2.... any tips?
     
  4. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    TitleScreen_Loop:



    moveq #0,d0
    move.w d0,(Two_player_mode_copy).w


    move.w d0,(Two_player_mode).w


    move.w d0,(Current_ZoneAndAct).w



    to...



    moveq #0,d0
    move.w d0,(Two_player_mode_copy).w


    move.w d0,(Two_player_mode).w


    move.w #$XXYY,(Current_ZoneAndAct).w



    XX = zone ID


    YY = act ID
     
  5. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    I changed it to move.b (how could I overlook that?) and made some small changes to the code, with one being a way of seeing if it works. Here's my code now:



    move.b ($FFFFC90E).w, d0 ; Load selected mode into d0
    add.b d0, d0 ; Multiply once


    add.b d0, d0 ; Multiply again


    move.b d0, ($FFFFC90F).w ; Debugging Code


    move.b d0, ($FFFFF600).w ; Go to selected mode



    So I load the contents of d0 back into a RAM Adress for debugging, it turns out it is always 00 for dumb reasons. Anyone know why this happens? I'm just completely discombobulated about why this code doesn't want to work.
     
  6. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    People, I have a problem: How would i load PLCs for an extra char? It worked for Mapping and animation i think...
     
  7. Sinkdude

    Sinkdude He looked much leaner on TV Member

    Joined:
    May 6, 2008
    Messages:
    41
    Location:
    Michigan
    I'm trying to fix this problem:


    I've put Flicky in place of the rabbit in Scrap Brain zone and kept the chicken in the level, but when I've loaded the level, only the chickens were in the level, and at different speeds. How do I fix it?
     
  8. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    I can't use FSUTIL, but I want to make my levels from scratch. I want to make the tiles and palettes in SonED2. Do any of you have any empty .bin files I can use?
     
  9. Sinkdude

    Sinkdude He looked much leaner on TV Member

    Joined:
    May 6, 2008
    Messages:
    41
    Location:
    Michigan
    I also forgot this code:



    Code:
    Obj28_VarIndex:	dc.b 0,	5, 4, 2, 6, 3, 4, 5, 3,	0, 5, 1
    
    
    
    Obj28_Variables:dc.w $FE00, $FC00
    
    		dc.l Map_obj28
    
    		dc.w $FE00, $FD00&#59; horizontal speed, vertical speed
    
    		dc.l Map_obj28a	&#59; mappings address
    
    		dc.w $FE80, $FD00
    
    		dc.l Map_obj28
    
    		dc.w $FEC0, $FE80
    
    		dc.l Map_obj28a
    
    		dc.w $FE40, $FD00
    
    		dc.l Map_obj28b
    
    		dc.w $FD00, $FC00
    
    		dc.l Map_obj28a
    
    		dc.w $FD80, $FC80
    
    		dc.l Map_obj28b
    
    
    
    Obj28_EndSpeed:	dc.w $FBC0, $FC00, $FBC0, $FC00, $FBC0,	$FC00, $FD00, $FC00
    
    		dc.w $FD00, $FC00, $FE80, $FD00, $FE80,	$FD00, $FEC0, $FE80
    
    		dc.w $FE40, $FD00, $FE00, $FD00, $FD80,	$FC80
    
    
    
    Obj28_EndMap:	dc.l Map_obj28a, Map_obj28a, Map_obj28a, Map_obj28, Map_obj28
    
    		dc.l Map_obj28,	Map_obj28, Map_obj28a, Map_obj28b, Map_obj28a
    
    		dc.l Map_obj28b
    
    
    
    Obj28_EndVram:	dc.w $5A5, $5A5, $5A5, $553, $553, $573, $573, $585, $593
    
    		dc.w $565, $5B3

    The screenshot is in the attachment.

    /monthly_07_2010/post-408-1280515798_thumb.png
     

    Attached Files:

  10. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Pretty much every hex editor includes an "Insert" function. Simply insert like 10000 bytes with 00 and save it as whatever.bin.
     
  11. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    From what i see, XVI32 doesn't.
     
  12. SamplingMastersNix

    SamplingMastersNix 64-bit Sonic Hacking Novice Member

    Joined:
    Feb 13, 2010
    Messages:
    54
    Location:
    Madison, MS
    So, quick recap. Get a hex editor, type in the appropriate number of bytes, add 00, and save as cz.bin. Sounds straight forward, I'll try it.


    EDIT: I've just noticed something! The Nemesis art format comes in a compressed and uncompressed state. So, after I make the file, do I have to copy and compress the copy? If so, how?
     
    Last edited by a moderator: Jul 30, 2010
  13. Zero

    Zero Active Member Member

    Joined:
    Jan 26, 2009
    Messages:
    37
    look at where the char. plc is loaded (under SonicLoadDynplc or similar) and add an extra char. check. you should also binclude the file....
     
  14. M.N.K.

    M.N.K. In the River of Darkness... Member

    Joined:
    Feb 22, 2009
    Messages:
    506
    Location:
    Earth...
    well If you are talking about making your own custom art for your hack that's in nemesis format, then yes you would have to compress it.


    as for actually compressing it, one way I would suggest doing it is by using SonmapEd and save whatever nemesis art file you are editing and Compress it like that. At least thats how I did it anyway.
     
    Last edited by a moderator: Aug 1, 2010
  15. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Oh no, I'm working on Sonic 1. :) it'd be Incbin :)


    Doesn't matter, as I've adapted to shittles the echidna's glitchy look. Thanks anyway.
     
    Last edited by a moderator: Aug 1, 2010
  16. Zero

    Zero Active Member Member

    Joined:
    Jan 26, 2009
    Messages:
    37
    That was for sonic 1 but ok. glad i could kind of help...
     
  17. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    So, Moon and I tried to add another level as a kind of Hub. We removed it because it didn't work, but now we suspect what causes it, and I can't get it back in correctly. This is what happens:


    ">" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344">


    The PLC and Main Block Load Cues are set up correctly also. Anyone know why this happens?
     
  18. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    I also have a small question. I want to make a save feature in my hack. But i need to know how to do it, I mean, if I have ideas of how to program it i will try this. This question is for people with more advanced knowledge than me.
     
  19. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    Learn ASM. Well, do you have any knowledge how the SRAM functions or how to write/read to it? Modify your header to let the Emu/console know there's actually SRAM. It's pretty complicated. You only write data to odd adresses, a word is the size of a longword, and a longword the size of 2 longwords. This is the kind of thing I really don't want to explain and provide code here, but PM me or get on my IRC channel and I'd be more than happy to help you.
     
  20. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    I know ASM, but i don't know SRAM stuff. I'll PM you.