Untangling code dependencies

This commit is contained in:
Sergio Martin 2024-01-14 13:23:14 +01:00
parent 7b41851e30
commit a20bfd0320
3 changed files with 15 additions and 14 deletions

View File

@ -152,3 +152,17 @@ void Nes_Mapper::mirror_manual( int page0, int page1, int page2, int page3 )
}
void Nes_Mapper::intercept_reads( nes_addr_t addr, unsigned size )
{
emu().add_mapper_intercept( addr, size, true, false );
}
void Nes_Mapper::intercept_writes( nes_addr_t addr, unsigned size )
{
emu().add_mapper_intercept( addr, size, false, true );
}
void Nes_Mapper::enable_sram( bool enabled, bool read_only )
{
emu_->enable_sram( enabled, read_only );
}

View File

@ -9,7 +9,6 @@
#include "Nes_Cart.h"
#include "Nes_Cpu.h"
#include "nes_data.h"
#include "Nes_Core.h"
class Blip_Buffer;
class blip_eq_t;
class Nes_Core;
@ -188,19 +187,6 @@ inline bool Nes_Mapper::write_intercepted( nes_time_t, nes_addr_t, int ) { retur
inline int Nes_Mapper::read( nes_time_t, nes_addr_t ) { return -1; } // signal to caller
inline void Nes_Mapper::intercept_reads( nes_addr_t addr, unsigned size )
{
emu().add_mapper_intercept( addr, size, true, false );
}
inline void Nes_Mapper::intercept_writes( nes_addr_t addr, unsigned size )
{
emu().add_mapper_intercept( addr, size, false, true );
}
inline void Nes_Mapper::enable_sram( bool enabled, bool read_only )
{
emu_->enable_sram( enabled, read_only );
}
#endif

View File

@ -7,6 +7,7 @@
#define NES_VRC7_H
#include "emu2413_state.h"
#include "Blip_Buffer.h"
struct vrc7_snapshot_t;