- [NEW] Treballant en modularitzar la memòria, per a començar a implementar soport per als demes Spectrums

This commit is contained in:
2024-12-19 17:36:22 +01:00
parent da4c692283
commit dbd80694aa
10 changed files with 263 additions and 135 deletions

19
z80.h
View File

@@ -4,26 +4,20 @@
namespace z80
{
#define MEMTAG_NONE 0
#define MEMTAG_INST 1
#define MEMTAG_CODE 2
#define MEMTAG_DATA 3
#define MEMTAG_REPEAT 4
#define MEMTAG_MIXED 5
#define MEMTAG_IGNORE 6
#define Z80_OPTION_STOP_ON_INVALID 0
#define Z80_OPTION_BREAK_ON_INTERRUPT 1
#define Z80_OPTION_BREAK_ON_RET 2
#define Z80_NUM_OPTIONS 3
void reset(uint8_t* mem);
void reset();
//void reset(uint8_t* mem);
void connect_port(int num, int (*in_ptr)(int), void (*out_ptr)(int,int));
void interrupt();
uint32_t step();
uint8_t *getMem();
//uint8_t *getMem();
uint8_t *getRegs();
uint16_t getAF(const bool alt=false);
@@ -41,6 +35,8 @@ namespace z80
void setPC(const uint16_t addr);
/*
uint8_t getMemTag(const uint16_t addr);
void setMemTag(const uint16_t addr, const uint8_t value);
void clearMemTag();
@@ -48,6 +44,7 @@ namespace z80
uint8_t getMemTouched(const uint16_t addr);
void clearMemTouched();
void fixMemTouched();
*/
const bool getOption(const int option);
void setOption(const int option, const bool value);