Simplified SPC register initialization and eliminated an unnecessary function
This commit is contained in:
parent
ec58587742
commit
fb07d985ea
4 changed files with 3 additions and 15 deletions
|
@ -377,11 +377,9 @@ blargg_err_t Spc_Emu::start_track_( int track )
|
|||
|
||||
memcpy( smp.apuram, ptr, 0x10000 );
|
||||
memcpy( smp.sfm_last, ptr + 0xF4, 4 );
|
||||
smp.op_buswrite( 0xF1, ptr[ 0xF1 ] );
|
||||
smp.op_buswrite( 0xF2, ptr[ 0xF2 ] );
|
||||
smp.op_buswrite( 0xFA, ptr[ 0xFA ] );
|
||||
smp.op_buswrite( 0xFB, ptr[ 0xFB ] );
|
||||
smp.op_buswrite( 0xFC, ptr[ 0xFC ] );
|
||||
|
||||
static const uint8_t regs_to_copy[] = { 0xF1, 0xF2, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC };
|
||||
for (auto n : regs_to_copy) smp.op_buswrite( n, ptr[ n ] );
|
||||
ptr += 0x10000;
|
||||
|
||||
smp.dsp.spc_dsp.load( ptr );
|
||||
|
|
|
@ -11,8 +11,6 @@ struct SPC700 {
|
|||
virtual void op_write(uint16_t addr, uint8_t data) = 0;
|
||||
void op_step();
|
||||
|
||||
virtual uint8_t disassembler_read(uint16_t addr) = 0;
|
||||
|
||||
#include "registers.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
|
|
|
@ -182,10 +182,4 @@ void SMP::op_write(uint16_t addr, uint8_t data) {
|
|||
cycle_edge();
|
||||
}
|
||||
|
||||
uint8_t SMP::disassembler_read(uint16_t addr) {
|
||||
if((addr & 0xfff0) == 0x00f0) return 0x00;
|
||||
if((addr & 0xffc0) == 0xffc0 && status.iplrom_enable) return iplrom[addr & 0x3f];
|
||||
return apuram[addr];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -90,8 +90,6 @@ public:
|
|||
uint8_t op_read(uint16_t addr);
|
||||
void op_write(uint16_t addr, uint8_t data);
|
||||
|
||||
uint8_t disassembler_read(uint16_t addr);
|
||||
|
||||
//timing.cpp
|
||||
template<unsigned frequency>
|
||||
struct Timer {
|
||||
|
|
Loading…
Reference in a new issue