Jump to content

Welcome to 1Emulation.com
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account




Photo
- - - - -

pgm2yks

Posted by iq_132 , 12 June 2007 · 488 views

So I got bored today and started looking at the pgm2yks.c

Here's a few lines from the file

0x000000, 0x00007c, 0x0000f8, 0x000174, 0x0001f0, 0x00026c, 0x0002e8, 0x000364,
0x0003e0, 0x00045c, 0x0004d8, 0x000554, 0x0005d0, 0x00064c, 0x0006c8, 0x000744,
0x0007c0, 0x00083c, 0x0008b8, 0x000934, 0x0009b0, 0x000a2c, 0x000aa8, 0x000b24,
0x000ba0, 0x000c1c, 0x000c98, 0x000d14, 0x000d90, 0x000e0c, 0x000e88, 0x000f04,
0x000f80, 0x000ffc, 0x001078, 0x0010f4, 0x001170, 0x0011ec, 0x001268, 0x0012e4,


Here's what I got with the algo below

0x000000, 0x00007c, 0x0000f8, 0x000174, 0x0001f0, 0x00026c, 0x0002e8, 0x000364,
0x0003e0, 0x00045c, 0x0004d8, 0x000554, 0x0005d0, 0x00064c, 0x0006c8, 0x000744,
0x0007c0, 0x00083c, 0x0008b8, 0x000934, 0x0009b0, 0x000a2c, 0x000aa8, 0x000b24,
0x000ba0, 0x000c1c, 0x000c98, 0x000d14, 0x000d90, 0x000e0c, 0x000e88, 0x000f04,
0x000f80, 0x0010fc, 0x001078, 0x0011f4, 0x001170, 0x0012ec, 0x001268, 0x0013e4,



It's not 100 percent, and it gets worse as you go through the file (0x3c00 values),
but there are some bits of the decrypted addresses that are correct throughout
pretty much the whole file, so I'm fairly certain that I'm on the right path. :)

unsigned int nret(unsigned int sprite_no)
{
	unsigned int i, a  = 0x007c;

	for (i = 0; i < 32; i++)
	{
		if (sprite_no & (1 << i))
		{
			a ^= 0x84 << i;
		}
	}

	return a;
}





December 2017

S M T W T F S
     12
3456789
10 11 1213141516
17181920212223
24252627282930
31      

Recent Entries

Recent Comments

  • Photo
    To Do List
    darknior - Dec 27 2009 10:46 PM
  • Photo
    Amazing
    iq_132 - Apr 21 2007 01:59 PM
  • Photo
    Amazing
    Robert - Apr 21 2007 02:34 AM
  • Photo
    Amazing
    Mooney - Apr 21 2007 01:56 AM
  • Photo
    royalcdc
    Robert - Feb 10 2007 04:21 AM

0 user(s) viewing

0 members, 0 guests, 0 anonymous users