Increase/Decrease MTK6572 Cache

Somebody asked me about a mod I tried on my tablet where the Cache size was decreased, giving a total of 2.95gb of internal storage. Seeing the internal storage at almost 3gb was pretty cool, although, it seemed as if the performance of the tablet decreased somewhat. After trying the mod again, noticed that some apps slowed down and others would not open. This reminded me of something learned in a college course, the instructor had said something about, the more space you have will give you better speed. Another words, if you install an 80gb hard drive with a RPM of 5400 and 4gb of RAM in your computer. Now if one were to upgrade that hard drive, without changing anything else, to 100gb with a RPM of 7200, you will notice the difference in speed. This made a little light click, thinking, well if there is more cache for apps, would the tablet run faster, in my opinion it does appear to run a little better then before.

What I noticed yesterday is that when playing with the numbers, in order to get a working number to enter in the EBR1, everything has to be in 16 bytes, so that the numbers, for the Internal Application Storage, are divisible by 32. A couple of of the caches sizes I did looked at are 126 MiB and 376 MiB. Not sure if there are any other sizes when it comes to the MTK6572, did successfully make a workable EBR1 work with a cache size of 512 MiB.

Where does the extra bytes come from? Well, if you do another math solution, it actually works out a little better when modding. Lets take a number that is divisible by 2, how about 376 MiB, and see what the hex value is.

It's 3F, using some imagination, you have to fill in the blanks zeros, x3xF is read from right to left, entered from left to right as F0 03 now here is a EBR1 from the THL TS MTK6572:

Quite slick of them wouldn't you say? This makes it so much easier, if somebody doesn't want to increase the cache by to much or decrease it to small, you just need a number that can be divided by 2. Lets play around with a random number, if the cache is 126, lets just double it, giving a value of 256.

Looking at the hexadecimal value, yes it shows 80, so one has to use their brain power. The hex total needs to be read from right to left, mentally add the 2 missing zeros from right to left then entering the hex value into the EBR1 from left to right. So the Hex value is read x8x0 then entered as 00 08.

Maybe a simple way of explainging would be, to obtain the correct numbers would be, if you are unsure of exactly what was increased/decreased, take the byte value from the original EBR1, subtract the byte value from the new byte value of the modified EBR1:

New EBR1: Partition 1: 256 MiB (268435456 bytes, 524288 sectors from 1136128) Type 0x83 (Linux)Original EBR1:Partition 1: 376 MiB (394264576 bytes, 770048 sectors from 1443328) Type 0x83 (Linux)394264576-268435456=125829120 should be added as USERDATA+FAT+125829120 if decreasing your cache.394264576-268435456=125829120 should be subtract as USERDATA+FAT-125829120 if increasing your cacheJust like the MTK6572 repartition mod for internal storage, the same rule applies, partition #2 start address needs to be one number higher then partition #1 end address.

To fix the second two hex numbers in the EBR1, this means that the end sector of partition #1, 1660415 needs to be 1660416 for the start sector of partition #2. In calculator enter 1660415 as a decimal value and you will get this:

Also, same rule applies, ignore the last two zeros and reading from right to left enter 1956 as 56 19 in your EBR1 like this:

Unlike the mod to increase the internal application storage, you do not need to worry about partition #3 end sector, this mod will not change it. If you want to move on to the next step, increasing internal application storage for MTK6572, just click the link and follow the directions according to the modified cache scatter text.

**WARNING** THIS MOD IS TRICKIER WHEN CHANGING THE CACHE PARTITION, THESE STEPS ARE IMPORTANT TO SUCCESSFULLY FLASH IN SPFLASH TOOLS

Open spflash tools, select the format tab and you need to manually format the three following areas and enter, ONE BY ONE, the linear_start_addr and partition_size according to the modified scatter.

After you have flashed, in clockwork mod recovery, restore ONLY the data and system. Do not do anything with the cache, your backup is according to the old cache size and will cause a soft brick, leaving the device stuck at the boot logo. You will need to create a new backup for future restores according to the cache size.