trunk/hash/aim65_cart.xml
| r0 | r22626 | |
| 1 | <?xml version="1.0"?> |
| 2 | <!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> |
| 3 | <softwarelist name="aim65_cart" description="Rockwell AIM 65 cartridges"> |
| 4 | |
| 5 | <!-- |
| 6 | |
| 7 | There are 5 ROM sockets on the AIM 65 PCB: 2 sockets were for the boot strap and 3 sockets for software roms, |
| 8 | at locations z24, z25, and z26. |
| 9 | |
| 10 | There are the BASIC ROMs, PL65 and FORTH. Each has 2 ROMs and they all work. |
| 11 | |
| 12 | The Assembler ROM works. The Mathpack does not work (it needs another ROM which is missing). |
| 13 | |
| 14 | --> |
| 15 | |
| 16 | <software name="assemblr"> |
| 17 | <description>Assembler</description> |
| 18 | <year>197?</year> |
| 19 | <publisher><unknown></publisher> |
| 20 | <info name="usage" value="Load in "cart3", then press N to start"/> |
| 21 | |
| 22 | <part name="cart" interface="aim65_cart"> |
| 23 | <dataarea name="z24" size="4096"> |
| 24 | <rom name="assembler.z24" size="4096" crc="0878b399" sha1="483e92b57d64be51643a9f6490521a8572aa2f68" offset="0x0000" /> |
| 25 | </dataarea> |
| 26 | </part> |
| 27 | </software> |
| 28 | |
| 29 | <software name="basic11"> |
| 30 | <description>AIM 65 BASIC v1.1</description> |
| 31 | <year>1978</year> |
| 32 | <publisher>Microsoft</publisher> |
| 33 | <info name="usage" value="Load both in "cart1" and "cart2", then press 5 to start"/> |
| 34 | |
| 35 | <part name="cart" interface="aim65_cart"> |
| 36 | <dataarea name="z25" size="4096"> |
| 37 | <rom name="basic.z25" size="4096" crc="d7b42d2a" sha1="4bbdb28d332429825adea0266ed9192786d9e392" offset="0x0000" /> |
| 38 | </dataarea> |
| 39 | |
| 40 | <dataarea name="z26" size="4096"> |
| 41 | <rom name="basic.z26" size="4096" crc="36a61f39" sha1="f5ce0126cb594a565e730973fd140d03c298cefa" offset="0x0000" /> |
| 42 | </dataarea> |
| 43 | </part> |
| 44 | </software> |
| 45 | |
| 46 | <software name="forth13"> |
| 47 | <description>AIM 65 FORTH v1.3</description> |
| 48 | <year>197?</year> |
| 49 | <publisher><unknown></publisher> |
| 50 | <info name="usage" value="Load both in "cart1" and "cart2", then press 5 to start"/> |
| 51 | |
| 52 | <part name="cart" interface="aim65_cart"> |
| 53 | <dataarea name="z25" size="4096"> |
| 54 | <rom name="forth v1.3.z25" size="4096" crc="0671d019" sha1="dd2a1613e435c833634100cf4a22c6cff70c7a26" offset="0x0000" /> |
| 55 | </dataarea> |
| 56 | |
| 57 | <dataarea name="z26" size="4096"> |
| 58 | <rom name="forth v1.3.z26" size="4096" crc="a80ad472" sha1="42a2e8c86829a2fe48090e6665ff9fe25b12b070" offset="0x0000" /> |
| 59 | </dataarea> |
| 60 | </part> |
| 61 | </software> |
| 62 | |
| 63 | <software name="mathpack" supported="no"> |
| 64 | <description>Mathpack</description> |
| 65 | <year>197?</year> |
| 66 | <publisher><unknown></publisher> |
| 67 | |
| 68 | <part name="cart" interface="aim65_cart"> |
| 69 | <dataarea name="z24" size="4096"> |
| 70 | <rom name="mathpack.z24" size="4096" crc="4889af55" sha1="5e9541ddfc06e3802d09b30d1bd89c5da914c76e" offset="0x0000" /> |
| 71 | </dataarea> |
| 72 | </part> |
| 73 | </software> |
| 74 | |
| 75 | <software name="pl65"> |
| 76 | <description>AIM 65 PL/65 v1.0</description> |
| 77 | <year>1978</year> |
| 78 | <publisher>Rockwell</publisher> |
| 79 | <info name="usage" value="Load both in "cart1" and "cart2", then press 5 to start"/> |
| 80 | |
| 81 | <part name="cart" interface="aim65_cart"> |
| 82 | <dataarea name="z25" size="4096"> |
| 83 | <rom name="pl65 v1.0.z25" size="4096" crc="76dcf864" sha1="e937c54ed109401f796640cd45b27dfefb76667e" offset="0x0000" /> |
| 84 | </dataarea> |
| 85 | |
| 86 | <dataarea name="z26" size="4096"> |
| 87 | <rom name="pl65 v1.0.z26" size="4096" crc="2ac71abd" sha1="6df5e3125bebefac80d51d9337555f54bdf0d8ea" offset="0x0000" /> |
| 88 | </dataarea> |
| 89 | </part> |
| 90 | </software> |
| 91 | |
| 92 | </softwarelist> |
trunk/src/mess/drivers/aim65.c
| r22625 | r22626 | |
| 255 | 255 | MACHINE DRIVERS |
| 256 | 256 | ***************************************************************************/ |
| 257 | 257 | |
| 258 | struct aim_cart_range |
| 259 | { |
| 260 | const char *tag; |
| 261 | int offset; |
| 262 | }; |
| 263 | |
| 264 | static const struct aim_cart_range aim_cart_table[] = |
| 265 | { |
| 266 | { ":z24", 0xd000 }, |
| 267 | { ":z25", 0xc000 }, |
| 268 | { ":z26", 0xb000 }, |
| 269 | { 0 } |
| 270 | }; |
| 271 | |
| 272 | DEVICE_IMAGE_LOAD_MEMBER( aim65_state, aim65_cart ) |
| 273 | { |
| 274 | UINT32 size; |
| 275 | UINT8 *temp_copy; |
| 276 | const struct aim_cart_range *aim_cart = &aim_cart_table[0], *this_cart; |
| 277 | |
| 278 | /* First, determine where this cart has to be loaded */ |
| 279 | while (aim_cart->tag) |
| 280 | { |
| 281 | if (strcmp(aim_cart->tag, image.device().tag()) == 0) |
| 282 | break; |
| 283 | |
| 284 | aim_cart++; |
| 285 | } |
| 286 | |
| 287 | this_cart = aim_cart; |
| 288 | |
| 289 | if (!this_cart->tag) |
| 290 | { |
| 291 | astring errmsg; |
| 292 | errmsg.printf("Tag '%s' could not be found", image.device().tag()); |
| 293 | image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.cstr()); |
| 294 | return IMAGE_INIT_FAIL; |
| 295 | } |
| 296 | |
| 297 | if (image.software_entry() == NULL) |
| 298 | { |
| 299 | size = image.length(); |
| 300 | temp_copy = auto_alloc_array(machine(), UINT8, size); |
| 301 | |
| 302 | if (size > 0x1000) |
| 303 | { |
| 304 | image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); |
| 305 | auto_free(machine(), temp_copy); |
| 306 | return IMAGE_INIT_FAIL; |
| 307 | } |
| 308 | |
| 309 | if (image.fread(temp_copy, size) != size) |
| 310 | { |
| 311 | image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file"); |
| 312 | auto_free(machine(), temp_copy); |
| 313 | return IMAGE_INIT_FAIL; |
| 314 | } |
| 315 | } |
| 316 | else |
| 317 | { |
| 318 | if (image.get_software_region(this_cart->tag + 1) == NULL) |
| 319 | { |
| 320 | astring errmsg; |
| 321 | errmsg.printf("Attempted to load file with wrong extension\nCartslot '%s' only accepts files with '.%s' extension", |
| 322 | this_cart->tag, this_cart->tag + 1); |
| 323 | image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.cstr()); |
| 324 | return IMAGE_INIT_FAIL; |
| 325 | } |
| 326 | |
| 327 | size = image.get_software_region_length(this_cart->tag + 1); |
| 328 | temp_copy = auto_alloc_array(machine(), UINT8, size); |
| 329 | memcpy(temp_copy, image.get_software_region(this_cart->tag + 1), size); |
| 330 | } |
| 331 | |
| 332 | memcpy(memregion("maincpu")->base() + this_cart->offset, temp_copy, size); |
| 333 | |
| 334 | auto_free(machine(), temp_copy); |
| 335 | |
| 336 | return IMAGE_INIT_PASS; |
| 337 | } |
| 338 | |
| 258 | 339 | static MACHINE_CONFIG_START( aim65, aim65_state ) |
| 259 | 340 | /* basic machine hardware */ |
| 260 | 341 | MCFG_CPU_ADD("maincpu", M6502, AIM65_CLOCK) /* 1 MHz */ |
| r22625 | r22626 | |
| 284 | 365 | MCFG_CASSETTE_ADD( "cassette", aim65_1_cassette_interface ) |
| 285 | 366 | MCFG_CASSETTE_ADD( "cassette2", aim65_2_cassette_interface ) |
| 286 | 367 | |
| 287 | | MCFG_CARTSLOT_ADD("cart1") |
| 368 | MCFG_CARTSLOT_ADD("z26") |
| 288 | 369 | MCFG_CARTSLOT_EXTENSION_LIST("z26") |
| 370 | MCFG_CARTSLOT_INTERFACE("aim65_cart") |
| 371 | MCFG_CARTSLOT_LOAD(aim65_state, aim65_cart) |
| 289 | 372 | MCFG_CARTSLOT_NOT_MANDATORY |
| 290 | | MCFG_CARTSLOT_ADD("cart2") |
| 373 | |
| 374 | MCFG_CARTSLOT_ADD("z25") |
| 291 | 375 | MCFG_CARTSLOT_EXTENSION_LIST("z25") |
| 376 | MCFG_CARTSLOT_INTERFACE("aim65_cart") |
| 377 | MCFG_CARTSLOT_LOAD(aim65_state, aim65_cart) |
| 292 | 378 | MCFG_CARTSLOT_NOT_MANDATORY |
| 293 | | MCFG_CARTSLOT_ADD("cart3") |
| 379 | |
| 380 | MCFG_CARTSLOT_ADD("z24") |
| 294 | 381 | MCFG_CARTSLOT_EXTENSION_LIST("z24") |
| 382 | MCFG_CARTSLOT_INTERFACE("aim65_cart") |
| 295 | 383 | MCFG_CARTSLOT_NOT_MANDATORY |
| 384 | MCFG_CARTSLOT_LOAD(aim65_state, aim65_cart) |
| 296 | 385 | |
| 297 | 386 | /* internal ram */ |
| 298 | 387 | MCFG_RAM_ADD(RAM_TAG) |
| 299 | 388 | MCFG_RAM_DEFAULT_SIZE("4K") |
| 300 | 389 | MCFG_RAM_EXTRA_OPTIONS("1K,2K,3K") |
| 390 | |
| 391 | /* Software lists */ |
| 392 | MCFG_SOFTWARE_LIST_ADD("cart_list","aim65_cart") |
| 301 | 393 | MACHINE_CONFIG_END |
| 302 | 394 | |
| 303 | 395 | |
| r22625 | r22626 | |
| 307 | 399 | |
| 308 | 400 | ROM_START( aim65 ) |
| 309 | 401 | ROM_REGION(0x10000, "maincpu", 0) |
| 310 | | ROM_CART_LOAD("cart1", 0xb000, 0x1000, ROM_OPTIONAL) |
| 311 | | ROM_CART_LOAD("cart2", 0xc000, 0x1000, ROM_OPTIONAL) |
| 312 | | ROM_CART_LOAD("cart3", 0xd000, 0x1000, ROM_OPTIONAL) |
| 313 | 402 | ROM_SYSTEM_BIOS(0, "aim65", "Rockwell AIM-65") |
| 314 | 403 | ROMX_LOAD("aim65mon.z23", 0xe000, 0x1000, CRC(90e44afe) SHA1(78e38601edf6bfc787b58750555a636b0cf74c5c), ROM_BIOS(1)) |
| 315 | 404 | ROMX_LOAD("aim65mon.z22", 0xf000, 0x1000, CRC(d01914b0) SHA1(e5b5ddd4cd43cce073a718ee4ba5221f2bc84eaf), ROM_BIOS(1)) |