- Add RRFNFS V 1.2 support.

This commit is contained in:
agibert 2009-12-07 11:32:06 +00:00
parent c3a454144f
commit d2d8d4da11
3 changed files with 48 additions and 37 deletions

View File

@ -1,7 +1,7 @@
# $RCSfile: ReadMe.txt,v $
# $Revision: 1.4 $
# $Revision: 1.5 $
# $Name: $
# $Date: 2009/04/26 00:14:32 $
# $Date: 2009/12/07 11:32:06 $
# $Author: agibert $
@ -29,34 +29,37 @@ There is three modes available
Repository structure
--------------------
The repository is minimally composed by two directory: roms and misc.
The rom directory is full of rom files. These file can be uncompressed (.nds) or compressed. Three compressors are supported: zip, rar and 7zip. Next to a nds2rm run, the rom file names and rom archive file names follow the RRFNFS 1.1 format. Before a nds2rn run, the rom file names must start with a number followed by a space.
The rom directory is full of rom files. These file can be uncompressed (.nds) or compressed. Three compressors are supported: zip, rar and 7zip. Next to a nds2rm run, the rom file names and rom archive file names follow the RRFNFS 1.2 format. Before a nds2rn run, the rom file names must start with a number followed by a space.
In the misc directory, nds2rm is looking for the dat file: dsrom.xml. This file is comming from http://www.advanscene.com/offline/datas/ADVANsCEne_NDS.zip
RRFNFS 1.1: Rx3 Rom File Name Format Standard version 1.1
RRFNFS 1.2: Rx3 Rom File Name Format Standard version 1.2
---------------------------------------------------------
nds2rm stores ROMs in a .nds file with a standardized file name format:
XXXX - NNNNNNNNNN (R=L1-...-Ln) [SS].nds
with
XXXX: id
NNNNNNNNN: name
R: Region
L1-...-Ln: Language list
SS: Status (OK,KO)
nds2rm stores ROMs in a .nds file with a standardized file name format:
XXXX - NNNNNNNNNN (R=L1-...-Ln) [SS].nds
with
XXXX: id
NNNNNNNNN: name
R: region
L1-...-Ln: language list
SS: status (OK,KO)
nds2rm compresses each ROM file in an archive file with a standardized file name format:
XXXX - NNNNNNNNNN (R=L1-...-Ln) [SS] {CCCCCCCC} <FFFF>.ccc
with:
XXXX: id
NNNNNNNNN: name
R: Region
L1-...-Ln: Language list
SS: Status (OK,KO)
CCCCCCCC: CheckSum
FFFF: FingerPrint
ccc: Archive suffix (zip, rar, 7z)
nds2rm compresses each ROM file in an archive file with a standardized file name format:
XXXX - NNNNNNNNNN (R=L1-...-Ln) [SS] {CCCCCCCC} _FFFF_.ccc
or this form for a duplicate archive:
XXXX - NNNNNNNNNN (R=L1-...-Ln) [SS] {CCCCCCCC} _FFFF_-Y.ccc
with:
XXXX: id
NNNNNNNNN: name
R: region
L1-...-Ln: language list
SS: status (OK,KO)
CCCCCCCC: checksum
FFFF: fingerprint
Y: dup id
ccc: archive suffix (zip, rar, 7z)

View File

@ -1,13 +1,21 @@
# $RCSfile: ReleaseNotes.txt,v $
# $Revision: 1.6 $
# $Revision: 1.7 $
# $Name: $
# $Date: 2009/10/27 18:28:44 $
# $Date: 2009/12/07 11:32:07 $
# $Author: agibert $
--------------------------------------------------------------------------------
nds2rm V 1.2.0-1 - A. Gibert - 2009/11/23
--------------------------------------------------------------------------------
- Update RRFNFS to 1.2: replace angle bracket by _ to enclose fingerprint, in order to be FAT/NTFS friendly !
--------------------------------------------------------------------------------
nds2rm V 1.1.1-1 - A. Gibert - 2009/10/27
--------------------------------------------------------------------------------

24
nds2rm
View File

