Mercurial > audlegacy-plugins
comparison src/console/sap_cpu_io.h @ 316:fb513e10174e trunk
[svn] - merge libconsole-blargg into mainline libconsole:
+ obsoletes plugins-ugly:sapplug
author | nenolod |
---|---|
date | Thu, 30 Nov 2006 19:54:33 -0800 |
parents | |
children | 986f098da058 |
comparison
equal
deleted
inserted
replaced
315:2294f3a6f136 | 316:fb513e10174e |
---|---|
1 | |
2 #include "Sap_Emu.h" | |
3 | |
4 #include "blargg_source.h" | |
5 | |
6 #define CPU_WRITE( cpu, addr, data, time ) STATIC_CAST(Sap_Emu&,*cpu).cpu_write( addr, data ) | |
7 | |
8 void Sap_Emu::cpu_write( sap_addr_t addr, int data ) | |
9 { | |
10 mem [addr] = data; | |
11 if ( (addr >> 8) == 0xD2 ) | |
12 cpu_write_( addr, data ); | |
13 } | |
14 | |
15 #ifdef NDEBUG | |
16 #define CPU_READ( cpu, addr, time ) READ_LOW( addr ) | |
17 #else | |
18 #define CPU_READ( cpu, addr, time ) STATIC_CAST(Sap_Emu&,*cpu).cpu_read( addr ) | |
19 | |
20 int Sap_Emu::cpu_read( sap_addr_t addr ) | |
21 { | |
22 if ( (addr & 0xF900) == 0xD000 ) | |
23 dprintf( "Unmapped read $%04X\n", addr ); | |
24 return mem [addr]; | |
25 } | |
26 #endif |