#include "riscos.h"

class ResourceFS : public Module
{
private:
  typedef struct fileinfo
  {
    char *filename;
    uint32_t load_address;
    uint32_t exec_address;
    uint32_t file_size;
    uint32_t file_attributes;
    uint32_t *file_data; // Pointer to file data
  } fileinfo_t;

  vector<fileinfo_t> data;
  typedef vector<fileinfo_t>::iterator fileinfo_iter;

  void RegisterFiles (void);
  void DeregisterFiles (void);

public:
  char *module_name;
  int version_major;
  int version_minor;
  int swi_chunk_begin;
  int swi_chunk_end;

  ResourceFS (void) : Module ()
  {
    module_name = "ResourceFS";
    version_major = 1;
    version_minor = 00;
    swi_chunk_begin = 0x41b40;
    swi_chunk_end = 0x41b7f;
  }
  virtual ~ResourceFS () {}

  unsigned int SWIChunkBegin (void) { return swi_chunk_begin; }
  unsigned int SWIChunkEnd (void) { return swi_chunk_end; }
  bool SWI (unsigned int swinum, bool xbit);
};
