-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathsfc_famicom.h
More file actions
45 lines (33 loc) · 838 Bytes
/
Copy pathsfc_famicom.h
File metadata and controls
45 lines (33 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
// License: MIT http://opensource.org/licenses/MIT
// Author: dustpg mailto:dustpg@gmail.com
#include "sfc_rom.h"
#include "sfc_code.h"
/// <summary>
/// StepFC扩展接口
/// </summary>
typedef struct {
// ROM 加载器读取信息
sfc_ecode(*load_rom)(void*, sfc_rom_info_t*);
// ROM 加载器卸载
sfc_ecode(*free_rom)(void*, sfc_rom_info_t*);
} sfc_interface_t;
/// <summary>
/// FC 模拟器主体
/// </summary>
typedef struct {
// 参数
void* argument;
// 接口
sfc_interface_t interfaces;
// ROM 信息
sfc_rom_info_t rom_info;
} sfc_famicom_t;
// 初始化
sfc_ecode sfc_famicom_init(
sfc_famicom_t* famicom,
void* argument,
const sfc_interface_t* interfaces
);
// 反初始化
void sfc_famicom_uninit(sfc_famicom_t*);