map099.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  ** map99.c
21  **
22  ** mapper 99 interface
23  ** $Id: map099.c,v 1.2 2001/04/27 14:37:11 neil Exp $
24  */
25  
26  #include "noftypes.h"
27  #include "nes_mmc.h"
28  #include "nes_ppu.h"
29  
30  /* Switch VROM for VS games */
31  static void map99_vromswitch(uint8 value)
32  {
33     int bank = (value & 0x04) >> 2;
34     mmc_bankvrom(8, 0x0000, bank);
35  }
36  
37  /* mapper 99: VS. System */
38  static const void map99_init(void)
39  {
40     ppu_mirror(0, 1, 2, 3);
41     ppu_setvromswitch(map99_vromswitch);
42  }
43  
44  const mapintf_t map99_intf =
45  {
46     99, /* mapper number */
47     "VS. System", /* mapper name */
48     map99_init, /* init routine */
49     NULL, /* vblank callback */
50     NULL, /* hblank callback */
51     NULL, /* get state (snss) */
52     NULL, /* set state (snss) */
53     NULL, /* memory read structure */
54     NULL, /* memory write structure */
55     NULL /* external sound device */
56  };
57  
58  /*
59  ** $Log: map099.c,v $
60  ** Revision 1.2  2001/04/27 14:37:11  neil
61  ** wheeee
62  **
63  ** Revision 1.1  2001/04/27 12:54:40  neil
64  ** blah
65  **
66  ** Revision 1.1.1.1  2001/04/27 07:03:54  neil
67  ** initial
68  **
69  ** Revision 1.1  2000/10/24 12:19:33  matt
70  ** changed directory structure
71  **
72  ** Revision 1.6  2000/10/22 19:17:47  matt
73  ** mapper cleanups galore
74  **
75  ** Revision 1.5  2000/10/21 19:33:38  matt
76  ** many more cleanups
77  **
78  ** Revision 1.4  2000/10/10 13:58:17  matt
79  ** stroustrup squeezing his way in the door
80  **
81  ** Revision 1.3  2000/07/10 05:29:03  matt
82  ** cleaned up some mirroring issues
83  **
84  ** Revision 1.2  2000/07/06 02:48:43  matt
85  ** clearly labelled structure members
86  **
87  ** Revision 1.1  2000/07/05 05:05:18  matt
88  ** initial revision
89  **
90  */