hash/vic1001_cart.xml
| r14506 | r14507 | |
| 6 | 6 | Missing stuff: |
| 7 | 7 | |
| 8 | 8 | - Behr Bonz multicart |
| 9 | | - Mega-Cart |
| 10 | 9 | - Ultra Vic-20 Cart |
| 11 | | - Vic Flash Plugin |
| 12 | | - Final Expansion 3 |
| 13 | 10 | - Speech Synthesizer (SP-0256-AL2) |
| 14 | | - |
| 15 | 11 | |
| 16 | 12 | http://sleepingelephant.com/denial/wiki/index.php?title=Cartridges |
| 17 | 13 | http://www.digitpress.com/the_digs/vic20/texts/vic-rare.htm |
| r14506 | r14507 | |
| 1327 | 1323 | </part> |
| 1328 | 1324 | </software> |
| 1329 | 1325 | |
| 1326 | <software name="fe3"> |
| 1327 | <description>Final Expansion 3</description> |
| 1328 | <year>2011</year> |
| 1329 | <publisher>Denial</publisher> |
| 1330 | <info name="serial" value="VIC-2011" /> |
| 1331 | <sharedfeat name="compatibility" value="NTSC,PAL"/> |
| 1332 | <part name="cart" interface="vic1001_cart"> |
| 1333 | <feature name="slot" value="fe" /> |
| 1334 | <dataarea name="rom" size="0x80000"> |
| 1335 | <rom name="fe3vice-r020.bin" size="0x80000" crc="c12d844a" sha1="3946b6595f4ac0469a9fd97e4cd156618e868deb" offset="0x0000" /> |
| 1336 | </dataarea> |
| 1337 | <dataarea name="ram" size="0x80000"> |
| 1338 | </part> |
| 1339 | </software> |
| 1340 | |
| 1330 | 1341 | <software name="finalorb"> |
| 1331 | 1342 | <description>Final Orbit + Bumper Bash (NTSC)</description> |
| 1332 | 1343 | <year>1983</year> |
| r14506 | r14507 | |
| 1901 | 1912 | </part> |
| 1902 | 1913 | </software> |
| 1903 | 1914 | |
| 1915 | <software name="megacart"> |
| 1916 | <description>Mega-Cart</description> |
| 1917 | <year>2008</year> |
| 1918 | <publisher>Denial</publisher> |
| 1919 | <info name="serial" value="MC-2008" /> |
| 1920 | <sharedfeat name="compatibility" value="NTSC,PAL"/> |
| 1921 | <part name="cart" interface="vic1001_cart"> |
| 1922 | <feature name="slot" value="megacart" /> |
| 1923 | <dataarea name="rom" size="0x200000"> |
| 1924 | <rom name="megacart.rom" size="0x200000" crc="787551d4" sha1="c4854de023c25dc827af3bebed76d2ff86eaf0ce" offset="0x0000" /> |
| 1925 | </dataarea> |
| 1926 | <dataarea name="ram" size="0x8000"> |
| 1927 | </part> |
| 1928 | </software> |
| 1929 | |
| 1904 | 1930 | <software name="meteorun"> |
| 1905 | 1931 | <description>Meteor Run (PAL)</description> |
| 1906 | 1932 | <year>1982</year> |
| r14506 | r14507 | |
| 3470 | 3496 | </part> |
| 3471 | 3497 | </software> |
| 3472 | 3498 | |
| 3499 | <software name="fp"> |
| 3500 | <description>Vic Flash Plugin</description> |
| 3501 | <year>2008</year> |
| 3502 | <publisher>Marko Mäkelä</publisher> |
| 3503 | <sharedfeat name="compatibility" value="NTSC,PAL"/> |
| 3504 | <part name="cart" interface="vic1001_cart"> |
| 3505 | <feature name="slot" value="fp" /> |
| 3506 | <dataarea name="rom" size="0x400000"> |
| 3507 | <rom name="menu-s.bin" size="0x400000" crc="de4f023b" sha1="164666798dfcee7d6b86a39548af4a97d72c0852" offset="0x0000" /> |
| 3508 | </dataarea> |
| 3509 | </part> |
| 3510 | </software> |
| 3511 | |
| 3473 | 3512 | <software name="forth11"> |
| 3474 | 3513 | <description>VIC Forth v1.1</description> |
| 3475 | 3514 | <year>1982</year> |
hash/c64_cart.xml
| r14506 | r14507 | |
| 1399 | 1399 | </dataarea> |
| 1400 | 1400 | </part> |
| 1401 | 1401 | </software> |
| 1402 | |
| 1403 | <software name="mmcr"> |
| 1404 | <description>MMC Replay v0.55</description> |
| 1405 | <year>2008</year> |
| 1406 | <publisher>Protovision</publisher> |
| 1407 | <part name="cart" interface="c64_cart"> |
| 1408 | <feature name="slot" value="mmc_replay" /> |
| 1409 | <feature name="exrom" value="0" /> |
| 1410 | <feature name="game" value="0" /> |
| 1411 | <dataarea name="roml" size="0x10000"> |
| 1412 | <rom name="mmcrbios.bin" size="0x10000" crc="63E35CA8" sha1="165934CEE24FE6BCDDEFD370288B58E01AC985D8" offset="0x0000" /> |
| 1413 | </dataarea> |
| 1414 | </part> |
| 1415 | </software> |
| 1416 | |
| 1417 | <software name="mmc64"> |
| 1418 | <description>MMC64 v1.10</description> |
| 1419 | <year>2007</year> |
| 1420 | <publisher>Protovision</publisher> |
| 1421 | <part name="cart" interface="c64_cart"> |
| 1422 | <feature name="slot" value="mmc64" /> |
| 1423 | <feature name="exrom" value="0" /> |
| 1424 | <feature name="game" value="0" /> |
| 1425 | <dataarea name="roml" size="0x2000"> |
| 1426 | <rom name="mmc64v1b.bin" size="0x2000" crc="c6255ad9" sha1="0fc4516ae9fc24da1a4e008ccdb876e765aaf640" offset="0x0000" /> |
| 1427 | </dataarea> |
| 1428 | </part> |
| 1429 | </software> |
| 1402 | 1430 | |
| 1431 | <software name="rr"> |
| 1432 | <description>Retro Replay v3.8P</description> |
| 1433 | <year>2006</year> |
| 1434 | <publisher>CyberpunX</publisher> |
| 1435 | <sharedfeat name="compatibility" value="PAL"/> |
| 1436 | <part name="cart" interface="c64_cart"> |
| 1437 | <feature name="slot" value="retro_replay" /> |
| 1438 | <feature name="exrom" value="0" /> |
| 1439 | <feature name="game" value="0" /> |
| 1440 | <dataarea name="roml" size="0x10000"> |
| 1441 | <rom name="rr38ppal.bin" size="0x10000" crc="fa52afac" sha1="48381d924a20978319ead8de7c904c91f270cc65" offset="0x0000" /> |
| 1442 | </dataarea> |
| 1443 | </part> |
| 1444 | </software> |
| 1445 | |
| 1403 | 1446 | <!-- Games Added by k1w1 --> |
| 1404 | 1447 | |
| 1405 | 1448 | <software name="advcrtor"> |
src/mess/machine/c64exp.c
| r14506 | r14507 | |
| 11 | 11 | #include "emuopts.h" |
| 12 | 12 | #include "machine/c64exp.h" |
| 13 | 13 | #include "formats/cbm_crt.h" |
| 14 | #include "formats/imageutl.h" |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | |
| 17 | 18 | //************************************************************************** |
| 19 | // MACROS/CONSTANTS |
| 20 | //************************************************************************** |
| 21 | |
| 22 | #define LOG 0 |
| 23 | |
| 24 | |
| 25 | |
| 26 | //************************************************************************** |
| 18 | 27 | // DEVICE DEFINITIONS |
| 19 | 28 | //************************************************************************** |
| 20 | 29 | |
| r14506 | r14507 | |
| 200 | 209 | } |
| 201 | 210 | else if (!mame_stricmp(filetype(), "a0")) |
| 202 | 211 | { |
| 203 | | fread(m_cart->c64_romh_pointer(machine(), 0x2000), size); |
| 212 | fread(m_cart->c64_romh_pointer(machine(), 0x2000), 0x2000); |
| 204 | 213 | |
| 214 | m_cart->c64_exrom_w(0); |
| 205 | 215 | m_cart->c64_game_w(0); |
| 206 | | m_cart->c64_exrom_w(0); |
| 207 | 216 | } |
| 208 | 217 | else if (!mame_stricmp(filetype(), "e0")) |
| 209 | 218 | { |
| 210 | | fread(m_cart->c64_romh_pointer(machine(), 0x2000), size); |
| 219 | fread(m_cart->c64_romh_pointer(machine(), 0x2000), 0x2000); |
| 211 | 220 | |
| 212 | 221 | m_cart->c64_game_w(0); |
| 213 | 222 | } |
| 214 | | } |
| 215 | | else |
| 216 | | { |
| 217 | | if (get_feature("slot") == NULL) |
| 223 | else if (!mame_stricmp(filetype(), "crt")) |
| 218 | 224 | { |
| 219 | | size = get_software_region_length("roml"); |
| 225 | // read the header |
| 226 | cbm_crt_header header; |
| 227 | fread(&header, CRT_HEADER_LENGTH); |
| 228 | |
| 229 | if (memcmp(header.signature, CRT_SIGNATURE, 16) != 0) |
| 230 | return IMAGE_INIT_FAIL; |
| 231 | |
| 232 | UINT16 hardware = pick_integer_be(header.hardware, 0, 2); |
| 233 | |
| 234 | // TODO support other cartridge hardware |
| 235 | if (hardware != CRT_C64_STANDARD) |
| 236 | return IMAGE_INIT_FAIL; |
| 237 | |
| 238 | if (LOG) |
| 239 | { |
| 240 | logerror("Name: %s\n", header.name); |
| 241 | logerror("Hardware: %04x\n", hardware); |
| 242 | logerror("Slot device: %s\n", CRT_C64_SLOT_NAMES[hardware]); |
| 243 | logerror("EXROM: %u\n", header.exrom); |
| 244 | logerror("GAME: %u\n", header.game); |
| 245 | } |
| 246 | |
| 247 | // determine ROM region lengths |
| 248 | size_t roml_size = 0; |
| 249 | size_t romh_size = 0; |
| 250 | |
| 251 | while (!image_feof()) |
| 252 | { |
| 253 | cbm_crt_chip chip; |
| 254 | fread(&chip, CRT_CHIP_LENGTH); |
| 255 | |
| 256 | UINT16 address = pick_integer_be(chip.start_address, 0, 2); |
| 257 | UINT16 size = pick_integer_be(chip.image_size, 0, 2); |
| 258 | UINT16 type = pick_integer_be(chip.chip_type, 0, 2); |
| 259 | |
| 260 | if (LOG) |
| 261 | { |
| 262 | logerror("CHIP Address: %04x\n", address); |
| 263 | logerror("CHIP Size: %04x\n", size); |
| 264 | logerror("CHIP Type: %04x\n", type); |
| 265 | } |
| 266 | |
| 267 | switch (address) |
| 268 | { |
| 269 | case 0x8000: roml_size += size; break; |
| 270 | case 0xa000: romh_size += size; break; |
| 271 | case 0xe000: romh_size += size; break; |
| 272 | default: logerror("Invalid CHIP loading address!\n"); break; |
| 273 | } |
| 274 | |
| 275 | fseek(size, SEEK_CUR); |
| 276 | } |
| 220 | 277 | |
| 221 | | switch (size) |
| 278 | // allocate cartridge memory |
| 279 | UINT8 *roml = NULL; |
| 280 | UINT8 *romh = NULL; |
| 281 | |
| 282 | if (roml_size) roml = m_cart->c64_roml_pointer(machine(), roml_size); |
| 283 | if (romh_size) romh = m_cart->c64_romh_pointer(machine(), romh_size); |
| 284 | |
| 285 | // read the data |
| 286 | offs_t roml_offset = 0; |
| 287 | offs_t romh_offset = 0; |
| 288 | |
| 289 | fseek(CRT_HEADER_LENGTH, SEEK_SET); |
| 290 | |
| 291 | while (!image_feof()) |
| 222 | 292 | { |
| 223 | | case 0x2000: |
| 224 | | memcpy(m_cart->c64_roml_pointer(machine(), 0x2000), get_software_region("roml"), size); |
| 293 | cbm_crt_chip chip; |
| 294 | fread(&chip, CRT_CHIP_LENGTH); |
| 295 | |
| 296 | UINT16 address = pick_integer_be(chip.start_address, 0, 2); |
| 297 | UINT16 size = pick_integer_be(chip.image_size, 0, 2); |
| 225 | 298 | |
| 226 | | size = get_software_region_length("romh"); |
| 227 | | if (size) memcpy(m_cart->c64_romh_pointer(machine(), 0x2000), get_software_region("romh"), size); |
| 228 | | break; |
| 229 | | |
| 230 | | case 0x4000: |
| 231 | | memcpy(m_cart->c64_roml_pointer(machine(), 0x2000), get_software_region("roml"), 0x2000); |
| 232 | | memcpy(m_cart->c64_romh_pointer(machine(), 0x2000), get_software_region("roml") + 0x2000, 0x2000); |
| 233 | | break; |
| 234 | | |
| 235 | | default: |
| 236 | | memcpy(m_cart->c64_roml_pointer(machine(), size), get_software_region("roml"), size); |
| 237 | | break; |
| 299 | switch (address) |
| 300 | { |
| 301 | case 0x8000: fread(roml + roml_offset, size); roml_offset += size; break; |
| 302 | case 0xa000: fread(romh + romh_offset, size); romh_offset += size; break; |
| 303 | case 0xe000: fread(romh + romh_offset, size); romh_offset += size; break; |
| 304 | } |
| 238 | 305 | } |
| 239 | | } |
| 240 | | else |
| 241 | | { |
| 242 | | size = get_software_region_length("roml"); |
| 243 | | if (size) memcpy(m_cart->c64_roml_pointer(machine(), size), get_software_region("roml"), size); |
| 244 | 306 | |
| 245 | | size = get_software_region_length("romh"); |
| 246 | | if (size) memcpy(m_cart->c64_romh_pointer(machine(), size), get_software_region("romh"), size); |
| 247 | | |
| 248 | | size = get_software_region_length("ram"); |
| 249 | | if (size) memset(m_cart->c64_ram_pointer(machine(), size), 0, size); |
| 307 | m_cart->c64_exrom_w(header.exrom); |
| 308 | m_cart->c64_game_w(header.game); |
| 250 | 309 | } |
| 310 | } |
| 311 | else |
| 312 | { |
| 313 | size = get_software_region_length("roml"); |
| 314 | if (size) memcpy(m_cart->c64_roml_pointer(machine(), size), get_software_region("roml"), size); |
| 315 | |
| 316 | size = get_software_region_length("romh"); |
| 317 | if (size) memcpy(m_cart->c64_romh_pointer(machine(), size), get_software_region("romh"), size); |
| 251 | 318 | |
| 319 | size = get_software_region_length("ram"); |
| 320 | if (size) memset(m_cart->c64_ram_pointer(machine(), size), 0, size); |
| 321 | |
| 322 | m_cart->c64_exrom_w(atol(get_feature("exrom"))); |
| 252 | 323 | m_cart->c64_game_w(atol(get_feature("game"))); |
| 253 | | m_cart->c64_exrom_w(atol(get_feature("exrom"))); |
| 254 | 324 | } |
| 255 | 325 | } |
| 256 | 326 | |