★ FAQ ★ Program in generalAt this time, it is not in the unformatted state (it is not recognized as unformatted by the application), and the corrupted file exists.
When data is recorded to the cartridge RAM as described above, it stops in the BUP_Write () function.
For comparison, I tried running the data recording process of another application (created by calling the function with the same name in SBL in the same procedure), but it was executed normally. Is there a difference depending on the library due to the internal processing of the BUP_Write () function?
If the backup data is corrupted, the data size information contained in the backup data may have changed.
It is possible that the buffer will be exceeded when reading / writing a backup.
It can also hang if it is an important area of your system.
In the first place, depending on how the user uses it, it is quite possible that this will happen, but if this happens, the application will no longer be able to handle it.
In the case of continuous data of 4096 bytes, the usage should be (4096 + 32) / 64 = 65 blocks when calculated by the usage formula in the creation standard, but actually write to the backup RAM and "BUP_Dir" If you check with "BUP_Stat" or "BUP_Stat", the amount of blocks used is 72 blocks.
Also, on the backup data management screen, it is displayed as 65 blocks according to the calculation formula. Why does this difference occur?
Is it okay to use the built-in backup RAM of the main unit up to the capacity limit with one backup data?
Or is it necessary to leave some capacity free as a moral?
When accessing the backup RAM, check whether it is possible to write in block units shown in the structure BupStat acquired by Bup_Stat, and refer to it.
The "consumption [block] " described in Developer's Information STN-9 is
It is convenient value for notifying the amount used in the 'user'.
Use the formula.
This formula is the same as the formula for consumption displayed on the backup management screen of the main unit BOOT-ROM, and is common to all of the main unit, cartridge, and FD. Since it is different from the consumption amount in the strict sense, it cannot be used for checking the remaining capacity.
In addition, the size of "block" in the library function differs for each device, and is as follows.
| Total number of blocks totalblock | Capacity of 1 block blocksize (In bytes) | |
|---|---|---|
| Built-in RAM (current) | 512 | 64 |
| Power memory (old model) | 1024 | 512 |
| Power memory (new model) | 2048 | 256 |
If you want to write the content of the comment in Japanese, specify BUP_JAPANESE for'Language type'.
For other languages, use one of the following:
| BUP_ENGLISH | :English |
| BUP_FRANCAIS | :French |
| BUP_DEUTSCH | :German |
| BUP_ESPANOL | :Spanish |
| BUP_ITALIANO | :Italian |
* For the characters that can be used in the file name and comment information, refer to "Backup Creation Criteria".
BUP_Init (addr, workbuff, conf)
Uint32 * addr: Library expansion area Uint32 workbuff [2078]: Library work area BupConfig conf [3]: Connection device information conf [0] Built-in RAM
conf [1] Cartridge RAM
conf [2] FDD (currently unavailable)
★ FAQ ★ Program in general