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