Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / gst / nsf / fds_snd.c
1 /*
2 ** Nofrendo (c) 1998-2000 Matthew Conte (matt@conte.com)
3 **
4 **
5 ** This program is free software; you can redistribute it and/or
6 ** modify it under the terms of version 2 of the GNU Library General 
7 ** Public License as published by the Free Software Foundation.
8 **
9 ** This program is distributed in the hope that it will be useful, 
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 ** Library General Public License for more details.  To obtain a 
13 ** copy of the GNU Library General Public License, write to the Free 
14 ** Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 **
16 ** Any permitted reproduction of these routines, in whole or in part,
17 ** must bear this legend.
18 **
19 **
20 ** fds_snd.c
21 **
22 ** Famicom Disk System sound emulation
23 ** $Id$
24 */
25
26 #include <stdio.h>
27 #include "types.h"
28 #include "nes_apu.h"
29 #include "fds_snd.h"
30
31 static int32 fds_incsize = 0;
32
33 /* mix sound channels together */
34 static int32
35 fds_process (void)
36 {
37   int32 output;
38
39   output = 0;
40
41   return output;
42 }
43
44 /* write to registers */
45 static void
46 fds_write (uint32 address, uint8 value)
47 {
48 }
49
50 /* reset state of vrcvi sound channels */
51 static void
52 fds_reset (void)
53 {
54   fds_incsize = apu_getcyclerate ();
55 }
56
57 static void
58 fds_init (void)
59 {
60 }
61
62 /* TODO: bleh */
63 static void
64 fds_shutdown (void)
65 {
66 }
67
68 static apu_memwrite fds_memwrite[] = {
69   {0x4040, 0x4092, fds_write},
70   {(uint32) - 1, (uint32) - 1, NULL}
71 };
72
73 apuext_t fds_ext = {
74   fds_init,
75   fds_shutdown,
76   fds_reset,
77   fds_process,
78   NULL,                         /* no reads */
79   fds_memwrite
80 };
81
82 /*
83 ** $Log$
84 ** Revision 1.4  2008/03/26 07:40:55  slomo
85 ** * gst/nsf/Makefile.am:
86 ** * gst/nsf/fds_snd.c:
87 ** * gst/nsf/mmc5_snd.c:
88 ** * gst/nsf/nsf.c:
89 ** * gst/nsf/types.h:
90 ** * gst/nsf/vrc7_snd.c:
91 ** * gst/nsf/vrcvisnd.c:
92 ** * gst/nsf/memguard.c:
93 ** * gst/nsf/memguard.h:
94 ** Remove memguard again and apply hopefully all previously dropped
95 ** local patches. Should be really better than the old version now.
96 **
97 ** Revision 1.3  2008-03-25 15:56:10  slomo
98 ** Patch by: Andreas Henriksson <andreas at fatal dot set>
99 ** * gst/nsf/Makefile.am:
100 ** * gst/nsf/dis6502.h:
101 ** * gst/nsf/fds_snd.c:
102 ** * gst/nsf/fds_snd.h:
103 ** * gst/nsf/fmopl.c:
104 ** * gst/nsf/fmopl.h:
105 ** * gst/nsf/gstnsf.c:
106 ** * gst/nsf/log.c:
107 ** * gst/nsf/log.h:
108 ** * gst/nsf/memguard.c:
109 ** * gst/nsf/memguard.h:
110 ** * gst/nsf/mmc5_snd.c:
111 ** * gst/nsf/mmc5_snd.h:
112 ** * gst/nsf/nes6502.c:
113 ** * gst/nsf/nes6502.h:
114 ** * gst/nsf/nes_apu.c:
115 ** * gst/nsf/nes_apu.h:
116 ** * gst/nsf/nsf.c:
117 ** * gst/nsf/nsf.h:
118 ** * gst/nsf/osd.h:
119 ** * gst/nsf/types.h:
120 ** * gst/nsf/vrc7_snd.c:
121 ** * gst/nsf/vrc7_snd.h:
122 ** * gst/nsf/vrcvisnd.c:
123 ** * gst/nsf/vrcvisnd.h:
124 ** Update our internal nosefart to nosefart-2.7-mls to fix segfaults
125 ** on some files. Fixes bug #498237.
126 ** Remove some // comments, fix some compiler warnings and use pow()
127 ** instead of a slow, selfmade implementation.
128 **
129 ** Revision 1.1  2003/04/08 20:53:00  ben
130 ** Adding more files...
131 **
132 ** Revision 1.3  2000/07/03 02:18:53  matt
133 ** much better external module exporting
134 **
135 ** Revision 1.2  2000/06/20 04:06:16  matt
136 ** migrated external sound definition to apu module
137 **
138 ** Revision 1.1  2000/06/20 00:06:47  matt
139 ** initial revision
140 **
141 */