[JAM, MDA Compact, S100 Software Upgrading] SideShowBob:
Reduce ROM backup size

I am new here and have been trying to back up my MDAIII ROM. The first part: writing to ROM to the SD card was fine no probs. But I got quite worried coping the ROM backup to a PC file because I always get the warning: ReadFile(): test.nbf -- The parameter is incorrect. :evil:

J:\>ntrw read test.nbf P:
NTRW v2.00
Removeable media
Cylinders: 0:31
TracksPerCylinder: 255
SectorsPerTrack: 63
BytesPerSector: 512
bufsize is 65536
255852544 bytes written bytes: 0
ReadFile(): test.nbf -- The parameter is incorrect.

(the file was there) :?

J:\>dir test.nbf
Volume in drive J is FAT32
Volume Serial Number is XXXX-XXXX

Directory of J:\

30/06/2005 12:08 255,852,544 test.nbf
1 File(s) 255,852,544 bytes
0 Dir(s) 231,866,368 bytes free

I googled “+ntrw +parameter +incorrect” and found a few posts that said that is normal and can safely be ignored, from memory I think it was due to the expected file size being different.

Phew, :D I was getting worried that I could not back up the ROM.

Size Problem

It is obvious that the ROM does not take up the whole SD card (256 MB), so I used WinRAR to compress the nbf file with a recovery record, BUT the compressed file was about 240 MB :? , can’t be right. If you think about the process it is obvious that the ROM dump only writes used memory, when you do the subset dumps the vary in the amount of time taken. Therefore the extra bytes were already on the card (Formatting the card is very fast, and full format takes the same amount of time as quick format).

So when I formatted the card it did not clear/wipe the previous data, this in not a problem normally because the file system does not reference it, but Mitty or RomUpdate (same program) does not use a file system, it just write bytes in the raw and the ntrw program does not know at what point these end.

So I wonder what the point of formatting the card is :!: , it does not clear it the file system is not used, but it does no harm (except from giving you a false sense of security).

Safe way to clear your SD card. :idea:

1.	Use “ntrw read zero.bin P:” to dump a file that is the same size as your card, does not matter what is on your card (P: is the drive letter for the SD card)

2.	Open zero.bin in HexEditor, on the menu choose Edit – Fill, put a single 0 in the Bytes box and leave the Fill in – Whole file checked and click OK, than save this file. (If you then compress this the file is tiny)

3.	Then in the DOS window run “ntrw write zero.bin P:” and your card is clear

4.	Now make your backups as shown in the instructions, but use step 3 instead of formatting.

Now when you compress the ROM images copied to the PC the file sizes are reasonable, I get the following sizes with winRAR (good compression + 3% recovery record)

Complete ROM 22,488 KB, CE 17,399 KB, Radio 1,141 KB and Extended ROM 3,880 KB, much better than 4 X 256 MB.

:?: I also notice that bytes 0x034 to 0x017F change between sessions, I assume that this is normal because the rest is consistant. Answers on a postcard :wink:

Device:

T-Mobile UK MDAIII

Model Number: PH20B, Minor: 0 B

Language code: ENG, Minor: G

Operator code: T-MOB005

ROM Version: 1.06.00, Minor: 0 0

Extended ROM Version: 1.06.117

Radio Version: 1.00.00, Minor: 00.00