Submit initial patch from FS#12176. Adds support for several new game music formats...
[kugel-rb.git] / apps / codecs / libgme / sgc_cpu.c
blob3bd2d15df9d90b19f85af07902196685ef26f0ec
1 // Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
3 #include "sgc_emu.h"
5 #include "blargg_endian.h"
6 //#include "z80_cpu_log.h"
8 /* Copyright (C) 2009 Shay Green. This module is free software; you
9 can redistribute it and/or modify it under the terms of the GNU Lesser
10 General Public License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version. This
12 module is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 details. You should have received a copy of the GNU Lesser General Public
16 License along with this module; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
19 #include "blargg_source.h"
21 #define OUT_PORT( addr, data ) cpu_out( this, TIME(), addr, data )
22 #define IN_PORT( addr ) 0 // cpu in
23 #define WRITE_MEM( addr, data ) cpu_write( this, addr, data )
24 #define IDLE_ADDR this->idle_addr
25 #define RST_BASE this->vectors_addr
27 #define CPU_BEGIN \
28 bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time )\
30 Sgc_Cpu* cpu = &this->cpu; \
31 Z80_set_end_time( cpu, end_time );
33 #include "z80_cpu_run.h"
35 return warning;