summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libgme/sgc_cpu.c
diff options
context:
space:
mode:
authorSean Bartell <wingedtachikoma@gmail.com>2011-06-25 21:32:25 -0400
committerNils Wallménius <nils@rockbox.org>2012-04-25 22:13:20 +0200
commitf40bfc9267b13b54e6379dfe7539447662879d24 (patch)
tree9b20069d5e62809ff434061ad730096836f916f2 /lib/rbcodec/codecs/libgme/sgc_cpu.c
parenta0009907de7a0107d49040d8a180f140e2eff299 (diff)
downloadrockbox-f40bfc9267b13b54e6379dfe7539447662879d24.tar.gz
rockbox-f40bfc9267b13b54e6379dfe7539447662879d24.zip
Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
Diffstat (limited to 'lib/rbcodec/codecs/libgme/sgc_cpu.c')
-rw-r--r--lib/rbcodec/codecs/libgme/sgc_cpu.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libgme/sgc_cpu.c b/lib/rbcodec/codecs/libgme/sgc_cpu.c
new file mode 100644
index 0000000000..d23c01499b
--- /dev/null
+++ b/lib/rbcodec/codecs/libgme/sgc_cpu.c
@@ -0,0 +1,36 @@
1// Game_Music_Emu 0.6-pre. http://www.slack.net/~ant/
2
3#include "sgc_emu.h"
4
5#include "blargg_endian.h"
6//#include "z80_cpu_log.h"
7
8/* Copyright (C) 2009 Shay Green. This module is free software; you
9can redistribute it and/or modify it under the terms of the GNU Lesser
10General Public License as published by the Free Software Foundation; either
11version 2.1 of the License, or (at your option) any later version. This
12module is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15details. You should have received a copy of the GNU Lesser General Public
16License along with this module; if not, write to the Free Software Foundation,
17Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
18
19#include "blargg_source.h"
20
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
26
27#define CPU_BEGIN \
28bool run_cpu( struct Sgc_Emu* this, cpu_time_t end_time )\
29{\
30 Sgc_Cpu* cpu = &this->cpu; \
31 Z80_set_end_time( cpu, end_time );
32
33 #include "z80_cpu_run.h"
34
35 return warning;
36}