map003.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  ** map3.c
21  **
22  ** mapper 3 interface
23  ** $Id: map003.c,v 1.2 2001/04/27 14:37:11 neil Exp $
24  */
25  #include "noftypes.h"
26  #include "nes_mmc.h"
27  
28  /* mapper 3: CNROM */
29  static void map3_write(uint32 address, uint8 value)
30  {
31     UNUSED(address);
32  
33     mmc_bankvrom(8, 0x0000, value);
34  }
35  
36  static const map_memwrite map3_memwrite[] =
37  {
38     { 0x8000, 0xFFFF, map3_write },
39     {     -1,     -1, NULL }
40  };
41  
42  const mapintf_t map3_intf =
43  {
44     3, /* mapper number */
45     "CNROM", /* mapper name */
46     NULL, /* init routine */
47     NULL, /* vblank callback */
48     NULL, /* hblank callback */
49     NULL, /* get state (snss) */
50     NULL, /* set state (snss) */
51     NULL, /* memory read structure */
52     map3_memwrite, /* memory write structure */
53     NULL /* external sound device */
54  };
55  
56  /*
57  ** $Log: map003.c,v $
58  ** Revision 1.2  2001/04/27 14:37:11  neil
59  ** wheeee
60  **
61  ** Revision 1.1  2001/04/27 12:54:40  neil
62  ** blah
63  **
64  ** Revision 1.1.1.1  2001/04/27 07:03:54  neil
65  ** initial
66  **
67  ** Revision 1.1  2000/10/24 12:19:32  matt
68  ** changed directory structure
69  **
70  ** Revision 1.5  2000/10/22 19:17:46  matt
71  ** mapper cleanups galore
72  **
73  ** Revision 1.4  2000/10/21 19:33:38  matt
74  ** many more cleanups
75  **
76  ** Revision 1.3  2000/08/16 02:50:11  matt
77  ** random mapper cleanups
78  **
79  ** Revision 1.2  2000/07/06 02:48:43  matt
80  ** clearly labelled structure members
81  **
82  ** Revision 1.1  2000/07/04 23:11:45  matt
83  ** initial revision
84  **
85  */