2016-06-26 00:46:54 +00:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2018-02-25 16:27:32 +00:00
|
|
|
#include "BaseLoader.h"
|
2016-06-26 00:46:54 +00:00
|
|
|
|
2018-07-02 18:49:19 +00:00
|
|
|
struct NsfHeader;
|
|
|
|
struct RomData;
|
|
|
|
|
2018-02-25 16:27:32 +00:00
|
|
|
class NsfLoader : public BaseLoader
|
2016-06-26 00:46:54 +00:00
|
|
|
{
|
|
|
|
private:
|
2018-07-02 18:49:19 +00:00
|
|
|
void Read(uint8_t* &data, uint8_t& dest);
|
|
|
|
void Read(uint8_t* &data, uint16_t& dest);
|
|
|
|
void Read(uint8_t* &data, char* dest, size_t len);
|
2016-06-26 00:46:54 +00:00
|
|
|
|
|
|
|
protected:
|
2018-07-02 18:49:19 +00:00
|
|
|
void InitializeFromHeader(RomData& romData);
|
|
|
|
void InitHeader(NsfHeader& header);
|
2016-06-26 00:46:54 +00:00
|
|
|
|
|
|
|
public:
|
2018-02-25 16:27:32 +00:00
|
|
|
using BaseLoader::BaseLoader;
|
|
|
|
|
2020-01-01 01:23:26 +00:00
|
|
|
void LoadRom(RomData& romData, vector<uint8_t>& romFile);
|
2016-06-26 00:46:54 +00:00
|
|
|
};
|