hash/vboy.xml
| r7918 | r7919 | |
| 2 | 2 | <!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> |
| 3 | 3 | <softwarelist name="vboy" description="Nintendo Virtual Boy cartridges"> |
| 4 | 4 | <!-- Id: VUE-VPBE-USA - Developers: T&E Soft --> |
| 5 | | <software name="3dtetris"> |
| 5 | <software name="3dtetris" supported="no"> |
| 6 | 6 | <description>3-D Tetris (USA)</description> |
| 7 | 7 | <year>1996</year> |
| 8 | 8 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 14 | 14 | </software> |
| 15 | 15 | |
| 16 | 16 | <!-- Id: VUE-VGPJ-JPN/USA - Developers: Intelligent Systems - Releases: 1995-07-01 (JPN) --> |
| 17 | | <software name="galactic"> |
| 17 | <software name="galactic" supported="no"> |
| 18 | 18 | <description>Galactic Pinball (Jpn, USA)</description> |
| 19 | 19 | <year>1995</year> |
| 20 | 20 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 26 | 26 | </software> |
| 27 | 27 | |
| 28 | 28 | <!-- Id: VUE-VVGE-USA - Developers: T&E Soft --> |
| 29 | | <software name="golf"> |
| 29 | <software name="golf" supported="no"> |
| 30 | 30 | <description>Golf (USA)</description> |
| 31 | 31 | <year>1995</year> |
| 32 | 32 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 38 | 38 | </software> |
| 39 | 39 | |
| 40 | 40 | <!-- Id: VUE-VIMJ-JPN - Developers: Betop (I'Max) - Releases: 1995-10-13 (JPN) --> |
| 41 | | <software name="innsmout"> |
| 41 | <software name="innsmout" supported="no"> |
| 42 | 42 | <description>Innsmouth no Yakata (Jpn)</description> |
| 43 | 43 | <year>1995</year> |
| 44 | 44 | <publisher>I'Max</publisher> |
| r7918 | r7919 | |
| 50 | 50 | </software> |
| 51 | 51 | |
| 52 | 52 | <!-- Id: VUE-VJBE-USA - Developers: Atlus --> |
| 53 | | <software name="jackbros"> |
| 53 | <software name="jackbros" supported="no"> |
| 54 | 54 | <description>Jack Bros. (USA)</description> |
| 55 | 55 | <year>1995</year> |
| 56 | 56 | <publisher>Atlus</publisher> |
| r7918 | r7919 | |
| 62 | 62 | </software> |
| 63 | 63 | |
| 64 | 64 | <!-- Id: VUE-VJBJ-JPN - Developers: Atlus - Releases: 1995-09-29 (JPN) --> |
| 65 | | <software name="jackbrosj" cloneof="jackbros"> |
| 65 | <software name="jackbrosj" cloneof="jackbros" supported="no"> |
| 66 | 66 | <description>Jack Bros. no Meiro de Hiihoo! (Jpn)</description> |
| 67 | 67 | <year>1995</year> |
| 68 | 68 | <publisher>Atlus</publisher> |
| r7918 | r7919 | |
| 74 | 74 | </software> |
| 75 | 75 | |
| 76 | 76 | <!-- Id: VUE-VMCJ-JPN/USA - Developers: Nintendo R&D1 - Releases: 1995-09-28 (JPN) --> |
| 77 | | <software name="mariocla"> |
| 77 | <software name="mariocla" supported="no"> |
| 78 | 78 | <description>Mario Clash (Jpn, USA)</description> |
| 79 | 79 | <year>1995</year> |
| 80 | 80 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 86 | 86 | </software> |
| 87 | 87 | |
| 88 | 88 | <!-- Id: VUE-VMTJ-JPN/USA - Developers: Nintendo R&D1 / Tose Software - Releases: 1995-07-21 (JPN) --> |
| 89 | | <software name="marioten"> |
| 89 | <software name="marioten" supported="no"> |
| 90 | 90 | <description>Mario's Tennis (Jpn, USA)</description> |
| 91 | 91 | <year>1995</year> |
| 92 | 92 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 98 | 98 | </software> |
| 99 | 99 | |
| 100 | 100 | <!-- Id: VUE-VNFE-USA - Developers: Nintendo IRD --> |
| 101 | | <software name="nesterfb"> |
| 101 | <software name="nesterfb" supported="no"> |
| 102 | 102 | <description>Nester's Funky Bowling (USA)</description> |
| 103 | 103 | <year>1996</year> |
| 104 | 104 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 110 | 110 | </software> |
| 111 | 111 | |
| 112 | 112 | <!-- Id: VUE-VH2E-USA - Developers: Raizing --> |
| 113 | | <software name="panicbom"> |
| 113 | <software name="panicbom" supported="no"> |
| 114 | 114 | <description>Panic Bomber (USA)</description> |
| 115 | 115 | <year>1995</year> |
| 116 | 116 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 122 | 122 | </software> |
| 123 | 123 | |
| 124 | 124 | <!-- Id: VUE-VREE-USA - Developers: T&E Soft --> |
| 125 | | <software name="redalarm"> |
| 125 | <software name="redalarm" supported="no"> |
| 126 | 126 | <description>Red Alarm (USA)</description> |
| 127 | 127 | <year>1995</year> |
| 128 | 128 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 134 | 134 | </software> |
| 135 | 135 | |
| 136 | 136 | <!-- Id: VUE-VREJ-JPN - Developers: T&E Soft - Releases: 1995-07-21 (JPN) --> |
| 137 | | <software name="redalarmj" cloneof="redalarm"> |
| 137 | <software name="redalarmj" cloneof="redalarm" supported="no"> |
| 138 | 138 | <description>Red Alarm (Jpn)</description> |
| 139 | 139 | <year>1995</year> |
| 140 | 140 | <publisher>T&E Soft</publisher> |
| r7918 | r7919 | |
| 146 | 146 | </software> |
| 147 | 147 | |
| 148 | 148 | <!-- Id: VUE-VSDJ-JPN - Developers: Bandai? - Releases: 1995-12-22 (JPN) --> |
| 149 | | <software name="sdgundam"> |
| 149 | <software name="sdgundam" supported="no"> |
| 150 | 150 | <description>SD Gundam - Dimension War (Jpn)</description> |
| 151 | 151 | <year>1995</year> |
| 152 | 152 | <publisher>Bandai</publisher> |
| r7918 | r7919 | |
| 158 | 158 | </software> |
| 159 | 159 | |
| 160 | 160 | <!-- Id: VUE-VSPJ-JPN - Developers: Taito - Releases: 1995-12-01 (JPN) --> |
| 161 | | <software name="spaceinv"> |
| 161 | <software name="spaceinv" supported="no"> |
| 162 | 162 | <description>Space Invaders - Virtual Collection (Jpn)</description> |
| 163 | 163 | <year>1995</year> |
| 164 | 164 | <publisher>Taito</publisher> |
| r7918 | r7919 | |
| 170 | 170 | </software> |
| 171 | 171 | |
| 172 | 172 | <!-- Id: VUE-VSSJ-JPN - Developers: Tomcat System - Releases: 1995-09-29 (JPN) --> |
| 173 | | <software name="ssquash"> |
| 173 | <software name="ssquash" supported="no"> |
| 174 | 174 | <description>Space Squash (Jpn)</description> |
| 175 | 175 | <year>1995</year> |
| 176 | 176 | <publisher>Coconuts Japan Entertainment</publisher> |
| r7918 | r7919 | |
| 182 | 182 | </software> |
| 183 | 183 | |
| 184 | 184 | <!-- Id: VUE-VTBJ-JPN/USA - Developers: Nintendo R&D1 - Releases: 1995-07-21 (JPN) --> |
| 185 | | <software name="telerobo"> |
| 185 | <software name="telerobo" supported="no"> |
| 186 | 186 | <description>Teleroboxer (Jpn, USA)</description> |
| 187 | 187 | <year>1995</year> |
| 188 | 188 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 194 | 194 | </software> |
| 195 | 195 | |
| 196 | 196 | <!-- Id: VUE-VH2J_JPN - Developers: Raizing - Releases: 1995-07-21 (JPN) --> |
| 197 | | <software name="tobidase"> |
| 197 | <software name="tobidase" supported="no"> |
| 198 | 198 | <description>Tobidase! Panibon (Jpn)</description> |
| 199 | 199 | <year>1995</year> |
| 200 | 200 | <publisher>Hudson</publisher> |
| r7918 | r7919 | |
| 206 | 206 | </software> |
| 207 | 207 | |
| 208 | 208 | <!-- Id: VUE-VVBJ-JPN - Developers: Athena - Releases: 1995-12-22 (JPN) --> |
| 209 | | <software name="vbowling"> |
| 209 | <software name="vbowling" supported="no"> |
| 210 | 210 | <description>Virtual Bowling (Jpn)</description> |
| 211 | 211 | <year>1995</year> |
| 212 | 212 | <publisher>Athena</publisher> |
| r7918 | r7919 | |
| 218 | 218 | </software> |
| 219 | 219 | |
| 220 | 220 | <!-- Id: VUE-VVFJ-JPN - Developers: Pack-In-Video - Releases: 1995-10-16 (JPN) --> |
| 221 | | <software name="vfishing"> |
| 221 | <software name="vfishing" supported="no"> |
| 222 | 222 | <description>Virtual Fishing (Jpn)</description> |
| 223 | 223 | <year>1995</year> |
| 224 | 224 | <publisher>Pack-In-Video</publisher> |
| r7918 | r7919 | |
| 230 | 230 | </software> |
| 231 | 231 | |
| 232 | 232 | <!-- Id: VUE-VH3E-USA - Developers: Hudson --> |
| 233 | | <software name="vforce"> |
| 233 | <software name="vforce" supported="no"> |
| 234 | 234 | <description>Vertical Force (USA)</description> |
| 235 | 235 | <year>1995</year> |
| 236 | 236 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 242 | 242 | </software> |
| 243 | 243 | |
| 244 | 244 | <!-- Id: VUE-VH3J-JPN - Developers: Hudson - Releases: 1995-08-12 (JPN) --> |
| 245 | | <software name="vforcej" cloneof="vforce"> |
| 245 | <software name="vforcej" cloneof="vforce" supported="no"> |
| 246 | 246 | <description>Vertical Force (Jpn)</description> |
| 247 | 247 | <year>1995</year> |
| 248 | 248 | <publisher>Hudson</publisher> |
| r7918 | r7919 | |
| 254 | 254 | </software> |
| 255 | 255 | |
| 256 | 256 | <!-- Id: VUE-VVGJ-JPN - Developers: T&E Soft - Releases: 1995-08-11 (JPN) --> |
| 257 | | <software name="vgolf"> |
| 257 | <software name="vgolf" supported="no"> |
| 258 | 258 | <description>T&E Virtual Golf (Jpn)</description> |
| 259 | 259 | <year>1995</year> |
| 260 | 260 | <publisher>T&E Soft</publisher> |
| r7918 | r7919 | |
| 266 | 266 | </software> |
| 267 | 267 | |
| 268 | 268 | <!-- Id: VUE-VJVJ-JPN - Developers: J-Wing - Releases: 1995-12-08 (JPN) --> |
| 269 | | <software name="vlab"> |
| 269 | <software name="vlab" supported="no"> |
| 270 | 270 | <description>Virtual Lab (Jpn)</description> |
| 271 | 271 | <year>1995</year> |
| 272 | 272 | <publisher>J-Wing</publisher> |
| r7918 | r7919 | |
| 278 | 278 | </software> |
| 279 | 279 | |
| 280 | 280 | <!-- Id: VUE-VVPE-USA - Developers: Kemco --> |
| 281 | | <software name="vleague"> |
| 281 | <software name="vleague" supported="no"> |
| 282 | 282 | <description>Virtual League Baseball (USA)</description> |
| 283 | 283 | <year>1995</year> |
| 284 | 284 | <publisher>Kemco</publisher> |
| r7918 | r7919 | |
| 290 | 290 | </software> |
| 291 | 291 | |
| 292 | 292 | <!-- Id: VUE-VVPJ-JPN - Developers: Kemco - Releases: 1995-08-11 (JPN) --> |
| 293 | | <software name="vproyak"> |
| 293 | <software name="vproyak" supported="no"> |
| 294 | 294 | <description>Virtual Pro Yakyuu '95 (Jpn)</description> |
| 295 | 295 | <year>1995</year> |
| 296 | 296 | <publisher>Kemco</publisher> |
| r7918 | r7919 | |
| 302 | 302 | </software> |
| 303 | 303 | |
| 304 | 304 | <!-- Id: VUE-VTRJ-JPN - Developers: Locomotive - Releases: 1995-08-25 (JPN) --> |
| 305 | | <software name="vtetris"> |
| 305 | <software name="vtetris" supported="no"> |
| 306 | 306 | <description>V-Tetris (Jpn)</description> |
| 307 | 307 | <year>1995</year> |
| 308 | 308 | <publisher>Bullet-Proof Software</publisher> |
| r7918 | r7919 | |
| 314 | 314 | </software> |
| 315 | 315 | |
| 316 | 316 | <!-- Id: VUE-VWCJ-JPN/USA - Developers: Nintendo R&D1 - Releases: 1995-12-01 (JPN) --> |
| 317 | | <software name="wariolnd"> |
| 317 | <software name="wariolnd" supported="no"> |
| 318 | 318 | <description>Virtual Boy Wario Land (USA) ~ Virtual Boy Wario Land - Awazon no Hihou (Jpn)</description> |
| 319 | 319 | <year>1995</year> |
| 320 | 320 | <publisher>Nintendo</publisher> |
| r7918 | r7919 | |
| 326 | 326 | </software> |
| 327 | 327 | |
| 328 | 328 | <!-- Id: VUE-VWEE-USA - Developers: Ocean --> |
| 329 | | <software name="waterwld"> |
| 329 | <software name="waterwld" supported="no"> |
| 330 | 330 | <description>Waterworld (USA)</description> |
| 331 | 331 | <year>1995</year> |
| 332 | 332 | <publisher>Ocean</publisher> |
hash/megaduck.xml
| r7918 | r7919 | |
| 6 | 6 | <year>1993</year> |
| 7 | 7 | <publisher>Commin</publisher> |
| 8 | 8 | <!-- <serial>CB014/MD014</serial> --> |
| 9 | | <part name="cart" interface="megaduck"> |
| 9 | <part name="cart" interface="megaduck_cart"> |
| 10 | 10 | <dataarea name="rom" size="65536"> |
| 11 | 11 | <rom name="014.bin" size="65536" crc="eca6c0ad" sha1="aa2c3774eb48df0854d4b61997653f79a810f4cc" offset="0000" /> |
| 12 | 12 | </dataarea> |
| r7918 | r7919 | |
| 18 | 18 | <year>1993</year> |
| 19 | 19 | <publisher>Commin</publisher> |
| 20 | 20 | <!-- <serial>CB006/MD006</serial> --> |
| 21 | | <part name="cart" interface="megaduck"> |
| 21 | <part name="cart" interface="megaduck_cart"> |
| 22 | 22 | <dataarea name="rom" size="32768"> |
| 23 | 23 | <rom name="006.bin" size="32768" crc="f88f2d25" sha1="4f3022126f33964e0fb5505fa0caeaa13b995309" offset="0000" /> |
| 24 | 24 | </dataarea> |
| r7918 | r7919 | |
| 29 | 29 | <description>Black Forest Tale</description> |
| 30 | 30 | <year>1993</year> |
| 31 | 31 | <publisher>Commin</publisher> |
| 32 | | <part name="cart" interface="megaduck"> |
| 32 | <part name="cart" interface="megaduck_cart"> |
| 33 | 33 | <dataarea name="rom" size="65536"> |
| 34 | 34 | <rom name="bftale.bin" size="65536" crc="211d268b" sha1="3d62acc2db46bb7b6a2909d640dec6ce095aeec3" offset="0000" /> |
| 35 | 35 | </dataarea> |
| r7918 | r7919 | |
| 41 | 41 | <year>1993</year> |
| 42 | 42 | <publisher>Timlex International</publisher> |
| 43 | 43 | <!-- <serial>CB001/MD001</serial> --> |
| 44 | | <part name="cart" interface="megaduck"> |
| 44 | <part name="cart" interface="megaduck_cart"> |
| 45 | 45 | <dataarea name="rom" size="32768"> |
| 46 | 46 | <rom name="001.bin" size="32768" crc="58efe338" sha1="9b050e41b9aa18dbf5c043f19b7c945c89811cc1" offset="0000" /> |
| 47 | 47 | </dataarea> |
| r7918 | r7919 | |
| 53 | 53 | <year>1993</year> |
| 54 | 54 | <publisher>Sachen</publisher> |
| 55 | 55 | <!-- <serial>CB021/MD021</serial> --> |
| 56 | | <part name="cart" interface="megaduck"> |
| 56 | <part name="cart" interface="megaduck_cart"> |
| 57 | 57 | <dataarea name="rom" size="131072"> |
| 58 | 58 | <rom name="021.bin" size="131072" crc="2adb7253" sha1="9ff96b40e8636fad37b1b95f83f3a9584f3dfe3e" offset="0000" /> |
| 59 | 59 | </dataarea> |
| r7918 | r7919 | |
| 65 | 65 | <year>1993</year> |
| 66 | 66 | <publisher>Commin</publisher> |
| 67 | 67 | <!-- <serial>CB036/MD036</serial> --> |
| 68 | | <part name="cart" interface="megaduck"> |
| 68 | <part name="cart" interface="megaduck_cart"> |
| 69 | 69 | <dataarea name="rom" size="65536"> |
| 70 | 70 | <rom name="036.bin" size="65536" crc="ff0da355" sha1="fb4ba6c9823808c2705f597294b784837342cbcb" offset="00000" /> |
| 71 | 71 | </dataarea> |
| r7918 | r7919 | |
| 77 | 77 | <year>1993</year> |
| 78 | 78 | <publisher>Sachen</publisher> |
| 79 | 79 | <!-- <serial>CB029/MD029</serial> --> |
| 80 | | <part name="cart" interface="megaduck"> |
| 80 | <part name="cart" interface="megaduck_cart"> |
| 81 | 81 | <dataarea name="rom" size="65536"> |
| 82 | 82 | <rom name="029.bin" size="65536" crc="98694021" sha1="6eefbf8742eba1279f943c321b5d55e45a727a67" offset="00000" /> |
| 83 | 83 | </dataarea> |
| r7918 | r7919 | |
| 89 | 89 | <year>1993</year> |
| 90 | 90 | <publisher>Sachen</publisher> |
| 91 | 91 | <!-- <serial>CB035/MD035</serial> --> |
| 92 | | <part name="cart" interface="megaduck"> |
| 92 | <part name="cart" interface="megaduck_cart"> |
| 93 | 93 | <dataarea name="rom" size="65536"> |
| 94 | 94 | <rom name="035.bin" size="65536" crc="8046ea70" sha1="2a1c5bea602ab27ecf680c88cfe9884186b61438" offset="00000" /> |
| 95 | 95 | </dataarea> |
| r7918 | r7919 | |
| 101 | 101 | <year>1993</year> |
| 102 | 102 | <publisher>Commin</publisher> |
| 103 | 103 | <!-- <serial>CB010/MD010</serial> --> |
| 104 | | <part name="cart" interface="megaduck"> |
| 104 | <part name="cart" interface="megaduck_cart"> |
| 105 | 105 | <dataarea name="rom" size="32768"> |
| 106 | 106 | <rom name="010.bin" size="32768" crc="d71f1770" sha1="69222a0c5c3920d0784d0e58c3407b74c1b2bfe8" offset="0000" /> |
| 107 | 107 | </dataarea> |
| r7918 | r7919 | |
| 113 | 113 | <year>1993</year> |
| 114 | 114 | <publisher>Commin</publisher> |
| 115 | 115 | <!-- <serial>CB010/MD010</serial> --> |
| 116 | | <part name="cart" interface="megaduck"> |
| 116 | <part name="cart" interface="megaduck_cart"> |
| 117 | 117 | <dataarea name="rom" size="32768"> |
| 118 | 118 | <rom name="010a.bin" size="32768" crc="61c81e06" sha1="13d8882371823e5dfb74191ef0addafc43aa1de4" offset="0000" /> |
| 119 | 119 | </dataarea> |
| r7918 | r7919 | |
| 125 | 125 | <year>1993</year> |
| 126 | 126 | <publisher>Commin</publisher> |
| 127 | 127 | <!-- <serial>CB008/MD0008</serial> --> |
| 128 | | <part name="cart" interface="megaduck"> |
| 128 | <part name="cart" interface="megaduck_cart"> |
| 129 | 129 | <dataarea name="rom" size="65536"> |
| 130 | 130 | <rom name="008.bin" size="65536" crc="35fb1616" sha1="4849CD6F881B5B78E1D3A08EDB727E79C77F9D39" offset="00000" /> |
| 131 | 131 | </dataarea> |
| r7918 | r7919 | |
| 137 | 137 | <year>1993</year> |
| 138 | 138 | <publisher>Sachen</publisher> |
| 139 | 139 | <!-- <serial>CB019/MD019</serial> --> |
| 140 | | <part name="cart" interface="megaduck"> |
| 140 | <part name="cart" interface="megaduck_cart"> |
| 141 | 141 | <dataarea name="rom" size="65536"> |
| 142 | 142 | <rom name="019.bin" size="65536" crc="2bb6aeb9" sha1="f1a9a8365f1b78057ed5cc647fd68efafc0c49e8" offset="00000" /> |
| 143 | 143 | </dataarea> |
| r7918 | r7919 | |
| 149 | 149 | <year>1993</year> |
| 150 | 150 | <publisher>Sachen</publisher> |
| 151 | 151 | <!-- <serial>CB018/MD018</serial> --> |
| 152 | | <part name="cart" interface="megaduck"> |
| 152 | <part name="cart" interface="megaduck_cart"> |
| 153 | 153 | <dataarea name="rom" size="65536"> |
| 154 | 154 | <rom name="018.bin" size="65536" crc="315ef9f2" sha1="c76a57047f0f72252cddd7974a3b694392753469" offset="00000" /> |
| 155 | 155 | </dataarea> |
| r7918 | r7919 | |
| 161 | 161 | <year>1993</year> |
| 162 | 162 | <publisher>Commin</publisher> |
| 163 | 163 | <!-- <serial>CB002/MD002</serial> --> |
| 164 | | <part name="cart" interface="megaduck"> |
| 164 | <part name="cart" interface="megaduck_cart"> |
| 165 | 165 | <dataarea name="rom" size="32768"> |
| 166 | 166 | <rom name="002.bin" size="32768" crc="74c3377f" sha1="9b7d69f9b0a44eeaa36971aabec553ebd3bfdc0e" offset="0000" /> |
| 167 | 167 | </dataarea> |
| r7918 | r7919 | |
| 173 | 173 | <year>1993</year> |
| 174 | 174 | <publisher>Commin</publisher> |
| 175 | 175 | <!-- <serial>CB005/MD005</serial> --> |
| 176 | | <part name="cart" interface="megaduck"> |
| 176 | <part name="cart" interface="megaduck_cart"> |
| 177 | 177 | <dataarea name="rom" size="65536"> |
| 178 | 178 | <rom name="005.bin" size="65536" crc="cd2730ac" sha1="022d7e635ea64c6a525db5d31c30a7d8636f4c18" offset="00000" /> |
| 179 | 179 | </dataarea> |
src/mess/machine/gb.c
| r7918 | r7919 | |
| 2198 | 2198 | |
| 2199 | 2199 | DEVICE_IMAGE_LOAD(megaduck_cart) |
| 2200 | 2200 | { |
| 2201 | | int I, filesize; |
| 2201 | int I; |
| 2202 | UINT32 filesize; |
| 2202 | 2203 | |
| 2203 | 2204 | for (I = 0; I < MAX_ROMBANK; I++) |
| 2204 | 2205 | gb_driver_data.ROMMap[I] = NULL; |
| 2205 | 2206 | for (I = 0; I < MAX_RAMBANK; I++) |
| 2206 | 2207 | gb_driver_data.RAMMap[I] = NULL; |
| 2207 | 2208 | |
| 2208 | | filesize = image_length(image); |
| 2209 | | gb_driver_data.ROMBanks = filesize / 0x4000; |
| 2209 | if (image_software_entry(image) == NULL) |
| 2210 | filesize = image_length(image); |
| 2211 | else |
| 2212 | filesize = image_get_software_region_length(image, "rom"); |
| 2210 | 2213 | |
| 2211 | | if ( ( filesize == 0 ) || ( ( filesize % 0x4000 ) != 0 ) ) |
| 2214 | if ((filesize == 0) || ((filesize % 0x4000) != 0)) |
| 2212 | 2215 | { |
| 2213 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Invalid rom file size" ); |
| 2216 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Invalid rom file size"); |
| 2214 | 2217 | return INIT_FAIL; |
| 2215 | 2218 | } |
| 2219 | |
| 2220 | gb_driver_data.ROMBanks = filesize / 0x4000; |
| 2216 | 2221 | |
| 2217 | 2222 | /* Claim memory */ |
| 2218 | 2223 | gb_driver_data.gb_cart = auto_alloc_array(image->machine, UINT8, filesize); |
| 2219 | 2224 | |
| 2220 | 2225 | /* Read cartridge */ |
| 2221 | | if (image_fread (image, gb_driver_data.gb_cart, filesize) != filesize) |
| 2226 | if (image_software_entry(image) == NULL) |
| 2222 | 2227 | { |
| 2223 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file" ); |
| 2224 | | return INIT_FAIL; |
| 2228 | if (image_fread(image, gb_driver_data.gb_cart, filesize) != filesize) |
| 2229 | { |
| 2230 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file"); |
| 2231 | return INIT_FAIL; |
| 2232 | } |
| 2225 | 2233 | } |
| 2234 | else |
| 2235 | { |
| 2236 | memcpy(gb_driver_data.gb_cart, image_get_software_region(image, "rom"), filesize); |
| 2237 | } |
| 2226 | 2238 | |
| 2227 | 2239 | /* Log cart information */ |
| 2228 | 2240 | { |
| r7918 | r7919 | |
| 2232 | 2244 | |
| 2233 | 2245 | for (I = 0; I < gb_driver_data.ROMBanks; I++) |
| 2234 | 2246 | { |
| 2235 | | gb_driver_data.ROMMap[I] = gb_driver_data.gb_cart + ( I * 0x4000 ); |
| 2247 | gb_driver_data.ROMMap[I] = gb_driver_data.gb_cart + (I * 0x4000); |
| 2236 | 2248 | } |
| 2237 | 2249 | |
| 2238 | 2250 | /* Build rom bank Mask */ |
src/mess/drivers/advision.c
| r7918 | r7919 | |
| 63 | 63 | |
| 64 | 64 | static DEVICE_IMAGE_LOAD( advision_cart ) |
| 65 | 65 | { |
| 66 | | UINT8 *cart_rom; |
| 67 | | UINT32 cart_rom_size; |
| 66 | UINT32 size; |
| 68 | 67 | |
| 69 | 68 | if (image_software_entry(image) == NULL) |
| 70 | 69 | { |
| 71 | | cart_rom = memory_region(image->machine, "cart"); |
| 72 | | cart_rom_size = image_length(image); |
| 70 | size = image_length(image); |
| 73 | 71 | |
| 74 | | if (cart_rom_size > memory_region_length(image->machine, "cart")) |
| 72 | if (size > memory_region_length(image->machine, I8048_TAG)) |
| 75 | 73 | { |
| 76 | 74 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); |
| 77 | 75 | return INIT_FAIL; |
| 78 | 76 | } |
| 79 | 77 | |
| 80 | | if (image_fread(image, cart_rom, cart_rom_size) != cart_rom_size) |
| 78 | if (image_fread(image, memory_region(image->machine, I8048_TAG), size) != size) |
| 81 | 79 | { |
| 82 | 80 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file"); |
| 83 | 81 | return INIT_FAIL; |
| r7918 | r7919 | |
| 86 | 84 | } |
| 87 | 85 | else |
| 88 | 86 | { |
| 89 | | cart_rom = image_get_software_region(image, "rom"); |
| 90 | | cart_rom_size = image_get_software_region_length(image, "rom"); |
| 87 | size = image_get_software_region_length(image, "rom"); |
| 88 | memcpy(memory_region(image->machine, I8048_TAG), image_get_software_region(image, "rom"), size); |
| 91 | 89 | } |
| 92 | | |
| 93 | | memcpy(memory_region(image->machine, I8048_TAG), cart_rom, cart_rom_size); |
| 94 | 90 | |
| 95 | 91 | return INIT_PASS; |
| 96 | 92 | } |
| r7918 | r7919 | |
| 159 | 155 | |
| 160 | 156 | ROM_REGION( 0x200, COP411_TAG, 0 ) |
| 161 | 157 | ROM_LOAD( "avsound.u8", 0x000, 0x200, CRC(81e95975) SHA1(8b6f8c30dd3e9d8e43f1ea20fba2361b383790eb) ) |
| 162 | | |
| 163 | | ROM_REGION( 0x1000, "cart", ROMREGION_ERASE00 ) |
| 164 | 158 | ROM_END |
| 165 | 159 | |
| 166 | 160 | /* Game Driver */ |
src/mess/drivers/arcadia.c
| r7918 | r7919 | |
| 1 | 1 | /****************************************************************************** |
| 2 | | Consolidation and enhancment of documentation by Manfred Schneider based on previous work from |
| 2 | Consolidation and enhancement of documentation by Manfred Schneider based on previous work from |
| 3 | 3 | PeT mess@utanet.at and Paul Robson (autismuk@aol.com) minor updates by incog |
| 4 | 4 | |
| 5 | 5 | Schematics, manuals and anything you can desire for at http://amigan.classicgaming.gamespy.com/ |
| r7918 | r7919 | |
| 463 | 463 | int size; |
| 464 | 464 | |
| 465 | 465 | memset(rom, 0, 0x8000); |
| 466 | | size = image_length(image); |
| 467 | | |
| 468 | | if (size > memory_region_length(image->machine, "maincpu")) |
| 469 | | size = memory_region_length(image->machine, "maincpu"); |
| 470 | | |
| 471 | | if (image_fread(image, rom, size) != size) |
| 472 | | return INIT_FAIL; |
| 473 | | |
| 466 | if (image_software_entry(image) == NULL) |
| 467 | { |
| 468 | size = image_length(image); |
| 469 | |
| 470 | if (size > memory_region_length(image->machine, "maincpu")) |
| 471 | size = memory_region_length(image->machine, "maincpu"); |
| 472 | |
| 473 | if (image_fread(image, rom, size) != size) |
| 474 | return INIT_FAIL; |
| 475 | } |
| 476 | else |
| 477 | { |
| 478 | size = image_get_software_region_length(image, "rom"); |
| 479 | memcpy(rom, image_get_software_region(image, "rom"), size); |
| 480 | } |
| 481 | |
| 474 | 482 | if (size > 0x1000) |
| 475 | 483 | memmove(rom + 0x2000, rom + 0x1000, size - 0x1000); |
| 476 | | if (size > 0x2000) |
| 477 | | memmove(rom + 0x4000, rom + 0x3000, size - 0x2000); |
| 484 | |
| 485 | if (size > 0x2000) |
| 486 | memmove(rom + 0x4000, rom + 0x3000, size - 0x2000); |
| 478 | 487 | |
| 479 | 488 | #if 1 |
| 480 | 489 | // golf cartridge support |
| 481 | 490 | // 4kbyte at 0x0000 |
| 482 | 491 | // 2kbyte at 0x4000 |
| 483 | | if (size<=0x2000) memcpy (rom+0x4000, rom+0x2000, 0x1000); |
| 492 | if (size <= 0x2000) |
| 493 | memcpy(rom + 0x4000, rom + 0x2000, 0x1000); |
| 484 | 494 | #else |
| 485 | 495 | /* this is a testpatch for the golf cartridge |
| 486 | 496 | so it could be burned in a arcadia 2001 cartridge |
| 487 | 497 | activate it and use debugger to save patched version */ |
| 488 | 498 | // not enough yet (some pointers stored as data?) |
| 489 | | struct { UINT16 address; UINT8 old; UINT8 neu; } |
| 499 | struct { UINT16 address; UINT8 old; UINT8 new; } |
| 500 | int i: |
| 490 | 501 | patch[]= { |
| 491 | 502 | { 0x0077,0x40,0x20 }, |
| 492 | 503 | { 0x011e,0x40,0x20 }, |
| r7918 | r7919 | |
| 510 | 521 | { 0x0ffb,0x41,0x21 }, |
| 511 | 522 | { 0x20ec,0x42,0x22 } |
| 512 | 523 | }; |
| 513 | | for (int i=0; i<ARRAY_LENGTH(patch); i++) { |
| 514 | | assert(rom[patch[i].address]==patch[i].old); |
| 515 | | rom[patch[i].address]=patch[i].neu; |
| 524 | |
| 525 | for (i = 0; i < ARRAY_LENGTH(patch); i++) |
| 526 | { |
| 527 | assert(rom[patch[i].address] == patch[i].old); |
| 528 | rom[patch[i].address] = patch[i].new; |
| 516 | 529 | } |
| 517 | 530 | #endif |
| 518 | 531 | return INIT_PASS; |
| r7918 | r7919 | |
| 549 | 562 | MDRV_CARTSLOT_ADD("cart") |
| 550 | 563 | MDRV_CARTSLOT_EXTENSION_LIST("bin") |
| 551 | 564 | MDRV_CARTSLOT_NOT_MANDATORY |
| 565 | MDRV_CARTSLOT_INTERFACE("arcadia_cart") |
| 552 | 566 | MDRV_CARTSLOT_LOAD(arcadia_cart) |
| 567 | |
| 568 | /* Software lists */ |
| 569 | MDRV_SOFTWARE_LIST_ADD("arcadia") |
| 553 | 570 | MACHINE_DRIVER_END |
| 554 | 571 | |
| 555 | 572 | ROM_START(advsnha) |
src/mess/drivers/sg1000.c
| r7918 | r7919 | |
| 772 | 772 | static DEVICE_IMAGE_LOAD( sg1000_cart ) |
| 773 | 773 | { |
| 774 | 774 | const address_space *program = cputag_get_address_space(image->machine, Z80_TAG, ADDRESS_SPACE_PROGRAM); |
| 775 | | int size = image_length(image); |
| 775 | UINT32 size; |
| 776 | 776 | UINT8 *ptr = memory_region(image->machine, Z80_TAG); |
| 777 | 777 | |
| 778 | | if (image_fread(image, ptr, size ) != size) |
| 778 | if (image_software_entry(image) == NULL) |
| 779 | 779 | { |
| 780 | | return INIT_FAIL; |
| 780 | size = image_length(image); |
| 781 | if (image_fread(image, ptr, size) != size) |
| 782 | return INIT_FAIL; |
| 781 | 783 | } |
| 784 | else |
| 785 | { |
| 786 | size = image_get_software_region_length(image, "rom"); |
| 787 | memcpy(ptr, image_get_software_region(image, "rom"), size); |
| 788 | } |
| 782 | 789 | |
| 783 | 790 | /* cartridge ROM banking */ |
| 784 | 791 | sg1000_map_cartridge_memory(image->machine, ptr, size); |
| r7918 | r7919 | |
| 815 | 822 | |
| 816 | 823 | static DEVICE_IMAGE_LOAD( sc3000_cart ) |
| 817 | 824 | { |
| 818 | | int size = image_length(image); |
| 825 | UINT32 size; |
| 819 | 826 | UINT8 *ptr = memory_region(image->machine, Z80_TAG); |
| 820 | | |
| 821 | | if (image_fread(image, ptr, size) != size) |
| 827 | |
| 828 | if (image_software_entry(image) == NULL) |
| 822 | 829 | { |
| 823 | | return INIT_FAIL; |
| 830 | size = image_length(image); |
| 831 | if (image_fread(image, ptr, size) != size) |
| 832 | return INIT_FAIL; |
| 824 | 833 | } |
| 834 | else |
| 835 | { |
| 836 | size = image_get_software_region_length(image, "rom"); |
| 837 | memcpy(ptr, image_get_software_region(image, "rom"), size); |
| 838 | } |
| 825 | 839 | |
| 826 | 840 | /* cartridge ROM and work RAM banking */ |
| 827 | 841 | sc3000_map_cartridge_memory(image->machine, ptr, size); |
| r7918 | r7919 | |
| 857 | 871 | MDRV_CARTSLOT_ADD("cart") |
| 858 | 872 | MDRV_CARTSLOT_EXTENSION_LIST("sg,bin") |
| 859 | 873 | MDRV_CARTSLOT_MANDATORY |
| 874 | MDRV_CARTSLOT_INTERFACE("sg1000_cart") |
| 860 | 875 | MDRV_CARTSLOT_LOAD(sg1000_cart) |
| 861 | 876 | |
| 877 | /* software lists */ |
| 878 | MDRV_SOFTWARE_LIST_ADD("sg1000") |
| 879 | |
| 862 | 880 | /* internal ram */ |
| 863 | 881 | MDRV_RAM_ADD("messram") |
| 864 | 882 | MDRV_RAM_DEFAULT_SIZE("1K") |
| r7918 | r7919 | |
| 911 | 929 | MDRV_CARTSLOT_ADD("cart") |
| 912 | 930 | MDRV_CARTSLOT_EXTENSION_LIST("sg,sc,bin") |
| 913 | 931 | MDRV_CARTSLOT_MANDATORY |
| 932 | MDRV_CARTSLOT_INTERFACE("sg1000_cart") |
| 914 | 933 | MDRV_CARTSLOT_LOAD(sc3000_cart) |
| 915 | 934 | |
| 935 | /* software lists */ |
| 936 | MDRV_SOFTWARE_LIST_ADD("sg1000") |
| 937 | |
| 916 | 938 | /* internal ram */ |
| 917 | 939 | MDRV_RAM_ADD("messram") |
| 918 | 940 | MDRV_RAM_DEFAULT_SIZE("2K") |
src/mess/drivers/gmaster.c
| r7918 | r7919 | |
| 219 | 219 | |
| 220 | 220 | static DEVICE_IMAGE_LOAD( gmaster_cart ) |
| 221 | 221 | { |
| 222 | | UINT8 *cart_rom; |
| 223 | | UINT32 cart_rom_size; |
| 222 | UINT32 size; |
| 224 | 223 | |
| 225 | 224 | if (image_software_entry(image) == NULL) |
| 226 | 225 | { |
| 227 | | cart_rom = memory_region(image->machine, "cart"); |
| 228 | | cart_rom_size = image_length(image); |
| 226 | size = image_length(image); |
| 229 | 227 | |
| 230 | | if (cart_rom_size > memory_region_length(image->machine, "cart")) |
| 228 | if (size > (memory_region_length(image->machine, "maincpu") - 0x8000)) |
| 231 | 229 | { |
| 232 | 230 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); |
| 233 | 231 | return INIT_FAIL; |
| 234 | 232 | } |
| 235 | 233 | |
| 236 | | if (image_fread(image, cart_rom, cart_rom_size) != cart_rom_size) |
| 234 | if (image_fread(image, memory_region(image->machine, "maincpu") + 0x8000, size) != size) |
| 237 | 235 | { |
| 238 | 236 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file"); |
| 239 | 237 | return INIT_FAIL; |
| r7918 | r7919 | |
| 242 | 240 | } |
| 243 | 241 | else |
| 244 | 242 | { |
| 245 | | cart_rom = image_get_software_region(image, "rom"); |
| 246 | | cart_rom_size = image_get_software_region_length(image, "rom"); |
| 243 | size = image_get_software_region_length(image, "rom"); |
| 244 | memcpy(memory_region(image->machine, "maincpu") + 0x8000, image_get_software_region(image, "rom"), size); |
| 247 | 245 | } |
| 248 | | |
| 249 | | memcpy(memory_region(image->machine, "maincpu") + 0x8000, cart_rom, cart_rom_size); |
| 250 | | |
| 246 | |
| 251 | 247 | return INIT_PASS; |
| 252 | 248 | } |
| 253 | 249 | |
| r7918 | r7919 | |
| 296 | 292 | ROM_REGION(0x10000,"maincpu", 0) |
| 297 | 293 | ROM_LOAD("gmaster.bin", 0x0000, 0x1000, CRC(05cc45e5) SHA1(05d73638dea9657ccc2791c0202d9074a4782c1e) ) |
| 298 | 294 | // ROM_CART_LOAD(0, "bin", 0x8000, 0x7f00, 0) |
| 299 | | |
| 300 | | ROM_REGION( 0x8000, "cart", ROMREGION_ERASE00 ) |
| 301 | 295 | ROM_END |
| 302 | 296 | |
| 303 | 297 | static DRIVER_INIT( gmaster ) |
src/mess/drivers/vboy.c
| r7918 | r7919 | |
| 4 | 4 | |
| 5 | 5 | 12/05/2009 Skeleton driver. |
| 6 | 6 | |
| 7 | | Great info at http://www.goliathindustries.com/vb/ and http://www.vr32.de/modules/dokuwiki/doku.php? |
| 7 | Great info at http://www.goliathindustries.com/vb/ |
| 8 | and http://www.vr32.de/modules/dokuwiki/doku.php? |
| 8 | 9 | |
| 9 | 10 | ****************************************************************************/ |
| 10 | 11 | |
| r7918 | r7919 | |
| 668 | 669 | palette_set_colors(machine, 0, vboy_palette, ARRAY_LENGTH(vboy_palette)); |
| 669 | 670 | } |
| 670 | 671 | |
| 672 | static DEVICE_IMAGE_LOAD( vboy_cart ) |
| 673 | { |
| 674 | UINT32 size; |
| 675 | UINT8 *ptr = memory_region(image->machine, "user1"); |
| 676 | |
| 677 | if (image_software_entry(image) == NULL) |
| 678 | { |
| 679 | size = image_length(image); |
| 680 | if (image_fread(image, ptr, size) != size) |
| 681 | return INIT_FAIL; |
| 682 | } |
| 683 | else |
| 684 | { |
| 685 | size = image_get_software_region_length(image, "rom"); |
| 686 | memcpy(ptr, image_get_software_region(image, "rom"), size); |
| 687 | } |
| 688 | |
| 689 | return INIT_PASS; |
| 690 | } |
| 691 | |
| 671 | 692 | static MACHINE_DRIVER_START( vboy ) |
| 672 | 693 | |
| 673 | 694 | MDRV_DRIVER_DATA( vboy_state ) |
| r7918 | r7919 | |
| 708 | 729 | |
| 709 | 730 | /* cartridge */ |
| 710 | 731 | MDRV_CARTSLOT_ADD("cart") |
| 711 | | MDRV_CARTSLOT_EXTENSION_LIST("vb, bin") |
| 732 | MDRV_CARTSLOT_EXTENSION_LIST("vb,bin") |
| 733 | MDRV_CARTSLOT_MANDATORY |
| 734 | MDRV_CARTSLOT_INTERFACE("vboy_cart") |
| 735 | MDRV_CARTSLOT_LOAD(vboy_cart) |
| 736 | |
| 737 | /* software lists */ |
| 738 | MDRV_SOFTWARE_LIST_ADD("vboy") |
| 712 | 739 | MACHINE_DRIVER_END |
| 713 | 740 | |
| 714 | 741 | /* ROM definition */ |
| 715 | 742 | ROM_START( vboy ) |
| 716 | | ROM_REGION( 0x200000, "user1", 0 ) |
| 717 | | ROM_CART_LOAD("cart", 0x0000, 0x200000, ROM_MIRROR) |
| 743 | ROM_REGION( 0x200000, "user1", ROMREGION_ERASE00 ) |
| 718 | 744 | ROM_END |
| 719 | 745 | |
| 720 | 746 | /* Driver */ |
src/mess/drivers/pv1000.c
| r7918 | r7919 | |
| 171 | 171 | |
| 172 | 172 | static DEVICE_IMAGE_LOAD( pv1000_cart ) |
| 173 | 173 | { |
| 174 | | UINT8 *cart = memory_region( image->machine, "cart" ); |
| 175 | | int size = image_length( image ); |
| 174 | UINT8 *cart = memory_region(image->machine, "cart"); |
| 175 | UINT32 size; |
| 176 | |
| 177 | if (image_software_entry(image) == NULL) |
| 178 | size = image_length(image); |
| 179 | else |
| 180 | size = image_get_software_region_length(image, "rom"); |
| 181 | |
| 176 | 182 | |
| 177 | | if ( size != 0x2000 && size != 0x4000 ) |
| 183 | if (size != 0x2000 && size != 0x4000) |
| 178 | 184 | { |
| 179 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size" ); |
| 185 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); |
| 180 | 186 | return INIT_FAIL; |
| 181 | 187 | } |
| 182 | 188 | |
| 183 | | if ( image_fread( image, cart, size ) != size ) |
| 189 | if (image_software_entry(image) == NULL) |
| 184 | 190 | { |
| 185 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file" ); |
| 186 | | return INIT_FAIL; |
| 191 | if (image_fread(image, cart, size) != size) |
| 192 | { |
| 193 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file"); |
| 194 | return INIT_FAIL; |
| 195 | } |
| 187 | 196 | } |
| 197 | else |
| 198 | memcpy(cart, image_get_software_region(image, "rom"), size); |
| 199 | |
| 188 | 200 | |
| 189 | 201 | /* Mirror 8KB rom */ |
| 190 | | if ( size == 0x2000 ) |
| 191 | | { |
| 192 | | memcpy( cart+0x2000, cart, 0x2000 ); |
| 193 | | } |
| 202 | if (size == 0x2000) |
| 203 | memcpy(cart + 0x2000, cart, 0x2000); |
| 194 | 204 | |
| 195 | 205 | return INIT_PASS; |
| 196 | 206 | } |
| r7918 | r7919 | |
| 345 | 355 | MDRV_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 ) |
| 346 | 356 | |
| 347 | 357 | /* Cartridge slot */ |
| 348 | | MDRV_CARTSLOT_ADD( "cart" ) |
| 349 | | MDRV_CARTSLOT_EXTENSION_LIST( "bin" ) |
| 358 | MDRV_CARTSLOT_ADD("cart") |
| 359 | MDRV_CARTSLOT_EXTENSION_LIST("bin") |
| 350 | 360 | MDRV_CARTSLOT_MANDATORY |
| 351 | | MDRV_CARTSLOT_LOAD( pv1000_cart ) |
| 361 | MDRV_CARTSLOT_INTERFACE("pv1000_cart") |
| 362 | MDRV_CARTSLOT_LOAD(pv1000_cart) |
| 363 | |
| 364 | /* Software lists */ |
| 365 | MDRV_SOFTWARE_LIST_ADD("pv1000") |
| 352 | 366 | MACHINE_DRIVER_END |
| 353 | 367 | |
| 354 | 368 | |
src/mess/drivers/ngp.c
| r7918 | r7919 | |
| 487 | 487 | |
| 488 | 488 | |
| 489 | 489 | static ADDRESS_MAP_START( ngp_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 490 | | AM_RANGE( 0x000080, 0x0000bf ) AM_READWRITE( ngp_io_r, ngp_io_w ) /* ngp/c specific i/o */ |
| 491 | | AM_RANGE( 0x004000, 0x006fff ) AM_RAM /* work ram */ |
| 492 | | AM_RANGE( 0x007000, 0x007fff ) AM_RAM AM_SHARE("share1") /* shared with sound cpu */ |
| 493 | | AM_RANGE( 0x008000, 0x0087ff ) AM_DEVREADWRITE( "k1ge", k1ge_r, k1ge_w ) /* video registers */ |
| 494 | | AM_RANGE( 0x008800, 0x00bfff ) AM_RAM AM_REGION("vram", 0x800 ) /* Video RAM area */ |
| 495 | | AM_RANGE( 0x200000, 0x3fffff ) AM_ROM AM_WRITE( flash0_w ) AM_REGION( "cart", 0 ) /* cart area #1 */ |
| 496 | | AM_RANGE( 0x800000, 0x9fffff ) AM_ROM AM_WRITE( flash1_w ) AM_REGION( "cart", 0x200000 ) /* cart area #2 */ |
| 497 | | AM_RANGE( 0xff0000, 0xffffff ) AM_ROM AM_REGION( "maincpu", 0 ) /* system rom */ |
| 490 | AM_RANGE( 0x000080, 0x0000bf ) AM_READWRITE(ngp_io_r, ngp_io_w) /* ngp/c specific i/o */ |
| 491 | AM_RANGE( 0x004000, 0x006fff ) AM_RAM /* work ram */ |
| 492 | AM_RANGE( 0x007000, 0x007fff ) AM_RAM AM_SHARE("share1") /* shared with sound cpu */ |
| 493 | AM_RANGE( 0x008000, 0x0087ff ) AM_DEVREADWRITE("k1ge", k1ge_r, k1ge_w) /* video registers */ |
| 494 | AM_RANGE( 0x008800, 0x00bfff ) AM_RAM AM_REGION("vram", 0x800 ) /* Video RAM area */ |
| 495 | AM_RANGE( 0x200000, 0x3fffff ) AM_ROM AM_WRITE(flash0_w) AM_REGION("cart", 0) /* cart area #1 */ |
| 496 | AM_RANGE( 0x800000, 0x9fffff ) AM_ROM AM_WRITE(flash1_w) AM_REGION("cart", 0x200000) /* cart area #2 */ |
| 497 | AM_RANGE( 0xff0000, 0xffffff ) AM_ROM AM_REGION("maincpu", 0) /* system rom */ |
| 498 | 498 | ADDRESS_MAP_END |
| 499 | 499 | |
| 500 | 500 | |
| r7918 | r7919 | |
| 639 | 639 | static DEVICE_START( ngp_cart ) |
| 640 | 640 | { |
| 641 | 641 | ngp_state *state = (ngp_state *)device->machine->driver_data; |
| 642 | | UINT8 *cart = memory_region( device->machine, "cart" ); |
| 642 | UINT8 *cart = memory_region(device->machine, "cart"); |
| 643 | 643 | |
| 644 | 644 | state->flash_chip[0].present = 0; |
| 645 | 645 | state->flash_chip[0].state = F_READ; |
| r7918 | r7919 | |
| 654 | 654 | static DEVICE_IMAGE_LOAD( ngp_cart ) |
| 655 | 655 | { |
| 656 | 656 | ngp_state *state = (ngp_state *)image->machine->driver_data; |
| 657 | | int filesize = image_length( image ); |
| 657 | UINT32 filesize; |
| 658 | 658 | |
| 659 | | if ( filesize != 0x80000 && filesize != 0x100000 && filesize != 0x200000 && filesize != 0x400000 ) |
| 659 | if (image_software_entry(image) == NULL) |
| 660 | 660 | { |
| 661 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Incorrect or not support cartridge size" ); |
| 662 | | return INIT_FAIL; |
| 661 | filesize = image_length(image); |
| 662 | |
| 663 | if (filesize != 0x80000 && filesize != 0x100000 && filesize != 0x200000 && filesize != 0x400000) |
| 664 | { |
| 665 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Incorrect or not support cartridge size"); |
| 666 | return INIT_FAIL; |
| 667 | } |
| 668 | |
| 669 | if (image_fread(image, memory_region(image->machine, "cart"), filesize) != filesize) |
| 670 | { |
| 671 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Error loading file"); |
| 672 | return INIT_FAIL; |
| 673 | } |
| 663 | 674 | } |
| 664 | | |
| 665 | | if ( image_fread( image, memory_region(image->machine, "cart"), filesize ) != filesize ) |
| 675 | else |
| 666 | 676 | { |
| 667 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Error loading file" ); |
| 668 | | return INIT_FAIL; |
| 677 | filesize = image_get_software_region_length(image, "rom"); |
| 678 | memcpy(memory_region(image->machine, "cart"), image_get_software_region(image, "rom"), filesize); |
| 669 | 679 | } |
| 670 | | |
| 680 | |
| 671 | 681 | state->flash_chip[0].manufacturer_id = 0x98; |
| 672 | 682 | switch( filesize ) |
| 673 | 683 | { |
| r7918 | r7919 | |
| 790 | 800 | MDRV_SOUND_ROUTE( ALL_OUTPUTS, "lspeaker", 0.50 ) |
| 791 | 801 | MDRV_SOUND_ADD( "dac_r", DAC, 0 ) |
| 792 | 802 | MDRV_SOUND_ROUTE( ALL_OUTPUTS, "rspeaker", 0.50 ) |
| 793 | | |
| 794 | | MDRV_CARTSLOT_ADD("cart") |
| 795 | | MDRV_CARTSLOT_EXTENSION_LIST("bin,ngp,npc,ngc") |
| 796 | | MDRV_CARTSLOT_NOT_MANDATORY |
| 797 | | MDRV_CARTSLOT_START( ngp_cart ) |
| 798 | | MDRV_CARTSLOT_LOAD( ngp_cart ) |
| 799 | | MDRV_CARTSLOT_UNLOAD( ngp_cart ) |
| 800 | 803 | MACHINE_DRIVER_END |
| 801 | 804 | |
| 802 | 805 | |
| r7918 | r7919 | |
| 807 | 810 | MDRV_PALETTE_INIT( k1ge ) |
| 808 | 811 | |
| 809 | 812 | MDRV_K1GE_ADD( "k1ge", XTAL_6_144MHz, ngp_k1ge_interface ) |
| 813 | |
| 814 | MDRV_CARTSLOT_ADD("cart") |
| 815 | MDRV_CARTSLOT_EXTENSION_LIST("bin,ngp,npc,ngc") |
| 816 | MDRV_CARTSLOT_NOT_MANDATORY |
| 817 | MDRV_CARTSLOT_START(ngp_cart) |
| 818 | MDRV_CARTSLOT_INTERFACE("ngp_cart") |
| 819 | MDRV_CARTSLOT_UNLOAD(ngp_cart) |
| 820 | MDRV_SOFTWARE_LIST_ADD("ngp") |
| 810 | 821 | MACHINE_DRIVER_END |
| 811 | 822 | |
| 812 | 823 | |
| r7918 | r7919 | |
| 817 | 828 | MDRV_PALETTE_INIT( k2ge ) |
| 818 | 829 | |
| 819 | 830 | MDRV_K2GE_ADD( "k1ge", XTAL_6_144MHz, ngp_k1ge_interface ) |
| 831 | |
| 832 | MDRV_CARTSLOT_ADD("cart") |
| 833 | MDRV_CARTSLOT_EXTENSION_LIST("bin,ngp,npc,ngc") |
| 834 | MDRV_CARTSLOT_NOT_MANDATORY |
| 835 | MDRV_CARTSLOT_START(ngp_cart) |
| 836 | MDRV_CARTSLOT_LOAD(ngp_cart) |
| 837 | MDRV_CARTSLOT_INTERFACE("ngp_cart") |
| 838 | MDRV_CARTSLOT_UNLOAD(ngp_cart) |
| 839 | MDRV_SOFTWARE_LIST_ADD("ngp") |
| 820 | 840 | MACHINE_DRIVER_END |
| 821 | 841 | |
| 822 | 842 | |
src/mess/drivers/supracan.c
| r7918 | r7919 | |
| 920 | 920 | |
| 921 | 921 | static DEVICE_IMAGE_LOAD( supracan_cart ) |
| 922 | 922 | { |
| 923 | | UINT8 *cart = memory_region( image->machine, "cart" ); |
| 924 | | int size = image_length( image ); |
| 923 | UINT8 *cart = memory_region(image->machine, "cart"); |
| 924 | UINT32 size; |
| 925 | 925 | |
| 926 | | if ( size > 0x400000 ) |
| 926 | if (image_software_entry(image) == NULL) |
| 927 | 927 | { |
| 928 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size" ); |
| 929 | | return INIT_FAIL; |
| 928 | size = image_length(image); |
| 929 | |
| 930 | if (size > 0x400000) |
| 931 | { |
| 932 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); |
| 933 | return INIT_FAIL; |
| 934 | } |
| 935 | |
| 936 | if (image_fread(image, cart, size) != size) |
| 937 | { |
| 938 | image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file"); |
| 939 | return INIT_FAIL; |
| 940 | } |
| 930 | 941 | } |
| 931 | | |
| 932 | | if ( image_fread( image, cart, size ) != size ) |
| 942 | else |
| 933 | 943 | { |
| 934 | | image_seterror( image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file" ); |
| 935 | | return INIT_FAIL; |
| 944 | size = image_get_software_region_length(image, "rom"); |
| 945 | memcpy(cart, image_get_software_region(image, "rom"), size); |
| 936 | 946 | } |
| 937 | 947 | |
| 938 | 948 | return INIT_PASS; |
| r7918 | r7919 | |
| 1026 | 1036 | MDRV_PALETTE_INIT( supracan ) |
| 1027 | 1037 | MDRV_GFXDECODE( supracan ) |
| 1028 | 1038 | |
| 1029 | | MDRV_CARTSLOT_ADD( "cart" ) |
| 1030 | | MDRV_CARTSLOT_EXTENSION_LIST( "bin" ) |
| 1039 | MDRV_CARTSLOT_ADD("cart") |
| 1040 | MDRV_CARTSLOT_EXTENSION_LIST("bin") |
| 1031 | 1041 | MDRV_CARTSLOT_MANDATORY |
| 1032 | | MDRV_CARTSLOT_LOAD( supracan_cart ) |
| 1042 | MDRV_CARTSLOT_INTERFACE("supracan_cart") |
| 1043 | MDRV_CARTSLOT_LOAD(supracan_cart) |
| 1033 | 1044 | |
| 1045 | MDRV_SOFTWARE_LIST_ADD("supracan") |
| 1046 | |
| 1034 | 1047 | MDRV_VIDEO_START( supracan ) |
| 1035 | 1048 | MDRV_VIDEO_UPDATE( supracan ) |
| 1036 | 1049 | MACHINE_DRIVER_END |