Jump to content

  •  

Photo

Basic Questions and Answers Thread


  • Please log in to reply
1662 replies to this topic

#1225 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 344 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 08 September 2012 - 04:42 PM

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.

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.
  • 0

#1226 MarkeyJester

MarkeyJester

    Intelligence takes you so far, intuition takes you further

  • Pro User
  • 1371 posts
  • Gender:Male

Posted 08 September 2012 - 07:33 PM

I need a bitmap file...

a Bitmap file

...and an adressed asm file for recording.

An addressed ASM file

There you go, though I don't know how you intend on "recording" with an asm file.
  • 0

#1227 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 344 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 08 September 2012 - 08:41 PM

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.

Edited by Mike B Berry, 08 September 2012 - 08:41 PM.

  • 0

#1228 MarkeyJester

MarkeyJester

    Intelligence takes you so far, intuition takes you further

  • Pro User
  • 1371 posts
  • Gender:Male

Posted 08 September 2012 - 09:15 PM

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...1188#entry34418
http://sonicresearch...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.
  • 0

#1229 SuperEgg

SuperEgg

    Holy shit, Six emeralds....Strange.

  • Pro User
  • 546 posts
  • Gender:Male
  • Location:TEXAS

Posted 08 September 2012 - 09:42 PM

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?
  • 0

#1230 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 344 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 08 September 2012 - 11:16 PM

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.
  • 0

#1231 MarkeyJester

MarkeyJester

    Intelligence takes you so far, intuition takes you further

  • Pro User
  • 1371 posts
  • Gender:Male

Posted 09 September 2012 - 12:14 AM

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.
  • 0

#1232 Sonic master

Sonic master

    4 Chaos Emeralds

  • Member
  • 236 posts
  • Gender:Male
  • Interests:Homebrew games for retro systems.

Posted 10 September 2012 - 08:21 PM

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.

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.

Edited by Sonic master, 10 September 2012 - 08:27 PM.

  • 0

#1233 warr1or2

warr1or2

    3 Chaos Emeralds

  • Member
  • 102 posts
  • Gender:Male
  • Location:Town Creek, AL
  • Interests:Making Money, going out, being me

Posted 11 September 2012 - 12:20 AM

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

Edited by warr1or2, 11 September 2012 - 12:20 AM.

  • 0

#1234 Irixion

Irixion

    6 Chaos Emeralds

  • Pro User
  • 507 posts
  • Gender:Male
  • Location:Ontario, Canada

Posted 11 September 2012 - 10:48 PM

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.
  • 0

#1235 warr1or2

warr1or2

    3 Chaos Emeralds

  • Member
  • 102 posts
  • Gender:Male
  • Location:Town Creek, AL
  • Interests:Making Money, going out, being me

Posted 11 September 2012 - 11:04 PM

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.

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...wtopic=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
  • 0

#1236 Animemaster

Animemaster

    Lets get to work!

  • Pro User
  • 990 posts
  • Gender:Male
  • Location:UK

Posted 11 September 2012 - 11:38 PM


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.

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...wtopic=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



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

Edited by Animemaster, 11 September 2012 - 11:43 PM.

  • 0

#1237 Irixion

Irixion

    6 Chaos Emeralds

  • Pro User
  • 507 posts
  • Gender:Male
  • Location:Ontario, Canada

Posted 12 September 2012 - 01:34 AM

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.
  • 0

#1238 warr1or2

warr1or2

    3 Chaos Emeralds

  • Member
  • 102 posts
  • Gender:Male
  • Location:Town Creek, AL
  • Interests:Making Money, going out, being me

Posted 12 September 2012 - 02:21 AM

AnimeMaster that's what i was doing.
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

Also (FFFFFFFE).w, should be this: ($FFFFFFFE).w

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

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


Edited by warr1or2, 12 September 2012 - 02:23 AM.

  • 0

#1239 SpirituInsanum

SpirituInsanum

    6 Chaos Emeralds

  • Pro User
  • 616 posts
  • Gender:Male

Posted 12 September 2012 - 02:45 AM

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.
  • 0

#1240 SuperEgg

SuperEgg

    Holy shit, Six emeralds....Strange.

  • Pro User
  • 546 posts
  • Gender:Male
  • Location:TEXAS

Posted 12 September 2012 - 03:55 AM

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.
  • 0

#1241 Irixion

Irixion

    6 Chaos Emeralds

  • Pro User
  • 507 posts
  • Gender:Male
  • Location:Ontario, Canada

Posted 13 September 2012 - 01:31 AM

I find myself saying this for the fourth time now. He doesn't know what he's doing. Look at how 68k works before you try programming in it. Basic order of operation. It's like trying to read a sentence but with the words in random order.
  • 0

#1242 Mike B Berry

Mike B Berry

    The requisite of life

  • Member
  • 344 posts
  • Gender:Male
  • Location:Stanfield Oregon
  • Interests:Studying ASM and editing Sega Genesis roms.

Posted 13 September 2012 - 04:57 AM

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.

How many times have we done this with him by the way? It's obvious that the material linked (Mainly the 68k guide) either hasn't been understood correctly, or he hasn't built a foundation around his studies. I have created a simple guide to run him through, but the main issues depend on what he is trying to accomplish. I myself have a couple things to learn. I'm sure that in time (the distant future, that is,) his issues will be resolved.

Edited by Mike B Berry, 13 September 2012 - 05:00 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users