Hi,
I'm searching for a way to test a VMU file without load it.
Here is my pbm : I load a VMU file and want, when I save it again, be sure that the one I replace is the one I loaded.
Don't want replace another one if i changed the VMU for exemple.
Do you know how can I do that ?
Thanks.
JMD
test a VMU file
- JMD
- Insane DCEmu
- Posts: 234
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Wed Dec 11, 2002 6:45 am
- Location: A Melody From a Past Life Keeps Pulling Me Back
- Has thanked: 0
- Been thanked: 0
- Contact:
- JMD
- Insane DCEmu
- Posts: 234
- Joined: Wed Dec 11, 2002 6:45 am
- Location: A Melody From a Past Life Keeps Pulling Me Back
- Has thanked: 0
- Been thanked: 0
- Contact:
Ok, find a way : I load the header and check the CRC.
I do like this :
I do like this :
Code: Select all
#include <dc/fs_vmu.h>
// open file
file_t fd=fs_open("/vmu/a1/myfile",O_RDONLY);
// read header and cast as a file header
uint8 data[128];
fs_read(fd,&data,128);
vmu_hdr_t *hdr = (vmu_hdr_t *)&data;;
// read CRC
uint16 int_crc = hdr->crc;
printf("CRC = %i\n", int_crc);
// close file
fs_close(fd);