sarah-walker-pcem / pcem

PCem
http://pcem-emulator.co.uk
GNU General Public License v2.0
1.5k stars 206 forks source link

Request: Refactor the way ROM paths are named, sorted and loaded. #70

Open Aerocatia opened 2 years ago

Aerocatia commented 2 years ago

Could the way ROMs are loaded please be re-organised? Currently ROMs are found from a hard-coded directory structure with absolutely no standardization on file naming. It would be nice to have everything sorted in some way that makes it cleaner and easier to keep track of what ROM belongs its given device.

jviskari commented 2 years ago

I was thinking the same.

loadbios() and the switch case there could have complete rewrite.

There shoud be a scanner which scans rom paths and calculates hash for each rom.

Hash and "romset" enum should tie together the path to rom loader function

Loader function should know how to handle multirom sets and how to set parameters to romfread function.

The the ROM_ enums from ibm.h and matching hashes would be stored in user modifiable text file, new build would be required only if there's something special about loading the rom images.