src/mess/machine/cbmb.c
| r4018 | r4019 | |
| 1 | 1 | /*************************************************************************** |
| 2 | | commodore b series computer |
| 2 | commodore b series computer |
| 3 | 3 | |
| 4 | 4 | peter.trauner@jk.uni-linz.ac.at |
| 5 | 5 | ***************************************************************************/ |
| r4018 | r4019 | |
| 20 | 20 | |
| 21 | 21 | #include "devices/cartslot.h" |
| 22 | 22 | |
| 23 | | /* 2008-05 FP: Were these added as a reminder to add configs of |
| 23 | /* 2008-05 FP: Were these added as a reminder to add configs of |
| 24 | 24 | drivers 8 & 9 as in pet.c ? */ |
| 25 | 25 | #define IEEE8ON 0 |
| 26 | 26 | #define IEEE9ON 0 |
| r4018 | r4019 | |
| 37 | 37 | } while (0) |
| 38 | 38 | |
| 39 | 39 | static TIMER_CALLBACK(cbmb_frame_interrupt); |
| 40 | /* keyboard lines */ |
| 41 | static int cbmb_keyline_a, cbmb_keyline_b, cbmb_keyline_c; |
| 40 | 42 | |
| 41 | 43 | UINT8 *cbmb_basic; |
| 42 | 44 | UINT8 *cbmb_kernal; |
| r4018 | r4019 | |
| 75 | 77 | if (cbm_ieee_eoi_r(device->machine)) data |= 0x20; |
| 76 | 78 | if (cbm_ieee_dav_r(device->machine)) data |= 0x10; |
| 77 | 79 | if (cbm_ieee_atn_r(device->machine)) data |= 0x08; |
| 78 | | /* if (cbm_ieee_ren_r(device->machine)) data |= 0x04; */ |
| 80 | /* if (cbm_ieee_ren_r(device->machine)) data |= 0x04; */ |
| 79 | 81 | |
| 80 | 82 | return data; |
| 81 | 83 | } |
| r4018 | r4019 | |
| 87 | 89 | cbm_ieee_eoi_w(device->machine, 0, data & 0x20); |
| 88 | 90 | cbm_ieee_dav_w(device->machine, 0, data & 0x10); |
| 89 | 91 | cbm_ieee_atn_w(device->machine, 0, data & 0x08); |
| 90 | | /* cbm_ieee_ren_w(device->machine, 0, data & 0x04); */ |
| 92 | /* cbm_ieee_ren_w(device->machine, 0, data & 0x04); */ |
| 91 | 93 | logerror("cbm ieee %d %d\n", data & 0x02, data & 0x01); |
| 92 | 94 | } |
| 93 | 95 | |
| r4018 | r4019 | |
| 105 | 107 | port a7..a0 b7..b0 keyboard input */ |
| 106 | 108 | WRITE8_DEVICE_HANDLER( cbmb_keyboard_line_select_a ) |
| 107 | 109 | { |
| 108 | | cbmb_state *state = device->machine->driver_data; |
| 109 | | state->cbmb_keyline_a = data; |
| 110 | cbmb_keyline_a = data; |
| 110 | 111 | } |
| 111 | 112 | |
| 112 | 113 | WRITE8_DEVICE_HANDLER( cbmb_keyboard_line_select_b ) |
| 113 | 114 | { |
| 114 | | cbmb_state *state = device->machine->driver_data; |
| 115 | | state->cbmb_keyline_b = data; |
| 115 | cbmb_keyline_b = data; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | WRITE8_DEVICE_HANDLER( cbmb_keyboard_line_select_c ) |
| 119 | 119 | { |
| 120 | | cbmb_state *state = device->machine->driver_data; |
| 121 | | state->cbmb_keyline_c = data; |
| 120 | cbmb_keyline_c = data; |
| 122 | 121 | } |
| 123 | 122 | |
| 124 | 123 | READ8_DEVICE_HANDLER( cbmb_keyboard_line_a ) |
| 125 | 124 | { |
| 126 | 125 | int data = 0; |
| 127 | | cbmb_state *state = device->machine->driver_data; |
| 128 | | if (!(state->cbmb_keyline_c & 0x01)) |
| 126 | if (!(cbmb_keyline_c & 0x01)) |
| 129 | 127 | data |= input_port_read(device->machine, "ROW0"); |
| 130 | 128 | |
| 131 | | if (!(state->cbmb_keyline_c & 0x02)) |
| 129 | if (!(cbmb_keyline_c & 0x02)) |
| 132 | 130 | data |= input_port_read(device->machine, "ROW2"); |
| 133 | 131 | |
| 134 | | if (!(state->cbmb_keyline_c & 0x04)) |
| 132 | if (!(cbmb_keyline_c & 0x04)) |
| 135 | 133 | data |= input_port_read(device->machine, "ROW4"); |
| 136 | 134 | |
| 137 | | if (!(state->cbmb_keyline_c & 0x08)) |
| 135 | if (!(cbmb_keyline_c & 0x08)) |
| 138 | 136 | data |= input_port_read(device->machine, "ROW6"); |
| 139 | 137 | |
| 140 | | if (!(state->cbmb_keyline_c & 0x10)) |
| 138 | if (!(cbmb_keyline_c & 0x10)) |
| 141 | 139 | data |= input_port_read(device->machine, "ROW8"); |
| 142 | 140 | |
| 143 | | if (!(state->cbmb_keyline_c & 0x20)) |
| 141 | if (!(cbmb_keyline_c & 0x20)) |
| 144 | 142 | data |= input_port_read(device->machine, "ROW10"); |
| 145 | 143 | |
| 146 | 144 | return data ^0xff; |
| r4018 | r4019 | |
| 149 | 147 | READ8_DEVICE_HANDLER( cbmb_keyboard_line_b ) |
| 150 | 148 | { |
| 151 | 149 | int data = 0; |
| 152 | | cbmb_state *state = device->machine->driver_data; |
| 153 | | if (!(state->cbmb_keyline_c & 0x01)) |
| 150 | if (!(cbmb_keyline_c & 0x01)) |
| 154 | 151 | data |= input_port_read(device->machine, "ROW1"); |
| 155 | 152 | |
| 156 | | if (!(state->cbmb_keyline_c & 0x02)) |
| 153 | if (!(cbmb_keyline_c & 0x02)) |
| 157 | 154 | data |= input_port_read(device->machine, "ROW3"); |
| 158 | 155 | |
| 159 | | if (!(state->cbmb_keyline_c & 0x04)) |
| 156 | if (!(cbmb_keyline_c & 0x04)) |
| 160 | 157 | data |= input_port_read(device->machine, "ROW5"); |
| 161 | 158 | |
| 162 | | if (!(state->cbmb_keyline_c & 0x08)) |
| 159 | if (!(cbmb_keyline_c & 0x08)) |
| 163 | 160 | data |= input_port_read(device->machine, "ROW7"); |
| 164 | 161 | |
| 165 | | if (!(state->cbmb_keyline_c & 0x10)) |
| 162 | if (!(cbmb_keyline_c & 0x10)) |
| 166 | 163 | data |= input_port_read(device->machine, "ROW9") | ((input_port_read(device->machine, "SPECIAL") & 0x04) ? 1 : 0 ); |
| 167 | 164 | |
| 168 | | if (!(state->cbmb_keyline_c & 0x20)) |
| 165 | if (!(cbmb_keyline_c & 0x20)) |
| 169 | 166 | data |= input_port_read(device->machine, "ROW11"); |
| 170 | 167 | |
| 171 | 168 | return data ^0xff; |
| r4018 | r4019 | |
| 174 | 171 | READ8_DEVICE_HANDLER( cbmb_keyboard_line_c ) |
| 175 | 172 | { |
| 176 | 173 | int data = 0; |
| 177 | | cbmb_state *state = device->machine->driver_data; |
| 178 | | if ((input_port_read(device->machine, "ROW0") & ~state->cbmb_keyline_a) || |
| 179 | | (input_port_read(device->machine, "ROW1") & ~state->cbmb_keyline_b)) |
| 174 | cbmb_state *state = device->machine->driver_data; |
| 175 | if ((input_port_read(device->machine, "ROW0") & ~cbmb_keyline_a) || |
| 176 | (input_port_read(device->machine, "ROW1") & ~cbmb_keyline_b)) |
| 180 | 177 | data |= 0x01; |
| 181 | 178 | |
| 182 | | if ((input_port_read(device->machine, "ROW2") & ~state->cbmb_keyline_a) || |
| 183 | | (input_port_read(device->machine, "ROW3") & ~state->cbmb_keyline_b)) |
| 179 | if ((input_port_read(device->machine, "ROW2") & ~cbmb_keyline_a) || |
| 180 | (input_port_read(device->machine, "ROW3") & ~cbmb_keyline_b)) |
| 184 | 181 | data |= 0x02; |
| 185 | 182 | |
| 186 | | if ((input_port_read(device->machine, "ROW4") & ~state->cbmb_keyline_a) || |
| 187 | | (input_port_read(device->machine, "ROW5") & ~state->cbmb_keyline_b)) |
| 183 | if ((input_port_read(device->machine, "ROW4") & ~cbmb_keyline_a) || |
| 184 | (input_port_read(device->machine, "ROW5") & ~cbmb_keyline_b)) |
| 188 | 185 | data |= 0x04; |
| 189 | 186 | |
| 190 | | if ((input_port_read(device->machine, "ROW6") & ~state->cbmb_keyline_a) || |
| 191 | | (input_port_read(device->machine, "ROW7") & ~state->cbmb_keyline_b)) |
| 187 | if ((input_port_read(device->machine, "ROW6") & ~cbmb_keyline_a) || |
| 188 | (input_port_read(device->machine, "ROW7") & ~cbmb_keyline_b)) |
| 192 | 189 | data |= 0x08; |
| 193 | 190 | |
| 194 | | if ((input_port_read(device->machine, "ROW8") & ~state->cbmb_keyline_a) || |
| 195 | | ((input_port_read(device->machine, "ROW9") | ((input_port_read(device->machine, "SPECIAL") & 0x04) ? 1 : 0)) & ~state->cbmb_keyline_b)) |
| 191 | if ((input_port_read(device->machine, "ROW8") & ~cbmb_keyline_a) || |
| 192 | ((input_port_read(device->machine, "ROW9") | ((input_port_read(device->machine, "SPECIAL") & 0x04) ? 1 : 0)) & ~cbmb_keyline_b)) |
| 196 | 193 | data |= 0x10; |
| 197 | 194 | |
| 198 | | if ((input_port_read(device->machine, "ROW10") & ~state->cbmb_keyline_a) || |
| 199 | | (input_port_read(device->machine, "ROW11") & ~state->cbmb_keyline_b)) |
| 195 | if ((input_port_read(device->machine, "ROW10") & ~cbmb_keyline_a) || |
| 196 | (input_port_read(device->machine, "ROW11") & ~cbmb_keyline_b)) |
| 200 | 197 | data |= 0x20; |
| 201 | 198 | |
| 202 | | if (!state->p500) |
| 199 | if (!state->p500) |
| 203 | 200 | { |
| 204 | | if (!state->cbm_ntsc) |
| 201 | if (!state->cbm_ntsc) |
| 205 | 202 | data |= 0x40; |
| 206 | 203 | |
| 207 | | if (!state->cbm700) |
| 204 | if (!state->cbm700) |
| 208 | 205 | data |= 0x80; |
| 209 | 206 | } |
| 210 | 207 | return data ^0xff; |
| r4018 | r4019 | |
| 298 | 295 | DRIVER_INIT( cbm600 ) |
| 299 | 296 | { |
| 300 | 297 | cbmb_state *state = machine->driver_data; |
| 301 | | cbmb_common_driver_init(machine); |
| 298 | cbmb_common_driver_init(machine); |
| 302 | 299 | state->cbm_ntsc = 1; |
| 303 | 300 | cbm600_vh_init(machine); |
| 304 | 301 | } |
| r4018 | r4019 | |
| 349 | 346 | { |
| 350 | 347 | static int level = 0; |
| 351 | 348 | const device_config *tpi_0 = devtag_get_device(machine, TPI6525, "tpi6525_0"); |
| 352 | | |
| 349 | |
| 353 | 350 | #if 0 |
| 354 | 351 | int controller1 = input_port_read(machine, "CTRLSEL") & 0x07; |
| 355 | 352 | int controller2 = input_port_read(machine, "CTRLSEL") & 0x70; |
| r4018 | r4019 | |
| 366 | 363 | case 0x00: |
| 367 | 364 | value &= ~input_port_read(machine, "JOY1_1B"); /* Joy1 Directions + Button 1 */ |
| 368 | 365 | break; |
| 369 | | |
| 366 | |
| 370 | 367 | case 0x01: |
| 371 | 368 | if (input_port_read(machine, "OTHER") & 0x40) /* Paddle2 Button */ |
| 372 | 369 | value &= ~0x08; |
| r4018 | r4019 | |
| 380 | 377 | if (input_port_read(machine, "OTHER") & 0x01) /* Mouse Button Right */ |
| 381 | 378 | value &= ~0x01; |
| 382 | 379 | break; |
| 383 | | |
| 380 | |
| 384 | 381 | case 0x03: |
| 385 | 382 | value &= ~(input_port_read(machine, "JOY1_2B") & 0x1f); /* Joy1 Directions + Button 1 */ |
| 386 | 383 | break; |
| 387 | | |
| 384 | |
| 388 | 385 | case 0x04: |
| 389 | 386 | /* was there any input on the lightpen? where is it mapped? */ |
| 390 | | // if (input_port_read(machine, "OTHER") & 0x04) /* Lightpen Signal */ |
| 391 | | // value &= ?? ; |
| 387 | // if (input_port_read(machine, "OTHER") & 0x04) /* Lightpen Signal */ |
| 388 | // value &= ?? ; |
| 392 | 389 | break; |
| 393 | 390 | |
| 394 | 391 | case 0x07: |
| r4018 | r4019 | |
| 408 | 405 | case 0x00: |
| 409 | 406 | value &= ~input_port_read(machine, "JOY2_1B"); /* Joy2 Directions + Button 1 */ |
| 410 | 407 | break; |
| 411 | | |
| 408 | |
| 412 | 409 | case 0x10: |
| 413 | 410 | if (input_port_read(machine, "OTHER") & 0x10) /* Paddle4 Button */ |
| 414 | 411 | value &= ~0x08; |
| r4018 | r4019 | |
| 422 | 419 | if (input_port_read(machine, "OTHER") & 0x01) /* Mouse Button Right */ |
| 423 | 420 | value &= ~0x01; |
| 424 | 421 | break; |
| 425 | | |
| 422 | |
| 426 | 423 | case 0x30: |
| 427 | 424 | value &= ~(input_port_read(machine, "JOY2_2B") & 0x1f); /* Joy2 Directions + Button 1 */ |
| 428 | 425 | break; |
| 429 | 426 | |
| 430 | 427 | case 0x40: |
| 431 | 428 | /* was there any input on the lightpen? where is it mapped? */ |
| 432 | | // if (input_port_read(machine, "OTHER") & 0x04) /* Lightpen Signal */ |
| 433 | | // value &= ?? ; |
| 429 | // if (input_port_read(machine, "OTHER") & 0x04) /* Lightpen Signal */ |
| 430 | // value &= ?? ; |
| 434 | 431 | break; |
| 435 | 432 | |
| 436 | 433 | case 0x70: |
| r4018 | r4019 | |
| 445 | 442 | #endif |
| 446 | 443 | |
| 447 | 444 | // 128u4 FIXME |
| 448 | | // vic2_frame_interrupt (device); |
| 445 | // vic2_frame_interrupt (device); |
| 449 | 446 | |
| 450 | 447 | set_led_status (1, input_port_read(machine, "SPECIAL") & 0x04 ? 1 : 0); /* Shift Lock */ |
| 451 | 448 | } |
| r4018 | r4019 | |
| 453 | 450 | |
| 454 | 451 | /*********************************************** |
| 455 | 452 | |
| 456 | | CBM Business Computers Cartridges |
| 453 | CBM Business Computers Cartridges |
| 457 | 454 | |
| 458 | 455 | ***********************************************/ |
| 459 | 456 | |
| r4018 | r4019 | |
| 470 | 467 | |
| 471 | 468 | if (!mame_stricmp (filetype, "crt")) |
| 472 | 469 | { |
| 473 | | /* We temporarily remove .crt loading. Previous versions directly used |
| 474 | | the same routines used to load C64 .crt file, but I seriously doubt the |
| 475 | | formats are compatible. While waiting for confirmation about .crt dumps |
| 476 | | for CBMB machines, we simply do not load .crt files */ |
| 470 | /* We temporarily remove .crt loading. Previous versions directly used |
| 471 | the same routines used to load C64 .crt file, but I seriously doubt the |
| 472 | formats are compatible. While waiting for confirmation about .crt dumps |
| 473 | for CBMB machines, we simply do not load .crt files */ |
| 477 | 474 | } |
| 478 | | else |
| 475 | else |
| 479 | 476 | { |
| 480 | 477 | /* Assign loading address according to extension */ |
| 481 | 478 | if (!mame_stricmp (filetype, "10")) |
| r4018 | r4019 | |
| 505 | 502 | if (test != cbmb_cbm_cart[0].size) |
| 506 | 503 | return INIT_FAIL; |
| 507 | 504 | } |
| 508 | | |
| 505 | |
| 509 | 506 | /* Finally load the cart */ |
| 510 | | // This could be needed with .crt support |
| 511 | | // for (i = 0; (i < sizeof(pet_cbm_cart) / sizeof(pet_cbm_cart[0])) && (pet_cbm_cart[i].size != 0); i++) |
| 512 | | // memcpy(cbmb_memory + cbmb_cbm_cart[i].addr + 0xf0000, cbmb_cbm_cart[i].chip, cbmb_cbm_cart[i].size); |
| 507 | // This could be needed with .crt support |
| 508 | // for (i = 0; (i < sizeof(pet_cbm_cart) / sizeof(pet_cbm_cart[0])) && (pet_cbm_cart[i].size != 0); i++) |
| 509 | // memcpy(cbmb_memory + cbmb_cbm_cart[i].addr + 0xf0000, cbmb_cbm_cart[i].chip, cbmb_cbm_cart[i].size); |
| 513 | 510 | memcpy(cbmb_memory + cbmb_cbm_cart[0].addr + 0xf0000, cbmb_cbm_cart[0].chip, cbmb_cbm_cart[0].size); |
| 514 | 511 | |
| 515 | 512 | return INIT_PASS; |
src/mess/machine/pet.c
| r4018 | r4019 | |
| 1 | 1 | /*************************************************************************** |
| 2 | | commodore pet series computer |
| 2 | commodore pet series computer |
| 3 | 3 | |
| 4 | 4 | peter.trauner@jk.uni-linz.ac.at |
| 5 | 5 | ***************************************************************************/ |
| r4018 | r4019 | |
| 36 | 36 | UINT8 *superpet_memory; |
| 37 | 37 | UINT8 *pet_videoram; |
| 38 | 38 | static UINT8 *pet80_bank1_base; |
| 39 | | static int pet_keyline_select; |
| 39 | static int pet_keyline_select; |
| 40 | 40 | |
| 41 | 41 | static emu_timer *datasette1_timer; |
| 42 | 42 | static emu_timer *datasette2_timer; |
| r4018 | r4019 | |
| 75 | 75 | cb2 cassette 1 motor out |
| 76 | 76 | */ |
| 77 | 77 | static READ8_HANDLER ( pet_pia0_port_a_read ) |
| 78 | | { |
| 78 | { |
| 79 | 79 | int data = 0xf0 | pet_keyline_select; |
| 80 | 80 | |
| 81 | 81 | if ((cassette_get_state(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette1" )) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED) |
| r4018 | r4019 | |
| 84 | 84 | if ((cassette_get_state(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette2" )) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED) |
| 85 | 85 | data &= ~0x20; |
| 86 | 86 | |
| 87 | | if (!cbm_ieee_eoi_r(space->machine)) |
| 87 | if (!cbm_ieee_eoi_r(space->machine)) |
| 88 | 88 | data &= ~0x40; |
| 89 | 89 | |
| 90 | 90 | return data; |
| r4018 | r4019 | |
| 99 | 99 | static READ8_HANDLER ( pet_pia0_port_b_read ) |
| 100 | 100 | { |
| 101 | 101 | UINT8 data = 0xff; |
| 102 | | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", |
| 102 | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", |
| 103 | 103 | "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" }; |
| 104 | | |
| 105 | | if (pet_keyline_select < 10) |
| 104 | |
| 105 | if (pet_keyline_select < 10) |
| 106 | 106 | { |
| 107 | 107 | data = input_port_read(space->machine, keynames[pet_keyline_select]); |
| 108 | 108 | /* Check for left-shift lock */ |
| 109 | | if ((pet_keyline_select == 8) && (input_port_read(space->machine, "SPECIAL") & 0x80)) |
| 109 | if ((pet_keyline_select == 8) && (input_port_read(space->machine, "SPECIAL") & 0x80)) |
| 110 | 110 | data &= 0xfe; |
| 111 | 111 | } |
| 112 | 112 | return data; |
| r4018 | r4019 | |
| 117 | 117 | { |
| 118 | 118 | UINT8 data = 0xff; |
| 119 | 119 | pet_state *state = space->machine->driver_data; |
| 120 | | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", |
| 120 | static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", |
| 121 | 121 | "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" }; |
| 122 | | |
| 123 | | if (pet_keyline_select < 10) |
| 122 | |
| 123 | if (pet_keyline_select < 10) |
| 124 | 124 | { |
| 125 | 125 | data = input_port_read(space->machine, keynames[pet_keyline_select]); |
| 126 | 126 | /* Check for left-shift lock */ |
| r4018 | r4019 | |
| 128 | 128 | /* While waiting for confirmation from docs, we add a workaround here. */ |
| 129 | 129 | if (state->superpet) |
| 130 | 130 | { |
| 131 | | if ((pet_keyline_select == 6) && !(input_port_read(space->machine, "SPECIAL") & 0x80)) |
| 131 | if ((pet_keyline_select == 6) && !(input_port_read(space->machine, "SPECIAL") & 0x80)) |
| 132 | 132 | data &= 0xfe; |
| 133 | | } |
| 133 | } |
| 134 | 134 | else |
| 135 | 135 | { |
| 136 | | if ((pet_keyline_select == 6) && (input_port_read(space->machine, "SPECIAL") & 0x80)) |
| 136 | if ((pet_keyline_select == 6) && (input_port_read(space->machine, "SPECIAL") & 0x80)) |
| 137 | 137 | data &= 0xfe; |
| 138 | 138 | } |
| 139 | 139 | } |
| r4018 | r4019 | |
| 297 | 297 | |
| 298 | 298 | if (cbm_ieee_ndac_r(device->machine)) data |= 0x01; |
| 299 | 299 | |
| 300 | | // data & 0x08 -> cassette write (it seems to BOTH cassettes from schematics) |
| 300 | // data & 0x08 -> cassette write (it seems to BOTH cassettes from schematics) |
| 301 | 301 | |
| 302 | 302 | if (!(data & 0x10)) |
| 303 | 303 | { |
| r4018 | r4019 | |
| 443 | 443 | memory_install_write8_handler(space, 0xb000, 0xbfff, 0, 0, (data & 1) == 0 ? SMH_BANK4 : SMH_NOP); |
| 444 | 444 | |
| 445 | 445 | |
| 446 | | if (data & 4) |
| 446 | if (data & 4) |
| 447 | 447 | { |
| 448 | | if (!(data & 0x20)) |
| 448 | if (!(data & 0x20)) |
| 449 | 449 | { |
| 450 | 450 | pet80_bank1_base = pet_memory + 0x14000; |
| 451 | 451 | memory_set_bankptr (space->machine, 1, pet80_bank1_base); |
| r4018 | r4019 | |
| 453 | 453 | memory_set_bankptr (space->machine, 2, pet_memory + 0x15000); |
| 454 | 454 | memory_set_bankptr (space->machine, 3, pet_memory + 0x16000); |
| 455 | 455 | memory_set_bankptr (space->machine, 4, pet_memory + 0x17000); |
| 456 | | } |
| 457 | | else |
| 456 | } |
| 457 | else |
| 458 | 458 | { |
| 459 | | if (!(data & 0x20)) |
| 459 | if (!(data & 0x20)) |
| 460 | 460 | { |
| 461 | 461 | pet80_bank1_base = pet_memory + 0x10000; |
| 462 | 462 | memory_set_bankptr (space->machine, 1, pet80_bank1_base); |
| r4018 | r4019 | |
| 466 | 466 | memory_set_bankptr (space->machine, 4, pet_memory + 0x13000); |
| 467 | 467 | } |
| 468 | 468 | |
| 469 | | if (data & 8) |
| 469 | if (data & 8) |
| 470 | 470 | { |
| 471 | | if (!(data & 0x40)) |
| 471 | if (!(data & 0x40)) |
| 472 | 472 | { |
| 473 | 473 | memory_set_bankptr (space->machine, 7, pet_memory + 0x1e800); |
| 474 | 474 | } |
| 475 | 475 | memory_set_bankptr (space->machine, 6, pet_memory + 0x1c000); |
| 476 | 476 | memory_set_bankptr (space->machine, 8, pet_memory + 0x1f000); |
| 477 | 477 | memory_set_bankptr (space->machine, 9, pet_memory + 0x1fff1); |
| 478 | | } |
| 479 | | else |
| 478 | } |
| 479 | else |
| 480 | 480 | { |
| 481 | | if (!(data & 0x40)) |
| 481 | if (!(data & 0x40)) |
| 482 | 482 | { |
| 483 | 483 | memory_set_bankptr (space->machine, 7, pet_memory+ 0x1a800); |
| 484 | 484 | } |
| r4018 | r4019 | |
| 530 | 530 | case 2: |
| 531 | 531 | case 3: |
| 532 | 532 | /* 3: 1 pull down diagnostic pin on the userport |
| 533 | | 1: 1 if jumpered programable ram r/w |
| 534 | | 0: 0 if jumpered programable m6809, 1 m6502 selected */ |
| 533 | 1: 1 if jumpered programable ram r/w |
| 534 | 0: 0 if jumpered programable m6809, 1 m6502 selected */ |
| 535 | 535 | break; |
| 536 | 536 | |
| 537 | 537 | case 4: |
| r4018 | r4019 | |
| 561 | 561 | /* NOT WORKING - Just placeholder */ |
| 562 | 562 | static TIMER_CALLBACK( pet_tape1_timer ) |
| 563 | 563 | { |
| 564 | | // cassette 1 |
| 564 | // cassette 1 |
| 565 | 565 | UINT8 data = (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette1" )) > +0.0) ? 1 : 0; |
| 566 | 566 | pia_0_ca1_w(cputag_get_address_space(machine,"main",ADDRESS_SPACE_PROGRAM), 0, data); |
| 567 | 567 | } |
| r4018 | r4019 | |
| 570 | 570 | static TIMER_CALLBACK( pet_tape2_timer ) |
| 571 | 571 | { |
| 572 | 572 | const device_config *via_0 = device_list_find_by_tag(machine->config->devicelist, VIA6522, "via6522_0"); |
| 573 | | // cassette 2 |
| 573 | // cassette 2 |
| 574 | 574 | UINT8 data = (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette2" )) > +0.0) ? 1 : 0; |
| 575 | 575 | via_cb1_w(via_0, 0, data); |
| 576 | 576 | } |
| r4018 | r4019 | |
| 581 | 581 | int i; |
| 582 | 582 | pet_state *state = machine->driver_data; |
| 583 | 583 | |
| 584 | | state->pet_basic1 = 0; |
| 584 | state->pet_basic1 = 0; |
| 585 | 585 | state->superpet = 0; |
| 586 | 586 | state->cbm8096 = 0; |
| 587 | | |
| 587 | |
| 588 | 588 | /* BIG HACK; need to phase out this retarded memory management */ |
| 589 | 589 | if (!pet_memory) |
| 590 | 590 | pet_memory = mess_ram; |
| r4018 | r4019 | |
| 650 | 650 | |
| 651 | 651 | DRIVER_INIT( pet80 ) |
| 652 | 652 | { |
| 653 | | |
| 653 | |
| 654 | 654 | pet_state *state = machine->driver_data; |
| 655 | 655 | pet_memory = memory_region(machine, "main"); |
| 656 | 656 | |
| 657 | 657 | pet_common_driver_init(machine); |
| 658 | | state->cbm8096 = 1; |
| 658 | state->cbm8096 = 1; |
| 659 | 659 | pia_config(machine, 0, &petb_pia0); |
| 660 | 660 | videoram = &pet_memory[0x8000]; |
| 661 | 661 | videoram_size = 0x800; |
| 662 | 662 | pet80_vh_init(machine); |
| 663 | | |
| 663 | |
| 664 | 664 | } |
| 665 | 665 | |
| 666 | 666 | DRIVER_INIT( superpet ) |
| 667 | 667 | { |
| 668 | | |
| 668 | |
| 669 | 669 | pet_state *state = machine->driver_data; |
| 670 | 670 | pet_common_driver_init(machine); |
| 671 | 671 | state->superpet = 1; |
| r4018 | r4019 | |
| 683 | 683 | { |
| 684 | 684 | pet_state *state = machine->driver_data; |
| 685 | 685 | pia_reset(); |
| 686 | | |
| 686 | |
| 687 | 687 | if (state->superpet) |
| 688 | 688 | { |
| 689 | 689 | spet.rom = 0; |
| r4018 | r4019 | |
| 725 | 725 | pet_state *state = device->machine->driver_data; |
| 726 | 726 | if (state->superpet) |
| 727 | 727 | { |
| 728 | | if (input_port_read(device->machine, "CFG") & 0x04) |
| 728 | if (input_port_read(device->machine, "CFG") & 0x04) |
| 729 | 729 | { |
| 730 | 730 | cpu_set_input_line(device, INPUT_LINE_HALT, 1); |
| 731 | 731 | cpu_set_input_line(device, INPUT_LINE_HALT, 0); |
| 732 | 732 | pet_font |= 2; |
| 733 | | } |
| 734 | | else |
| 733 | } |
| 734 | else |
| 735 | 735 | { |
| 736 | 736 | cpu_set_input_line(device, INPUT_LINE_HALT, 0); |
| 737 | 737 | cpu_set_input_line(device, INPUT_LINE_HALT, 1); |
| r4018 | r4019 | |
| 745 | 745 | |
| 746 | 746 | /*********************************************** |
| 747 | 747 | |
| 748 | | PET Cartridges |
| 748 | PET Cartridges |
| 749 | 749 | |
| 750 | 750 | ***********************************************/ |
| 751 | 751 | |
| r4018 | r4019 | |
| 763 | 763 | |
| 764 | 764 | if (!mame_stricmp (filetype, "crt")) |
| 765 | 765 | { |
| 766 | | /* We temporarily remove .crt loading. Previous versions directly used |
| 767 | | the same routines used to load C64 .crt file, but I seriously doubt the |
| 768 | | formats are compatible. While waiting for confirmation about .crt dumps |
| 769 | | for PET machines, we simply do not load .crt files */ |
| 766 | /* We temporarily remove .crt loading. Previous versions directly used |
| 767 | the same routines used to load C64 .crt file, but I seriously doubt the |
| 768 | formats are compatible. While waiting for confirmation about .crt dumps |
| 769 | for PET machines, we simply do not load .crt files */ |
| 770 | 770 | } |
| 771 | | else |
| 771 | else |
| 772 | 772 | { |
| 773 | 773 | /* Assign loading address according to extension */ |
| 774 | 774 | if (!mame_stricmp (filetype, "a0")) |
| r4018 | r4019 | |
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | /* Finally load the cart */ |
| 797 | | // This could be needed with .crt support |
| 798 | | // for (i = 0; (i < sizeof(pet_cbm_cart) / sizeof(pet_cbm_cart[0])) && (pet_cbm_cart[i].size != 0); i++) |
| 799 | | // memcpy(pet_memory + pet_cbm_cart[i].addr, pet_cbm_cart[i].chip, pet_cbm_cart[i].size); |
| 797 | // This could be needed with .crt support |
| 798 | // for (i = 0; (i < sizeof(pet_cbm_cart) / sizeof(pet_cbm_cart[0])) && (pet_cbm_cart[i].size != 0); i++) |
| 799 | // memcpy(pet_memory + pet_cbm_cart[i].addr, pet_cbm_cart[i].chip, pet_cbm_cart[i].size); |
| 800 | 800 | memcpy(pet_memory + pet_cbm_cart[0].addr, pet_cbm_cart[0].chip, pet_cbm_cart[0].size); |
| 801 | 801 | |
| 802 | 802 | return INIT_PASS; |
src/mess/drivers/cbmb.c
| r4018 | r4019 | |
| 10 | 10 | |
| 11 | 11 | /* |
| 12 | 12 | |
| 13 | | 2008 - Driver Updates |
| 13 | 2008 - Driver Updates |
| 14 | 14 | --------------------- |
| 15 | 15 | |
| 16 | 16 | (most of the informations are taken from http://www.zimmers.net/cbmpics/ ) |
| r4018 | r4019 | |
| 27 | 27 | |
| 28 | 28 | Various models: |
| 29 | 29 | |
| 30 | | U.S. name EU name RAM |
| 30 | U.S. name EU name RAM |
| 31 | 31 | |
| 32 | | B500 (*) - 128k |
| 33 | | B128 CBM 610 128k |
| 34 | | B256 CBM 620 256k |
| 35 | | B128-80HP (**) CBM 710 128k |
| 36 | | B256-80HP (**) CBM 720 256k |
| 37 | | BX256-80HP (***) CBM 730 256k |
| 32 | B500 (*) - 128k |
| 33 | B128 CBM 610 128k |
| 34 | B256 CBM 620 256k |
| 35 | B128-80HP (**) CBM 710 128k |
| 36 | B256-80HP (**) CBM 720 256k |
| 37 | BX256-80HP (***) CBM 730 256k |
| 38 | 38 | |
| 39 | 39 | (*) Prototype for the B128? As you can read at http://www.zimmers.net/cbmpics/cb500.html |
| 40 | | the naming of these machines is not clear: either they were B500/128 & |
| 41 | | B500/256 or B128 & B256. However, these names always refer to the low |
| 42 | | profile models. |
| 40 | the naming of these machines is not clear: either they were B500/128 & |
| 41 | B500/256 or B128 & B256. However, these names always refer to the low |
| 42 | profile models. |
| 43 | 43 | (**) HP stands for High Profile. The other systems were the low profile models. |
| 44 | | HP machines had a detachable keyboard |
| 44 | HP machines had a detachable keyboard |
| 45 | 45 | (***) Additional 8088 CPU present |
| 46 | 46 | |
| 47 | 47 | CPU: MOS 6509 (2 MHz) |
| r4018 | r4019 | |
| 50 | 50 | Video: MOS 6545 CTRC (Text: 80 columns, 25 rows) |
| 51 | 51 | Sound: MOS 6581 SID (3 voice stereo synthesizer/digital sound capabilities) |
| 52 | 52 | Ports: CSG 6551/6525x2/6526 (IEEE-488 port; CBM Datasette port; RS232 port; |
| 53 | | CBM Monitor port; CBM-II/PET-II expansion port; 1 RCA audio port; Power |
| 54 | | and reset switches |
| 55 | | Keyboard: Full-sized 102 key QWERTY (19 key numeric keypad!; 4 direction |
| 56 | | cursor-pad) |
| 53 | CBM Monitor port; CBM-II/PET-II expansion port; 1 RCA audio port; Power |
| 54 | and reset switches |
| 55 | Keyboard: Full-sized 102 key QWERTY (19 key numeric keypad!; 4 direction |
| 56 | cursor-pad) |
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | * Commodore PET-II Series (1983) |
| 60 | 60 | |
| 61 | | This series only features the P500 machine, which never even reached the |
| 62 | | market. In this machine, the Datasette port can be used (the BASIC ROMs |
| 61 | This series only features the P500 machine, which never even reached the |
| 62 | market. In this machine, the Datasette port can be used (the BASIC ROMs |
| 63 | 63 | contain the necessary routines). It is also probably know as C128-40. |
| 64 | | |
| 64 | |
| 65 | 65 | CPU: CSG 6509 (1 MHz) |
| 66 | 66 | RAM: 128 kilobytes, expandable to 720k |
| 67 | 67 | ROM: 24 kilobytes |
| 68 | | Video: CSG 6569 "VIC-II" (320 x 200 Hi-Resolution; 40 columns text; Palette |
| 69 | | of 16 colors) |
| 68 | Video: CSG 6569 "VIC-II" (320 x 200 Hi-Resolution; 40 columns text; Palette |
| 69 | of 16 colors) |
| 70 | 70 | Sound: CSG 6581 "SID" (3 voice stereo synthesizer/digital sound capabilities) |
| 71 | | Ports: CSG 6551/6522 (2 Joystick/Mouse ports; IEEE-488 port; CBM Datasette |
| 72 | | port; RS232 port; CBM Monitor port; CBM-II/PET-II expansion port; 1 RCA |
| 73 | | audio port; Power and reset switches) |
| 74 | | Keyboard: Full-sized 102 key QWERTY (19 key numeric keypad!; 4 direction |
| 75 | | cursor-pad) |
| 71 | Ports: CSG 6551/6522 (2 Joystick/Mouse ports; IEEE-488 port; CBM Datasette |
| 72 | port; RS232 port; CBM Monitor port; CBM-II/PET-II expansion port; 1 RCA |
| 73 | audio port; Power and reset switches) |
| 74 | Keyboard: Full-sized 102 key QWERTY (19 key numeric keypad!; 4 direction |
| 75 | cursor-pad) |
| 76 | 76 | |
| 77 | 77 | [To Do] |
| 78 | 78 | |
| 79 | | * Support is still missing for: Sound, IEEE488, Floppy, internal slots |
| 79 | * Support is still missing for: Sound, IEEE488, Floppy, internal slots |
| 80 | 80 | |
| 81 | 81 | * Emulate 8088 co-processor for BX-256HP and eventually add its European |
| 82 | | counterpart CBM 730 |
| 82 | counterpart CBM 730 |
| 83 | 83 | |
| 84 | | * Add better P500 emulation (almost everything: memory access, inputs, |
| 85 | | Datasette, etc.) |
| 84 | * Add better P500 emulation (almost everything: memory access, inputs, |
| 85 | Datasette, etc.) |
| 86 | 86 | |
| 87 | 87 | * Was CBM 710 / 720 monitor at 50Hz? If not remove MACHINE_DRIVER_START(cbm700pal) |
| 88 | | and use the 60Hz version for the whole High Profile |
| 88 | and use the 60Hz version for the whole High Profile |
| 89 | 89 | |
| 90 | 90 | * Find info about the following models (if ever existed): |
| 91 | | + BX128-80HP |
| 92 | | + CBM 700 |
| 93 | | + CBM 505, CBM 510 (these seems proto as CBM 500 but with less RAM, 64 |
| 94 | | & 128) |
| 91 | + BX128-80HP |
| 92 | + CBM 700 |
| 93 | + CBM 505, CBM 510 (these seems proto as CBM 500 but with less RAM, 64 |
| 94 | & 128) |
| 95 | 95 | */ |
| 96 | 96 | |
| 97 | 97 | |
| r4018 | r4019 | |
| 225 | 225 | PORT_INCLUDE( cbmb_keyboard ) /* ROW0 -> ROW11 */ |
| 226 | 226 | |
| 227 | 227 | PORT_INCLUDE( cbmb_special ) /* SPECIAL */ |
| 228 | | |
| 228 | |
| 229 | 229 | PORT_INCLUDE( c64_controls ) /* CTRLSEL, JOY0, JOY1, PADDLE0 -> PADDLE3, TRACKX, TRACKY, LIGHTX, LIGHTY, OTHER */ |
| 230 | 230 | INPUT_PORTS_END |
| 231 | 231 | |
| r4018 | r4019 | |
| 337 | 337 | }; |
| 338 | 338 | |
| 339 | 339 | static const mc6845_interface cbm700_crtc = { |
| 340 | | "main", |
| 340 | "main", |
| 341 | 341 | 9 /*?*/, |
| 342 | 342 | NULL, |
| 343 | 343 | cbm700_update_row, |
| r4018 | r4019 | |
| 415 | 415 | |
| 416 | 416 | /* cia */ |
| 417 | 417 | MDRV_CIA6526_ADD("cia", CIA6526R1, 0, cbmb_cia) |
| 418 | | |
| 418 | |
| 419 | 419 | /* tpi */ |
| 420 | 420 | MDRV_TPI6525_ADD("tpi6525_0", cbmb_tpi_0_intf) |
| 421 | 421 | MDRV_TPI6525_ADD("tpi6525_1", cbmb_tpi_1_intf) |
| r4018 | r4019 | |
| 455 | 455 | static MACHINE_DRIVER_START( bx256hp ) |
| 456 | 456 | MDRV_IMPORT_FROM( cbm700 ) |
| 457 | 457 | |
| 458 | | // MDRV_CPU_ADD("8088", I8088, /* ? */) |
| 458 | // MDRV_CPU_ADD("8088", I8088, /* ? */) |
| 459 | 459 | MACHINE_DRIVER_END |
| 460 | 460 | |
| 461 | 461 | |
| 462 | 462 | static MACHINE_DRIVER_START( p500 ) |
| 463 | | MDRV_DRIVER_DATA(cbmb_state) |
| 463 | MDRV_DRIVER_DATA(cbmb_state) |
| 464 | 464 | /* basic machine hardware */ |
| 465 | 465 | MDRV_CPU_ADD("main", M6509, VIC6567_CLOCK) /* 7.8336 MHz */ |
| 466 | 466 | MDRV_CPU_PROGRAM_MAP(p500_readmem, p500_writemem) |
src/mess/drivers/pet.c
| r4018 | r4019 | |
| 12 | 12 | |
| 13 | 13 | /* |
| 14 | 14 | |
| 15 | | 2008 - Driver Updates |
| 15 | 2008 - Driver Updates |
| 16 | 16 | --------------------- |
| 17 | 17 | |
| 18 | 18 | (most of the informations are taken from http://www.zimmers.net/cbmpics/ ) |
| 19 | | (also, check |
| 20 | | http://www.6502.org/users/andre/petindex/local/cbm-model-list.1.0.txt |
| 19 | (also, check |
| 20 | http://www.6502.org/users/andre/petindex/local/cbm-model-list.1.0.txt |
| 21 | 21 | for a more comprehensive list of models) |
| 22 | 22 | |
| 23 | 23 | [CBM systems which belong to this driver] |
| r4018 | r4019 | |
| 25 | 25 | * Commodore PET 2001 (1977) - board design 1 |
| 26 | 26 | * PET 2001 Series / CBM 20XX Series (1979) - board design 2, upgraded ROMs |
| 27 | 27 | |
| 28 | | PET 2001, the first of the series came initially with a calculator style |
| 28 | PET 2001, the first of the series came initially with a calculator style |
| 29 | 29 | keyboard, later changed to a larger and better full-stroke one (actually |
| 30 | 30 | it was available in two versions: Businness and Home Computer, the latter |
| 31 | | also containing graphics on the keys). Plenty of models were released in |
| 31 | also containing graphics on the keys). Plenty of models were released in |
| 32 | 32 | this series, depending on the RAM size, the keyboard type and the screen |
| 33 | 33 | dimension (see below). |
| 34 | 34 | |
| 35 | 35 | CPU: MOS 6502 (1 MHz) |
| 36 | 36 | RAM: 4K and 8K early models (Expandable to 32k addressable, more banked); |
| 37 | | 8K, 16K, 32K later models (Expandable again to larger RAM config) |
| 37 | 8K, 16K, 32K later models (Expandable again to larger RAM config) |
| 38 | 38 | ROM: 18 kilobytes early models; 20 kilobytes later ones |
| 39 | | Video: MOS Technology 6545 CRTC (9" Monochrome display; 40 columns x 25 |
| 40 | | rows ) |
| 41 | | Sound: None ine arlier models; Piezo electronic speaker later ones(One |
| 42 | | square wave voice; Three octaves) |
| 43 | | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 |
| 44 | | Commodore Datasette ports; 'EXPANSION' port; CBM parallel |
| 45 | | programmable "User" port |
| 39 | Video: MOS Technology 6545 CRTC (9" Monochrome display; 40 columns x 25 |
| 40 | rows ) |
| 41 | Sound: None ine arlier models; Piezo electronic speaker later ones(One |
| 42 | square wave voice; Three octaves) |
| 43 | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 |
| 44 | Commodore Datasette ports; 'EXPANSION' port; CBM parallel |
| 45 | programmable "User" port |
| 46 | 46 | Keyboard: "Calculator" 69 key QWERTY in early models and Full 69 keys QWERTY |
| 47 | | in later ones (16 key numeric keypad!; 4 direction 2-key cursor-pad ) |
| 47 | in later ones (16 key numeric keypad!; 4 direction 2-key cursor-pad ) |
| 48 | 48 | Additional hardware: Datasette |
| 49 | 49 | |
| 50 | 50 | Model Table (*): |
| 51 | 51 | |
| 52 | | PET 2001-4K Calculator Keyboard, Black Trim |
| 53 | | PET 2001-8K Calculator Keyboard, Blue Trim, 9" Screen |
| 54 | | PET 2001-8C Calculator Keyboard, Blue Trim, 9" Screen B&W (**) |
| 55 | | PET 2001B-8 Business Keyboard, 12" Screen |
| 56 | | PET 2001B-16 Business Keyboard, 12" Screen |
| 57 | | PET 2001B-32 Business Keyboard, 12" Screen (***) |
| 58 | | PET 2001N-8 Home Computer Keyboard, 12" Screen |
| 59 | | PET 2001N-16 Home Computer Keyboard, 9" and 12" Screen |
| 60 | | PET 2001N-32 Home Computer Keyboard, BASIC 4.0 |
| 52 | PET 2001-4K Calculator Keyboard, Black Trim |
| 53 | PET 2001-8K Calculator Keyboard, Blue Trim, 9" Screen |
| 54 | PET 2001-8C Calculator Keyboard, Blue Trim, 9" Screen B&W (**) |
| 55 | PET 2001B-8 Business Keyboard, 12" Screen |
| 56 | PET 2001B-16 Business Keyboard, 12" Screen |
| 57 | PET 2001B-32 Business Keyboard, 12" Screen (***) |
| 58 | PET 2001N-8 Home Computer Keyboard, 12" Screen |
| 59 | PET 2001N-16 Home Computer Keyboard, 9" and 12" Screen |
| 60 | PET 2001N-32 Home Computer Keyboard, BASIC 4.0 |
| 61 | 61 | |
| 62 | | Notes: B&W = Black and White Screen |
| 63 | | G&W = Green and White Screen |
| 64 | | Calculator Keyboard models also had a built-in datasette |
| 65 | | Home Computer Keyboard also features graphics on keys |
| 62 | Notes: B&W = Black and White Screen |
| 63 | G&W = Green and White Screen |
| 64 | Calculator Keyboard models also had a built-in datasette |
| 65 | Home Computer Keyboard also features graphics on keys |
| 66 | 66 | |
| 67 | | (*) Models 2001B-XX & 2001-XXB are the same. Same applies to 2001N-XX & |
| 68 | | 2001-XXN |
| 69 | | (**) Also confirmed with Black Trim and 9" Screen G&W |
| 70 | | (***) Also confirmed with Black Trim and 9" Screen B&W |
| 67 | (*) Models 2001B-XX & 2001-XXB are the same. Same applies to 2001N-XX & |
| 68 | 2001-XXN |
| 69 | (**) Also confirmed with Black Trim and 9" Screen G&W |
| 70 | (***) Also confirmed with Black Trim and 9" Screen B&W |
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | * Commodore CBM 3008 / 3016 / 3032 (1979) - board design 2, upgraded ROMs |
| 74 | 74 | |
| 75 | | In Europe, Philips was already selling a machine called PET, so they |
| 76 | | forced Commodore to change name. The result was the CBM 30XX Series, where |
| 77 | | XX is equal to the RAM size. These were basically PET models with 9" Screen |
| 78 | | and upgraded ROMs. There also existed a German CBM 3001, which was a PET |
| 79 | | 2001, B or N. Notice that these systems used to boot |
| 75 | In Europe, Philips was already selling a machine called PET, so they |
| 76 | forced Commodore to change name. The result was the CBM 30XX Series, where |
| 77 | XX is equal to the RAM size. These were basically PET models with 9" Screen |
| 78 | and upgraded ROMs. There also existed a German CBM 3001, which was a PET |
| 79 | 2001, B or N. Notice that these systems used to boot |
| 80 | 80 | |
| 81 | 81 | CPU: MOS 6502 (1MHz) |
| 82 | 82 | RAM: 8K, 16k, and 32k models (Expandable to even more banked memory) |
| 83 | 83 | ROM: 20 Kilobytes |
| 84 | 84 | Video: MOS Technology 6545 CRTC (9" Monochrome display; 40 columns x 25 rows) |
| 85 | 85 | Sound: Piezo electronic speaker (One square wave voice; Three octaves) |
| 86 | | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 Commodore |
| 87 | | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 88 | | Keyboard: Full 69 key QWERTY (16 key numeric keypad!; 4 direction 2-key cursor-pad) |
| 86 | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 Commodore |
| 87 | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 88 | Keyboard: Full 69 key QWERTY (16 key numeric keypad!; 4 direction 2-key cursor-pad) |
| 89 | 89 | |
| 90 | 90 | |
| 91 | 91 | * Commodore PET 40XX / CBM 40XX (1980) - board design 2, BASIC 4, 9" Screen |
| r4018 | r4019 | |
| 99 | 99 | CPU: MOS 6502 (1 MHz) |
| 100 | 100 | RAM: 8K, 16k, and 32k models (Expandable to even more banked memory) |
| 101 | 101 | ROM: 20 Kilobytes |
| 102 | | Video: MOS Technology 6545 CRTC (9" and 12" Monochrome displays; 40 |
| 103 | | columns x 25 rows) |
| 102 | Video: MOS Technology 6545 CRTC (9" and 12" Monochrome displays; 40 |
| 103 | columns x 25 rows) |
| 104 | 104 | Sound: Piezo electronic speaker (One square wave voice; Three octaves) |
| 105 | | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 Commodore |
| 106 | | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 105 | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 Commodore |
| 106 | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 107 | 107 | Keyboard: Full 69 key QWERTY (16 key numeric keypad!; 4 direction 2-key cursor-pad) |
| 108 | 108 | |
| 109 | 109 | |
| 110 | 110 | * Commodore PET 8032 / CBM 8032 (1981) - board design 3, BASIC 4, 12" Screen |
| 111 | 111 | |
| 112 | | Again, 80 columns screen and piezo beeper; BASIC 4 has a 80 columns editor |
| 112 | Again, 80 columns screen and piezo beeper; BASIC 4 has a 80 columns editor |
| 113 | 113 | ROM. It was possible to expand it to a 8096. |
| 114 | 114 | |
| 115 | 115 | CPU: MOS 6502 (1 MHz) |
| r4018 | r4019 | |
| 117 | 117 | ROM: 20 Kilobytes |
| 118 | 118 | Video: MOS Technology 6545 CRTC (12" Monochrome displays; 80 columns x 25 rows) |
| 119 | 119 | Sound: Piezo electronic speaker (One square wave voice; Three octaves) |
| 120 | | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 Commodore |
| 121 | | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 120 | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 Commodore |
| 121 | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 122 | 122 | Keyboard: Full 73 key QWERTY (11 key numeric keypad!; 4 direction 2-key cursor-pad) |
| 123 | 123 | |
| 124 | 124 | |
| r4018 | r4019 | |
| 133 | 133 | ROM: 20 Kilobytes |
| 134 | 134 | Video: MOS Technology 6545 CRTC (12" Monochrome display; 80 columns x 25 rows) |
| 135 | 135 | Sound: Piezo electronic speaker (One square wave voice; Three octaves) |
| 136 | | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 square-connector Port; 2 Commodore |
| 137 | | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 138 | | Keyboard: Full 73 key QWERTY (11 key numeric keypad!; 4 direction 2-key cursor-pad) |
| 136 | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 square-connector Port; 2 Commodore |
| 137 | Datasette ports; 'EXPANSION' port; CBM parallel programmable "User" port) |
| 138 | Keyboard: Full 73 key QWERTY (11 key numeric keypad!; 4 direction 2-key cursor-pad) |
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 | * Commodore CBM 200 Series (198?) |
| r4018 | r4019 | |
| 146 | 146 | |
| 147 | 147 | * Commodore Super PET / MMF9000 (1981) - BASIC 4, 12" Screen |
| 148 | 148 | |
| 149 | | Based on PET 8032. Sold in Germany as MMF (MicroMainFrame) 9000. Machines |
| 149 | Based on PET 8032. Sold in Germany as MMF (MicroMainFrame) 9000. Machines |
| 150 | 150 | sold in Italy had 134kB of RAM. |
| 151 | 151 | |
| 152 | 152 | CPU: MOS Technology 6502 & 6809 (1 MHz clock speeds) |
| 153 | 153 | RAM: 96 kilobytes (64K was contained on an expansion board above the motherboard; |
| 154 | | Early SP9000 models had two boards above the motherboard; Some models also |
| 155 | | had 3 or more switches) |
| 154 | Early SP9000 models had two boards above the motherboard; Some models also |
| 155 | had 3 or more switches) |
| 156 | 156 | ROM: 48 kilobytes |
| 157 | | Video: MOS Technology 6545 CRTC (12" Monochrome display; 80 columns x 25 rows; |
| 158 | | 3+ character sets, 256 characters each) |
| 157 | Video: MOS Technology 6545 CRTC (12" Monochrome display; 80 columns x 25 rows; |
| 158 | 3+ character sets, 256 characters each) |
| 159 | 159 | Sound: Piezo electronic speaker (One square wave voice; Three octaves) |
| 160 | | Ports: 6551 ACIA, MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 |
| 161 | | Commodore Datasette ports; 'EXPANSION' port; RS232 Internal port; CBM |
| 162 | | parallel programmable "User" port; Memory and Processor selection switches) |
| 163 | | Keyboard: Full-sized 73 key QWERTY (Multi-Font 62 key keyboard; APL Symbols on |
| 164 | | the front of the keys; 11 key numeric keypad; Editor functions on the front |
| 165 | | of the keys; 2-key 4-direction cursor-pad) |
| 160 | Ports: 6551 ACIA, MOS 6520 PIA, MOS 6522 VIA (IEEE-488 edge-connector Port; 2 |
| 161 | Commodore Datasette ports; 'EXPANSION' port; RS232 Internal port; CBM |
| 162 | parallel programmable "User" port; Memory and Processor selection switches) |
| 163 | Keyboard: Full-sized 73 key QWERTY (Multi-Font 62 key keyboard; APL Symbols on |
| 164 | the front of the keys; 11 key numeric keypad; Editor functions on the front |
| 165 | of the keys; 2-key 4-direction cursor-pad) |
| 166 | 166 | |
| 167 | 167 | |
| 168 | | * Commodore CBM SP9000 |
| 168 | * Commodore CBM SP9000 |
| 169 | 169 | |
| 170 | 170 | Similar to Super PET. Dual uP 6502/6809, 96kB RAM, business keyboard. |
| 171 | 171 | |
| 172 | 172 | |
| 173 | 173 | * Commodore PET 8296 / CBM 8296 (1984) - BASIC 4, 12" Screen |
| 174 | 174 | |
| 175 | | Shipped with 128k RAM and separate keyboard, it is a complete redesign of the |
| 176 | | PET universal board. It fits into the separate keyboard case, and directly holds |
| 177 | | 128k RAM, of which 96k can be used as in the 8096. In addition, using "user |
| 178 | | jumpers" on the motherboard, the ROM can be completely switched off to access |
| 179 | | the RAM "under the ROM", so that the complete 128k RAM are accessible. The "user |
| 180 | | jumpers" could be set to connect to the userport, so this could even be done |
| 175 | Shipped with 128k RAM and separate keyboard, it is a complete redesign of the |
| 176 | PET universal board. It fits into the separate keyboard case, and directly holds |
| 177 | 128k RAM, of which 96k can be used as in the 8096. In addition, using "user |
| 178 | jumpers" on the motherboard, the ROM can be completely switched off to access |
| 179 | the RAM "under the ROM", so that the complete 128k RAM are accessible. The "user |
| 180 | jumpers" could be set to connect to the userport, so this could even be done |
| 181 | 181 | under program control. |
| 182 | 182 | |
| 183 | 183 | CPU: MOS 6502 (1 MHz) |
| r4018 | r4019 | |
| 185 | 185 | ROM: 24 Kilobytes |
| 186 | 186 | Video: MOS Technology 6545 CRTC (12" Monochrome displays; 80 columns x 25 rows) |
| 187 | 187 | Sound: Piezo electronic speaker (One square wave voice; Three octaves) |
| 188 | | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 Port; Commodore Datasette port; |
| 189 | | 'EXPANSION' port; CBM parallel programmable "User" port) |
| 188 | Ports: MOS 6520 PIA, MOS 6522 VIA (IEEE-488 Port; Commodore Datasette port; |
| 189 | 'EXPANSION' port; CBM parallel programmable "User" port) |
| 190 | 190 | Keyboard: Full 73 key QWERTY (11 key numeric keypad!; 4 direction 2-key cursor-pad) |
| 191 | 191 | |
| 192 | | see http://www.6502.org/users/andre/petindex/8x96.html and |
| 193 | | http://www.sothius.com/hypertxt/welcome.html?./additional/cbm8296addition.html for |
| 192 | see http://www.6502.org/users/andre/petindex/8x96.html and |
| 193 | http://www.sothius.com/hypertxt/welcome.html?./additional/cbm8296addition.html for |
| 194 | 194 | more informations |
| 195 | 195 | |
| 196 | 196 | |
| r4018 | r4019 | |
| 198 | 198 | |
| 199 | 199 | It was a 8296 with built-in 8250-LP disk drive. |
| 200 | 200 | |
| 201 | | * Commodore CBM 8296GD |
| 201 | * Commodore CBM 8296GD |
| 202 | 202 | |
| 203 | 203 | Mentioned at http://www.commodore.ca/products/pet/commodore_pet.htm#Commodore%20PET%20Chronology |
| 204 | 204 | as a 8296 with a high resolution graphics board and drive. No other info available. |
| r4018 | r4019 | |
| 206 | 206 | [Other models] |
| 207 | 207 | |
| 208 | 208 | |
| 209 | | * Teacher's PET Simply a PET 2001-N with a different label, due to a |
| 210 | | marketing campaign in US schools |
| 211 | | * MDS 6500 Modified 2001N-32 with matching 2040 drive. 500 made. |
| 212 | | * "CASSIE" Synergistics Inc. rebadged 8032 |
| 209 | * Teacher's PET Simply a PET 2001-N with a different label, due to a |
| 210 | marketing campaign in US schools |
| 211 | * MDS 6500 Modified 2001N-32 with matching 2040 drive. 500 made. |
| 212 | * "CASSIE" Synergistics Inc. rebadged 8032 |
| 213 | 213 | |
| 214 | 214 | |
| 215 | 215 | [Board Designs] |
| 216 | 216 | |
| 217 | | All these models can be reduced to four board types (source William Levak's |
| 217 | All these models can be reduced to four board types (source William Levak's |
| 218 | 218 | doc, layouts from PETFAQ): |
| 219 | 219 | |
| 220 | 220 | Static Board (PET 2001) |
| r4018 | r4019 | |
| 225 | 225 | 40 column display |
| 226 | 226 | A video interrupt interferes with disk drive operation. |
| 227 | 227 | Display timing not compatible with Basic 4.0. |
| 228 | | ROM sockets: A2 2K character ROM sockets: A2 2K character |
| 228 | ROM sockets: A2 2K character ROM sockets: A2 2K character |
| 229 | 229 | (2316B) H1 C000-CFFF (6540) H1 C000-C7FF |
| 230 | 230 | H2 D000-DFFF H2 D000-D7FF |
| 231 | 231 | H3 E000-E7FF H3 E000-E7FF |
| r4018 | r4019 | |
| 329 | 329 | +------####-####--##-+ |
| 330 | 330 | ! # # tape |
| 331 | 331 | ! # # #2 |
| 332 | | ! R exp bus # ! |
| 332 | ! R exp bus # ! |
| 333 | 333 | ! A #! |
| 334 | 334 | ! M 9 #! |
| 335 | 335 | ! A #! 4000, 8000 Series |
| r4018 | r4019 | |
| 345 | 345 | |
| 346 | 346 | [TO DO] |
| 347 | 347 | |
| 348 | | * Verify if pre-CRTC models had differences between NTSC & PAL systems. |
| 348 | * Verify if pre-CRTC models had differences between NTSC & PAL systems. |
| 349 | 349 | If no differences arise we can merge back the following sets: |
| 350 | 350 | + cbm30 (same as pet2001n) & cbm30b (same as pet2001b) |
| 351 | 351 | + cbm40o (same as pet40on) & cbm40ob (same as pet40ob) |
| r4018 | r4019 | |
| 362 | 362 | |
| 363 | 363 | * Find out answers to the following details: |
| 364 | 364 | |
| 365 | | + Did BASIC 2 also come as upgrade ROMs for PET 2001 with Static Board? If |
| 366 | | this is the case, we need to support the splitted versions of the ROMs as |
| 365 | + Did BASIC 2 also come as upgrade ROMs for PET 2001 with Static Board? If |
| 366 | this is the case, we need to support the splitted versions of the ROMs as |
| 367 | 367 | an alternative BIOS to pet2001. |
| 368 | 368 | + Did final PET 40XX & CBM 40XX with 40 Columns & CRTC support had business or |
| 369 | 369 | normal keyboards? |
| 370 | 370 | |
| 371 | 371 | * Find confirmation about some models (which I don't believe ever existed, |
| 372 | | but...): |
| 372 | but...): |
| 373 | 373 | |
| 374 | | + were there PET 2001-16k & PET 2001-32k with Calculator type keyboard? |
| 374 | + were there PET 2001-16k & PET 2001-32k with Calculator type keyboard? |
| 375 | 375 | + were there CBM 20XX in Europe? |
| 376 | | + what about the following unrealistic RAM configurations: 4004? 8008? 8016? |
| 377 | | 8064? |
| 376 | + what about the following unrealistic RAM configurations: 4004? 8008? 8016? |
| 377 | 8064? |
| 378 | 378 | + did a CBM 210 exist? |
| 379 | 379 | |
| 380 | 380 | */ |
| r4018 | r4019 | |
| 408 | 408 | AM_RANGE(0xe810, 0xe813) AM_READWRITE(pia_0_r, pia_0_w) |
| 409 | 409 | AM_RANGE(0xe820, 0xe823) AM_READWRITE(pia_1_r, pia_1_w) |
| 410 | 410 | AM_RANGE(0xe840, 0xe84f) AM_DEVREADWRITE(VIA6522, "via6522_0", via_r, via_w) |
| 411 | | /* AM_RANGE(0xe900, 0xe91f) AM_READ(cbm_ieee_state) // for debugging */ |
| 411 | /* AM_RANGE(0xe900, 0xe91f) AM_READ(cbm_ieee_state) // for debugging */ |
| 412 | 412 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 413 | 413 | ADDRESS_MAP_END |
| 414 | 414 | |
| r4018 | r4019 | |
| 499 | 499 | |
| 500 | 500 | static INPUT_PORTS_START( pet ) |
| 501 | 501 | PORT_INCLUDE( pet_keyboard ) /* ROW0 -> ROW9 */ |
| 502 | | |
| 502 | |
| 503 | 503 | PORT_INCLUDE( pet_special ) /* SPECIAL */ |
| 504 | 504 | |
| 505 | 505 | PORT_INCLUDE( pet_config ) /* CFG */ |
| r4018 | r4019 | |
| 702 | 702 | |
| 703 | 703 | MDRV_VIDEO_START( pet_crtc ) |
| 704 | 704 | MDRV_VIDEO_UPDATE( pet_crtc ) |
| 705 | | |
| 705 | |
| 706 | 706 | MDRV_IMPORT_FROM(pet4_cartslot) |
| 707 | 707 | MACHINE_DRIVER_END |
| 708 | 708 | |
| r4018 | r4019 | |
| 731 | 731 | MDRV_GFXDECODE( pet80 ) |
| 732 | 732 | MDRV_VIDEO_START( pet_crtc ) |
| 733 | 733 | MDRV_VIDEO_UPDATE( pet_crtc ) |
| 734 | | |
| 734 | |
| 735 | 735 | MDRV_IMPORT_FROM(pet4_cartslot) |
| 736 | 736 | MACHINE_DRIVER_END |
| 737 | 737 | |
| r4018 | r4019 | |
| 769 | 769 | |
| 770 | 770 | /* PET 2001 - Board type 1 (Static Board) */ |
| 771 | 771 | /* BASIC 1 - "*** COMMODORE BASIC ***" at boot */ |
| 772 | | /* Four board variations depending on |
| 773 | | ROM sockets: either 6540 or 2316B |
| 774 | | RAM: either 6550 or 2114 |
| 775 | | The ROM content is the same in both cases, but the labels differ. Below we use labels |
| 772 | /* Four board variations depending on |
| 773 | ROM sockets: either 6540 or 2316B |
| 774 | RAM: either 6550 or 2114 |
| 775 | The ROM content is the same in both cases, but the labels differ. Below we use labels |
| 776 | 776 | from the 2316B version. For documentation sake, these would have been the labels based on |
| 777 | 777 | the board with 6540 ROMs |
| 778 | 778 | |
| r4018 | r4019 | |
| 785 | 785 | 901439-07.h7 |
| 786 | 786 | 901439-08.a2 |
| 787 | 787 | |
| 788 | | Also, in some board with 2316B, the location of the ROMs changes h1 <-> h5, h2 <-> h6 and |
| 788 | Also, in some board with 2316B, the location of the ROMs changes h1 <-> h5, h2 <-> h6 and |
| 789 | 789 | h4 <-> h7 |
| 790 | 790 | */ |
| 791 | 791 | |
| r4018 | r4019 | |
| 968 | 968 | |
| 969 | 969 | |
| 970 | 970 | /* Two different layouts are documented for the m6809 */ |
| 971 | | /* The 2532 EEPROM listed below (2516 for the .u21 one) could have been replaced by three 2764 EEPROM. |
| 971 | /* The 2532 EEPROM listed below (2516 for the .u21 one) could have been replaced by three 2764 EEPROM. |
| 972 | 972 | In this case the labels would have been as follows |
| 973 | 973 | |
| 974 | 974 | 970018-12.u47 (contents: u17+u18 below) |
| 975 | | 970019-12.u48 (contents: u19+u20 below) |
| 975 | 970019-12.u48 (contents: u19+u20 below) |
| 976 | 976 | 970020-12.u49 (contents: u21+u22 below) |
| 977 | 977 | |
| 978 | 978 | */ |
| r4018 | r4019 | |
| 1005 | 1005 | ROM_REGION( 0x20000, "main", 0 ) |
| 1006 | 1006 | ROM_LOAD( "324746-01.ue7", 0xb000, 0x3000, CRC(7935b528) SHA1(5ab17ee70467152bf2130e3f48a2aa81e9df93c9) ) // BASIC 4 // FIX ME!! |
| 1007 | 1007 | ROM_CONTINUE( 0xf000, 0x1000 ) |
| 1008 | | ROM_LOAD( "901474-04.ue8", 0xe000, 0x800, CRC(c1ffca3a) SHA1(7040b283ba39e9630e3d147f7d076b7abc39bc70) ) // Dated 0384, coincides with 3681 above according to AndrŽ Fachat's notes |
| 1008 | ROM_LOAD( "901474-04.ue8", 0xe000, 0x800, CRC(c1ffca3a) SHA1(7040b283ba39e9630e3d147f7d076b7abc39bc70) ) // Dated 0384, coincides with 3681 above according to Andr? Fachat's notes |
| 1009 | 1009 | |
| 1010 | 1010 | ROM_REGION( 0x4000, "gfx1", 0 ) |
| 1011 | 1011 | ROM_LOAD( "901447-10.uc5", 0x0000, 0x800, CRC(d8408674) SHA1(0157a2d55b7ac4eaeb38475889ebeea52e2593db) ) // Character Generator |