Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.
I know its vram markey it was a typo error, and no I'm not lying.
That's fair enough but, be more careful when you post? and nobody said you were lying =$
nicogearX, you might wanna check here first as someone had attempted something similar. But in answer to your problem...
I thought I had seen similar problems before, I recall twice at Retro and once here, though upon searching I could only find the one above, but it should explain everything for you.
I see, thanks for solving it, so it was the VRam...
EDIT:Here's a new question, now that i'm going to be heading into more complicated things, i need to know something, how is it that i can find out what value represents what? i mean let's look at this code: move.w #$10,($FFFFF72A).w i already know it moves the word 10 to the address FFFFF72A, but for what is FFFFF72A used? i searched along the entire ROM but there's nowhere an explanation about the function of FFFFF72A, is that predetermined or what? PS: Remember i used FFFFF72A as an example only.
Well I think $FFFFF72A is a flag to do with the camera, there is a few that do different but I'm still not sure about what it TRULY does, I think its like when it locks the screen and then when it unlocks the camera is moved to the right, say like move.b #2,($FFFFF72A).w move the camera slowly and bit, change the 2 to a 4 and it moves faster and a bit further I think..... let someone else correct me.
Edit: fffff I forgot about the guide on sonicretro, I think the ram adress is listed there and tells you about how it effects tyhe camera.
I see, now i know what to use when i lock the screen, but let's say i want to find out what other addresses mean like....i don't know......FFFFAE68? i mean, is there a way to find out what everything does, or i must just guess out?
Like I mentioned in my previous post, I'll link it here, if the address you want is not listed its either because no one knows what it does, or no one bothered to update the page with said info. Or its a free ram address so you can do whatever with it, using to set things, comparing things,ect.
Thanks, that really helped!
EDIT:Now that i look into the code deeper...i found another question: "move.w #$400,2(a0)" now i know that it moves the word 400 to a0(I think), but again, how is this used for anything in the game? also please REMEMBER this is only an example, i want to know if there's a way to do this with EVERYTHING in the code, and if that's the case, how.
2(a0) can be really anything. You need to load something into a0 like a ram address.
lea ($FFFFFE10).w,a0 ; $FE10 is the zero point a0 starts at
So 2(a0) reffers to $FE12, it is the second byte after $FE10 which is loaded into a0.
you could also load -2(a0) which will reffer to $FE0E, 2 bytes before the zero point. Note that you could also load a ROM address, remember that the assembler automaticly builds all instances that are included into the ROM, so if you do this:
lea (Art_Sonic).l,a3 ; load ROM address in a3 (note that it has to be .l, this is a ROM address)
And now you can edit whatever is after that label as you wish.
If you are talking about an object, usually a0 is the SST address, 2(a0) is the word for the (VRAM address)/20. Multiply by $20 to get to the value in the pattern load cues.
And to answer your other question, to know what the RAM address does, edit it. Move values and look how it is affecting the game.
I see, i think i get it, so i must test to see what each code does...
Very good, you explained it pretty well too, one thing though that I couldn't help but notice:
It being a rom address is not the reason why it must be .L (longword), it's the offset location, if the offset location is from FFFF8000 to 00007FFF, then .W can be used to shortern the size of the command when assembled, if it is not between those two values .L can only be used.
To simplify it for the Megadrive, accessing an offset location from 00000000 to 00007FFF on the rom can be done word sized, otherwise long-word sized, accessing an offset location from FFFF8000 (00FF8000) to FFFFFFFF (00FFFFFF) in ram can be done word sized, otherwise long-word sized.
Note that the end byte of an address is ignored by the processor, so when it reads say FFFF9662, it'll be infact reading 00FF9662, the FF on the end there is so that it can be read wordsize to save space.
There are exceptions like using the Program Counter (PC) to read an offset location not within the location of FFFF8000 and 00007FFF at a shorter size, by I think that can be explained another time.
Actually it's a bitfield of the form PCCVHAAA AAAAAAAA. P is the high priority flag, CC determines the palette line the object uses (00 = line 1, 01 = line 2, 10 = line 3, 11 = line 4), V is the vertical flip flag, H is the horizontal flip flag, and AAAAAAAAAAA gives the starting pattern index (multiply by $20 to get the VRAM address).
I have a question. (Don't worry, I won't be such a pain in the ass like THAT last time.)
I'm trying to edit Sonic's sprites in SonMapEd. I'm going to import them to MS Paint.
What kind of file should I save the sprite to?
PNG, BMP or any other image format paint can open. Just a tip: get yourself Photoshop or Paintshop Pro, you can download them cracked from the web... (don't tell anyone )
anybody know of a s2k"disassembley thats not IDA format, i cant seem to split it with IDA pro yet, if that's what's meant to happen...
[EDIT] NEVERMIND I FOUND WHAT I WAS LOOKING FOR
How do I get the sprite in the BMP/PNG file?
I don't have access to SonMapEd right now, but first select the sprite you want to export, then go to File->Export and choose one of the options that brings the best results. Sorry if that's not the correct way, but I can't check right now, you might have to do a little looking yourself
Ok, lemme answer It another way.
Is there any way I can make a BMP/PNG file to port the sprite to?
Not sure why you're asking this since SonMapEd will do this for you, but just go to "File > Save to Image > Export Sprite Frame..." and there you go.
Now unless you're talking about making a file before exporting the sprite, technically it's possible, but you'd be spending unecessary and useless time doing that since SonMapEd can create a BMP file for you once you export the sprite.
Alright, so it creates the file automatically that I need to port the sprite to.
I clicked "save" in the "save to..." menu in my specified file, but it didn't work probably as I had NO file to save it to. Okay.
But how does SonMapEd create these files?
Before you click on "Save", be sure to type a name for the file. And be sure to save it in a location/folder where you will find the file.
Separate names with a comma.