@ -5,9 +5,9 @@
# (C) 2009 Arnaud G. Gibert
#-----------------------------------------------------------------------------------------------------------------------------------
# $RCSfile: nds2rm,v $
# $Revision: 1.20 $
# $Revision: 1.21 $
# $Name: $
# $Date: 2009/10/26 01:35:08 $
# $Date: 2009/12/07 11:32:07 $
# $Author: agibert $
#-----------------------------------------------------------------------------------------------------------------------------------
@ -251,7 +251,7 @@ function env_setup()
;;
esac
rrfnfs_regex=".... - .* \(.*=.*\) \[..\] \{........} <....>[-]*[0-9]*\.${csfx}$"
rrfnfs_regex=".... - .* \(.*=.*\) \[..\] \{........} _...._[-]*[0-9]*\.${csfx}$"
}
@ -527,7 +527,7 @@ function rom_list_dump()
do
if [[ ${dat_status[${i}]} == "${status}" ]]
then
echo "${dat_id[${i}]} - ${dat_title[${i}]} (${dat_region[${i}]}=${dat_lang[${i}]}) {${dat_crc[${i}]}} <${dat_fp[${i}]}>"
echo "${dat_id[${i}]} - ${dat_title[${i}]} (${dat_region[${i}]}=${dat_lang[${i}]}) {${dat_crc[${i}]}} _${dat_fp[${i}]}_"
fi
i=$(( ${i} + 1 ))
@ -658,7 +658,7 @@ function arc_mkfn()
dup_id=${9}
file_prefix="${id} - ${title} (${reg}=${lang}) [${status}] {${crc}} <${fp}>"
file_prefix="${id} - ${title} (${reg}=${lang}) [${status}] {${crc}} _${fp}_"
if [[ ${dup_id} == "" ]]
then
@ -941,8 +941,8 @@ function arc_proceed()
crc2=$(check -n <"${rom}" 2>&1 | sed -e 's/,.*//' -e 's/.*= //' | tr [:lower:] [:upper:])
fp=$(dd skip=12 count=4 bs=1 <"${rom}" 2>/dev/null)
else
crc2=${file/*\{/}; crc2=${crc2/\}*/}
fp=${file/*\} \</}; fp=${fp/\>*/}
crc2=${file/*\{/}; crc2=${crc2/\} _*/}
fp=${file/*\} _/}; fp=${fp/_*/}
fi
@ -1162,8 +1162,8 @@ function suffix_mng()
ignored_cnt=$((${ignored_cnt} + 1))
else
status=${file/* \[/}; status=${status/\] \{*/}
crc=${file/*\] \{/}; crc=${crc/\} \<*/}
fp=${file/*\} \</}; fp=${fp/\>*/}
crc=${file/*\] \{/}; crc=${crc/\} _*/}
fp=${file/*\} _/}; fp=${fp/_*/}
dat_dup[${idx}]="${dup_id}"
@ -1176,7 +1176,7 @@ function suffix_mng()
idx_old=${idx}
status_old=${status}
dup_id=0
file_name="${file/) \[*/}) [${status}] {${crc}} <${fp}>.${csfx}"
file_name="${file/) \[*/}) [${status}] {${crc}} _${fp}_.${csfx}"
dat_fp[${idx}]="${fp}"
dat_status[${idx}]="${status}"
@ -1189,7 +1189,7 @@ function suffix_mng()
# Duplicate rom
dup_id=$((${dup_id} + 1))
file_name="${file/) \[*/}) [${status}] {${crc}} <${fp}>-${dup_id}.${csfx}"
file_name="${file/) \[*/}) [${status}] {${crc}} _${fp}_-${dup_id}.${csfx}"
dup_cnt=$((${dup_cnt} + 1))
@ -1422,7 +1422,7 @@ function fp_scan()
if [[ ${file} =~ ${rrfnfs_regex} ]]
then
fp=${file/*\} \</}; fp=${fp/\>*/}
fp=${file/*\} _/}; fp=${fp/_*/}
status=${file/* \[/}; status=${status/\] \{*/}
if [[ ( "${dat_fp[${idx}]}" == "????" ) || ( ( "${dat_status[${idx}]}" == "KO" ) && ( "${status}" == "OK" ) ) ]]