firmware: file size adaptive ROM mirroring
This commit is contained in:
parent
8c2f74d8cd
commit
242bde5684
@ -187,7 +187,12 @@ void smc_id(snes_romprops_t* props) {
|
||||
}
|
||||
}
|
||||
if(header->romsize == 0 || header->romsize > 13) {
|
||||
header->romsize = 13;
|
||||
props->romsize_bytes = 1024;
|
||||
header->romsize = 0;
|
||||
while(props->romsize_bytes < file_handle.fsize-1) {
|
||||
header->romsize++;
|
||||
props->romsize_bytes <<= 1;
|
||||
}
|
||||
}
|
||||
props->ramsize_bytes = (uint32_t)1024 << header->ramsize;
|
||||
props->romsize_bytes = (uint32_t)1024 << header->romsize;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user