★ PROGRAMMER'S GUIDE ★ Backup Library User's ManualList | Title | Data | Data Name | No |
typedef struct BupConfig {
Uint16 unit_id; / * Unit ID * /
Uint16 partition; / * Number of partitions * /
} BupConfig;
Device type | unit_id | partition |
|---|---|---|
Built-in memory | 1 | 1 |
External cartridge | 2 | 1 |
List | Title | Data | Data Name | No |
typedef struct BupStat {
Uint32 totalsize; / * Total capacity () * /
Uint32 totalblock; / * number of blocks * /
Uint32 blocksize; / * 1 block size () * /
Uint32 freesize; / * Free space * /
Uint32 freeblock; / * Number of free blocks * /
Uint32 datanum; / * Number of writable items * /
} BupStat;
List | Title | Data | Data Name | No |
typedef struct BupDate {
Uint8 year; / * year (1980 minus the year) * /
Uint8 month; / * Month (1-12) * /
Uint8 day; / * days (1-31) * /
Uint8 time; / * hours (0-23) * /
Uint8 min; / * minutes (0-59) * /
Uint8 week; / * Sunday (Sunday 0-Sat 6) * /
} BupDate;
List | Title | Data | Data Name | No |
typedef struct BupDir {
Uint8 filename [12]; / * filename * /
/ * (11 ASCII characters + 12 bytes in total of NUL) * /
Uint8 comment [11]; / * Comment * /
/ * (10 ASCII characters + 11 bytes in total) * /
Uint8 language; / * Comment language type * /
/ * Japanese: BUP_JAPANESE * /
/ * English: BUP_ENGLISH * /
/ * French: BUP_FRANCAIS * /
/ * German: BUP_DEUTSCH * /
/ * Spanish: BUP_ESPANOL * /
/ * Italian: BUP_ITALIANO * /
Uint32 date; / * Date time data * /
Uint32 datasize; / * Data size (unit: bytes) * /
Uint16 blocksize; / * Data size (unit: block) * /
} BupDir;
List | Title | Func | Function | No |
Device number | Device type |
|---|---|
0 | Built-in memory cartridge |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
#define BUP_START_ADDR 0x6 ??????
#include "sega_bup.h"
Uint32 workmemory [2048 + 30];
void sample ()
{
BupConfig conf [3];
BUP_Init (BUP_START_ADDR, workmemory, conf);
...............
}
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
dir: File management information (input other than dir.blocksize) data: Pointer of write data owsw: Overwrite check mode ON: Do not write if a file with the same name exists. OFF: If a file with the same name exists, it will be overwritten.
Function value | meaning |
|---|---|
0 | success |
BUP_NON | disconnected |
BUP_UNFORMAT | Unformatted |
BUP_WRITE_PROTECT | With write protection |
BUP_FOUND | A file with the same name exists. |
other | Failure |
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
Function value | meaning |
|---|---|
0 | success |
BUP_NON | disconnected |
BUP_UNFORMAT | Unformatted |
BUP_NOT_FOUND | File not found |
BUP_BROKEN | The file is broken |
other | Failure |
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
Function value | meaning |
|---|---|
0 | success |
BUP_NON | disconnected |
BUP_UNFORMAT | Unformatted |
BUP_NOT_FOUND | File not found |
BUP_WRITE_PROTECT | With write protection |
other | Failure |
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
List | Title | Func | Function | No |
Device number | Storage device |
|---|---|
0 | Built-in memory |
1 | Memory cartridge or parallel interface |
2 | Serial interface |
Function value | meaning |
|---|---|
0 | success |
BUP_NON | disconnected |
BUP_UNFORMAT | Unformatted |
BUP_NO_MATCH | Data do not match |
BUP_NOT_FOUND | File not found |
BUP_BROKEN | The file is broken |
List | Title | Func | Function | No |
List | Title | Func | Function | No |
★ PROGRAMMER'S GUIDE ★ Backup Library User's Manual