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