OSCR
Open Source Cartridge Reader
Loading...
Searching...
No Matches
SFM.h
1#pragma once
2#if !defined(OSCR_CORE_SFM_H_)
3# define OSCR_CORE_SFM_H_
4
5# include "config.h"
6
7# if HAS_SFM
8# include "syslibinc.h"
9# include "common/Types.h"
10# include "ui.h"
11
16{
17 extern byte ready;
18 extern byte gameAddress[8];
19
20 void menu();
21
22 void cartOn();
23
24 void printHeader();
25
26 void gameMenu();
27 void gameOptions();
28 void flashMenu();
29 //void getGames(char gameCode[8][20], bool* hasMenu, byte* numGames);
30 bool getGames(OSCR::UI::MenuOptions< 7, 20> & gamesMenu);
31 void controlOut();
32 void controlIn();
33 void writeBank(uint8_t myBank, uint16_t myAddress, uint8_t myData);
34 uint8_t readBank(uint8_t myBank, uint16_t myAddress);
35 void getCartInfo();
36 bool checkcart();
37 void readROM();
38
39 void resetFlash();
40 void resetFlash(int startBank);
41
42 void idFlash(uint8_t startBank);
43 bool checkFlashId(uint8_t id);
44 bool checkFlashIds();
45
46 void writeFlash();
47 void writeFlashData(uint8_t startBank, uint32_t pos);
48
49 void busyCheck(uint8_t startBank);
50
51 void eraseFlash(int startBank);
52 uint8_t blankcheck(int startBank);
53 uint32_t verifyFlash(int startBank, uint32_t pos);
54
55 void readFlash();
56 void printMapping();
57 void readMapping();
58 void eraseMapping(uint8_t startBank);
59 uint8_t blankcheckMapping();
60 void writeMapping(uint8_t startBank, uint32_t pos);
61 bool unlockHirom(bool unlockWrite = true);
62 uint8_t send(uint8_t command);
63 void write(uint8_t startBank, uint32_t pos);
64} /* namespace OSCR::Cores::SFM */
65
66# endif /* HAS_SFM */
67#endif /* OSCR_CORE_SFM_H_ */
System core for SFC Memory Modules.
Definition SFM.h:16
Data struct for Menu instances.
Definition interfaces.h:79