intvsteve / VINTage

Various Intellivision-related projects, including the LTO Flash! User Interface application.
GNU General Public License v2.0
3 stars 1 forks source link

Locate ROMs in archive #314

Open intvsteve opened 5 years ago

intvsteve commented 5 years ago

Doing this has some different facets, which may need to split into separate projects.

  1. Browse into a (compressed) archive
  2. Discover ROMs in a (compressed) archive

The danger of discovery is that drilling into arbitrarily large .zip / et. al. files could place a heavy performance burden on the system w.r.t. memory and speed. Some considerations to mitigate: a) Gather list of potential archives and prompt to select which ones to search b) User-defined option to restrict size (default to something reasonable, e.g. 128MB)

Browsing for things like "browse and play" may involve different work on different platforms. Perhaps the native file dialog in Windows integrates browsing into known archive types already (or maybe only .zip). If so, yay! If not, then it's a slog to write a multi-platform archive browsing dialog.

intvsteve commented 5 years ago

Looks like doing this the least disruptive way will involve creating a better ROM file location system than a simple file path. Going to see about an implicitly convertible struct that has the "name" (formerly, path) and IStorageAccess bundled together.

The idea is to be able to have, say, a 'resource' storage access, a 'compressed archive' storage access, and a typical 'file system' storage access. In theory then you create one of these for specific use cases and pass it along to the ROM API layer and it Just Works (TM). The FileMemo<T> type could drop its cached StorageAccess, hopefully. The new system, via implicit conversion operators, could then hopefully be introduced piecemeal rather than making a hugely disruptive change to the API layers.