Basic Questions and Answers Thread

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

  1. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    I suppose this would count either as a double post or bump, and sorry if it is; but I might need this for future purposes.


    Where can I find a clearly visible rendition of the full 32 bit palette entry point list?
     
    Last edited by a moderator: Sep 7, 2012
  2. Sonic master

    Sonic master Well-Known Member Member

    Joined:
    Mar 27, 2010
    Messages:
    303
    Are you talking about a pointer table


    If so it looks like this



    Code:
    
    pointers:
    
     dc.l data1
    
     dc.l data2
    
    ;and so on
    
    
     
  3. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    Nope. I'm talking about the entire 32 bit pallet system. Not the 16 bit pallet listings. I'm going to implement it into my fan game as provided as my signature below because I'm too lazy to type it up. I would like to release it before Febuary 2013. But I can't seem to find the actual listing anywhere.
     
    Last edited by a moderator: Sep 8, 2012
  4. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    You will need to give us more information, for example "32 bit palette entry point list" ...of what? A bitmap file? And what do you mean by "clearly visible rendition"? A documentation about it?


    You're doing it again, leaving us out on information we need to know, in order to answer your question.
     
    Last edited by a moderator: Sep 8, 2012
  5. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    Sorry about that, I need as many renditions as I can get, I need a bitmap file and an adressed asm file for recording. If there is any possibility that they can be provided. Please and thanks.
     
  6. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    a Bitmap file

    An addressed ASM file


    There you go, though I don't know how you intend on "recording" with an asm file.
     
  7. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    I find this very humorous. It has inspired me to pat you on the back and give a reply, rather than a point of reputation. The intentions I have for the 32-bit pallet line, rests upon the fact of a fan game I'm making. I have decided to work alone on this, but I need all the materials I need that involve the palettes. And so far I haven't had much luck on finding what i need.
     
    Last edited by a moderator: Sep 8, 2012
  8. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    F.Y.I. points of reputation mean nothing to me, I've requested its take down multiple times in multiple topics.


    On subject though, you need to be more thorough with what it is you want, explain to us step by step, what you intend to do, and do not leave information out, be very narrow on this:

    • When you say "asm file", explain what language, you cannot expect us to assume it's 68k, because it might not be.
    • When you say a "32 bit palette entry point list", explain what kind of list, you could mean a list of pointers, that could be either byte, word, double-word or even higher, or you could mean just palette data one directly after another.


    This isn't me, I'm not an idiot who cannot read, you're just not being clear and are leaving things out. This isn't the first time either, take a look:


    http://sonicresearch.org/forums/index.php?showtopic=1335&st=1188#entry34418


    http://sonicresearch.org/forums/index.php?showtopic=1335&st=1188#entry34793


    After reading what you wrote, I thought you wanted to read from a palette held within a 32-bit bitmap file in an assembly language of some sort.


    But that doesn't make much sense, so I can only assume that it's wrong.
     
  9. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    I'm GONNA GIVE MARKEY LIKE 10000000000000 + rep points =P


    Back on topic, explain to me, why would you need an asm file for a fan game? I'm still kinda lost as to why you need a list. Do you mind explaining what in God's name you are trying to accomplish?
     
  10. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    MJ: I will only need the a bmp image of the whole palette


    SE: I needed an asm (MJ: Point of reasoning is that I don't know exactly what format the 32X games are in) file to record the pallet entries for the future. I'll be working with 32X dis-assemblies in the next couple of weeks.


    I know what will be said, So I end it here and search for it by myself. Thanks for the help as usual.
     
  11. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The 32x's VDP has a 15-bit colour format with an additional bit for alpha, together forming a 16-bit value, in bits:


    ABBB BBGG GGGR RRRR


    Where A is Alpha, B is blue, G is green and R is red, for a 32-bit colour from a bitmap, it would be (in bits):


    0000 0000 BBBB BBBB GGGG GGGG RRRR RRRR


    Where 0 is null (empty padding), B is blue, G is green and R is red, as far as I'm aware, when converting 32-bit (24) colour to the 16-bit (15) colour format, there is no direct format, but the best way is through logical AND clearing the lowest bits, i.e. as each colour segment in the 16-bit (15) colour format only has 5 bits, you remove the least significant bits of each segment to match that:


    0000 0000 BBBB BBBB GGGG GGGG RRRR RRRR


    Becomes:


    0000 0000 BBBB B000 GGGG G000 RRRR R000


    Then, the 0's can be removed by shifting the colours up into a 16-bit value:


    0000 0000 0000 0000 0BBB BBGG GGGR RRRR


    And setting the end bit as alpha (if needed), where alpha will set the pixel as behind or infront of Mega Drive VDP display (Depending on the settings).


    You can generate a total of 0x8000 colours for CRAM, of course, the VDP isn't limited to a palette, it has a mode for displaying raw bitmap colour pixels on the display plane itself (in the 16-bit (15) format explained above), rather than individual ID's to referrence a colour in CRAM.


    Here is an ASM file containing a load of dc.l long-word (32-bit) values of all possible 32x colours which can be generated, all 0x8000 of them.
     
  12. Sonic master

    Sonic master Well-Known Member Member

    Joined:
    Mar 27, 2010
    Messages:
    303
    Edit read other post beyond that post so it is 32x oh well should have read post after that sorry keeping this because it has some important information.


    What are you talking about this appears to not even be a sonic hacking question instead it is a general computer programming question. You have alot to learn judging by your posts. On the m68k pointers are stored as a 32bit pointer even though the m68k is considered 16bit by some. Doing dc.l data will resault in 4 bytes which is 32 bit. I hope you spend more time learning to program and please pick a decent laungue HINT: C or asm is the way to go do not do java for games or even worse please do not use game maker or something similar. C or asm can get you good well paying jobs gamemaker will not. Java does lead to jobs but in my opion java is not made for making games C is faster than java when done properly but most people appear to use java for gui related stuff. I put that advice here because you appear to be young and I think this advice about jobs can help you and learning to program a game in C or asm could help you get a job so I would highly recomend learning C or asm. Asm may lead you to more microcontroller related jobs just so you are aware or reverse enginering jobs. Crap I am getting offtopic.
     
    Last edited by a moderator: Sep 10, 2012
  13. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    one thing i have trouble with is adding multiple characters to sonic 1.


    Before the snasm68k on s1 hacking studio 2 quit working on me I had 2 characters and was making a third.


    1. Sonic


    2. Richter


    3. "SonicThree" which was taken from s1 hacking studio 1.


    when i tried loading richter, the art became that of "SonicThree"


    Now that I Migrated to a standalone Hivebrain disassembly, I'm managing 2 characters, knowing what happened before,


    1. Sonic


    2. SonicHS (SonicThree)


    and am wanting to readd Richter, But don't want to Corrupt the others.


    I may add more Sonics to it, so perhaps Sonic can "Cycle" through his various styles like i seen in a sonic 2 hack which pushing a button switched from sonic 2 style to sonic 3 & vice versa making it


    1. Sonic


    2. SonicHS (Jumpdash Enabled only)


    3. SonicHSP (art, maps, cues, anims, code from s1hackingstudio 2)


    4. SonicTwo (Sonic 2's art, maps, cues, code)


    5. SonicThreeK (Sonic3K's art, maps, cues, code)


    6. Richter (I still have his art, maps, cues, anims & what code i have for him ready)


    Perhaps I can just make an Intro stage (or outtro stage) to change characters and perhaps have Richter with his own Final Stage
     
    Last edited by a moderator: Sep 11, 2012
  14. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Exactly what is your question? You didn't post one? If you wanna know how to get the three characters in and they're just sprite swaps, you could set aside a RAM location, have it be 0, 1 or 2 for each character, then have the game check which of those is in the RAM address and load the appropriate DPLC/PLC/Mappings and Art.
     
    Last edited by a moderator: Sep 11, 2012
  15. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    I do, but when i try...


    At the moment I have Sonic, & SonicHS, but when i tried setting up Richter, sonic had Richter's art instead of his own.


    http://sonicresearch.org/forums/index.php?showtopic=3241&hl=


    as in this thread i mentioned i used the add extra characters tutorial at the retro, and was given a fix so that Richter would have his own moves.


    i even


    tst.b (FFFFFFFE).w


    bne not sonic map, cues, art, anim


    to make it so he was up and running. however attemptted SonicHS as third and richter started loading SonicHS


    now since i migrated the project due to asm68k, snasm68k quit working i now have the problem vice versa.


    sonic was loading richter's art instead, while SonicHS was fine
     
  16. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK



    cmpi.b #1,($FFFFFFFE).w ; check 2nd character


    beq.s Load2ndChar ; if so, load player 2


    cmpi.b #2,($FFFFFFFE).w ; check 3rd character


    beq.s Load3rdChar ; if so, load player 3


    ;code for the first character if not 2nd or 3rd



    You want something like this, so if set to 1, it will load the 2nd, set to 2, the 3rd. If neither are set(in other words 0) then just load the first character like normal.


    Also (FFFFFFFE).w, should be this: ($FFFFFFFE).w
     
    Last edited by a moderator: Sep 12, 2012
  17. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    This is basic 68k, if you don't know how to do a simple check like that I suggest looking at Retro's 68k guide.
     
  18. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    AnimeMaster that's what i was doing.



    Code:
    loc_3230: tst.w ($FFFFF614).w beq.w Demo andi.b #$80,($FFFFF605).w ; check if Start is pressed beq.w loc_317C ; if not, branch sf.b ($FFFFFFFE).w ; reset character to Sonic btst #$05,($FFFFF604).w ; is the B button being held? beq Title_ChkLevSel ; if not, branch addq.b #$01,($FFFFFFFE).w ; increase ID to new character btst #$06,($FFFFF604).w ; is the A button being held? beq Title_ChkLevSel ; if not, branch addq.b #$02,($FFFFFFFE).w ; increase ID to new character btst #$04,($FFFFF604).w ; is the A button being held? beq Title_ChkLevSel ; if not, branch addq.b #$03,($FFFFFFFE).w btst #$03,($FFFFF604).w ; is the A button being held? beq Title_ChkLevSel ; if not, branch addq.b #$05,($FFFFFFFE).w ; increase ID to new character ; increase ID to new character
    each button press to select the character
    yes i know, was typing & the button messed up on me without me realizing (these keys on the keyboard get stuck often :p

    the rest of what i did



    Code:
    
    SPLC_ReadEntry:
    
      moveq #0,d2
    
      move.b (a2)+,d2
    
      move.w d2,d0
    
      lsr.b #4,d0
    
      lsl.w #8,d2
    
      move.b (a2)+,d2
    
      lsl.w #5,d2
    
      cmpi.b #$01, ($FFFFFFFE).w ; is the multiple character flag set to $01 (Metal Sonic)?
    
      bne.s SonicArtLoad  ; if not, load Sonic's art
    
    		
    
    		 lea (Art_SonicThree).l,a1 ; load  Sonic Three's art
    
    		 cmpi.b  #$02, ($FFFFFFFE).w
    
    			    beq.s SonicHSLoad
    
      bra.s ContLoadPLC  ; branch to rest of code
    
      cmpi.b #$02, ($FFFFFFFE).w
    
      beq.s    SonicHSLoad
    
      ;cmpi.b #$03, ($FFFFFFFE).w
    
      ;beq.s   LoadRichter
    
      ;cmpi.b #$04, ($FFFFFFFE).w
    
      ;cmpi.b #$05, ($FFFFFFFE).w
    
    
    
    SonicArtLoad:
    
      lea (Art_Sonic).l, a1 ; load Sonic's art
    
    SonicHSLoad:
    
    			    lea (Art_SonicHS).l,a1 ; load  Sonic Three's art
    
    ;LoadRichter:
    
    ;			   lea (Art_Richter).l,a1			   
    
    ContLoadPLC:
    
      adda.l d2,a1
    
    
    [/CODE]
     
    Last edited by a moderator: Sep 12, 2012
  19. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    I think the problem is you don't understand yet how the code is being processed. To make it simple, as long as there's no instruction to go to a specific address of the program (all the bra/bcc/bsr/jmp/jsr/rts etc instructions) the program just keeps going to the next line.


    Look at those lines after SonicArtLoad. What happens is that the lea (Art_Sonic).l, a1 line is processed, but the next line being processed is lea (Art_SonicHS).l,a1, and then it's adda.l d2,a1. So Art_SonicHS replaces Art_Sonic in a1 and whatever you do, you end with that one being used.
     
  20. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    Frankly, I would quit using that tired old method character selection you have going. Add in an options menu or something. Next, as I told you, or somebody else earlier in this thread, it probably be 100000000 times easier just adding in a copy of the sonic object, change the sub names, adding ib its own art,then using that old button select on the title screen method but modified to instead load a different object as opposed to obj01 Sonic. Instead, it load obj04 or something, which could be your alternate character 1, then obj05 could be richter, ect. And with that change, the art wouldn't have to be checked, instead the object would load the art, thus removing all this unwanted code.... AND giving you more freedom to add moves to each character without the need of repetive and multiple checks.
     
    Last edited by a moderator: Sep 12, 2012