| View previous topic :: View next topic |
| Author |
Message |
raing3
Joined: 09 Nov 2008 Posts: 12
|
Posted: Tue Nov 11, 2008 11:28 am Post subject: Detect IPL Available Space? |
|
|
Does anyone know how I would go about detecting the available space in which an IPL can be written.
I have realised that with my app if the IPL being injected is larger than the available IPL space then the Memory Stick becomes corrupted.
Version 0.4 + Source is available at http://ifile.it/25amkt7 and version 0.5 with now source is available at http://ifile.it/ektnjc1.
Any help with fixing this would be greatly appreciated. I have tried looking before asking but I am unable to find an answer. |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Tue Nov 11, 2008 10:37 pm Post subject: |
|
|
| Read the MBR (0 sector) and you can see the address of the first partition. You can stuff whatever you want before that. |
|
| Back to top |
|
 |
raing3
Joined: 09 Nov 2008 Posts: 12
|
Posted: Thu Nov 13, 2008 1:08 pm Post subject: |
|
|
| I've found all this information and I no where it located but I'm having a bit of trouble trying to get this information and then make it detect how much space that actually is. Sorry for my stupidity. |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Thu Nov 13, 2008 1:47 pm Post subject: |
|
|
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/prork/prcb_dis_qxql.mspx?mfr=true
Make a structure according to the format of the partition table. You might have to make some values as characters and convert them to numbers because they use 6-bit values etc The first partition table always starts at a fixed address 0x01BE. Read from that address into the structure. Then from the structure you have the starting sector address of the first partition.
The space you have is (starting sector-IPL starting sector)*bytes per sector for that physical disk. |
|
| Back to top |
|
 |
raing3
Joined: 09 Nov 2008 Posts: 12
|
Posted: Mon Nov 17, 2008 12:24 pm Post subject: |
|
|
| Thanks Torch I've managed to fix the problem the information you provided was extremely helpful in fixing the problem and also helped me in adding a few more functions to my application. |
|
| Back to top |
|
 |
|