src/mess/machine/vc20tape.c
| r3189 | r3190 | |
| 1 | | /*************************************************************************** |
| 2 | | |
| 3 | | cbm vc20/c64 |
| 4 | | cbm c16 series (other physical representation) |
| 5 | | tape/cassette/datassette emulation |
| 6 | | |
| 7 | | ***************************************************************************/ |
| 8 | | #include <ctype.h> |
| 9 | | #include <stdio.h> |
| 10 | | |
| 11 | | #include "driver.h" |
| 12 | | #include "image.h" |
| 13 | | #include "sound/dac.h" |
| 14 | | |
| 15 | | #include "includes/vc20tape.h" |
| 16 | | |
| 17 | | #define TONE_ON_VALUE 0xff |
| 18 | | |
| 19 | | /* write line high active, */ |
| 20 | | /* read line low active!? */ |
| 21 | | |
| 22 | | #define TAPE_WAV 1 |
| 23 | | #define TAPE_PRG 2 |
| 24 | | |
| 25 | | static struct |
| 26 | | { |
| 27 | | int on, noise; |
| 28 | | int play, record; |
| 29 | | |
| 30 | | int data; |
| 31 | | int motor; |
| 32 | | write8_machine_func read_callback; |
| 33 | | |
| 34 | | int type; /* 0 nothing */ |
| 35 | | } |
| 36 | | tape; |
| 37 | | |
| 38 | | /* these are the values for wav files */ |
| 39 | | static struct |
| 40 | | { |
| 41 | | int state; |
| 42 | | emu_timer *timer; |
| 43 | | int pos; |
| 44 | | struct GameSample *sample; |
| 45 | | const device_config *img; |
| 46 | | } wav; |
| 47 | | |
| 48 | | /* these are the values for prg files */ |
| 49 | | static struct |
| 50 | | { |
| 51 | | int state; |
| 52 | | emu_timer *prg_timer; |
| 53 | | emu_timer *timer; |
| 54 | | int pos; |
| 55 | | |
| 56 | | #define VC20_SHORT (176e-6) |
| 57 | | #define VC20_MIDDLE (256e-6) |
| 58 | | #define VC20_LONG (336e-6) |
| 59 | | #define C16_SHORT (246e-6) /* messured */ |
| 60 | | #define C16_MIDDLE (483e-6) |
| 61 | | #define C16_LONG (965e-6) |
| 62 | | #define PCM_SHORT (double_to_attotime(prg.c16?C16_SHORT:VC20_SHORT)) |
| 63 | | #define PCM_MIDDLE (double_to_attotime(prg.c16?C16_MIDDLE:VC20_MIDDLE)) |
| 64 | | #define PCM_LONG (double_to_attotime(prg.c16?C16_LONG:VC20_LONG)) |
| 65 | | int c16; |
| 66 | | UINT8 *prg; |
| 67 | | int length; |
| 68 | | int stateblock, stateheader, statebyte, statebit; |
| 69 | | int prgdata; |
| 70 | | char name[16]; /*name for cbm */ |
| 71 | | UINT8 chksum; |
| 72 | | attotime lasttime; |
| 73 | | const device_config *img; |
| 74 | | } prg; |
| 75 | | |
| 76 | | /* from sound/samples.c no changes (static declared) */ |
| 77 | | /* readsamples not useable (loads files only from sample or game directory) */ |
| 78 | | /* and doesn't search the rompath */ |
| 79 | | static struct GameSample *vc20_read_wav_sample (const device_config *image) |
| 80 | | { |
| 81 | | /* NPW 28-Feb-2005 - this code sucks */ |
| 82 | | return NULL; |
| 83 | | #if 0 |
| 84 | | unsigned long offset = 0; |
| 85 | | UINT32 length, rate, filesize, temp32; |
| 86 | | UINT16 bits, temp16; |
| 87 | | char buf[32]; |
| 88 | | struct GameSample *result; |
| 89 | | int i; |
| 90 | | |
| 91 | | /* read the core header and make sure it's a WAVE file */ |
| 92 | | offset += mame_fread (f, buf, 4); |
| 93 | | if (offset < 4) |
| 94 | | return NULL; |
| 95 | | if (memcmp (&buf[0], "RIFF", 4) != 0) |
| 96 | | return NULL; |
| 97 | | |
| 98 | | /* get the total size */ |
| 99 | | offset += mame_fread (f, &filesize, 4); |
| 100 | | if (offset < 8) |
| 101 | | return NULL; |
| 102 | | filesize = LITTLE_ENDIANIZE_INT32 (filesize); |
| 103 | | |
| 104 | | /* read the RIFF file type and make sure it's a WAVE file */ |
| 105 | | offset += mame_fread (f, buf, 4); |
| 106 | | if (offset < 12) |
| 107 | | return NULL; |
| 108 | | if (memcmp (&buf[0], "WAVE", 4) != 0) |
| 109 | | return NULL; |
| 110 | | |
| 111 | | /* seek until we find a format tag */ |
| 112 | | while (1) |
| 113 | | { |
| 114 | | offset += mame_fread (f, buf, 4); |
| 115 | | offset += mame_fread (f, &length, 4); |
| 116 | | length = LITTLE_ENDIANIZE_INT32 (length); |
| 117 | | if (memcmp (&buf[0], "fmt ", 4) == 0) |
| 118 | | break; |
| 119 | | |
| 120 | | /* seek to the next block */ |
| 121 | | mame_fseek (f, length, SEEK_CUR); |
| 122 | | offset += length; |
| 123 | | if (offset >= filesize) |
| 124 | | return NULL; |
| 125 | | } |
| 126 | | |
| 127 | | /* read the format -- make sure it is PCM */ |
| 128 | | offset += mame_fread(f, &temp16, 2); |
| 129 | | temp16 = LITTLE_ENDIANIZE_INT16(temp16); |
| 130 | | if (temp16 != 1) |
| 131 | | return NULL; |
| 132 | | |
| 133 | | /* number of channels -- only mono is supported */ |
| 134 | | offset += mame_fread(f, &temp16, 2); |
| 135 | | temp16 = LITTLE_ENDIANIZE_INT16(temp16); |
| 136 | | if (temp16 != 1) |
| 137 | | return NULL; |
| 138 | | |
| 139 | | /* sample rate */ |
| 140 | | offset += mame_fread (f, &rate, 4); |
| 141 | | rate = LITTLE_ENDIANIZE_INT32 (rate); |
| 142 | | |
| 143 | | /* bytes/second and block alignment are ignored */ |
| 144 | | offset += mame_fread (f, buf, 6); |
| 145 | | |
| 146 | | /* bits/sample */ |
| 147 | | offset += mame_fread(f, &bits, 2); |
| 148 | | bits = LITTLE_ENDIANIZE_INT16(bits); |
| 149 | | if (bits != 8 && bits != 16) |
| 150 | | return NULL; |
| 151 | | |
| 152 | | /* seek past any extra data */ |
| 153 | | mame_fseek (f, length - 16, SEEK_CUR); |
| 154 | | offset += length - 16; |
| 155 | | |
| 156 | | /* seek until we find a data tag */ |
| 157 | | while (1) |
| 158 | | { |
| 159 | | offset += mame_fread (f, buf, 4); |
| 160 | | offset += mame_fread (f, &length, 4); |
| 161 | | length = LITTLE_ENDIANIZE_INT32 (length); |
| 162 | | if (memcmp (&buf[0], "data", 4) == 0) |
| 163 | | break; |
| 164 | | |
| 165 | | /* seek to the next block */ |
| 166 | | mame_fseek (f, length, SEEK_CUR); |
| 167 | | offset += length; |
| 168 | | if (offset >= filesize) |
| 169 | | return NULL; |
| 170 | | } |
| 171 | | |
| 172 | | /* allocate the game sample */ |
| 173 | | result = (struct GameSample *)malloc (sizeof (struct GameSample) + length); |
| 174 | | |
| 175 | | if (result == NULL) |
| 176 | | return NULL; |
| 177 | | |
| 178 | | /* fill in the sample data */ |
| 179 | | result->length = length; |
| 180 | | result->smpfreq = rate; |
| 181 | | result->resolution = bits; |
| 182 | | |
| 183 | | /* read the data in */ |
| 184 | | if (bits == 8) |
| 185 | | { |
| 186 | | mame_fread (f, result->data, length); |
| 187 | | |
| 188 | | /* convert 8-bit data to signed samples */ |
| 189 | | for (temp32 = 0; temp32 < length; temp32++) |
| 190 | | result->data[temp32] -= 0x80; |
| 191 | | } |
| 192 | | else |
| 193 | | { |
| 194 | | /* 16-bit data is fine as-is */ |
| 195 | | mame_fread(f, result->data, length); |
| 196 | | for (i = 0; i < length; i += 2) |
| 197 | | { |
| 198 | | UINT16 *ptr = (UINT16 *) (&result->data[i]); |
| 199 | | *ptr = LITTLE_ENDIANIZE_INT16(ptr); |
| 200 | | } |
| 201 | | } |
| 202 | | return result; |
| 203 | | #endif |
| 204 | | } |
| 205 | | |
| 206 | | static TIMER_CALLBACK(vc20_wav_timer); |
| 207 | | static void vc20_wav_state (void) |
| 208 | | { |
| 209 | | /* NPW 28-Feb-2005 - this code sucks */ |
| 210 | | #if 0 |
| 211 | | switch (wav.state) |
| 212 | | { |
| 213 | | case 0: |
| 214 | | break; /* not inited */ |
| 215 | | case 1: /* off */ |
| 216 | | if (tape.on) |
| 217 | | { |
| 218 | | wav.state = 2; |
| 219 | | break; |
| 220 | | } |
| 221 | | break; |
| 222 | | case 2: /* on */ |
| 223 | | if (!tape.on) |
| 224 | | { |
| 225 | | wav.state = 1; |
| 226 | | tape.play = 0; |
| 227 | | tape.record = 0; |
| 228 | | dac_data_w (0, 0); |
| 229 | | break; |
| 230 | | } |
| 231 | | if (tape.motor && tape.play) |
| 232 | | { |
| 233 | | wav.state = 3; |
| 234 | | timer_adjust_periodic(wav.timer, 0, 0, 1.0 / wav.sample->smpfreq); |
| 235 | | break; |
| 236 | | } |
| 237 | | if (tape.motor && tape.record) |
| 238 | | { |
| 239 | | wav.state = 4; |
| 240 | | break; |
| 241 | | } |
| 242 | | break; |
| 243 | | case 3: /* reading */ |
| 244 | | if (!tape.on) |
| 245 | | { |
| 246 | | wav.state = 1; |
| 247 | | tape.play = 0; |
| 248 | | tape.record = 0; |
| 249 | | dac_data_w (0, 0); |
| 250 | | timer_reset(wav.timer, attotime_never); |
| 251 | | break; |
| 252 | | } |
| 253 | | if (!tape.motor || !tape.play) |
| 254 | | { |
| 255 | | wav.state = 2; |
| 256 | | timer_reset(wav.timer, attotime_never); |
| 257 | | dac_data_w (0, 0); |
| 258 | | break; |
| 259 | | } |
| 260 | | break; |
| 261 | | case 4: /* saving */ |
| 262 | | if (!tape.on) |
| 263 | | { |
| 264 | | wav.state = 1; |
| 265 | | tape.play = 0; |
| 266 | | tape.record = 0; |
| 267 | | dac_data_w (0, 0); |
| 268 | | break; |
| 269 | | } |
| 270 | | if (!tape.motor || !tape.record) |
| 271 | | { |
| 272 | | wav.state = 2; |
| 273 | | dac_data_w (0, 0); |
| 274 | | break; |
| 275 | | } |
| 276 | | break; |
| 277 | | } |
| 278 | | #endif |
| 279 | | } |
| 280 | | |
| 281 | | static void vc20_wav_open(const device_config *image) |
| 282 | | { |
| 283 | | if ((wav.sample = vc20_read_wav_sample (image)) == NULL) |
| 284 | | { |
| 285 | | logerror("tape %s could not be loaded\n", image_filename(image)); |
| 286 | | return; |
| 287 | | } |
| 288 | | logerror("tape %s loaded\n", image_filename(image)); |
| 289 | | |
| 290 | | tape.type = TAPE_WAV; |
| 291 | | wav.img = image; |
| 292 | | wav.pos = 0; |
| 293 | | tape.on = 1; |
| 294 | | wav.state = 2; |
| 295 | | } |
| 296 | | |
| 297 | | static void vc20_wav_write (int data) |
| 298 | | { |
| 299 | | if (tape.noise) |
| 300 | | dac_data_w (0, data); |
| 301 | | } |
| 302 | | |
| 303 | | static TIMER_CALLBACK(vc20_wav_timer) |
| 304 | | { |
| 305 | | /* NPW 28-Feb-2005 - this code sucks */ |
| 306 | | #if 0 |
| 307 | | if (wav.sample->resolution == 8) |
| 308 | | { |
| 309 | | tape.data = wav.sample->data[wav.pos] > 0x0; |
| 310 | | wav.pos++; |
| 311 | | if (wav.pos >= wav.sample->length) |
| 312 | | { |
| 313 | | wav.pos = 0; |
| 314 | | tape.play = 0; |
| 315 | | } |
| 316 | | } |
| 317 | | else |
| 318 | | { |
| 319 | | tape.data = ((short *) (wav.sample->data))[wav.pos] > 0x0; |
| 320 | | wav.pos++; |
| 321 | | if (wav.pos * 2 >= wav.sample->length) |
| 322 | | { |
| 323 | | wav.pos = 0; |
| 324 | | tape.play = 0; |
| 325 | | } |
| 326 | | } |
| 327 | | if (tape.noise) |
| 328 | | dac_data_w (0, tape.data ? TONE_ON_VALUE : 0); |
| 329 | | if (tape.read_callback) |
| 330 | | tape.read_callback (0, tape.data); |
| 331 | | /* vc20_wav_state(); // removing timer in timer puls itself hangs */ |
| 332 | | #endif |
| 333 | | } |
| 334 | | |
| 335 | | static TIMER_CALLBACK(vc20_prg_timer); |
| 336 | | static void vc20_prg_state (void) |
| 337 | | { |
| 338 | | switch (prg.state) |
| 339 | | { |
| 340 | | case 0: |
| 341 | | break; /* not inited */ |
| 342 | | case 1: /* off */ |
| 343 | | if (tape.on) |
| 344 | | { |
| 345 | | prg.state = 2; |
| 346 | | break; |
| 347 | | } |
| 348 | | break; |
| 349 | | case 2: /* on */ |
| 350 | | if (!tape.on) |
| 351 | | { |
| 352 | | prg.state = 1; |
| 353 | | tape.play = 0; |
| 354 | | tape.record = 0; |
| 355 | | dac_data_w (0, 0); |
| 356 | | break; |
| 357 | | } |
| 358 | | if (tape.motor && tape.play) |
| 359 | | { |
| 360 | | prg.state = 3; |
| 361 | | timer_reset(prg.timer, attotime_zero); |
| 362 | | break; |
| 363 | | } |
| 364 | | if (tape.motor && tape.record) |
| 365 | | { |
| 366 | | prg.state = 4; |
| 367 | | break; |
| 368 | | } |
| 369 | | break; |
| 370 | | case 3: /* reading */ |
| 371 | | if (!tape.on) |
| 372 | | { |
| 373 | | prg.state = 1; |
| 374 | | tape.play = 0; |
| 375 | | tape.record = 0; |
| 376 | | dac_data_w (0, 0); |
| 377 | | timer_reset(prg.timer, attotime_never); |
| 378 | | break; |
| 379 | | } |
| 380 | | if (!tape.motor || !tape.play) |
| 381 | | { |
| 382 | | prg.state = 2; |
| 383 | | timer_reset(prg.timer, attotime_never); |
| 384 | | dac_data_w (0, 0); |
| 385 | | break; |
| 386 | | } |
| 387 | | break; |
| 388 | | case 4: /* saving */ |
| 389 | | if (!tape.on) |
| 390 | | { |
| 391 | | prg.state = 1; |
| 392 | | tape.play = 0; |
| 393 | | tape.record = 0; |
| 394 | | dac_data_w (0, 0); |
| 395 | | break; |
| 396 | | } |
| 397 | | if (!tape.motor || !tape.record) |
| 398 | | { |
| 399 | | prg.state = 2; |
| 400 | | dac_data_w (0, 0); |
| 401 | | break; |
| 402 | | } |
| 403 | | break; |
| 404 | | } |
| 405 | | } |
| 406 | | |
| 407 | | static void vc20_prg_open(const device_config *image) |
| 408 | | { |
| 409 | | const char *name; |
| 410 | | int i; |
| 411 | | |
| 412 | | prg.length = image_length(image); |
| 413 | | prg.prg = image_ptr(image); |
| 414 | | if (!prg.prg) |
| 415 | | { |
| 416 | | logerror("tape %s could not be loaded\n", image_filename(image)); |
| 417 | | return; |
| 418 | | } |
| 419 | | logerror("tape %s loaded\n", image_filename(image)); |
| 420 | | |
| 421 | | name = image_filename(image); |
| 422 | | for (i = 0; name[i] != 0; i++) |
| 423 | | prg.name[i] = toupper (name[i]); |
| 424 | | for (; i < 16; i++) |
| 425 | | prg.name[i] = ' '; |
| 426 | | |
| 427 | | prg.img = image; |
| 428 | | prg.stateblock = 0; |
| 429 | | prg.stateheader = 0; |
| 430 | | prg.statebyte = 0; |
| 431 | | prg.statebit = 0; |
| 432 | | tape.type = TAPE_PRG; |
| 433 | | tape.on = 1; |
| 434 | | prg.state = 2; |
| 435 | | prg.pos = 0; |
| 436 | | prg.timer = prg.prg_timer; |
| 437 | | } |
| 438 | | |
| 439 | | static void vc20_prg_write (int data) |
| 440 | | { |
| 441 | | #if 0 |
| 442 | | /* this was used to decode cbms tape format, but could */ |
| 443 | | /* be converted to a real program writer */ |
| 444 | | /* c16: be sure the cpu clock is about 1.8 MHz (when screen is off) */ |
| 445 | | static int count = 0; |
| 446 | | static int old = 0; |
| 447 | | static double time = 0; |
| 448 | | static int bytecount = 0, byte; |
| 449 | | |
| 450 | | if (old != data) |
| 451 | | { |
| 452 | | double neu = timer_get_time (); |
| 453 | | int diff = (neu - time) * 1000000; |
| 454 | | |
| 455 | | count++; |
| 456 | | logerror("%f %d %s %d\n", (PCM_LONG + PCM_MIDDLE) / 2, |
| 457 | | bytecount, old ? "high" : "low", |
| 458 | | diff); |
| 459 | | if (old) |
| 460 | | { |
| 461 | | if (count > 0 /*27000 */ ) |
| 462 | | { |
| 463 | | switch (bytecount) |
| 464 | | { |
| 465 | | case 0: |
| 466 | | if (diff > (PCM_LONG + PCM_MIDDLE) * 1e6 / 2) |
| 467 | | { |
| 468 | | bytecount++; |
| 469 | | byte = 0; |
| 470 | | } |
| 471 | | break; |
| 472 | | case 1: |
| 473 | | case 3: |
| 474 | | case 5: |
| 475 | | case 7: |
| 476 | | case 9: |
| 477 | | case 11: |
| 478 | | case 13: |
| 479 | | case 15: |
| 480 | | case 17: |
| 481 | | bytecount++; |
| 482 | | break; |
| 483 | | case 2: |
| 484 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 485 | | byte |= 1; |
| 486 | | bytecount++; |
| 487 | | break; |
| 488 | | case 4: |
| 489 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 490 | | byte |= 2; |
| 491 | | bytecount++; |
| 492 | | break; |
| 493 | | case 6: |
| 494 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 495 | | byte |= 4; |
| 496 | | bytecount++; |
| 497 | | break; |
| 498 | | case 8: |
| 499 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 500 | | byte |= 8; |
| 501 | | bytecount++; |
| 502 | | break; |
| 503 | | case 10: |
| 504 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 505 | | byte |= 0x10; |
| 506 | | bytecount++; |
| 507 | | break; |
| 508 | | case 12: |
| 509 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 510 | | byte |= 0x20; |
| 511 | | bytecount++; |
| 512 | | break; |
| 513 | | case 14: |
| 514 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 515 | | byte |= 0x40; |
| 516 | | bytecount++; |
| 517 | | break; |
| 518 | | case 16: |
| 519 | | if (diff > (PCM_MIDDLE + PCM_SHORT) * 1e6 / 2) |
| 520 | | byte |= 0x80; |
| 521 | | logerror("byte %.2x\n", byte); |
| 522 | | bytecount = 0; |
| 523 | | break; |
| 524 | | } |
| 525 | | } |
| 526 | | } |
| 527 | | old = data; |
| 528 | | time = timer_get_time (); |
| 529 | | } |
| 530 | | #endif |
| 531 | | if (tape.noise) |
| 532 | | dac_data_w (0, data ? TONE_ON_VALUE : 0); |
| 533 | | } |
| 534 | | |
| 535 | | static void vc20_tape_bit (int bit) |
| 536 | | { |
| 537 | | switch (prg.statebit) |
| 538 | | { |
| 539 | | case 0: |
| 540 | | if (bit) |
| 541 | | { |
| 542 | | timer_reset (prg.timer, prg.lasttime = PCM_MIDDLE); |
| 543 | | prg.statebit = 2; |
| 544 | | } |
| 545 | | else |
| 546 | | { |
| 547 | | prg.statebit++; |
| 548 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 549 | | } |
| 550 | | break; |
| 551 | | case 1: |
| 552 | | timer_reset (prg.timer, prg.lasttime = PCM_MIDDLE); |
| 553 | | prg.statebit = 0; |
| 554 | | break; |
| 555 | | case 2: |
| 556 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 557 | | prg.statebit = 0; |
| 558 | | break; |
| 559 | | } |
| 560 | | } |
| 561 | | |
| 562 | | static void vc20_tape_byte (void) |
| 563 | | { |
| 564 | | static int bit = 0, parity = 0; |
| 565 | | |
| 566 | | /* convert one byte to vc20 tape data |
| 567 | | * puls wide modulation |
| 568 | | * 3 type of pulses (quadratic on/off pulse) |
| 569 | | * K (short) 176 microseconds |
| 570 | | * M 256 |
| 571 | | * L 336 |
| 572 | | * LM bit0 bit1 bit2 bit3 bit4 bit5 bit6 bit7 oddparity |
| 573 | | * 0 coded as KM, 1 as MK |
| 574 | | * gives 8.96 milliseconds for 1 byte |
| 575 | | */ |
| 576 | | switch (prg.statebyte) |
| 577 | | { |
| 578 | | case 0: |
| 579 | | timer_reset (prg.timer, prg.lasttime = PCM_LONG); |
| 580 | | prg.statebyte++; |
| 581 | | break; |
| 582 | | case 1: |
| 583 | | timer_reset (prg.timer, prg.lasttime = PCM_MIDDLE); |
| 584 | | prg.statebyte++; |
| 585 | | bit = 1; |
| 586 | | parity = 0; |
| 587 | | break; |
| 588 | | case 2: |
| 589 | | case 3: |
| 590 | | case 4: |
| 591 | | case 5: |
| 592 | | case 6: |
| 593 | | case 7: |
| 594 | | case 8: |
| 595 | | case 9: |
| 596 | | vc20_tape_bit (prg.prgdata & bit); |
| 597 | | if (prg.prgdata & bit) |
| 598 | | parity = !parity; |
| 599 | | bit <<= 1; |
| 600 | | prg.statebyte++; |
| 601 | | break; |
| 602 | | case 10: |
| 603 | | vc20_tape_bit (!parity); |
| 604 | | prg.chksum ^= prg.prgdata; |
| 605 | | prg.statebyte = 0; |
| 606 | | prg.pos--; |
| 607 | | break; |
| 608 | | } |
| 609 | | } |
| 610 | | |
| 611 | | /* 01 prg id |
| 612 | | * lo hi load address |
| 613 | | * lo hi end address |
| 614 | | * 192-5-1 bytes: filename (filled with 0x20) |
| 615 | | * xor chksum */ |
| 616 | | static void vc20_tape_prgheader (void) |
| 617 | | { |
| 618 | | static int i = 0; |
| 619 | | |
| 620 | | switch (prg.stateheader) |
| 621 | | { |
| 622 | | case 0: |
| 623 | | prg.chksum = 0; |
| 624 | | prg.prgdata = 1; |
| 625 | | prg.stateheader++; |
| 626 | | vc20_tape_byte (); |
| 627 | | break; |
| 628 | | case 1: |
| 629 | | prg.prgdata = prg.prg[0]; |
| 630 | | prg.stateheader++; |
| 631 | | vc20_tape_byte (); |
| 632 | | break; |
| 633 | | case 2: |
| 634 | | prg.prgdata = prg.prg[1]; |
| 635 | | prg.stateheader++; |
| 636 | | vc20_tape_byte (); |
| 637 | | break; |
| 638 | | case 3: |
| 639 | | prg.prgdata = (prg.prg[0] + prg.length - 2) & 0xff; |
| 640 | | prg.stateheader++; |
| 641 | | vc20_tape_byte (); |
| 642 | | break; |
| 643 | | case 4: |
| 644 | | prg.prgdata = ((prg.prg[0] + (prg.prg[1] << 8)) + prg.length - 2) >> 8; |
| 645 | | prg.stateheader++; |
| 646 | | i = 0; |
| 647 | | vc20_tape_byte (); |
| 648 | | break; |
| 649 | | case 5: |
| 650 | | if ((i != 16) && (prg.name[i] != 0)) |
| 651 | | { |
| 652 | | prg.prgdata = prg.name[i]; |
| 653 | | i++; |
| 654 | | vc20_tape_byte (); |
| 655 | | break; |
| 656 | | } |
| 657 | | prg.prgdata = 0x20; |
| 658 | | prg.stateheader++; |
| 659 | | vc20_tape_byte (); |
| 660 | | break; |
| 661 | | case 6: |
| 662 | | if (i != 192 - 5 - 1) |
| 663 | | { |
| 664 | | vc20_tape_byte (); |
| 665 | | i++; |
| 666 | | break; |
| 667 | | } |
| 668 | | prg.prgdata = prg.chksum; |
| 669 | | vc20_tape_byte (); |
| 670 | | prg.stateheader = 0; |
| 671 | | break; |
| 672 | | } |
| 673 | | } |
| 674 | | |
| 675 | | static void vc20_tape_program (void) |
| 676 | | { |
| 677 | | static int i = 0; |
| 678 | | |
| 679 | | switch (prg.stateblock) |
| 680 | | { |
| 681 | | case 0: |
| 682 | | prg.pos = (9 + 192 + 1) * 2 + (9 + prg.length - 2 + 1) * 2; |
| 683 | | i = 0; |
| 684 | | prg.stateblock++; |
| 685 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 686 | | break; |
| 687 | | case 1: |
| 688 | | i++; |
| 689 | | if (i < 12000 /*27136 */ ) |
| 690 | | { /* this time is not so important */ |
| 691 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 692 | | break; |
| 693 | | } |
| 694 | | /* writing countdown $89 ... $80 */ |
| 695 | | prg.stateblock++; |
| 696 | | prg.prgdata = 0x89; |
| 697 | | vc20_tape_byte (); |
| 698 | | break; |
| 699 | | case 2: |
| 700 | | if (prg.prgdata != 0x81) |
| 701 | | { |
| 702 | | prg.prgdata--; |
| 703 | | vc20_tape_byte (); |
| 704 | | break; |
| 705 | | } |
| 706 | | prg.stateblock++; |
| 707 | | vc20_tape_prgheader (); |
| 708 | | break; |
| 709 | | case 3: |
| 710 | | timer_reset (prg.timer, prg.lasttime = PCM_LONG); |
| 711 | | prg.stateblock++; |
| 712 | | i = 0; |
| 713 | | break; |
| 714 | | case 4: |
| 715 | | if (i < 80) |
| 716 | | { |
| 717 | | i++; |
| 718 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 719 | | break; |
| 720 | | } |
| 721 | | /* writing countdown $09 ... $00 */ |
| 722 | | prg.prgdata = 9; |
| 723 | | prg.stateblock++; |
| 724 | | vc20_tape_byte (); |
| 725 | | break; |
| 726 | | case 5: |
| 727 | | if (prg.prgdata != 1) |
| 728 | | { |
| 729 | | prg.prgdata--; |
| 730 | | vc20_tape_byte (); |
| 731 | | break; |
| 732 | | } |
| 733 | | prg.stateblock++; |
| 734 | | vc20_tape_prgheader (); |
| 735 | | break; |
| 736 | | case 6: |
| 737 | | timer_reset (prg.timer, prg.lasttime = PCM_LONG); |
| 738 | | prg.stateblock++; |
| 739 | | i = 0; |
| 740 | | break; |
| 741 | | case 7: |
| 742 | | if (i < 80) |
| 743 | | { |
| 744 | | i++; |
| 745 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 746 | | break; |
| 747 | | } |
| 748 | | i = 0; |
| 749 | | prg.stateblock++; |
| 750 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 751 | | break; |
| 752 | | case 8: |
| 753 | | if (i < 3000 /*5376 */ ) |
| 754 | | { |
| 755 | | i++; |
| 756 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 757 | | break; |
| 758 | | } |
| 759 | | prg.prgdata = 0x89; |
| 760 | | prg.stateblock++; |
| 761 | | vc20_tape_byte (); |
| 762 | | break; |
| 763 | | case 9: |
| 764 | | if (prg.prgdata != 0x81) |
| 765 | | { |
| 766 | | prg.prgdata--; |
| 767 | | vc20_tape_byte (); |
| 768 | | break; |
| 769 | | } |
| 770 | | i = 2; |
| 771 | | prg.chksum = 0; |
| 772 | | prg.prgdata = prg.prg[i]; |
| 773 | | i++; |
| 774 | | vc20_tape_byte (); |
| 775 | | prg.stateblock++; |
| 776 | | break; |
| 777 | | case 10: |
| 778 | | if (i < prg.length) |
| 779 | | { |
| 780 | | prg.prgdata = prg.prg[i]; |
| 781 | | i++; |
| 782 | | vc20_tape_byte (); |
| 783 | | break; |
| 784 | | } |
| 785 | | prg.prgdata = prg.chksum; |
| 786 | | vc20_tape_byte (); |
| 787 | | prg.stateblock++; |
| 788 | | break; |
| 789 | | case 11: |
| 790 | | timer_reset (prg.timer, prg.lasttime = PCM_LONG); |
| 791 | | prg.stateblock++; |
| 792 | | i = 0; |
| 793 | | break; |
| 794 | | case 12: |
| 795 | | if (i < 80) |
| 796 | | { |
| 797 | | i++; |
| 798 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 799 | | break; |
| 800 | | } |
| 801 | | /* writing countdown $09 ... $00 */ |
| 802 | | prg.prgdata = 9; |
| 803 | | prg.stateblock++; |
| 804 | | vc20_tape_byte (); |
| 805 | | break; |
| 806 | | case 13: |
| 807 | | if (prg.prgdata != 1) |
| 808 | | { |
| 809 | | prg.prgdata--; |
| 810 | | vc20_tape_byte (); |
| 811 | | break; |
| 812 | | } |
| 813 | | prg.chksum = 0; |
| 814 | | i = 2; |
| 815 | | prg.prgdata = prg.prg[i]; |
| 816 | | i++; |
| 817 | | vc20_tape_byte (); |
| 818 | | prg.stateblock++; |
| 819 | | break; |
| 820 | | case 14: |
| 821 | | if (i < prg.length) |
| 822 | | { |
| 823 | | prg.prgdata = prg.prg[i]; |
| 824 | | i++; |
| 825 | | vc20_tape_byte (); |
| 826 | | break; |
| 827 | | } |
| 828 | | prg.prgdata = prg.chksum; |
| 829 | | vc20_tape_byte (); |
| 830 | | prg.stateblock++; |
| 831 | | break; |
| 832 | | case 15: |
| 833 | | timer_reset (prg.timer, prg.lasttime = PCM_LONG); |
| 834 | | prg.stateblock++; |
| 835 | | i = 0; |
| 836 | | break; |
| 837 | | case 16: |
| 838 | | if (i < 80) |
| 839 | | { |
| 840 | | i++; |
| 841 | | timer_reset (prg.timer, prg.lasttime = PCM_SHORT); |
| 842 | | break; |
| 843 | | } |
| 844 | | prg.stateblock = 0; |
| 845 | | break; |
| 846 | | } |
| 847 | | |
| 848 | | } |
| 849 | | |
| 850 | | static TIMER_CALLBACK(vc20_prg_timer) |
| 851 | | { |
| 852 | | if (!tape.data) |
| 853 | | { /* send the same low phase */ |
| 854 | | if (tape.noise) |
| 855 | | dac_data_w (0, 0); |
| 856 | | tape.data = 1; |
| 857 | | timer_reset (prg.timer, prg.lasttime); |
| 858 | | } |
| 859 | | else |
| 860 | | { |
| 861 | | if (tape.noise) |
| 862 | | dac_data_w (0, TONE_ON_VALUE); |
| 863 | | tape.data = 0; |
| 864 | | if (prg.statebit) |
| 865 | | { |
| 866 | | vc20_tape_bit (0); |
| 867 | | } |
| 868 | | else if (prg.statebyte) |
| 869 | | { /* send the rest of the byte */ |
| 870 | | vc20_tape_byte (); |
| 871 | | } |
| 872 | | else if (prg.stateheader) |
| 873 | | { |
| 874 | | vc20_tape_prgheader (); |
| 875 | | } |
| 876 | | else |
| 877 | | { |
| 878 | | vc20_tape_program (); |
| 879 | | if (!prg.stateblock) |
| 880 | | { |
| 881 | | tape.play = 0; |
| 882 | | } |
| 883 | | } |
| 884 | | } |
| 885 | | if (tape.read_callback) |
| 886 | | tape.read_callback (machine, 0, tape.data); |
| 887 | | vc20_prg_state (); |
| 888 | | } |
| 889 | | |
| 890 | | void vc20_tape_open (write8_machine_func read_callback) |
| 891 | | { |
| 892 | | tape.read_callback = read_callback; |
| 893 | | #ifndef NEW_GAMEDRIVER |
| 894 | | tape.type = 0; |
| 895 | | tape.on = 0; |
| 896 | | tape.noise = 0; |
| 897 | | tape.play = 0; |
| 898 | | tape.record = 0; |
| 899 | | tape.motor = 0; |
| 900 | | tape.data = 0; |
| 901 | | #endif |
| 902 | | prg.c16 = 0; |
| 903 | | wav.timer = timer_alloc(vc20_wav_timer, NULL); |
| 904 | | prg.prg_timer = timer_alloc(vc20_prg_timer, NULL); |
| 905 | | } |
| 906 | | |
| 907 | | void c16_tape_open (void) |
| 908 | | { |
| 909 | | vc20_tape_open (NULL); |
| 910 | | prg.c16 = 1; |
| 911 | | } |
| 912 | | |
| 913 | | static DEVICE_IMAGE_LOAD( vc20_tape ) |
| 914 | | { |
| 915 | | const char *cp; |
| 916 | | |
| 917 | | tape.type = 0; |
| 918 | | tape.on = 0; |
| 919 | | tape.noise = 0; |
| 920 | | tape.play = 0; |
| 921 | | tape.record = 0; |
| 922 | | tape.motor = 0; |
| 923 | | tape.data = 0; |
| 924 | | |
| 925 | | cp = image_filetype(image); |
| 926 | | if (!cp) |
| 927 | | return INIT_FAIL; |
| 928 | | |
| 929 | | if (mame_stricmp (cp, "wav") == 0) |
| 930 | | vc20_wav_open(image); |
| 931 | | else if (mame_stricmp (cp, "prg") == 0) |
| 932 | | vc20_prg_open(image); |
| 933 | | else |
| 934 | | return INIT_FAIL; |
| 935 | | return INIT_PASS; |
| 936 | | } |
| 937 | | |
| 938 | | static DEVICE_IMAGE_UNLOAD( vc20_tape ) |
| 939 | | { |
| 940 | | vc20_tape_close(); |
| 941 | | } |
| 942 | | |
| 943 | | void vc20_tape_close (void) |
| 944 | | { |
| 945 | | switch (tape.type) |
| 946 | | { |
| 947 | | case TAPE_WAV: |
| 948 | | free (wav.sample); |
| 949 | | break; |
| 950 | | case TAPE_PRG: |
| 951 | | free (prg.prg); |
| 952 | | break; |
| 953 | | } |
| 954 | | /* HJB reset so vc20_tape_close() can be called multiple times!? */ |
| 955 | | tape.type = 0; |
| 956 | | } |
| 957 | | |
| 958 | | static void vc20_state (void) |
| 959 | | { |
| 960 | | switch (tape.type) |
| 961 | | { |
| 962 | | case TAPE_WAV: |
| 963 | | vc20_wav_state (); |
| 964 | | break; |
| 965 | | case TAPE_PRG: |
| 966 | | vc20_prg_state (); |
| 967 | | break; |
| 968 | | } |
| 969 | | } |
| 970 | | |
| 971 | | int vc20_tape_switch (void) |
| 972 | | { |
| 973 | | int data = 1; |
| 974 | | |
| 975 | | switch (tape.type) |
| 976 | | { |
| 977 | | case TAPE_WAV: |
| 978 | | data = !((wav.state > 1) && (tape.play || tape.record)); |
| 979 | | break; |
| 980 | | case TAPE_PRG: |
| 981 | | data = !((prg.state > 1) && (tape.play || tape.record)); |
| 982 | | break; |
| 983 | | } |
| 984 | | return data; |
| 985 | | } |
| 986 | | |
| 987 | | int vc20_tape_read (void) |
| 988 | | { |
| 989 | | switch (tape.type) |
| 990 | | { |
| 991 | | case TAPE_WAV: |
| 992 | | if (wav.state == 3) |
| 993 | | return tape.data; |
| 994 | | break; |
| 995 | | case TAPE_PRG: |
| 996 | | if (prg.state == 3) |
| 997 | | return tape.data; |
| 998 | | break; |
| 999 | | } |
| 1000 | | return 0; |
| 1001 | | } |
| 1002 | | |
| 1003 | | /* here for decoding tape formats */ |
| 1004 | | void vc20_tape_write (int data) |
| 1005 | | { |
| 1006 | | switch (tape.type) |
| 1007 | | { |
| 1008 | | case TAPE_WAV: |
| 1009 | | if (wav.state == 4) |
| 1010 | | vc20_wav_write (data); |
| 1011 | | break; |
| 1012 | | case TAPE_PRG: |
| 1013 | | if (prg.state == 4) |
| 1014 | | vc20_prg_write (data); |
| 1015 | | break; |
| 1016 | | } |
| 1017 | | } |
| 1018 | | |
| 1019 | | void vc20_tape_config (int on, int noise) |
| 1020 | | { |
| 1021 | | switch (tape.type) |
| 1022 | | { |
| 1023 | | case TAPE_WAV: |
| 1024 | | tape.on = (wav.state != 0) && on; |
| 1025 | | break; |
| 1026 | | case TAPE_PRG: |
| 1027 | | tape.on = (prg.state != 0) && on; |
| 1028 | | break; |
| 1029 | | } |
| 1030 | | tape.noise = tape.on && noise; |
| 1031 | | vc20_state (); |
| 1032 | | } |
| 1033 | | |
| 1034 | | void vc20_tape_buttons (int play, int record, int stop) |
| 1035 | | { |
| 1036 | | if (stop) |
| 1037 | | { |
| 1038 | | tape.play = 0, tape.record = 0; |
| 1039 | | } |
| 1040 | | else if (play && !tape.record) |
| 1041 | | { |
| 1042 | | tape.play = tape.on; |
| 1043 | | } |
| 1044 | | else if (record && !tape.play) |
| 1045 | | { |
| 1046 | | tape.record = tape.on; |
| 1047 | | } |
| 1048 | | vc20_state (); |
| 1049 | | } |
| 1050 | | |
| 1051 | | void vc20_tape_motor (int data) |
| 1052 | | { |
| 1053 | | tape.motor = !data; |
| 1054 | | vc20_state (); |
| 1055 | | } |
| 1056 | | |
| 1057 | | void vc20_tape_status (char *text, int size) |
| 1058 | | { |
| 1059 | | text[0] = 0; |
| 1060 | | switch (tape.type) |
| 1061 | | { |
| 1062 | | case TAPE_WAV: |
| 1063 | | switch (wav.state) |
| 1064 | | { |
| 1065 | | case 4: |
| 1066 | | snprintf (text, size, "Tape saving"); |
| 1067 | | break; |
| 1068 | | case 3: |
| 1069 | | /* NPW 28-Feb-2005 - this code sucks */ |
| 1070 | | #if 0 |
| 1071 | | snprintf (text, size, "Tape (%s) loading %d/%dsec", |
| 1072 | | image_filename(wav.img), |
| 1073 | | wav.pos / wav.sample->smpfreq, |
| 1074 | | wav.sample->length / wav.sample->smpfreq); |
| 1075 | | #endif |
| 1076 | | break; |
| 1077 | | } |
| 1078 | | break; |
| 1079 | | case TAPE_PRG: |
| 1080 | | switch (prg.state) |
| 1081 | | { |
| 1082 | | case 4: |
| 1083 | | snprintf (text, size, "Tape saving"); |
| 1084 | | break; |
| 1085 | | case 3: |
| 1086 | | snprintf (text, size, "Tape (%s) loading %d", |
| 1087 | | image_filename(prg.img), prg.pos); |
| 1088 | | break; |
| 1089 | | } |
| 1090 | | break; |
| 1091 | | } |
| 1092 | | } |
| 1093 | | |
| 1094 | | |
| 1095 | | |
| 1096 | | void vc20tape_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1097 | | { |
| 1098 | | switch(state) |
| 1099 | | { |
| 1100 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1101 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_CASSETTE; break; |
| 1102 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 1103 | | |
| 1104 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1105 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(vc20_tape); break; |
| 1106 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(vc20_tape); break; |
| 1107 | | |
| 1108 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1109 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "wav"); break; |
| 1110 | | } |
| 1111 | | } |
| 1112 | | |
src/mess/drivers/c128.c
| r3189 | r3190 | |
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | /* |
| 12 | | ------------------------------------ |
| 13 | | c128 commodore c128 (ntsc version) |
| 14 | | c128ger commodore c128 german (pal version) |
| 15 | | ------------------------------------ |
| 16 | | (preliminary version) |
| 17 | 12 | |
| 18 | | if the game runs to fast with the ntsc version, try the pal version! |
| 19 | | flickering affects in one video version, try the other video version |
| 13 | 2008 - Driver Updates |
| 14 | --------------------- |
| 20 | 15 | |
| 21 | | c128 |
| 22 | | hardware emulation mode for c64 |
| 23 | | displayed over din/tv connector only |
| 24 | | c64 cartridges |
| 25 | | c64 userport |
| 26 | | only the c64 standard keys available |
| 27 | | country support (keyboard, character rom, kernel (keyboard polling)) |
| 28 | | character rom german |
| 29 | | character rom french, belgium, italian |
| 30 | | editor, kernel for german |
| 31 | | editor, kernel for swedish |
| 32 | | editor, kernel for finish |
| 33 | | editor, kernel for norwegian |
| 34 | | editor, kernel for french |
| 35 | | editor, kernel for italian |
| 36 | | enhanced keyboard |
| 37 | | m8502 processor (additional port pin) |
| 38 | | additional vdc videochip for 80 column modes with own connector (rgbi) |
| 39 | | 16k byte ram for this chip |
| 40 | | 128 kbyte ram, 64 kbyte rom, 8k byte charrom, 2k byte static colorram |
| 41 | | (1 mbyte ram possible) |
| 42 | | sid6581 soundchip |
| 43 | | c64 expansion port with some additional pins |
| 44 | | z80 cpu for CPM mode |
| 45 | | c128d |
| 46 | | c1571 floppy drive build in |
| 47 | | 64kb vdc ram |
| 48 | | sid8580 sound chip |
| 49 | | c128cr/c128dcr |
| 50 | | cost reduced |
| 51 | | only modified for cheaper production (newer rams, ...) |
| 16 | (most of the informations are taken from http://www.zimmers.net/cbmpics/ ) |
| 52 | 17 | |
| 53 | | state |
| 54 | | ----- |
| 55 | | uses c64 emulation for c64 mode |
| 56 | | so only notes for the additional subsystems here |
| 57 | 18 | |
| 58 | | rasterline based video system |
| 59 | | no cpu holding |
| 60 | | imperfect scrolling support (when 40 columns or 25 lines) |
| 61 | | lightpen support not finished |
| 62 | | rasterline not finished |
| 63 | | vdc emulation |
| 64 | | dirtybuffered video system |
| 65 | | text mode |
| 66 | | only standard 8x8 characters supported |
| 67 | | graphic mode not tested |
| 68 | | lightpen not supported |
| 69 | | scrolling not supported |
| 70 | | z80 emulation |
| 71 | | floppy simulation not enough for booting CPM |
| 72 | | so simplified z80 memory management not tested |
| 73 | | no cpu clock doubling |
| 74 | | no internal function rom |
| 75 | | c64 mode |
| 76 | | differences to real c64??? |
| 77 | | no sound |
| 78 | | cia6526's look in machine/cia6526.c |
| 79 | | keyboard |
| 80 | | gameport a |
| 81 | | paddles 1,2 |
| 82 | | joystick 1 |
| 83 | | 2 button joystick/mouse joystick emulation |
| 84 | | no mouse |
| 85 | | lightpen (not finished) |
| 86 | | gameport b |
| 87 | | paddles 3,4 |
| 88 | | joystick 2 |
| 89 | | 2 button joystick/mouse joystick emulation |
| 90 | | no mouse |
| 91 | | simple tape support |
| 92 | | (not working, cia timing, cpu timing?) |
| 93 | | serial bus |
| 94 | | simple disk drives |
| 95 | | no printer or other devices |
| 96 | | expansion modules |
| 97 | | no c128 modules |
| 98 | | expansion modules c64 |
| 99 | | rom cartridges (exrom) |
| 100 | | ultimax rom cartridges (game) |
| 101 | | c64 cartridges (only standard rom cartridges) |
| 102 | | no other rom cartridges (bankswitching logic in it, switching exrom, game) |
| 103 | | no ieee488 support |
| 104 | | no cpm cartridge |
| 105 | | no speech cartridge (no circuit diagram found) |
| 106 | | no fm sound cartridge |
| 107 | | no other expansion modules |
| 108 | | no userport |
| 109 | | no rs232/v.24 interface |
| 110 | | quickloader |
| 19 | [CBM systems which belong to this driver] |
| 111 | 20 | |
| 112 | | Keys |
| 113 | | ---- |
| 114 | | Some PC-Keyboards does not behave well when special two or more keys are |
| 115 | | pressed at the same time |
| 116 | | (with my keyboard printscreen clears the pressed pause key!) |
| 21 | * Commodore 128 (1985) |
| 117 | 22 | |
| 118 | | shift-cbm switches between upper-only and normal character set |
| 119 | | (when wrong characters on screen this can help) |
| 120 | | run (shift-stop) loads pogram from type and starts it |
| 121 | | esc-x switch between two videosystems |
| 23 | CPU: CSG 8502 (1 or 2 Mhz), Z80 (~3 Mhz) |
| 24 | RAM: 128 kilobytes |
| 25 | ROM: 72 kilobytes expandable |
| 26 | Video: MOS 8564 "VIC-II", MOS 8563 CTRC (40/80 columns text; Palette of 16 |
| 27 | colors; Hires modes 320 x 200, 640 x 200 |
| 28 | Sound: MOS 8580 "SID" (3 voice stereo synthesizer/digital sound |
| 29 | capabilities) |
| 30 | Ports: MOS 6526 CIA x2 (2 Joystick/Mouse ports; CBM Serial port; CBM |
| 31 | Datasette port; parallel programmable "User" port; CBM Monitor port; |
| 32 | C64 expansion port; Warm reset switch; Keyboard port; Power switch) |
| 33 | Keyboard: Full-sized 93 key QWERTY (14 key numeric keypad; 8 programmable |
| 34 | function keys + HELP; 4 direction 4-key cursor-pad) |
| 122 | 35 | |
| 123 | | additional keys (to c64) are in c64mode not useable |
| 124 | 36 | |
| 125 | | Lightpen |
| 126 | | -------- |
| 127 | | Paddle 5 x-axe |
| 128 | | Paddle 6 y-axe |
| 37 | * Commodore 128CR (198?) |
| 129 | 38 | |
| 130 | | Tape |
| 131 | | ---- |
| 132 | | (DAC 1 volume in noise volume) |
| 133 | | loading of wav, prg and prg files in zip archiv |
| 134 | | commandline -cassette image |
| 135 | | wav: |
| 136 | | 8 or 16(not tested) bit, mono, 125000 Hz minimum |
| 137 | | has the same problems like an original tape drive (tone head must |
| 138 | | be adjusted to get working(no load error,...) wav-files) |
| 139 | | zip: |
| 140 | | must be placed in current directory |
| 141 | | prg's are played in the order of the files in zip file |
| 39 | Basically, a C128 in a redesigned board to reduce production costs. It's |
| 40 | not clear when it's been produced, nor if it has ever been produced on |
| 41 | large scale. Its BIOS is an intermediate revision between rev. 0 and rev. 1 |
| 42 | in the main C128. |
| 43 | A picture of the PCB can be found here: |
| 44 | http://www.zimmers.net/anonftp/pub/cbm/schematics/computers/c128/c128cr.jpg |
| 142 | 45 | |
| 143 | | use LOAD or LOAD"" or LOAD"",1 for loading of normal programs |
| 144 | | use LOAD"",1,1 for loading programs to their special address |
| 145 | 46 | |
| 146 | | several programs relies on more features |
| 147 | | (loading other file types, writing, ...) |
| 47 | * Commodore 128D (1985) |
| 148 | 48 | |
| 149 | | Discs |
| 150 | | ----- |
| 151 | | only file load from drive 8 and 9 implemented |
| 152 | | loads file from rom directory (*.prg,*.p00) (must NOT be specified on commandline) |
| 153 | | or file from d64 image (here also directory LOAD"$",8 supported) |
| 154 | | use LOAD"filename",8 |
| 155 | | or LOAD"filename",8,1 (for loading machine language programs at their address) |
| 156 | | for loading |
| 157 | | type RUN or the appropriate sys call to start them |
| 49 | Designed in the US, but only sold in Europe, it is a C128 in a desktop |
| 50 | case, with built-in 1571 disk drive (upgraded with a special software to |
| 51 | discourage pirating software). Some NTSC prototypes exist. |
| 158 | 52 | |
| 159 | | several programs rely on more features |
| 160 | | (loading other file types, writing, ...) |
| 53 | CPU: CSG 8502 (1 or 2 Mhz), Z80 (~3 Mhz), 6502 (co-processor for disk |
| 54 | drive) |
| 55 | RAM: 128 kilobytes |
| 56 | ROM: 72 kilobytes expandable |
| 57 | Video: MOS 8564 "VIC-II", MOS 8563 CTRC (40/80 columns text; Palette of 16 |
| 58 | colors; Hires modes 320 x 200, 640 x 200 |
| 59 | Sound: MOS 8580 "SID" (3 voice stereo synthesizer/digital sound |
| 60 | capabilities) |
| 61 | Ports: MOS 6526 CIA x2 (2 Joystick/Mouse ports; CBM Serial port; CBM |
| 62 | Datasette port; parallel programmable "User" port; CBM Monitor port; |
| 63 | C64 expansion port; Warm reset switch; Keyboard port; Power switch) |
| 64 | Keyboard: Full-sized 93 key QWERTY (14 key numeric keypad; 8 programmable |
| 65 | function keys + HELP; 4 direction 4-key cursor-pad) |
| 66 | Additional Hardware: Internal 1571 disk drive (Double sided/Double Density |
| 67 | 360k; capable of reading GCR and MFM formats) |
| 161 | 68 | |
| 162 | | most games rely on starting own programs in the floppy drive |
| 163 | | (and therefor cpu level emulation is needed) |
| 164 | 69 | |
| 165 | | Roms |
| 166 | | ---- |
| 167 | | .prg |
| 168 | | .crt |
| 169 | | .80 .90 .a0 .b0 .e0 .f0 |
| 170 | | files with boot-sign in it |
| 171 | | recogniced as roms |
| 70 | * Commodore 128DCR (1986) |
| 172 | 71 | |
| 173 | | .prg files loaded at address in its first two bytes |
| 174 | | .?0 files to address specified in extension |
| 175 | | .crt roms to addresses in crt file |
| 72 | Basically, a C128D in a redesigned board to reduce production costs. It's |
| 73 | the only model sold in the US, but it's quite possible that it came later |
| 74 | in Europe as well (being cheaper to produce). |
| 176 | 75 | |
| 177 | | Quickloader |
| 178 | | ----------- |
| 179 | | .prg and .p00 files supported |
| 180 | | loads program into memory and sets program end pointer |
| 181 | | (works with most programs) |
| 182 | | program ready to get started with RUN |
| 183 | | loads first rom when you press quickload key (numeric slash) |
| 184 | 76 | |
| 185 | | c64 mode |
| 186 | | -------- |
| 187 | | hold down commodore key while reseting or turning on |
| 188 | | type go64 at the c128 command mode |
| 77 | * Commodore "128D/81" (198?) |
| 189 | 78 | |
| 190 | | cpm mode |
| 191 | | -------- |
| 192 | | cpm disk must be inserted in device 8 |
| 193 | | turn on computer |
| 194 | | or |
| 195 | | type boot at the c128 command mode |
| 79 | NTSC prototype for an improved version of C128D, featuring a built-in 1581 |
| 80 | disk drive in place of the 1571 used in C128D / C128DCR. The prototype has no |
| 81 | given name, so C128D/81 is just a reasonable way to indicate it. The case is |
| 82 | from a PAL C128D and the board is a heavily modified PAL board with hand |
| 83 | soldered connections to make it NTSC. |
| 196 | 84 | |
| 197 | | when problems start with -log and look into error.log file |
| 198 | 85 | |
| 199 | | rom dumping |
| 200 | | ----------- |
| 86 | [TO DO] |
| 201 | 87 | |
| 202 | | Dumping of the roms from the running machine: |
| 203 | | in the monitor program |
| 204 | | s "drive:name",device,start,end |
| 88 | * C64 Mode |
| 205 | 89 | |
| 206 | | s "0:basic",8,f4000,fc000 |
| 207 | | s "0:editor",8,fc000,fd000 |
| 208 | | s "0:kernel",8,ee000,f0000 |
| 209 | | s "0:char128",8,ed000,ee000 |
| 90 | See [TO DO] in drivers/c64.c for the missing features. |
| 210 | 91 | |
| 211 | | *z80bios missing (funet says only 1 version!?) |
| 212 | | I don't know, maybe there is a cpm utility allowing saving |
| 213 | | the memory area 0-0xfff of bank 0. |
| 214 | | (I don't want to develope (and cant test) this short complicated |
| 215 | | program) |
| 216 | 92 | |
| 217 | | *c64basic and kernel (only 1 version!?) |
| 218 | | in c64 mode |
| 219 | | poke43,0:poke44,160:poke45,0:poke46,192:save"0:basic64",8 |
| 93 | * C/PM Mode |
| 220 | 94 | |
| 221 | | in c64 mode |
| 222 | | for i=0 to 8191:poke 32*256+i, peek(224*256+i): next |
| 223 | | poke43,0:poke44,32:poke45,0:poke46,64:save"0:kernel64",8 |
| 95 | It should work if you put the CP/M disk in drive 8 and enter BOOT. Better |
| 96 | disk emulation would be of help, anyway. |
| 224 | 97 | |
| 225 | | *c64 charset (swedish version or original c64 version) |
| 226 | | in c128 mode |
| 227 | | monitor |
| 228 | | a 2000 sei |
| 229 | | lda #33 |
| 230 | | sta 1 |
| 231 | | ldy #0 |
| 232 | | sty fa |
| 233 | | sty fc |
| 234 | | lda #c0 |
| 235 | | sta fd |
| 236 | | lda #d0 |
| 237 | | sta fb |
| 238 | | ldx #10 |
| 239 | | lda (fa),y |
| 240 | | sta (fc),y |
| 241 | | iny |
| 242 | | bne 2015 |
| 243 | | inc fb |
| 244 | | inc fd |
| 245 | | dex |
| 246 | | bne 2015 |
| 247 | | lda #37 |
| 248 | | sta 1 |
| 249 | | cli |
| 250 | | rts |
| 251 | | (additional enter to end assembler input) |
| 252 | | x (to leave monitor) |
| 253 | | go64 (answer with y) |
| 254 | | sys 32*256 |
| 255 | | poke 43,0:poke44,192:poke45,0:poke46,208:save"0:char64",8 |
| 98 | * C128 Mode |
| 256 | 99 | |
| 257 | | or in c64 mode |
| 258 | | load the program in the attachment |
| 259 | | load"savechar64",8,1 |
| 260 | | sys 32*256 |
| 261 | | poke 43,0:poke44,192:poke45,0:poke46,208:save"0:char64",8 |
| 100 | Various missing features (e.g. no cpu clock doubling; no internal function |
| 101 | rom; serial bus doesn't support printer or other devices; no C128 cart |
| 102 | expansions are supported; no userport; no rs232/v.24 interface) |
| 262 | 103 | |
| 263 | | c128d floppy disk bios: |
| 264 | | I think you have to download a program |
| 265 | | copying the bios to puffers. |
| 266 | | Then you could read this buffer into the computer, or write |
| 267 | | these buffers to disk. |
| 104 | * Informations / BIOS / Supported Sets: |
| 268 | 105 | |
| 269 | | Transportation to your pc: |
| 270 | | 1571 writing to mfm encoded disketts (in cpm mode only, or use program) |
| 271 | | maybe the IBM CPM-86 formats are like the standard DOS formats. |
| 272 | | but using dd may create images known by some other emulators. |
| 273 | | 1581 writes mfm encoded: |
| 274 | | can one of these drives to a format know by linux? |
| 275 | | Some years ago I build a simple adapter pc/parport to vc1541 |
| 276 | | floppy disk drive. |
| 106 | - Was C128D using rev. 1 BIOS in 4 ROMs? I guessed so because the board has the |
| 107 | same desing as a C128, and later C128DCR still used rev. 1 BIOS (only contained |
| 108 | in two ROMs) |
| 277 | 109 | |
| 278 | | Dumping roms with epromer |
| 279 | | ------------------------- |
| 280 | | c128 |
| 281 | | U18 (read compatible 2764?) 8kB c64 character rom, c128 character rom |
| 282 | | U32 23128 (read compatible 27128?) 16kB c64 Basic, c64 Kernel |
| 283 | | U33 23128 (read compatible 27128?) 16kB c128 Basic at 0x4000 |
| 284 | | U34 23128 (read compatible 27128?) 16kB c128 Basic at 0x8000 |
| 285 | | U35 23128 (read compatible 27128?) 16kB c128 Editor, Z80Bios, C128 Kernel |
| 286 | | c128 cost reduced |
| 287 | | U18 (read compatible 2764?) 8kB c64 character rom, c128 character rom |
| 288 | | U32 23256 (read compatible 27256?) 32kB c64 Basic, c64 Kernel, c128 Editor, Z80Bios, C128 Kernel |
| 289 | | U34 23256 (read compatible 27256?) 32kB C128 Basic |
| 290 | | c128dcr |
| 291 | | as c128 cr |
| 292 | | U102 23256 (read compatible 27256?) 32kB 1571 system rom |
| 110 | - Is it possible to track down and dump properly C128 PAL BIOSes? Current sets |
| 111 | are mostly tagged as bad dumps because obtained by extracting the content in |
| 112 | pieces. I'd like to have confirmation that the common parts are really the same |
| 113 | before removing the flag. |
| 293 | 114 | |
| 115 | - PAL BIOSes are from C128? C128D? or C128DCR? Were there differences in the |
| 116 | contents between them, except for being splitted in 2 or 4 parts? Were all |
| 117 | versions sold in each country? Right now we choose to support the following sets |
| 118 | (more to be added if BIOS content confirmed): |
| 119 | |
| 120 | + German, Italian and Swedish dumps are known to come from a C128DCR. Therefore, |
| 121 | we support c128drde, c128drit and c128drsw. |
| 122 | |
| 123 | + We also have a dump of the German C128, therefore we support the c128ger, even |
| 124 | if it's not clear which BASIC version it was shipped with. We assumed the older |
| 125 | kernal to be shipped with rev. 0 and the newer with rev. 1. |
| 126 | |
| 127 | + The Finnish, French and Norwegian dumps came with no notes (or these have been |
| 128 | lost). Therefore we support only the c128 for these, i.e. c128fin, c128fre and |
| 129 | c128nor. |
| 130 | |
| 131 | + Character ROM for Belgium, Italy and French was the same (I/F/B on the label, |
| 132 | and indeed it turned out to be the same on both the Italian and French C128) |
| 133 | |
| 134 | - Also, the italian C128DCR was found with a rev. 0 BASIC on it. Were both rev. 0 |
| 135 | and rev. 1 used in the CR version? When did Commodore switch between the two? |
| 136 | |
| 137 | [Notes about dumping BIOS] |
| 138 | |
| 139 | Dumping roms with eeprom reader |
| 140 | ------------------------------- |
| 141 | |
| 142 | c128 / c128d |
| 143 | |
| 144 | U18 (read compatible 2764?) 8kB c64 character rom, c128 character rom |
| 145 | U32 23128 (read compatible 27128?) 16kB c64 Basic, c64 Kernel |
| 146 | U33 23128 (read compatible 27128?) 16kB c128 Basic at 0x4000 |
| 147 | U34 23128 (read compatible 27128?) 16kB c128 Basic at 0x8000 |
| 148 | U35 23128 (read compatible 27128?) 16kB c128 Editor, Z80BIOS, c128 Kernel |
| 149 | |
| 150 | c128cr / c128dcr |
| 151 | |
| 152 | U18 (read compatible 2764?) 8kB c64 character rom, c128 character rom |
| 153 | U32 23256 (read compatible 27256?) 32kB c64 Basic + Kernel, c128 Editor, Z80BIOS, c128 Kernel |
| 154 | U34 23256 (read compatible 27256?) 32kB c128 Basic |
| 155 | |
| 156 | c128d / c128dcr also need: |
| 157 | |
| 158 | U102 23256 (read compatible 27256?) 32kB 1571 system rom |
| 159 | |
| 160 | |
| 161 | It would be also possible to dump the BIOS in monitor, but it would be preferable |
| 162 | to use an EEPROM reader, in order to obtain a dump of the whole content. |
| 294 | 163 | */ |
| 295 | 164 | |
| 165 | |
| 296 | 166 | #include "driver.h" |
| 297 | 167 | #include "sound/sid6581.h" |
| 298 | 168 | #include "machine/6526cia.h" |
| r3189 | r3190 | |
| 308 | 178 | #include "includes/c64.h" |
| 309 | 179 | |
| 310 | 180 | |
| 181 | /************************************* |
| 182 | * |
| 183 | * Main CPU memory handlers |
| 184 | * |
| 185 | *************************************/ |
| 186 | |
| 187 | |
| 311 | 188 | /* shares ram with m8502 |
| 312 | 189 | * how to bankswitch ? |
| 313 | 190 | * bank 0 |
| r3189 | r3190 | |
| 595 | 472 | INPUT_PORTS_END |
| 596 | 473 | |
| 597 | 474 | |
| 475 | /************************************* |
| 476 | * |
| 477 | * Graphics definitions |
| 478 | * |
| 479 | *************************************/ |
| 598 | 480 | |
| 481 | |
| 599 | 482 | static PALETTE_INIT( c128 ) |
| 600 | 483 | { |
| 601 | 484 | int i; |
| r3189 | r3190 | |
| 642 | 525 | GFXDECODE_ENTRY( "gfx2", 0x0000, c128graphic_charlayout, 0, 0x100 ) |
| 643 | 526 | GFXDECODE_END |
| 644 | 527 | |
| 645 | | #if 0 |
| 646 | | /* usa first 318018-02 318019-02 318020-03 rev 0*/ |
| 647 | 528 | |
| 648 | | /* usa mid 318018-03 318019-03 318020-04 */ |
| 649 | 529 | |
| 650 | | /* usa last 318018-04 318019-04 318020-05 rev 1*/ |
| 651 | | /* usa dcr 318022-02 318023-02, same as usa last */ |
| 530 | /************************************* |
| 531 | * |
| 532 | * Sound definitions |
| 533 | * |
| 534 | *************************************/ |
| 652 | 535 | |
| 653 | | /* between rev0 and rev1 252343-03+252343-04 */ |
| 654 | 536 | |
| 655 | | ROM_LOAD ("basic-4000.318018-02.bin", 0x100000, 0x4000, CRC(2ee6e2fa)) |
| 656 | | ROM_LOAD ("basic-8000.318019-02.bin", 0x104000, 0x4000, CRC(d551fce0)) |
| 657 | | /* same as above, but in one chip */ |
| 658 | | ROM_LOAD ("basic.318022-01.bin", 0x100000, 0x8000, CRC(e857df90)) |
| 659 | | |
| 660 | | /* maybe 318018-03+318019-03 */ |
| 661 | | ROM_LOAD ("basic.252343-03.bin", 0x100000, 0x8000, CRC(bc07ed87)) |
| 662 | | |
| 663 | | /* 1986 final upgrade */ |
| 664 | | ROM_LOAD ("basic-4000.318018-04.bin", 0x100000, 0x4000, CRC(9f9c355b)) |
| 665 | | ROM_LOAD ("basic-8000.318019-04.bin", 0x104000, 0x4000, CRC(6e2c91a7)) |
| 666 | | /* same as above, but in one chip */ |
| 667 | | ROM_LOAD ("basic.318022-02.bin", 0x100000, 0x8000, CRC(af1ae1e8)) |
| 668 | | |
| 669 | | ROM_LOAD ("64c.251913-01.bin", 0x108000, 0x4000, CRC(0010ec31)) |
| 670 | | |
| 671 | | /* editor, z80 bios, c128kernel */ |
| 672 | | ROM_LOAD ("kernal.318020-03.bin", 0x10c000, 0x4000, CRC(1e94bb02)) |
| 673 | | ROM_LOAD ("kernal.318020-05.bin", 0x10c000, 0x4000, CRC(ba456b8e)) |
| 674 | | ROM_LOAD ("kernal.german.315078-01.bin", 0x10c000, 0x4000, CRC(a51e2168)) |
| 675 | | ROM_LOAD ("kernal.german.315078-02.bin", 0x10c000, 0x4000, CRC(b275bb2e)) |
| 676 | | /* 0x3e086a24 z80bios 0xca5e1179*/ |
| 677 | | ROM_LOAD ("french.bin", 0x10c000, 0x4000, CRC(2df282b8)) |
| 678 | | /* 0x71002a97 z80bios 0x167b8364*/ |
| 679 | | ROM_LOAD ("finnish1.bin", 0x10c000, 0x4000, CRC(d3ecea84)) |
| 680 | | /* 0xb7ff5efe z80bios 0x5ce42fc8 */ |
| 681 | | ROM_LOAD ("finnish2.bin", 0x10c000, 0x4000, CRC(9526fac4)) |
| 682 | | /* 0x8df58148 z80bios 0x7b0d2140 */ |
| 683 | | ROM_LOAD ("italian.bin", 0x10c000, 0x4000, CRC(74d6b084)) |
| 684 | | /* 0x84c55911 z80bios 0x3ba48012 */ |
| 685 | | ROM_LOAD ("norwegian.bin", 0x10c000, 0x4000, CRC(a5406848)) |
| 686 | | |
| 687 | | /* c64 basic, c64 kernel, editor, z80 bios, c128kernel */ |
| 688 | | /* 252913-01+318020-05 */ |
| 689 | | ROM_LOAD ("complete.318023-02.bin", 0x100000, 0x8000, CRC(eedc120a)) |
| 690 | | /* 252913-01+0x98f2a2ed maybe 318020-04*/ |
| 691 | | ROM_LOAD ("complete.252343-04.bin", 0x108000, 0x8000, CRC(cc6bdb69)) |
| 692 | | /* 251913-01+0xbff7550b */ |
| 693 | | ROM_LOAD ("complete.german.318077-01.bin", 0x108000, 0x8000, CRC(eb6e2c8f)) |
| 694 | | /* chip label says Ker.Sw/Fi */ |
| 695 | | /* 901226.01+ 0xf10c2c25 +0x1cf7f729 */ |
| 696 | | ROM_LOAD ("complete.swedish.318034-01.bin", 0x108000, 0x8000, CRC(cb4e1719)) |
| 697 | | |
| 698 | | ROM_LOAD ("characters.390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6)) |
| 699 | | ROM_LOAD ("characters.german.315079-01.bin", 0x120000, 0x2000, CRC(fe5a2db1)) |
| 700 | | /* chip label says I/F/B (belgium, italian, french) characters */ |
| 701 | | /* italian and french verified to be the same*/ |
| 702 | | ROM_LOAD ("characters.french.325167-01.bin", 0x120000, 0x2000, CRC(bad36b88)) |
| 703 | | |
| 704 | | /* only parts of system roms, so not found in any c128 variant */ |
| 705 | | ROM_LOAD ("editor.finnish1.bin", 0x10c000, 0x1000, CRC(71002a97)) |
| 706 | | ROM_LOAD ("editor.finnish2.bin", 0x10c000, 0x1000, CRC(b7ff5efe)) |
| 707 | | ROM_LOAD ("editor.french.bin", 0x10c000, 0x1000, CRC(3e086a24)) |
| 708 | | ROM_LOAD ("editor.italian.bin", 0x10c000, 0x1000, CRC(8df58148)) |
| 709 | | ROM_LOAD ("editor.norwegian.bin", 0x10c000, 0x1000, CRC(84c55911)) |
| 710 | | |
| 711 | | ROM_LOAD ("kernalpart.finnish1.bin", 0x10e000, 0x2000, CRC(167b8364)) |
| 712 | | ROM_LOAD ("kernalpart.finnish2.bin", 0x10e000, 0x2000, CRC(5ce42fc8)) |
| 713 | | ROM_LOAD ("kernalpart.french.bin", 0x10e000, 0x2000, CRC(ca5e1179)) |
| 714 | | ROM_LOAD ("kernalpart.italian.bin", 0x10e000, 0x2000, CRC(7b0d2140)) |
| 715 | | ROM_LOAD ("kernalpart.norwegian.bin", 0x10e000, 0x2000, CRC(3ba48012)) |
| 716 | | |
| 717 | | ROM_LOAD ("z80bios.bin", 0x10d000, 0x1000, CRC(c38d83c6)) |
| 718 | | |
| 719 | | /* function rom in internal socket */ |
| 720 | | ROM_LOAD("super_chip.bin", 0x110000, 0x8000, CRC(a66f73c5)) |
| 721 | | #endif |
| 722 | | |
| 723 | | ROM_START (c128) |
| 724 | | ROM_REGION (0x132800, "main", 0) |
| 725 | | ROM_LOAD ("318018.04", 0x100000, 0x4000, CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441)) |
| 726 | | ROM_LOAD ("318019.04", 0x104000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0)) |
| 727 | | ROM_LOAD ("251913.01", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88)) |
| 728 | | ROM_LOAD ("318020.05", 0x10c000, 0x4000, CRC(ba456b8e) SHA1(ceb6e1a1bf7e08eb9cbc651afa29e26adccf38ab)) |
| 729 | | ROM_LOAD ("390059.01", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f)) |
| 730 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 731 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 732 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 733 | | ROM_END |
| 734 | | |
| 735 | | ROM_START (c128d) |
| 736 | | ROM_REGION (0x132800, "main", 0) |
| 737 | | ROM_LOAD ("318022.02", 0x100000, 0x8000, CRC(af1ae1e8) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816)) |
| 738 | | ROM_LOAD ("318023.02", 0x108000, 0x8000, CRC(eedc120a) SHA1(f98c5a986b532c78bb68df9ec6dbcf876913b99f)) |
| 739 | | ROM_LOAD ("390059.01", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f)) |
| 740 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 741 | | C1571_ROM("cpu_vc1540") |
| 742 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 743 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 744 | | ROM_END |
| 745 | | |
| 746 | | // submitted as cost reduced set! |
| 747 | | ROM_START (c128dita) |
| 748 | | ROM_REGION (0x132800, "main", 0) |
| 749 | | ROM_LOAD ("318022.02", 0x100000, 0x8000, CRC(af1ae1e8) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816)) |
| 750 | | |
| 751 | | // in a cost reduced set this should be 1 rom |
| 752 | | ROM_LOAD ("251913.01", 0x108000, 0x4000, CRC(0010ec31)) |
| 753 | | // ROM_LOAD ("901226.01", 0x108000, 0x2000, CRC(f833d117)) |
| 754 | | // ROM_LOAD( "kern128d.ita", 0x10a000, 0x2000, CRC(f1098d37 )) |
| 755 | | ROM_LOAD ("318079.01", 0x10c000, 0x4000, CRC(66673e8b)) |
| 756 | | |
| 757 | | ROM_LOAD ("325167.01", 0x120000, 0x2000, CRC(bad36b88)) // taken from funet |
| 758 | | // normally 1 rom |
| 759 | | // ROM_LOAD ("325167.01b", 0x120000, 0x1000, CRC(ec4272ee)) //standard c64 901226.01 |
| 760 | | // ROM_LOAD ("325167.01b", 0x121000, 0x1000, CRC(2bc73556)) // bad dump |
| 761 | | |
| 762 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 763 | | // not included in submission |
| 764 | | // C1571_ROM("cpu_vc1540") |
| 765 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 766 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 767 | | ROM_END |
| 768 | | |
| 769 | | ROM_START (c128ger) |
| 770 | | /* c128d german */ |
| 771 | | ROM_REGION (0x132800, "main", 0) |
| 772 | | ROM_LOAD ("318022.02", 0x100000, 0x8000, CRC(af1ae1e8) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816)) |
| 773 | | ROM_LOAD ("318077.01", 0x108000, 0x8000, CRC(eb6e2c8f) SHA1(6b3d891fedabb5335f388a5d2a71378472ea60f4)) |
| 774 | | ROM_LOAD ("315079.01", 0x120000, 0x2000, CRC(fe5a2db1) SHA1(638f8aff51c2ac4f99a55b12c4f8c985ef4bebd3)) |
| 775 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 776 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 777 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 778 | | ROM_END |
| 779 | | |
| 780 | | ROM_START (c128fra) |
| 781 | | ROM_REGION (0x132800, "main", 0) |
| 782 | | ROM_LOAD ("318018.04", 0x100000, 0x4000, CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441)) |
| 783 | | ROM_LOAD ("318019.04", 0x104000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0)) |
| 784 | | ROM_LOAD ("251913.01", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88)) |
| 785 | | #if 1 |
| 786 | | ROM_LOAD ("french.bin", 0x10c000, 0x4000, CRC(2df282b8) SHA1(a0680d04db3232fa9f58598e5c9f09c4fe94f601)) |
| 787 | | #else |
| 788 | | ROM_LOAD ("editor.french.bin", 0x10c000, 0x1000, CRC(3e086a24)) |
| 789 | | ROM_LOAD ("z80bios.bin", 0x10d000, 0x1000, CRC(c38d83c6)) |
| 790 | | ROM_LOAD ("kernalpart.french.bin", 0x10e000, 0x2000, CRC(ca5e1179)) |
| 791 | | #endif |
| 792 | | ROM_LOAD ("325167.01", 0x120000, 0x2000, CRC(bad36b88) SHA1(9119b27a1bf885fa4c76fff5d858c74c194dd2b8)) |
| 793 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 794 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 795 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 796 | | ROM_END |
| 797 | | |
| 798 | | ROM_START (c128ita) |
| 799 | | ROM_REGION (0x132800, "main", 0) |
| 800 | | /* original 318022-01 */ |
| 801 | | ROM_LOAD ("318018.04", 0x100000, 0x4000, CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441)) |
| 802 | | ROM_LOAD ("318019.04", 0x104000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0)) |
| 803 | | ROM_LOAD ("251913.01", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88)) |
| 804 | | ROM_LOAD ("italian.bin", 0x10c000, 0x4000, CRC(74d6b084) SHA1(592a626eb2b5372596ac374d3505c3ce78dd040f)) |
| 805 | | ROM_LOAD ("325167.01", 0x120000, 0x2000, CRC(bad36b88) SHA1(9119b27a1bf885fa4c76fff5d858c74c194dd2b8)) |
| 806 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 807 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 808 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 809 | | ROM_END |
| 810 | | |
| 811 | | ROM_START (c128swe) |
| 812 | | ROM_REGION (0x132800, "main", 0) |
| 813 | | ROM_LOAD ("318022.02", 0x100000, 0x8000, CRC(af1ae1e8) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816)) |
| 814 | | ROM_LOAD ("318034.01", 0x108000, 0x8000, CRC(cb4e1719) SHA1(9b0a0cef56d00035c611e07170f051ee5e63aa3a)) |
| 815 | | ROM_LOAD ("325181.01", 0x120000, 0x2000, CRC(7a70d9b8) SHA1(aca3f7321ee7e6152f1f0afad646ae41964de4fb)) |
| 816 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 817 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 818 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 819 | | ROM_END |
| 820 | | |
| 821 | | ROM_START (c128nor) |
| 822 | | ROM_REGION (0x132800, "main", 0) |
| 823 | | ROM_LOAD ("318018.04", 0x100000, 0x4000, BAD_DUMP CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441)) |
| 824 | | ROM_LOAD ("318019.04", 0x104000, 0x4000, BAD_DUMP CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0)) |
| 825 | | ROM_LOAD ("251913.01", 0x108000, 0x4000, BAD_DUMP CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88)) |
| 826 | | ROM_LOAD ("nor.bin", 0x10c000, 0x4000, BAD_DUMP CRC(a5406848) SHA1(00fe2fd610a812121befab1e7238fa882c0f8257)) |
| 827 | | /* standard c64, vic20 based norwegian */ |
| 828 | | ROM_LOAD ("char.nor", 0x120000, 0x2000, BAD_DUMP CRC(ba95c625) SHA1(5a87faa457979e7b6f434251a9e32f4483b337b3)) |
| 829 | | ROM_REGION (0x10000, "m8502", ROMREGION_ERASEFF) |
| 830 | | ROM_REGION (0x2000, "gfx1", ROMREGION_ERASEFF) |
| 831 | | ROM_REGION (0x100, "gfx2", ROMREGION_ERASEFF) |
| 832 | | ROM_END |
| 833 | | |
| 834 | 537 | static const sid6581_interface c128_sound_interface = |
| 835 | 538 | { |
| 836 | 539 | c64_paddle_read |
| r3189 | r3190 | |
| 838 | 541 | |
| 839 | 542 | |
| 840 | 543 | |
| 544 | /************************************* |
| 545 | * |
| 546 | * Machine driver |
| 547 | * |
| 548 | *************************************/ |
| 549 | |
| 550 | |
| 841 | 551 | static MACHINE_DRIVER_START( c128 ) |
| 842 | 552 | /* basic machine hardware */ |
| 843 | 553 | MDRV_CPU_ADD("main", Z80, VIC6567_CLOCK) |
| r3189 | r3190 | |
| 903 | 613 | MDRV_SOUND_CONFIG(c128_sound_interface) |
| 904 | 614 | MACHINE_DRIVER_END |
| 905 | 615 | |
| 616 | static MACHINE_DRIVER_START( c128dpal ) |
| 617 | MDRV_IMPORT_FROM( c128pal ) |
| 618 | MDRV_IMPORT_FROM( cpu_c1571 ) |
| 619 | MACHINE_DRIVER_END |
| 906 | 620 | |
| 621 | |
| 622 | |
| 623 | /************************************* |
| 624 | * |
| 625 | * ROM definition(s) |
| 626 | * |
| 627 | *************************************/ |
| 628 | |
| 629 | |
| 630 | ROM_START( c128 ) |
| 631 | ROM_REGION( 0x132800, "main", 0 ) |
| 632 | ROM_SYSTEM_BIOS( 0, "default", "rev. 1" ) |
| 633 | ROMX_LOAD( "318018-04.bin", 0x100000, 0x4000, CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441), ROM_BIOS(1) ) // BASIC lo |
| 634 | ROMX_LOAD( "318019-04.bin", 0x104000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0), ROM_BIOS(1) ) // BASIC hi |
| 635 | // ROMX_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88), ROM_BIOS(1) ) // C64 OS ROM |
| 636 | ROMX_LOAD( "318020-05.bin", 0x10c000, 0x4000, CRC(ba456b8e) SHA1(ceb6e1a1bf7e08eb9cbc651afa29e26adccf38ab), ROM_BIOS(1) ) // Kernal |
| 637 | ROM_SYSTEM_BIOS( 1, "rev0", "rev. 0" ) |
| 638 | ROMX_LOAD( "318018-02.bin", 0x100000, 0x4000, CRC(2ee6e2fa) SHA1(60e1491e1d5782e3cf109f518eb73427609badc6), ROM_BIOS(2) ) // BASIC lo |
| 639 | ROMX_LOAD( "318019-02.bin", 0x104000, 0x4000, CRC(d551fce0) SHA1(4d223883e866645328f86a904b221464682edc4f), ROM_BIOS(2) ) // BASIC hi |
| 640 | // ROMX_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88), ROM_BIOS(2) ) // C64 OS ROM |
| 641 | ROMX_LOAD( "318020-03.bin", 0x10c000, 0x4000, CRC(00456b8e) SHA1(ceb6e1a1bf7e08eb9cbc651afa29e26adccf38ab), ROM_BIOS(2) ) // Kernal |
| 642 | |
| 643 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 644 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) // Character |
| 645 | |
| 646 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 647 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 648 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 649 | ROM_END |
| 650 | |
| 651 | |
| 652 | ROM_START( c128cr ) |
| 653 | ROM_REGION( 0x132800, "main", 0 ) |
| 654 | ROM_LOAD( "252343-03.bin", 0x100000, 0x8000, CRC(009c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441) ) // BASIC lo + hi |
| 655 | ROM_LOAD( "252343-04.bin", 0x108000, 0x8000, CRC(002c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0) ) // C64 OS ROM + Kernal |
| 656 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) // Character |
| 657 | |
| 658 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 659 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 660 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 661 | ROM_END |
| 662 | |
| 663 | |
| 664 | /* See notes at the top of the driver about PAL dumps */ |
| 665 | |
| 666 | ROM_START( c128ger ) |
| 667 | ROM_REGION( 0x132800, "main", 0 ) |
| 668 | ROM_SYSTEM_BIOS( 0, "default", "rev. 1" ) |
| 669 | ROMX_LOAD( "318018-04.bin", 0x100000, 0x4000, CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441), ROM_BIOS(1) ) // BASIC lo |
| 670 | ROMX_LOAD( "318019-04.bin", 0x104000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0), ROM_BIOS(1) ) // BASIC hi |
| 671 | // ROMX_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88), ROM_BIOS(1) ) // C64 OS ROM |
| 672 | ROMX_LOAD( "315078-02.bin", 0x10c000, 0x4000, CRC(b275bb2e) SHA1(78ac5dcdd840b092ba1ee6d19b33af079613291f), ROM_BIOS(1) ) // Kernal |
| 673 | ROM_SYSTEM_BIOS( 1, "rev0", "rev. 0" ) |
| 674 | ROMX_LOAD( "318018-02.bin", 0x100000, 0x4000, CRC(2ee6e2fa) SHA1(60e1491e1d5782e3cf109f518eb73427609badc6), ROM_BIOS(2) ) // BASIC lo |
| 675 | ROMX_LOAD( "318019-02.bin", 0x104000, 0x4000, CRC(d551fce0) SHA1(4d223883e866645328f86a904b221464682edc4f), ROM_BIOS(2) ) // BASIC hi |
| 676 | // ROMX_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88), ROM_BIOS(2) ) // C64 OS ROM |
| 677 | ROMX_LOAD( "315078-01.bin", 0x10c000, 0x4000, CRC(a51e2168) SHA1(bcf82a89a8fc5d086bec2ff3bcbdecc8af2be3af), ROM_BIOS(2) ) // Kernal |
| 678 | |
| 679 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 680 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) // Character |
| 681 | |
| 682 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 683 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 684 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 685 | ROM_END |
| 686 | |
| 687 | ROM_START( c128fin ) |
| 688 | ROM_REGION( 0x132800, "main", 0 ) |
| 689 | ROM_LOAD( "318018-04.bin", 0x100000, 0x4000, BAD_DUMP CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441) ) // BASIC lo |
| 690 | ROM_LOAD( "318019-04.bin", 0x104000, 0x4000, BAD_DUMP CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0) ) // BASIC hi |
| 691 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, BAD_DUMP CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 692 | ROM_SYSTEM_BIOS( 0, "fin1", "set 1" ) |
| 693 | ROMX_LOAD( "editor.finnish1.bin", 0x10c000, 0x1000, BAD_DUMP CRC(71002a97), ROM_BIOS(1) ) |
| 694 | // ROMX_LOAD( "z80bios.bin", 0x10d000, 0x1000, CRC(c38d83c6), BAD_DUMP ROM_BIOS(1) ) |
| 695 | ROMX_LOAD( "kernalpart.finnish1.bin", 0x10e000, 0x2000, BAD_DUMP CRC(167b8364), ROM_BIOS(1) ) |
| 696 | ROM_SYSTEM_BIOS( 1, "fin2", "set 2" ) |
| 697 | ROMX_LOAD( "editor.finnish2.bin", 0x10c000, 0x1000, BAD_DUMP CRC(b7ff5efe), ROM_BIOS(2) ) |
| 698 | // ROMX_LOAD( "z80bios.bin", 0x10d000, 0x1000, BAD_DUMP CRC(c38d83c6), ROM_BIOS(2) ) |
| 699 | ROMX_LOAD( "kernalpart.finnish2.bin", 0x10e000, 0x2000, BAD_DUMP CRC(7b0d2140), ROM_BIOS(2) ) |
| 700 | |
| 701 | ROM_LOAD( "z80bios.bin", 0x10d000, 0x1000, BAD_DUMP CRC(c38d83c6) ) |
| 702 | /* Swedish character set while waiting for a real dump */ |
| 703 | ROM_LOAD( "325181-01.bin", 0x120000, 0x2000, BAD_DUMP CRC(7a70d9b8) SHA1(aca3f7321ee7e6152f1f0afad646ae41964de4fb) ) |
| 704 | |
| 705 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 706 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 707 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 708 | ROM_END |
| 709 | |
| 710 | ROM_START( c128fra ) |
| 711 | ROM_REGION( 0x132800, "main", 0 ) |
| 712 | ROM_LOAD( "318018-04.bin", 0x100000, 0x4000, BAD_DUMP CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441) ) // BASIC lo |
| 713 | ROM_LOAD( "318019-04.bin", 0x104000, 0x4000, BAD_DUMP CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0) ) // BASIC hi |
| 714 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, BAD_DUMP CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 715 | ROM_LOAD( "editor.french.bin", 0x10c000, 0x1000, BAD_DUMP CRC(3e086a24) ) |
| 716 | ROM_LOAD( "z80bios.bin", 0x10d000, 0x1000, BAD_DUMP CRC(c38d83c6) ) |
| 717 | ROM_LOAD( "kernalpart.french.bin", 0x10e000, 0x2000, BAD_DUMP CRC(ca5e1179) ) |
| 718 | ROM_LOAD( "characters.french.325167-01.bin", 0x120000, 0x2000, BAD_DUMP CRC(bad36b88) ) |
| 719 | |
| 720 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 721 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 722 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 723 | ROM_END |
| 724 | |
| 725 | |
| 726 | ROM_START( c128nor ) |
| 727 | ROM_REGION( 0x132800, "main", 0 ) |
| 728 | ROM_LOAD( "318018-04.bin", 0x100000, 0x4000, BAD_DUMP CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441) ) // BASIC lo |
| 729 | ROM_LOAD( "318019-04.bin", 0x104000, 0x4000, BAD_DUMP CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0) ) // BASIC hi |
| 730 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, BAD_DUMP CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 731 | ROM_LOAD( "editor.norwegian.bin", 0x10c000, 0x1000, BAD_DUMP CRC(84c55911) ) |
| 732 | ROM_LOAD( "z80bios.bin", 0x10d000, 0x1000, BAD_DUMP CRC(c38d83c6) ) |
| 733 | ROM_LOAD( "kernalpart.norwegian.bin", 0x10e000, 0x2000, BAD_DUMP CRC(3ba48012) ) |
| 734 | /* standard vic20 based norwegian */ |
| 735 | ROM_LOAD( "char.nor", 0x120000, 0x2000, BAD_DUMP CRC(ba95c625) SHA1(5a87faa457979e7b6f434251a9e32f4483b337b3) ) |
| 736 | |
| 737 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 738 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 739 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 740 | ROM_END |
| 741 | |
| 742 | |
| 743 | /* C128D Board is basically the same as C128 + a second board for the disk drive */ |
| 744 | ROM_START( c128d ) |
| 745 | ROM_REGION( 0x132800, "main", 0 ) |
| 746 | ROM_LOAD( "318018-04.bin", 0x100000, 0x4000, CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441) ) // BASIC lo |
| 747 | ROM_LOAD( "318019-04.bin", 0x104000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0) ) // BASIC hi |
| 748 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 749 | ROM_LOAD( "318020-05.bin", 0x10c000, 0x4000, CRC(ba456b8e) SHA1(ceb6e1a1bf7e08eb9cbc651afa29e26adccf38ab) ) // Kernal |
| 750 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) |
| 751 | |
| 752 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 753 | C1571_ROM("cpu_vc1540") |
| 754 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 755 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 756 | ROM_END |
| 757 | |
| 758 | #define rom_c128dpr rom_c128d |
| 759 | |
| 760 | /* This BIOS is exactly the same as C128 rev. 1, but on two ROMs only */ |
| 761 | ROM_START( c128dcr ) |
| 762 | ROM_REGION( 0x132800, "main", 0 ) |
| 763 | ROM_LOAD( "318022-02.bin", 0x100000, 0x8000, CRC(af1ae1e8) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816) ) // BASIC lo + hi |
| 764 | ROM_LOAD( "318023-02.bin", 0x108000, 0x8000, CRC(eedc120a) SHA1(f98c5a986b532c78bb68df9ec6dbcf876913b99f) ) // C64 OS ROM + Kernal |
| 765 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) // Character |
| 766 | |
| 767 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 768 | C1571_ROM("cpu_vc1540") |
| 769 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 770 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 771 | ROM_END |
| 772 | |
| 773 | |
| 774 | /* See notes at the top of the driver about PAL dumps */ |
| 775 | |
| 776 | ROM_START( c128drde ) |
| 777 | ROM_REGION( 0x132800, "main", 0 ) |
| 778 | ROM_LOAD( "318022-02.bin", 0x100000, 0x8000, CRC(af1ae1e8) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816) ) // BASIC lo + hi |
| 779 | ROM_LOAD( "318077-01.bin", 0x108000, 0x8000, CRC(eb6e2c8f) SHA1(6b3d891fedabb5335f388a5d2a71378472ea60f4) ) // C64 OS ROM + Kernal Ger |
| 780 | ROM_LOAD( "315079-01.bin", 0x120000, 0x2000, CRC(fe5a2db1) SHA1(638f8aff51c2ac4f99a55b12c4f8c985ef4bebd3) ) |
| 781 | |
| 782 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 783 | C1571_ROM("cpu_vc1540") |
| 784 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 785 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 786 | ROM_END |
| 787 | |
| 788 | |
| 789 | ROM_START( c128drsw ) |
| 790 | ROM_REGION( 0x132800, "main", 0 ) |
| 791 | ROM_LOAD( "318022-02.bin", 0x100000, 0x8000, CRC(af1ae1e8) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816) ) // BASIC lo + hi |
| 792 | ROM_LOAD( "318034-01.bin", 0x108000, 0x8000, CRC(cb4e1719) SHA1(9b0a0cef56d00035c611e07170f051ee5e63aa3a) ) // C64 OS ROM + Kernal Sw/Fi |
| 793 | ROM_LOAD( "325181-01.bin", 0x120000, 0x2000, CRC(7a70d9b8) SHA1(aca3f7321ee7e6152f1f0afad646ae41964de4fb) ) |
| 794 | |
| 795 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 796 | C1571_ROM("cpu_vc1540") |
| 797 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 798 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 799 | ROM_END |
| 800 | |
| 801 | |
| 802 | ROM_START( c128drit ) |
| 803 | ROM_REGION( 0x132800, "main", 0 ) |
| 804 | ROM_LOAD( "318022-01.bin", 0x100000, 0x8000, CRC(e857df90) SHA1(953dcdf5784a6b39ef84dd6fd968c7a03d8d6816) ) // BASIC lo + hi - based on BASIC rev.0 |
| 805 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, BAD_DUMP CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 806 | ROM_LOAD( "editor.italian.bin", 0x10c000, 0x1000, BAD_DUMP CRC(8df58148) ) |
| 807 | ROM_LOAD( "z80bios.bin", 0x10d000, 0x1000, BAD_DUMP CRC(c38d83c6) ) |
| 808 | ROM_LOAD( "kernalpart.italian.bin", 0x10e000, 0x2000, BAD_DUMP CRC(7b0d2140) ) |
| 809 | ROM_LOAD( "325167-01.bin", 0x120000, 0x2000, BAD_DUMP CRC(bad36b88) ) |
| 810 | |
| 811 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 812 | C1571_ROM("cpu_vc1540") |
| 813 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 814 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 815 | ROM_END |
| 816 | |
| 817 | |
| 818 | |
| 819 | /************************************* |
| 820 | * |
| 821 | * System configuration(s) |
| 822 | * |
| 823 | *************************************/ |
| 824 | |
| 825 | |
| 907 | 826 | static SYSTEM_CONFIG_START(c128) |
| 908 | 827 | CONFIG_DEVICE(c64_cartslot_getinfo) |
| 909 | 828 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| r3189 | r3190 | |
| 911 | 830 | SYSTEM_CONFIG_END |
| 912 | 831 | |
| 913 | 832 | static SYSTEM_CONFIG_START(c128d) |
| 833 | CONFIG_DEVICE(c64_cartslot_getinfo) |
| 914 | 834 | CONFIG_DEVICE(c1571_device_getinfo) |
| 915 | 835 | CONFIG_DEVICE(datasette_device_getinfo) |
| 916 | 836 | SYSTEM_CONFIG_END |
| 917 | 837 | |
| 918 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 919 | | COMP (1985, c128, 0, 0, c128, c128, c128, c128, "Commodore Business Machines Co.","Commodore 128 NTSC", 0) |
| 920 | | COMP (1985, c128ger, c128, 0, c128pal, c128ger, c128pal, c128, "Commodore Business Machines Co.","Commodore 128 German (PAL)", 0) |
| 921 | | COMP (1985, c128fra, c128, 0, c128pal, c128fra, c128pal, c128, "Commodore Business Machines Co.","Commodore 128 French (PAL)", 0) |
| 922 | | COMP (1985, c128ita, c128, 0, c128pal, c128ita, c128pal, c128, "Commodore Business Machines Co.","Commodore 128 Italian (PAL)", 0) |
| 923 | | COMP (1985, c128swe, c128, 0, c128pal, c128swe, c128pal, c128, "Commodore Business Machines Co.","Commodore 128 Swedish (PAL)", 0) |
| 924 | | /* other countries spanish, belgium, norwegian */ |
| 925 | | COMP (1985, c128nor, c128, 0, c128pal, c128ita, c128pal, c128, "Commodore Business Machines Co.","Commodore 128 Norwegian (PAL)", GAME_NOT_WORKING) |
| 926 | | COMP (1985, c128d, c128, 0, c128d, c128, c128, c128d, "Commodore Business Machines Co.","Commodore 128D NTSC", GAME_NOT_WORKING) |
| 927 | | //COMP(1985,c128dita, c128, 0, c128d, c128, c128, c128d, "Commodore Business Machines Co.","Commodore 128D Italian (PAL)", GAME_NOT_WORKING) |
| 928 | | COMP (1985, c128dita, c128, 0, c128pal, c128ita, c128pal, c128d, "Commodore Business Machines Co.","Commodore 128D Italian (PAL)", GAME_NOT_WORKING) |
| 838 | |
| 839 | /*************************************************************************** |
| 840 | |
| 841 | Game driver(s) |
| 842 | |
| 843 | ***************************************************************************/ |
| 844 | |
| 845 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 846 | |
| 847 | COMP( 1985, c128, 0, 0, c128, c128, c128, c128, "Commodore Business Machines Co.", "Commodore 128 NTSC", 0) |
| 848 | COMP( 1985, c128cr, c128, 0, c128, c128, c128, c128, "Commodore Business Machines Co.", "Commodore 128CR (NTSC, proto?)", 0) |
| 849 | |
| 850 | COMP( 1985, c128fin, c128, 0, c128pal, c128swe, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Finland)", 0) |
| 851 | COMP( 1985, c128fra, c128, 0, c128pal, c128fra, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, France)", 0) |
| 852 | COMP( 1985, c128ger, c128, 0, c128pal, c128ger, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Germany)", 0) |
| 853 | COMP( 1985, c128nor, c128, 0, c128pal, c128ita, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Norway)", 0) |
| 854 | /* other countries spain, belgium, ... */ |
| 855 | |
| 856 | COMP( 1985, c128dpr, c128, 0, c128d, c128, c128, c128d, "Commodore Business Machines Co.", "Commodore 128D (NTSC, proto)", GAME_NOT_WORKING) |
| 857 | COMP( 1985, c128d, c128, 0, c128dpal, c128, c128pal, c128d, "Commodore Business Machines Co.", "Commodore 128D PAL", GAME_NOT_WORKING) |
| 858 | |
| 859 | COMP( 1986, c128dcr, c128, 0, c128d, c128, c128, c128d, "Commodore Business Machines Co.", "Commodore 128DCR NTSC", GAME_NOT_WORKING) |
| 860 | COMP( 1986, c128drde, c128, 0, c128dpal, c128ger, c128pal, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Germany)", GAME_NOT_WORKING) |
| 861 | COMP( 1986, c128drit, c128, 0, c128dpal, c128ita, c128pal, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Italy)", GAME_NOT_WORKING) |
| 862 | COMP( 1986, c128drsw, c128, 0, c128dpal, c128swe, c128pal, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Sweden)", GAME_NOT_WORKING) |
| 863 | //COMP( 1986, c128d81, c128, 0, c128d, c128, c128, c128d, "Commodore Business Machines Co.", "Commodore "128D/81" NTSC", GAME_NOT_WORKING) // no floppy drive emulation makes this useless atm |
src/mess/drivers/c16.c
| r3189 | r3190 | |
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | /* |
| 12 | | ------------------------------------ |
| 13 | | c16 commodore c16/c116/c232/c264 (pal version) |
| 14 | | plus4 commodore plus4 (ntsc version) |
| 15 | | c364 commodore c364/v364 prototype (ntsc version) |
| 16 | | ------------------------------------ |
| 17 | | (beta version) |
| 18 | 12 | |
| 19 | | if the game runs to fast with the ntsc version, try the pal version! |
| 20 | | flickering affects in one video version, try the other video version |
| 13 | 2008 - Driver Updates |
| 14 | --------------------- |
| 21 | 15 | |
| 22 | | c16(pal version, ntsc version?): |
| 23 | | design like the vc20/c64 |
| 24 | | sequel to c64 |
| 25 | | other keyboardlayout, |
| 26 | | worse soundchip, |
| 27 | | more colors, but no sprites, |
| 28 | | other tape and gameports plugs |
| 29 | | 16 kbyte ram |
| 30 | | newer basic and kernal (ieee floppy support) |
| 16 | (most of the informations are taken from http://www.zimmers.net/cbmpics/ ) |
| 31 | 17 | |
| 32 | | c116(pal version, ntsc version?): |
| 33 | | 100% software compatible to c16 |
| 34 | | small and flat |
| 35 | | gummi keys |
| 36 | 18 | |
| 37 | | 232: |
| 38 | | video system versions (?) |
| 39 | | plus4 case |
| 40 | | 32 kbyte ram |
| 41 | | userport?, acia6551 chip? |
| 19 | [CBM systems which belong to this driver] |
| 42 | 20 | |
| 43 | | 264: |
| 44 | | video system versions (?) |
| 45 | | plus4 case |
| 46 | | 64 kbyte ram |
| 47 | | userport?, acia6551 chip? |
| 21 | * Commodore 116 (1984, Europe only) |
| 48 | 22 | |
| 49 | | plus4(pal version, ntsc version?): |
| 50 | | in emu ntsc version! |
| 51 | | case like c116, but with normal keys |
| 52 | | 64 kbyte ram |
| 53 | | userport |
| 54 | | build in additional rom with programs |
| 23 | Entry level computer of the Commodore 264 family, it was marketed only |
| 24 | in Europe. It was impressive for the small size of its case, but it didn't |
| 25 | meet commercial success |
| 55 | 26 | |
| 56 | | c364 prototype: |
| 57 | | video system versions (?) |
| 58 | | like plus4, but with additional numeric keyblock |
| 59 | | slightly modified kernel rom |
| 60 | | build in speech hardware/rom |
| 27 | CPU: MOS Technology 7501 (variable clock rate, with max 1.76 Mhz) |
| 28 | RAM: 16 kilobytes (expandable to 64k internally) |
| 29 | ROM: 32 kilobytes |
| 30 | Video: MOS Technology 7360 "TED" (5 Video modes; Max. Resolution 320x200; |
| 31 | 40 columns text; Palette of 16 colors in 8 shades, for 128 colors) |
| 32 | Sound: MOS Technology 7360 "TED" (2 voice tone-generating sound capabilities) |
| 33 | Ports: MOS 7360 (2 Joystick/Mouse ports; CBM Serial port; 'TED' port; "TV" |
| 34 | Port and switch; CBM Monitor port; Power and reset switches; Power |
| 35 | connector) |
| 36 | Keyboard: QWERTY 62 key "membrane" (8 programmable function keys; 4 direction |
| 37 | cursor-pad) |
| 61 | 38 | |
| 62 | | state |
| 63 | | ----- |
| 64 | | rasterline based video system |
| 65 | | imperfect scrolling support (when 40 columns or 25 lines) |
| 66 | | lightpen support missing? |
| 67 | | should be enough for 95% of the games and programs |
| 68 | | imperfect sound |
| 69 | | keyboard, joystick 1 and 2 |
| 70 | | no speech hardware (c364) |
| 71 | | simple tape support |
| 72 | | serial bus |
| 73 | | simple disk drives |
| 74 | | no printer or other devices |
| 75 | | expansion modules |
| 76 | | rom cartridges |
| 77 | | simple ieee488 floppy support (c1551 floppy disk drive) |
| 78 | | no other expansion modules |
| 79 | | no userport (plus4) |
| 80 | | no rs232/v.24 interface |
| 81 | | quickloader |
| 82 | 39 | |
| 83 | | some unsolved problems |
| 84 | | memory check by c16 kernel will not recognize more memory without restart of mess |
| 85 | | cpu clock switching/changing (overclocking should it be) |
| 40 | * Commodore 16 (1984) |
| 86 | 41 | |
| 87 | | Keys |
| 88 | | ---- |
| 89 | | Some PC-Keyboards does not behave well when special two or more keys are |
| 90 | | pressed at the same time |
| 91 | | (with my keyboard printscreen clears the pressed pause key!) |
| 42 | Redesigned version of the C116, with a different case and a different |
| 43 | keyboard. |
| 92 | 44 | |
| 93 | | shift-cbm switches between upper-only and normal character set |
| 94 | | (when wrong characters on screen this can help) |
| 95 | | run (shift-stop) loads first program from device 8 (dload"*) and starts it |
| 96 | | stop-reset activates monitor (use x to leave it) |
| 45 | CPU: MOS Technology 7501 (variable clock rate, with max 1.76 Mhz) |
| 46 | RAM: 16 kilobytes (expandable to 64k internally) |
| 47 | ROM: 32 kilobytes |
| 48 | Video: MOS Technology 7360 "TED" (5 Video modes; Max. Resolution 320x200; |
| 49 | 40 columns text; Palette of 16 colors in 8 shades, for 128 colors) |
| 50 | Sound: MOS Technology 7360 "TED" (2 voice tone-generating sound capabilities) |
| 51 | Ports: MOS 7360 (2 Joystick/Mouse ports; CBM Serial port; 'TED' port; "TV" |
| 52 | Port and switch; CBM Monitor port; Power and reset switches; Power |
| 53 | connector) |
| 54 | Keyboard: QWERTY 66 key typewriter style (8 programmable function keys; |
| 55 | 4 direction cursor-pad) |
| 97 | 56 | |
| 98 | | Tape |
| 99 | | ---- |
| 100 | | (DAC 1 volume in noise volume) |
| 101 | | loading of wav, prg and prg files in zip archiv |
| 102 | | commandline -cassette image |
| 103 | | wav: |
| 104 | | 8 or 16(not tested) bit, mono, 5000 Hz minimum |
| 105 | | has the same problems like an original tape drive (tone head must |
| 106 | | be adjusted to get working(no load error,...) wav-files) |
| 107 | | zip: |
| 108 | | must be placed in current directory |
| 109 | | prg's are played in the order of the files in zip file |
| 110 | 57 | |
| 111 | | use LOAD or LOAD"" or LOAD"",1 for loading of normal programs |
| 112 | | use LOAD"",1,1 for loading programs to their special address |
| 58 | * Commodore Plus/4 (1984) |
| 113 | 59 | |
| 114 | | several programs relies on more features |
| 115 | | (loading other file types, writing, ...) |
| 60 | This system became the middle tier of the Commodore 264 family, replacing |
| 61 | the original Commodore 264. The Plus/4 is basically the same as the C264, |
| 62 | but the name refers to the four built-in programs which came with the |
| 63 | machine: Word Processing, Spreadsheet, Database software, Graphing package. |
| 116 | 64 | |
| 117 | | Discs |
| 118 | | ----- |
| 119 | | only file load from drive 8 and 9 implemented |
| 120 | | loads file from rom directory (*.prg,*p00) (must NOT be specified on commandline) |
| 121 | | or file from d64 image (here also directory LOAD"$",8 supported) |
| 122 | | use DLOAD"filename" |
| 123 | | or LOAD"filename",8 |
| 124 | | or LOAD"filename",8,1 (for loading machine language programs at their address) |
| 125 | | for loading |
| 126 | | type RUN or the appropriate sys call to start them |
| 65 | CPU: MOS Technology 7501 (variable clock rate, with max 1.76 Mhz) |
| 66 | RAM: 64 kilobytes (expandable to 64k internally) |
| 67 | ROM: 64 kilobytes |
| 68 | Video: MOS Technology 7360 "TED" (5 Video modes; Max. Resolution 320x200; |
| 69 | 40 columns text; Palette of 16 colors in 8 shades, for 128 colors) |
| 70 | Sound: MOS Technology 7360 "TED" (2 voice tone-generating sound capabilities) |
| 71 | Ports: MOS 7360 (2 Joystick/Mouse ports; CBM Serial port; 'TED' port; "TV" |
| 72 | Port and switch; CBM Monitor port; Power and reset switches; Power |
| 73 | connector) |
| 74 | Keyboard: Full-sized QWERTY 67 key (8 programmable function keys; |
| 75 | 4 direction cursor-pad) |
| 127 | 76 | |
| 128 | | several programs rely on more features |
| 129 | | (loading other file types, writing, ...) |
| 130 | 77 | |
| 131 | | most games rely on starting own programs in the floppy drive |
| 132 | | (and therefore cpu level emulation is needed) |
| 78 | * Commodore 232 (1984, Prototype) |
| 133 | 79 | |
| 134 | | Roms |
| 135 | | ---- |
| 136 | | .bin .rom .lo .hi .prg |
| 137 | | files with boot-sign in it |
| 138 | | recogniced as roms |
| 80 | This system never reached the production and only few units exist. It is |
| 81 | in between the C16 and the C264, with its 32 kilobytes of RAM. |
| 139 | 82 | |
| 140 | | .prg files loaded at address in its first two bytes |
| 141 | | .bin, .rom, .lo , .hi roms loaded to cs1 low, cs1 high, cs2 low, cs2 high |
| 142 | | address accordingly to order in command line |
| 143 | 83 | |
| 144 | | Quickloader |
| 145 | | ----------- |
| 146 | | .prg files supported |
| 147 | | loads program into memory and sets program end pointer |
| 148 | | (works with most programs) |
| 149 | | program ready to get started with RUN |
| 150 | | loads first rom when you press quickload key (f8) |
| 84 | * Commodore 264 (1984, Prototype) |
| 151 | 85 | |
| 152 | | when problems start with -log and look into error.log file |
| 153 | | */ |
| 86 | Basically the same of a Plus/4 but without the built-in programs. |
| 154 | 87 | |
| 155 | 88 | |
| 89 | * Commodore V364 (1984, Prototype) |
| 90 | |
| 91 | This system was supposed to become the high-end system of the family, |
| 92 | featuring 64 kilobytes of RAM, the same technology of the Plus/4, a |
| 93 | keyboard with numeric keypad and built in voice synthesis capabilities. |
| 94 | |
| 95 | [TO DO] |
| 96 | |
| 97 | * Floppy drives: |
| 98 | |
| 99 | - Drives 8 & 9 supported, but limited compatibility. Real disk emulation is |
| 100 | needed. |
| 101 | |
| 102 | * Other Peripherals: |
| 103 | |
| 104 | - Lightpen support is unfinished |
| 105 | - Missing support for (it might or might not be added eventually): |
| 106 | printers and other devices; most expansion modules; userport; rs232/v.24 interface. |
| 107 | |
| 108 | * System Specific |
| 109 | |
| 110 | - V364 lacks speech hardware emulation |
| 111 | |
| 112 | */ |
| 113 | |
| 114 | |
| 156 | 115 | #include "driver.h" |
| 157 | 116 | #include "sound/sid6581.h" |
| 158 | 117 | |
| r3189 | r3190 | |
| 164 | 123 | |
| 165 | 124 | #include "includes/c16.h" |
| 166 | 125 | |
| 126 | /************************************* |
| 127 | * |
| 128 | * Main CPU memory handlers |
| 129 | * |
| 130 | *************************************/ |
| 167 | 131 | |
| 132 | |
| 133 | |
| 168 | 134 | /* |
| 169 | 135 | * commodore c16/c116/plus 4 |
| 170 | 136 | * 16 KByte (C16/C116) or 32 KByte or 64 KByte (plus4) RAM |
| r3189 | r3190 | |
| 404 | 370 | #endif |
| 405 | 371 | |
| 406 | 372 | |
| 373 | /************************************* |
| 374 | * |
| 375 | * Graphics definitions |
| 376 | * |
| 377 | *************************************/ |
| 407 | 378 | |
| 408 | | /* Initialise the c16 palette */ |
| 379 | |
| 409 | 380 | static PALETTE_INIT( c16 ) |
| 410 | 381 | { |
| 411 | 382 | int i; |
| r3189 | r3190 | |
| 415 | 386 | } |
| 416 | 387 | } |
| 417 | 388 | |
| 418 | | #if 0 |
| 419 | | /* cbm version in kernel at 0xff80 (offset 0x3f80) |
| 420 | | 0x80 means pal version */ |
| 421 | 389 | |
| 422 | | /* basic */ |
| 423 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 424 | 390 | |
| 425 | | /* kernal pal */ |
| 426 | | ROM_LOAD("318004.05", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb)) |
| 427 | | ROM_LOAD ("318004.03", 0x14000, 0x4000, CRC(77bab934)) |
| 428 | 391 | |
| 429 | | /* kernal ntsc */ |
| 430 | | ROM_LOAD ("318005.05", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682)) |
| 431 | | ROM_LOAD ("318005.04", 0x14000, 0x4000, CRC(799a633d)) |
| 392 | /************************************* |
| 393 | * |
| 394 | * Machine driver |
| 395 | * |
| 396 | *************************************/ |
| 432 | 397 | |
| 433 | | /* 3plus1 program */ |
| 434 | | ROM_LOAD ("317053.01", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f)) |
| 435 | | ROM_LOAD ("317054.01", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693)) |
| 436 | 398 | |
| 437 | | /* same as 109de2fc, but saved from running machine, so |
| 438 | | io area different ! */ |
| 439 | | ROM_LOAD ("3plus1hi.rom", 0x1c000, 0x4000, CRC(aab61387)) |
| 440 | | /* same but lo and hi in one rom */ |
| 441 | | ROM_LOAD ("3plus1.rom", 0x18000, 0x8000, CRC(7d464449)) |
| 442 | | #endif |
| 443 | | |
| 444 | | ROM_START (c232) |
| 445 | | ROM_REGION (0x40000, "main", 0) |
| 446 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 447 | | ROM_LOAD("318004.01", 0x14000, 0x4000, CRC(dbdc3319) SHA1(3c77caf72914c1c0a0875b3a7f6935cd30c54201)) |
| 448 | | ROM_END |
| 449 | | |
| 450 | | ROM_START (c16) |
| 451 | | ROM_REGION (0x40000, "main", 0) |
| 452 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 453 | | ROM_LOAD("318004.05", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb)) |
| 454 | | ROM_END |
| 455 | | |
| 456 | | ROM_START (c16hun) |
| 457 | | ROM_REGION (0x40000, "main", 0) |
| 458 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 459 | | ROM_LOAD("hungary.bin", 0x14000, 0x4000, CRC(775f60c5) SHA1(20cf3c4bf6c54ef09799af41887218933f2e27ee)) |
| 460 | | ROM_END |
| 461 | | |
| 462 | | ROM_START (c16c) |
| 463 | | ROM_REGION (0x40000, "main", 0) |
| 464 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 465 | | ROM_LOAD("318004.05", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb)) |
| 466 | | C1551_ROM ("cpu_c1551") |
| 467 | | ROM_END |
| 468 | | |
| 469 | | ROM_START (c16v) |
| 470 | | ROM_REGION (0x40000, "main", 0) |
| 471 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 472 | | ROM_LOAD("318004.05", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb)) |
| 473 | | VC1541_ROM ("cpu_vc1540") |
| 474 | | ROM_END |
| 475 | | |
| 476 | | ROM_START (plus4) |
| 477 | | ROM_REGION (0x40000, "main", 0) |
| 478 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 479 | | ROM_LOAD ("318005.05", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682)) |
| 480 | | ROM_LOAD ("317053.01", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f)) |
| 481 | | ROM_LOAD ("317054.01", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693)) |
| 482 | | ROM_END |
| 483 | | |
| 484 | | ROM_START (plus4c) |
| 485 | | ROM_REGION (0x40000, "main", 0) |
| 486 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 487 | | ROM_LOAD ("318005.05", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682)) |
| 488 | | ROM_LOAD ("317053.01", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f)) |
| 489 | | ROM_LOAD ("317054.01", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693)) |
| 490 | | C1551_ROM ("cpu_c1551") |
| 491 | | ROM_END |
| 492 | | |
| 493 | | ROM_START (plus4v) |
| 494 | | ROM_REGION (0x40000, "main", 0) |
| 495 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 496 | | ROM_LOAD ("318005.05", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682)) |
| 497 | | ROM_LOAD ("317053.01", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f)) |
| 498 | | ROM_LOAD ("317054.01", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693)) |
| 499 | | VC1541_ROM ("cpu_vc1540") |
| 500 | | ROM_END |
| 501 | | |
| 502 | | ROM_START (c364) |
| 503 | | ROM_REGION (0x40000, "main", 0) |
| 504 | | ROM_LOAD ("318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd)) |
| 505 | | ROM_LOAD ("kern364p.bin", 0x14000, 0x4000, CRC(84fd4f7a) SHA1(b9a5b5dacd57ca117ef0b3af29e91998bf4d7e5f)) |
| 506 | | ROM_LOAD ("317053.01", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f)) |
| 507 | | ROM_LOAD ("317054.01", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693)) |
| 508 | | /* at address 0x20000 not so good */ |
| 509 | | ROM_LOAD ("spk3cc4.bin", 0x28000, 0x4000, CRC(5227c2ee) SHA1(59af401cbb2194f689898271c6e8aafa28a7af11)) |
| 510 | | ROM_END |
| 511 | | |
| 512 | | |
| 513 | | |
| 514 | 399 | static MACHINE_DRIVER_START( c16 ) |
| 515 | 400 | /* basic machine hardware */ |
| 516 | 401 | MDRV_CPU_ADD("main", M7501, 1400000) /* 7.8336 Mhz */ |
| r3189 | r3190 | |
| 615 | 500 | MDRV_CPU_PROGRAM_MAP(c364_map, 0) |
| 616 | 501 | MACHINE_DRIVER_END |
| 617 | 502 | |
| 618 | | static DRIVER_INIT( c16 ) { c16_driver_init(machine); } |
| 619 | | #ifdef UNUSED_FUNCTION |
| 620 | | DRIVER_INIT( c16hun ) { c16_driver_init(machine); } |
| 621 | | DRIVER_INIT( c16c ) { c16_driver_init(machine); } |
| 622 | | DRIVER_INIT( c16v ) { c16_driver_init(machine); } |
| 623 | | #endif |
| 624 | | static DRIVER_INIT( plus4 ) { c16_driver_init(machine); } |
| 625 | | #ifdef UNUSED_FUNCTION |
| 626 | | DRIVER_INIT( plus4c ) { c16_driver_init(machine); } |
| 627 | | DRIVER_INIT( plus4v ) { c16_driver_init(machine); } |
| 628 | | DRIVER_INIT( c364 ) { c16_driver_init(machine); } |
| 629 | | #endif |
| 630 | 503 | |
| 631 | 504 | |
| 505 | |
| 506 | /************************************* |
| 507 | * |
| 508 | * ROM definition(s) |
| 509 | * |
| 510 | *************************************/ |
| 511 | |
| 512 | ROM_START( c232 ) |
| 513 | ROM_REGION (0x40000, "main", 0) |
| 514 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 515 | ROM_LOAD( "318004-01.bin", 0x14000, 0x4000, CRC(dbdc3319) SHA1(3c77caf72914c1c0a0875b3a7f6935cd30c54201) ) |
| 516 | ROM_END |
| 517 | |
| 518 | ROM_START( c264 ) |
| 519 | ROM_REGION (0x40000, "main", 0) |
| 520 | ROM_LOAD( "basic-264.bin", 0x10000, 0x4000, CRC(6a2fc8e3) SHA1(473fce23afa07000cdca899fbcffd6961b36a8a0) ) |
| 521 | ROM_LOAD( "kernal-264.bin", 0x14000, 0x4000, CRC(8f32abe7) SHA1(d481faf5fcbb331878dc7851c642d04f26a32873) ) |
| 522 | ROM_END |
| 523 | |
| 524 | ROM_START( c364 ) |
| 525 | ROM_REGION (0x40000, "main", 0) |
| 526 | ROM_LOAD( "318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 527 | ROM_LOAD( "kern364p.bin", 0x14000, 0x4000, CRC(84fd4f7a) SHA1(b9a5b5dacd57ca117ef0b3af29e91998bf4d7e5f) ) |
| 528 | ROM_LOAD( "317053-01.bin", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) ) |
| 529 | ROM_LOAD( "317054-01.bin", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) ) |
| 530 | /* at address 0x20000 not so good */ |
| 531 | ROM_LOAD( "spk3cc4.bin", 0x28000, 0x4000, CRC(5227c2ee) SHA1(59af401cbb2194f689898271c6e8aafa28a7af11) ) |
| 532 | ROM_END |
| 533 | |
| 534 | |
| 535 | ROM_START( c16 ) |
| 536 | ROM_REGION (0x40000, "main", 0) |
| 537 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 538 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 539 | ROMX_LOAD( "318004-05.bin", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(1) ) |
| 540 | ROM_SYSTEM_BIOS( 1, "rev3", "rev. 3" ) |
| 541 | ROMX_LOAD( "318004-03.bin", 0x14000, 0x4000, CRC(77bab934) SHA1(97814dab9d757fe5a3a61d357a9a81da588a9783), ROM_BIOS(2) ) |
| 542 | ROM_SYSTEM_BIOS( 2, "rev4", "rev. 4" ) |
| 543 | ROMX_LOAD( "318004-04.bin", 0x14000, 0x4000, CRC(be54ed79) SHA1(514ad3c29d01a2c0a3b143d9c1d4143b1912b793), ROM_BIOS(3) ) |
| 544 | ROM_END |
| 545 | |
| 546 | ROM_START( c16c ) |
| 547 | ROM_REGION (0x40000, "main", 0) |
| 548 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 549 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 550 | ROMX_LOAD( "318004-05.bin", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(1) ) |
| 551 | ROM_SYSTEM_BIOS( 1, "rev3", "rev. 3" ) |
| 552 | ROMX_LOAD( "318004-03.bin", 0x14000, 0x4000, CRC(77bab934) SHA1(97814dab9d757fe5a3a61d357a9a81da588a9783), ROM_BIOS(2) ) |
| 553 | ROM_SYSTEM_BIOS( 2, "rev4", "rev. 4" ) |
| 554 | ROMX_LOAD( "318004-04.bin", 0x14000, 0x4000, CRC(be54ed79) SHA1(514ad3c29d01a2c0a3b143d9c1d4143b1912b793), ROM_BIOS(3) ) |
| 555 | |
| 556 | C1551_ROM ("cpu_c1551") |
| 557 | ROM_END |
| 558 | |
| 559 | ROM_START( c16v ) |
| 560 | ROM_REGION (0x40000, "main", 0) |
| 561 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 562 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 563 | ROMX_LOAD( "318004-05.bin", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(1) ) |
| 564 | ROM_SYSTEM_BIOS( 1, "rev3", "rev. 3" ) |
| 565 | ROMX_LOAD( "318004-03.bin", 0x14000, 0x4000, CRC(77bab934) SHA1(97814dab9d757fe5a3a61d357a9a81da588a9783), ROM_BIOS(2) ) |
| 566 | ROM_SYSTEM_BIOS( 2, "rev4", "rev. 4" ) |
| 567 | ROMX_LOAD( "318004-04.bin", 0x14000, 0x4000, CRC(be54ed79) SHA1(514ad3c29d01a2c0a3b143d9c1d4143b1912b793), ROM_BIOS(3) ) |
| 568 | |
| 569 | VC1541_ROM ("cpu_vc1540") |
| 570 | ROM_END |
| 571 | |
| 572 | #define rom_c116 rom_c16 |
| 573 | #define rom_c116c rom_c16c |
| 574 | #define rom_c116v rom_c16v |
| 575 | |
| 576 | ROM_START( c16hun ) |
| 577 | ROM_REGION (0x40000, "main", 0) |
| 578 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 579 | ROM_LOAD( "hungary.bin", 0x14000, 0x4000, CRC(775f60c5) SHA1(20cf3c4bf6c54ef09799af41887218933f2e27ee) ) |
| 580 | ROM_END |
| 581 | |
| 582 | ROM_START( plus4 ) |
| 583 | ROM_REGION (0x40000, "main", 0) |
| 584 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 585 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 586 | ROMX_LOAD( "318005-05.bin", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(1) ) |
| 587 | ROM_SYSTEM_BIOS( 1, "rev4", "rev. 4" ) |
| 588 | ROMX_LOAD( "318005-04.bin", 0x14000, 0x4000, CRC(799a633d) SHA1(5df52c693387c0e2b5d682613a3b5a65477311cf), ROM_BIOS(2) ) |
| 589 | |
| 590 | ROM_LOAD( "317053-01.bin", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) ) |
| 591 | ROM_LOAD( "317054-01.bin", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) ) |
| 592 | ROM_END |
| 593 | |
| 594 | ROM_START( plus4c ) |
| 595 | ROM_REGION (0x40000, "main", 0) |
| 596 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 597 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 598 | ROMX_LOAD( "318005-05.bin", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(1) ) |
| 599 | ROM_SYSTEM_BIOS( 1, "rev4", "rev. 4" ) |
| 600 | ROMX_LOAD( "318005-04.bin", 0x14000, 0x4000, CRC(799a633d) SHA1(5df52c693387c0e2b5d682613a3b5a65477311cf), ROM_BIOS(2) ) |
| 601 | |
| 602 | ROM_LOAD( "317053-01.bin", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) ) |
| 603 | ROM_LOAD( "317054-01.bin", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) ) |
| 604 | |
| 605 | C1551_ROM ("cpu_c1551") |
| 606 | ROM_END |
| 607 | |
| 608 | ROM_START( plus4v ) |
| 609 | ROM_REGION (0x40000, "main", 0) |
| 610 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 611 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 612 | ROMX_LOAD( "318005-05.bin", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(1) ) |
| 613 | ROM_SYSTEM_BIOS( 1, "rev4", "rev. 4" ) |
| 614 | ROMX_LOAD( "318005-04.bin", 0x14000, 0x4000, CRC(799a633d) SHA1(5df52c693387c0e2b5d682613a3b5a65477311cf), ROM_BIOS(2) ) |
| 615 | |
| 616 | ROM_LOAD( "317053-01.bin", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) ) |
| 617 | ROM_LOAD( "317054-01.bin", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) ) |
| 618 | |
| 619 | VC1541_ROM ("cpu_vc1540") |
| 620 | ROM_END |
| 621 | |
| 622 | |
| 623 | |
| 624 | /************************************* |
| 625 | * |
| 626 | * Generic driver initialization |
| 627 | * |
| 628 | *************************************/ |
| 629 | |
| 630 | |
| 631 | static DRIVER_INIT( c16 ) |
| 632 | { |
| 633 | c16_driver_init(machine); |
| 634 | } |
| 635 | |
| 636 | static DRIVER_INIT( plus4 ) |
| 637 | { |
| 638 | c16_driver_init(machine); |
| 639 | } |
| 640 | |
| 641 | |
| 642 | /************************************* |
| 643 | * |
| 644 | * System configuration(s) |
| 645 | * |
| 646 | *************************************/ |
| 647 | |
| 648 | |
| 632 | 649 | static SYSTEM_CONFIG_START(c16) |
| 633 | 650 | CONFIG_DEVICE(c16_cartslot_getinfo) |
| 634 | 651 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| r3189 | r3190 | |
| 677 | 694 | CONFIG_RAM_DEFAULT(64 * 1024) |
| 678 | 695 | SYSTEM_CONFIG_END |
| 679 | 696 | |
| 680 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 681 | | COMP ( 1984, c232, c16, 0, c16, c16, c16, c16, "Commodore Business Machines Co.", "Commodore 232 Prototype", 0) |
| 682 | | COMP ( 1984, c16, 0, 0, c16, c16, c16, c16, "Commodore Business Machines Co.", "Commodore 16/116/232/264 (PAL)", 0) |
| 683 | | COMP ( 1984, c16hun, c16, 0, c16, c16, c16, c16, "Commodore Business Machines Co.", "Commodore 16 Novotrade (PAL, Hungarian Character Set)", 0) |
| 684 | | COMP ( 1984, c16c, c16, 0, c16c, c16c, c16, c16c, "Commodore Business Machines Co.", "Commodore 16/116/232/264 (PAL), 1551", 0 ) |
| 685 | | COMP ( 1984, plus4, c16, 0, plus4, plus4, plus4, plus, "Commodore Business Machines Co.", "Commodore +4 (NTSC)", 0) |
| 686 | | COMP ( 1984, plus4c, c16, 0, plus4c, plus4c, plus4, plusc, "Commodore Business Machines Co.", "Commodore +4 (NTSC), 1551", 0 ) |
| 687 | | COMP ( 1984, c364, c16, 0, c364, plus4, plus4, plusv, "Commodore Business Machines Co.", "Commodore 364 (Prototype)", GAME_IMPERFECT_SOUND) |
| 688 | | COMP ( 1984, c16v, c16, 0, c16v, c16v, c16, c16v, "Commodore Business Machines Co.", "Commodore 16/116/232/264 (PAL), VC1541", GAME_NOT_WORKING) |
| 689 | | COMP ( 1984, plus4v, c16, 0, plus4v, plus4v, plus4, plusv, "Commodore Business Machines Co.", "Commodore +4 (NTSC), VC1541", GAME_NOT_WORKING) |
| 697 | /*************************************************************************** |
| 698 | |
| 699 | Game driver(s) |
| 700 | |
| 701 | ***************************************************************************/ |
| 702 | |
| 703 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 704 | |
| 705 | COMP( 1984, c16, 0, 0, c16, c16, c16, c16, "Commodore Business Machines Co.", "Commodore 16 (PAL)", 0) |
| 706 | COMP( 1984, c16c, c16, 0, c16c, c16c, c16, c16c, "Commodore Business Machines Co.", "Commodore 16 (PAL, 1551)", 0 ) |
| 707 | COMP( 1984, c16v, c16, 0, c16v, c16v, c16, c16v, "Commodore Business Machines Co.", "Commodore 16 (PAL, VC1541)", GAME_NOT_WORKING) |
| 708 | COMP( 1984, c16hun, c16, 0, c16, c16, c16, c16, "Commodore Business Machines Co.", "Commodore 16 Novotrade (PAL, Hungary)", 0) |
| 709 | |
| 710 | COMP( 1984, c116, c16, 0, c16, c16, c16, c16, "Commodore Business Machines Co.", "Commodore 116 (PAL)", 0) |
| 711 | COMP( 1984, c116c, c16, 0, c16c, c16c, c16, c16c, "Commodore Business Machines Co.", "Commodore 116 (PAL, 1551)", 0 ) |
| 712 | COMP( 1984, c116v, c16, 0, c16v, c16v, c16, c16v, "Commodore Business Machines Co.", "Commodore 116 (PAL, VC1541)", GAME_NOT_WORKING) |
| 713 | |
| 714 | COMP( 1984, plus4, c16, 0, plus4, plus4, plus4, plus, "Commodore Business Machines Co.", "Commodore Plus/4 (NTSC)", 0) |
| 715 | COMP( 1984, plus4c, c16, 0, plus4c, plus4c, plus4, plusc, "Commodore Business Machines Co.", "Commodore Plus/4 (NTSC, 1551)", 0 ) |
| 716 | COMP( 1984, plus4v, c16, 0, plus4v, plus4v, plus4, plusv, "Commodore Business Machines Co.", "Commodore Plus/4 (NTSC, VC1541)", GAME_NOT_WORKING) |
| 717 | |
| 718 | COMP( 1984, c232, c16, 0, c16, c16, c16, c16, "Commodore Business Machines Co.", "Commodore 232 (Prototype)", 0) |
| 719 | COMP( 1984, c264, c16, 0, c16, plus4, plus4, plus, "Commodore Business Machines Co.", "Commodore 264 (Prototype)", 0) |
| 720 | COMP( 1984, c364, c16, 0, c364, plus4, plus4, plusv, "Commodore Business Machines Co.", "Commodore V364 (Prototype)", GAME_IMPERFECT_SOUND) |
src/mess/drivers/vc20.c
| r3189 | r3190 | |
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | /* |
| 13 | | ------------------------------------ |
| 14 | | vic20 commodore vic20 (ntsc version) |
| 15 | | vc20 commodore vc20 (pal version) |
| 16 | | ------------------------------------ |
| 17 | 13 | |
| 18 | | vic20 ntsc-version |
| 19 | | when screen is two wide right or low, |
| 20 | | or screen doesn't fitt in visible area |
| 21 | | or gameplay is too fast |
| 22 | | try the pal version |
| 14 | 2008 - Driver Updates |
| 15 | --------------------- |
| 23 | 16 | |
| 24 | | vc20 pal-version |
| 17 | (most of the informations are taken from http://www.zimmers.net/cbmpics/ ) |
| 25 | 18 | |
| 26 | | a normal or good written program does not rely on the video system |
| 27 | 19 | |
| 28 | | vic20cr |
| 29 | | cost reduced |
| 30 | | only modified for cheaper production (newer rams, ...) |
| 31 | | (2 2kx8 rams instead of 8 1kx4 rams, ...) |
| 20 | [CBM systems which belong to this driver] |
| 32 | 21 | |
| 33 | | State |
| 34 | | ----- |
| 35 | 22 | |
| 36 | | rasterline based video system |
| 37 | | should be enough for all vic20 games and programs |
| 38 | | imperfect sound |
| 39 | | timer system only 98% accurate |
| 40 | | simple tape support |
| 41 | | serial bus |
| 42 | | simple disk support |
| 43 | | no printer or other devices |
| 44 | | no userport |
| 45 | | no rs232/v.24 interface |
| 46 | | keyboard |
| 47 | | gameport |
| 48 | | joystick |
| 49 | | paddles |
| 50 | | lightpen |
| 51 | | expansion slot |
| 52 | | ram and rom cartridges |
| 53 | | no special expansion modules like ieee488 interface |
| 54 | | Quickloader |
| 23 | * VIC-1001 (1981, Japan) |
| 55 | 24 | |
| 56 | | for a more complete vic20 emulation take a look at the very good |
| 57 | | vice emulator |
| 25 | The first model released was the Japanese one. It featured support for the |
| 26 | Japanese katakana character. |
| 58 | 27 | |
| 59 | | Video |
| 60 | | ----- |
| 61 | | NTSC: |
| 62 | | Screen Size (normal TV (horizontal),4/3 ratio) |
| 63 | | pixel ratio: about 7/5 ! |
| 64 | | so no standard Vesa Resolution is good |
| 65 | | tweaked mode 256x256 acceptable |
| 66 | | best define own display mode (when graphic driver supports this) |
| 67 | | PAL: |
| 68 | | pixel ratio about 13/10 ! |
| 69 | | good (but only part of screen filled) 1024x768 |
| 70 | | acceptable 800x600 |
| 71 | | better define own display mode (when graphic driver supports this) |
| 28 | CPU: MOS Technology 6502 (1.01 Mhz) |
| 29 | RAM: 5 kilobytes (Expanded to 21k though an external 16k unit) |
| 30 | ROM: 20 kilobytes |
| 31 | Video: MOS Technology 6560 "VIC"(Text: 22 columns, 23 rows; Hires: 176x184 |
| 32 | pixels bitmapped; 8 text colors, 16 background colors) |
| 33 | Sound: MOS Technology 6560 "VIC" (3 voices -square wave-, noise and volume) |
| 34 | Ports: 6522 VIA x2 (1 Joystick/Mouse port; CBM Serial port; 'Cartridge / |
| 35 | Game / Expansion' port; CBM Monitor port; CBM 'USER' port; Power and |
| 36 | reset switches; Power connector) |
| 37 | Keyboard: Full-sized QWERTY 66 key (8 programmable function keys; 2 sets of |
| 38 | Keyboardable graphic characters; 2 key direction cursor-pad) |
| 39 | |
| 72 | 40 | |
| 73 | | XMESS: |
| 74 | | use -scalewidth 3 -scaleheight 2 for acceptable display |
| 75 | | better define own display mode |
| 41 | * VIC 20 (1981) |
| 76 | 42 | |
| 77 | | Keys |
| 78 | | ---- |
| 79 | | Some PC-Keyboards does not behave well when special two or more keys are |
| 80 | | pressed at the same time |
| 81 | | (with my keyboard printscreen clears the pressed pause key!) |
| 43 | This system was the first computer to sell more than one million units |
| 44 | worldwide. It was sold both in Europe and in the US. In Germany the |
| 45 | computer was renamed as VC 20 (apparently, it stands for 'VolksComputer' |
| 82 | 46 | |
| 83 | | stop-restore in much cases prompt will appear |
| 84 | | shift-cbm switches between upper-only and normal character set |
| 85 | | (when wrong characters on screen this can help) |
| 86 | | run (shift-stop) load and start program from tape |
| 47 | CPU: MOS Technology 6502A (1.01 Mhz) |
| 48 | RAM: 5 kilobytes (Expanded to 32k) |
| 49 | ROM: 20 kilobytes |
| 50 | Video: MOS Technology 6560 "VIC"(Text: 22 columns, 23 rows; Hires: 176x184 |
| 51 | pixels bitmapped; 8 text colors, 16 background colors) |
| 52 | Sound: MOS Technology 6560 "VIC" (3 voices -square wave-, noise and volume) |
| 53 | Ports: 6522 VIA x2 (1 Joystick/Mouse port; CBM Serial port; 'Cartridge / |
| 54 | Game / Expansion' port; CBM Monitor port; CBM 'USER' port; Power and |
| 55 | reset switches; Power connector) |
| 56 | Keyboard: Full-sized QWERTY 66 key (8 programmable function keys; 2 sets of |
| 57 | Keyboardable graphic characters; 2 key direction cursor-pad) |
| 87 | 58 | |
| 88 | | Lightpen |
| 89 | | -------- |
| 90 | | Paddle 3 x-axe |
| 91 | | Paddle 4 y-axe |
| 92 | 59 | |
| 93 | | Tape |
| 94 | | ---- |
| 95 | | (DAC 1 volume in noise volume) |
| 96 | | loading of wav, prg and prg files in zip archiv |
| 97 | | commandline -cassette image |
| 98 | | wav: |
| 99 | | 8 or 16(not tested) bit, mono, 12500 Hz minimum |
| 100 | | has the same problems like an original tape drive (tone head must |
| 101 | | be adjusted to get working (no load error,...) wav-files) |
| 102 | | zip: |
| 103 | | must be placed in current directory |
| 104 | | prg's are played in the order of the files in zip file |
| 60 | * VIC 21 (1983) |
| 105 | 61 | |
| 106 | | use LOAD or LOAD"" or LOAD"",1 for loading of normal programs |
| 107 | | use LOAD"",1,1 for loading programs to their special address |
| 62 | It consists of a VIC 20 with built-in RAM expansion, to reach a RAM |
| 63 | capability of 21 kilobytes. |
| 108 | 64 | |
| 109 | | several programs rely on more features |
| 110 | | (loading other file types, writing, ...) |
| 111 | 65 | |
| 112 | | Discs |
| 113 | | ----- |
| 114 | | only file load from drive 8 and 9 implemented |
| 115 | | loads file from rom directory (*.prg,*.p00)(must NOT be specified on commandline) |
| 116 | | or file from d64 image (here also directory command LOAD"$",8 supported) |
| 117 | | LOAD"filename",8 |
| 118 | | or LOAD"filename",8,1 (for loading machine language programs at their address) |
| 119 | | for loading |
| 120 | | type RUN or the appropriate SYS call to start them |
| 66 | * VIC 20CR |
| 121 | 67 | |
| 122 | | several programs rely on more features |
| 123 | | (loading other file types, writing, ...) |
| 68 | CR stands for Cost Reduced, as it consisted of a board with only 2 (larger) |
| 69 | block of RAM instead of 8. |
| 124 | 70 | |
| 125 | | some games rely on starting own programs in the floppy drive |
| 126 | | (and therefore CPU level emulation is needed) |
| 127 | 71 | |
| 128 | | Roms |
| 129 | | ---- |
| 130 | | .bin .rom .a0 .20 .40 .60 .prg |
| 131 | | files with boot-sign in it |
| 132 | | recognized as roms |
| 72 | [TO DO] |
| 133 | 73 | |
| 134 | | .20 files loaded at 0x2000 |
| 135 | | .40 files loaded at 0x4000 |
| 136 | | .60 files loaded at 0x6000 |
| 137 | | .a0 files loaded at 0xa000 |
| 138 | | .prg files loaded at address in its first two bytes |
| 139 | | .bin .rom files loaded at 0x4000 when 0x4000 bytes long |
| 140 | | else loaded at 0xa000 |
| 141 | 74 | |
| 142 | | Quickloader |
| 143 | | ----------- |
| 144 | | .prg files supported |
| 145 | | loads program into memory and sets program end pointer |
| 146 | | (works with most programs) |
| 147 | | program ready to get started with RUN |
| 148 | | currently loads first rom when you press quickload key (f8) |
| 75 | * Imperfect sound |
| 149 | 76 | |
| 150 | | when problems start with -log and look into error.log file |
| 151 | | */ |
| 77 | * Timer system only 98% accurate |
| 152 | 78 | |
| 79 | * No support for printer or other devices; no userport; no rs232/v.24 |
| 80 | interface; no special expansion modules like ieee488 interface |
| 81 | |
| 82 | */ |
| 153 | 83 | |
| 84 | |
| 154 | 85 | #include "driver.h" |
| 155 | 86 | |
| 156 | 87 | #include "includes/cbm.h" |
| r3189 | r3190 | |
| 163 | 94 | #include "includes/vc20.h" |
| 164 | 95 | |
| 165 | 96 | |
| 97 | /************************************* |
| 98 | * |
| 99 | * Main CPU memory handlers |
| 100 | * |
| 101 | *************************************/ |
| 102 | |
| 103 | |
| 166 | 104 | static ADDRESS_MAP_START( vc20_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 167 | 105 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 168 | 106 | AM_RANGE(0x0400, 0x0fff) AM_ROMBANK(1) AM_WRITE( vc20_0400_w ) /* ram, rom or nothing */ |
| r3189 | r3190 | |
| 308 | 246 | INPUT_PORTS_END |
| 309 | 247 | |
| 310 | 248 | |
| 249 | /************************************* |
| 250 | * |
| 251 | * Graphics definitions |
| 252 | * |
| 253 | *************************************/ |
| 311 | 254 | |
| 312 | | /* Initialise the vc20 palette */ |
| 255 | |
| 313 | 256 | static PALETTE_INIT( vc20 ) |
| 314 | 257 | { |
| 315 | 258 | int i; |
| r3189 | r3190 | |
| 319 | 262 | } |
| 320 | 263 | } |
| 321 | 264 | |
| 322 | | #if 0 |
| 323 | | /* chargen */ |
| 324 | | ROM_LOAD ("901460.03", 0x8000, 0x1000, CRC(83e032a6)) |
| 325 | | /* basic */ |
| 326 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1)) |
| 327 | | /* kernel ntsc-m of vic1001? */ |
| 328 | | ROM_LOAD ("901486.02", 0xe000, 0x2000, CRC(336900d7)) |
| 329 | | /* kernel ntsc */ |
| 330 | | ROM_LOAD ("901486.06", 0xe000, 0x2000, CRC(e5e7c174)) |
| 331 | | /* kernel pal */ |
| 332 | | ROM_LOAD ("901486.07", 0xe000, 0x2000, CRC(4be07cb4)) |
| 333 | 265 | |
| 334 | | /* patched pal system for swedish/finish keyboard and chars */ |
| 335 | | /* but in rom? (maybe patched means in this case nec version) */ |
| 336 | | ROM_LOAD ("nec22101.207", 0x8000, 0x1000, CRC(d808551d)) |
| 337 | | ROM_LOAD ("nec22081.206", 0xe000, 0x2000, CRC(b2a60662)) |
| 338 | 266 | |
| 339 | | /* ieee488 cartridge */ |
| 340 | | ROM_LOAD ("325329-04.bin", 0xb000, 0x800, CRC(d37b6335)) |
| 341 | | #endif |
| 267 | /************************************* |
| 268 | * |
| 269 | * Machine driver |
| 270 | * |
| 271 | *************************************/ |
| 342 | 272 | |
| 343 | | ROM_START (vic20) |
| 344 | | ROM_REGION (0x10000, "main",0) |
| 345 | | ROM_FILL( 0x0000, 0x8000, 0xFF ) |
| 346 | | ROM_LOAD ("901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4)) |
| 347 | | ROM_FILL( 0x9000, 0x3000, 0xFF ) |
| 348 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d)) |
| 349 | | ROM_LOAD ("901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19)) |
| 350 | | ROM_END |
| 351 | | |
| 352 | | ROM_START (vic1001) |
| 353 | | ROM_REGION (0x10000, "main",0) |
| 354 | | ROM_FILL( 0x0000, 0x8000, 0xFF ) |
| 355 | | ROM_LOAD ("901460.02", 0x8000, 0x1000, CRC(fcfd8a4b) SHA1(dae61ac03065aa2904af5c123ce821855898c555)) |
| 356 | | ROM_FILL( 0x9000, 0x3000, 0xFF ) |
| 357 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d)) |
| 358 | | ROM_LOAD ("901486.02", 0xe000, 0x2000, CRC(336900d7) SHA1(c9ead45e6674d1042ca6199160e8583c23aeac22)) |
| 359 | | ROM_END |
| 360 | | |
| 361 | | ROM_START (vic20swe) |
| 362 | | ROM_REGION (0x10000, "main",0) |
| 363 | | ROM_FILL( 0x0000, 0x8000, 0xFF ) |
| 364 | | ROM_LOAD ("nec22101.207", 0x8000, 0x1000, CRC(d808551d) SHA1(f403f0b0ce5922bd61bbd768bdd6f0b38e648c9f)) |
| 365 | | ROM_FILL( 0x9000, 0x3000, 0xFF ) |
| 366 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d)) |
| 367 | | ROM_LOAD ("nec22081.206", 0xe000, 0x2000, CRC(b2a60662) SHA1(cb3e2f6e661ea7f567977751846ce9ad524651a3)) |
| 368 | | ROM_END |
| 369 | | |
| 370 | | ROM_START (vic20v) |
| 371 | | ROM_REGION (0x10000, "main",0) |
| 372 | | ROM_FILL( 0x0000, 0x8000, 0xFF ) |
| 373 | | ROM_LOAD ("901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4)) |
| 374 | | ROM_FILL( 0x9000, 0x3000, 0xFF ) |
| 375 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d)) |
| 376 | | ROM_LOAD ("901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19)) |
| 377 | | VC1540_ROM ("cpu_vc1540") |
| 378 | | ROM_END |
| 379 | | |
| 380 | | ROM_START (vic20i) |
| 381 | | ROM_REGION (0x10000, "main",0) |
| 382 | | ROM_FILL( 0x0000, 0x8000, 0xFF ) |
| 383 | | ROM_LOAD ("901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4)) |
| 384 | | ROM_FILL( 0x9000, 0x2000, 0xFF ) |
| 385 | | ROM_LOAD ("325329.04", 0xb000, 0x800, CRC(d37b6335) SHA1(828c965829d21c60e8c2d083caee045c639a270f)) |
| 386 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d)) |
| 387 | | ROM_LOAD ("901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19)) |
| 388 | | /* C2031_ROM ("cpu_vc1540") */ |
| 389 | | ROM_END |
| 390 | | |
| 391 | | ROM_START (vc20) |
| 392 | | ROM_REGION (0x10000, "main",0) |
| 393 | | ROM_FILL( 0x0000, 0x8000, 0xFF ) |
| 394 | | ROM_LOAD ("901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4)) |
| 395 | | ROM_FILL( 0x9000, 0x3000, 0xFF ) |
| 396 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d)) |
| 397 | | ROM_LOAD ("901486.07", 0xe000, 0x2000, CRC(4be07cb4) SHA1(ce0137ed69f003a299f43538fa9eee27898e621e)) |
| 398 | | ROM_END |
| 399 | | |
| 400 | | ROM_START (vc20v) |
| 401 | | ROM_REGION (0x10000, "main",0) |
| 402 | | ROM_FILL( 0x0000, 0x8000, 0xFF ) |
| 403 | | ROM_LOAD ("901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4)) |
| 404 | | ROM_FILL( 0x9000, 0x3000, 0xFF ) |
| 405 | | ROM_LOAD ("901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d)) |
| 406 | | ROM_LOAD ("901486.07", 0xe000, 0x2000, CRC(4be07cb4) SHA1(ce0137ed69f003a299f43538fa9eee27898e621e)) |
| 407 | | VC1541_ROM ("cpu_vc1540") |
| 408 | | ROM_END |
| 409 | | |
| 410 | 273 | static MACHINE_DRIVER_START( vic20 ) |
| 411 | 274 | /* basic machine hardware */ |
| 412 | 275 | MDRV_CPU_ADD("main", M6502, VIC6560_CLOCK) /* 7.8336 Mhz */ |
| r3189 | r3190 | |
| 492 | 355 | MACHINE_DRIVER_END |
| 493 | 356 | |
| 494 | 357 | |
| 358 | /************************************* |
| 359 | * |
| 360 | * ROM definition(s) |
| 361 | * |
| 362 | *************************************/ |
| 363 | |
| 364 | |
| 365 | ROM_START( vic1001 ) |
| 366 | ROM_REGION (0x10000, "main", 0 ) |
| 367 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 368 | ROM_LOAD( "901460.02", 0x8000, 0x1000, CRC(fcfd8a4b) SHA1(dae61ac03065aa2904af5c123ce821855898c555) ) |
| 369 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 370 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 371 | ROM_LOAD( "901486.02", 0xe000, 0x2000, CRC(336900d7) SHA1(c9ead45e6674d1042ca6199160e8583c23aeac22) ) |
| 372 | ROM_END |
| 373 | |
| 374 | |
| 375 | ROM_START( vic20 ) |
| 376 | ROM_REGION (0x10000, "main", 0 ) |
| 377 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 378 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 379 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 380 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 381 | ROM_LOAD( "901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19) ) |
| 382 | ROM_END |
| 383 | |
| 384 | ROM_START( vic20pal ) |
| 385 | ROM_REGION (0x10000, "main", 0 ) |
| 386 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 387 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 388 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 389 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 390 | ROM_LOAD( "901486.07", 0xe000, 0x2000, CRC(4be07cb4) SHA1(ce0137ed69f003a299f43538fa9eee27898e621e) ) |
| 391 | ROM_END |
| 392 | |
| 393 | #define rom_vic20cr rom_vic20 |
| 394 | #define rom_vic20crp rom_vic20pal |
| 395 | |
| 396 | #define rom_vc20 rom_vic20pal |
| 397 | |
| 398 | ROM_START( vic20swe ) |
| 399 | /* patched pal system for swedish/finish keyboard and chars */ |
| 400 | /* but in rom? (maybe patched means in this case nec version) */ |
| 401 | ROM_REGION (0x10000, "main", 0 ) |
| 402 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 403 | ROM_LOAD( "nec22101.207", 0x8000, 0x1000, CRC(d808551d) SHA1(f403f0b0ce5922bd61bbd768bdd6f0b38e648c9f) ) |
| 404 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 405 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 406 | ROM_LOAD( "nec22081.206", 0xe000, 0x2000, CRC(b2a60662) SHA1(cb3e2f6e661ea7f567977751846ce9ad524651a3) ) |
| 407 | ROM_END |
| 408 | |
| 409 | |
| 410 | ROM_START( vic20i ) |
| 411 | ROM_REGION (0x10000, "main", 0 ) |
| 412 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 413 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 414 | ROM_FILL( 0x9000, 0x2000, 0xff ) |
| 415 | ROM_LOAD( "325329.04", 0xb000, 0x800, CRC(d37b6335) SHA1(828c965829d21c60e8c2d083caee045c639a270f) ) |
| 416 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 417 | ROM_LOAD( "901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19) ) |
| 418 | |
| 419 | /* C2031_ROM ("cpu_vc1540") */ |
| 420 | ROM_END |
| 421 | |
| 422 | ROM_START( vic20v ) |
| 423 | ROM_REGION (0x10000, "main", 0 ) |
| 424 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 425 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 426 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 427 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 428 | ROM_LOAD( "901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19) ) |
| 429 | |
| 430 | VC1540_ROM ("cpu_vc1540") |
| 431 | ROM_END |
| 432 | |
| 433 | ROM_START( vic20plv ) |
| 434 | ROM_REGION (0x10000, "main", 0 ) |
| 435 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 436 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 437 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 438 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 439 | ROM_LOAD( "901486.07", 0xe000, 0x2000, CRC(4be07cb4) SHA1(ce0137ed69f003a299f43538fa9eee27898e621e) ) |
| 440 | |
| 441 | VC1541_ROM("cpu_vc1540") |
| 442 | ROM_END |
| 443 | |
| 444 | #define rom_vc20v rom_vic20plv |
| 445 | |
| 446 | |
| 447 | /************************************* |
| 448 | * |
| 449 | * System configuration(s) |
| 450 | * |
| 451 | *************************************/ |
| 452 | |
| 453 | |
| 495 | 454 | static SYSTEM_CONFIG_START(vic20) |
| 496 | 455 | CONFIG_DEVICE(vic20_cartslot_getinfo) |
| 497 | 456 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| r3189 | r3190 | |
| 514 | 473 | CONFIG_RAM(32 * 1024) |
| 515 | 474 | SYSTEM_CONFIG_END |
| 516 | 475 | |
| 517 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 518 | | COMP ( 1981, vic20, 0, 0, vic20, vic20, vic20, vic20, "Commodore Business Machines Co.", "VIC20 (NTSC)", GAME_IMPERFECT_SOUND) |
| 519 | | COMP ( 1981, vic20i, vic20, 0, vic20i, vic20i, vic20i, vic20, "Commodore Business Machines Co.", "VIC20 (NTSC), IEEE488 Interface (SYS45065)", GAME_IMPERFECT_SOUND) |
| 520 | | COMP ( 1981, vic1001, vic20, 0, vic20, vic1001, vic20, vic20, "Commodore Business Machines Co.", "VIC1001 (NTSC)", GAME_IMPERFECT_SOUND) |
| 521 | | COMP ( 1981, vc20, vic20, 0, vc20, vc20, vc20, vic20, "Commodore Business Machines Co.", "VIC20/VC20(German) PAL", GAME_IMPERFECT_SOUND) |
| 522 | | COMP ( 1981, vic20swe, vic20, 0, vc20, vic20swe, vc20, vic20, "Commodore Business Machines Co.", "VIC20 PAL, Swedish Expansion Kit", GAME_IMPERFECT_SOUND) |
| 523 | | COMP ( 1981, vic20v, vic20, 0, vic20v, vic20, vic20, vic20v, "Commodore Business Machines Co.", "VIC20 (NTSC), VC1540", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 524 | | COMP ( 1981, vc20v, vic20, 0, vc20v, vic20, vc20, vic20v, "Commodore Business Machines Co.", "VC20 (PAL), VC1541", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 476 | |
| 477 | /*************************************************************************** |
| 478 | |
| 479 | Game driver(s) |
| 480 | |
| 481 | ***************************************************************************/ |
| 482 | |
| 483 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 484 | |
| 485 | COMP( 1981, vic1001, vic20, 0, vic20, vic1001, vic20, vic20, "Commodore Business Machines Co.", "VIC-1001 (NTSC, Japan)", GAME_IMPERFECT_SOUND) |
| 486 | |
| 487 | COMP( 1981, vic20, 0, 0, vic20, vic20, vic20, vic20, "Commodore Business Machines Co.", "VIC 20 (NTSC)", GAME_IMPERFECT_SOUND) |
| 488 | COMP( 1981, vic20cr, vic20, 0, vic20, vic20, vic20, vic20, "Commodore Business Machines Co.", "VIC 20CR (NTSC)", GAME_IMPERFECT_SOUND) |
| 489 | COMP( 1981, vic20i, vic20, 0, vic20i, vic20i, vic20i, vic20, "Commodore Business Machines Co.", "VIC 20 (NTSC, IEEE488 Interface - SYS45065)", GAME_IMPERFECT_SOUND) |
| 490 | COMP( 1981, vic20v, vic20, 0, vic20v, vic20, vic20, vic20v, "Commodore Business Machines Co.", "VIC 20 (NTSC, VC1540)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 491 | |
| 492 | COMP( 1981, vic20pal, vic20, 0, vc20, vc20, vc20, vic20, "Commodore Business Machines Co.", "VC 20 (PAL)", GAME_IMPERFECT_SOUND) |
| 493 | COMP( 1981, vic20crp, vic20, 0, vc20, vc20, vc20, vic20, "Commodore Business Machines Co.", "VC 20CR (PAL)", GAME_IMPERFECT_SOUND) |
| 494 | COMP( 1981, vic20plv, vic20, 0, vc20v, vic20, vc20, vic20v, "Commodore Business Machines Co.", "VC 20 (PAL, VC1541)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 495 | COMP( 1981, vc20, vic20, 0, vc20, vc20, vc20, vic20, "Commodore Business Machines Co.", "VIC 20 (PAL, Germany)", GAME_IMPERFECT_SOUND) |
| 496 | COMP( 1981, vc20v, vic20, 0, vc20v, vic20, vc20, vic20v, "Commodore Business Machines Co.", "VIC 20 (PAL, Germany, VC1541)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 497 | |
| 498 | COMP( 1981, vic20swe, vic20, 0, vc20, vic20swe, vc20, vic20, "Commodore Business Machines Co.", "VIC 20 (PAL, Swedish Expansion Kit)", GAME_IMPERFECT_SOUND) |
src/mess/drivers/c64.c
| r3189 | r3190 | |
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | /* |
| 11 | | ------------------------------------ |
| 12 | | max commodore max (vic10/ultimax/vickie prototype) |
| 13 | | c64 commodore c64 (ntsc version) |
| 14 | | c64pal commodore c64 (pal version) |
| 15 | | c64gs commodore c64 game system (ntsc version) |
| 16 | | sx64 commodore sx64 (pal version) |
| 17 | | ------------------------------------ |
| 18 | | (preliminary version) |
| 19 | 11 | |
| 20 | | if the game runs to fast with the ntsc version, try the pal version! |
| 12 | 2008 - Driver Updates |
| 13 | --------------------- |
| 21 | 14 | |
| 22 | | c64 |
| 23 | | design like the vic20 |
| 24 | | better videochip with sprites |
| 25 | | famous sid6581 sound chip |
| 26 | | 64 kbyte ram |
| 27 | | 2nd gameport |
| 28 | | Educator 64-1 |
| 29 | | standard c64 |
| 30 | | bios color bios (as in pet64 series) when delivered with green monitor |
| 31 | | max (vic10,ultimax,vickey prototype) |
| 32 | | delivered in japan only? |
| 33 | | (all modules should work with c64) |
| 34 | | cartridges neccessary |
| 35 | | low cost c64 |
| 36 | | flat design |
| 37 | | only 4 kbyte sram |
| 38 | | simplier banking chip |
| 39 | | no portlines from cpu |
| 40 | | only 1 cia6526 chip |
| 41 | | restore key connection? |
| 42 | | no serial bus |
| 43 | | no userport |
| 44 | | keyboard |
| 45 | | tape port |
| 46 | | 2 gameports |
| 47 | | lightpen (port a only) and joystick mentioned in advertisement |
| 48 | | paddles |
| 49 | | cartridge/expansion port (some signals different to c64) |
| 50 | | no rom on board (minibasic with kernel delivered as cartridge?) |
| 51 | | c64gs |
| 52 | | game console without keyboard |
| 53 | | standard c64 mainboard! |
| 54 | | modified kernal |
| 55 | | basic rom |
| 56 | | 2. cia yes |
| 57 | | no userport |
| 58 | | no cbm serial port |
| 59 | | no keyboard connector |
| 60 | | no tapeport |
| 61 | | cbm4064/pet64/educator64-2 |
| 62 | | build in green monitor |
| 63 | | other case |
| 64 | | differences, versions??? |
| 65 | | (sx100 sx64 like prototype with build in black/white monitor) |
| 66 | | sx64 |
| 67 | | movable compact (and heavy) all in one comp |
| 68 | | build in vc1541 |
| 69 | | build in small color monitor |
| 70 | | no tape connector |
| 71 | | dx64 prototype |
| 72 | | two build in vc1541 (or 2 drives driven by one vc1541 circuit) |
| 15 | (most of the informations are taken from http://www.zimmers.net/cbmpics/ ) |
| 73 | 16 | |
| 74 | | state |
| 75 | | ----- |
| 76 | | rasterline based video system |
| 77 | | no cpu holding |
| 78 | | imperfect scrolling support (when 40 columns or 25 lines) |
| 79 | | lightpen support not finished |
| 80 | | rasterline not finished |
| 81 | | no sound |
| 82 | | cia6526's look in machine/cia6526.c |
| 83 | | keyboard |
| 84 | | gameport a |
| 85 | | paddles 1,2 |
| 86 | | joystick 1 |
| 87 | | 2 button joystick/mouse joystick emulation |
| 88 | | no mouse |
| 89 | | lightpen (not finished) |
| 90 | | gameport b |
| 91 | | paddles 3,4 |
| 92 | | joystick 2 |
| 93 | | 2 button joystick/mouse joystick emulation |
| 94 | | no mouse |
| 95 | | simple tape support |
| 96 | | (not working, cia timing?) |
| 97 | | serial bus |
| 98 | | simple disk drives |
| 99 | | no printer or other devices |
| 100 | | expansion modules c64 |
| 101 | | rom cartridges (exrom) |
| 102 | | ultimax rom cartridges (game) |
| 103 | | no other rom cartridges (bankswitching logic in it, switching exrom, game) |
| 104 | | no ieee488 support |
| 105 | | no cpm cartridge |
| 106 | | no speech cartridge (no circuit diagram found) |
| 107 | | no fm sound cartridge |
| 108 | | no other expansion modules |
| 109 | | expansion modules ultimax |
| 110 | | ultimax rom cartridges |
| 111 | | no other expansion modules |
| 112 | | no userport |
| 113 | | no rs232/v.24 interface |
| 114 | | no super cpu modification |
| 115 | | no second sid modification |
| 116 | | quickloader |
| 117 | 17 | |
| 118 | | Keys |
| 119 | | ---- |
| 120 | | Some PC-Keyboards does not behave well when special two or more keys are |
| 121 | | pressed at the same time |
| 122 | | (with my keyboard printscreen clears the pressed pause key!) |
| 18 | [CBM systems which belong to this driver] |
| 123 | 19 | |
| 124 | | shift-cbm switches between upper-only and normal character set |
| 125 | | (when wrong characters on screen this can help) |
| 126 | | run (shift-stop) loads pogram from type and starts it |
| 20 | * Commodore Max Machine (1982, Japan) |
| 127 | 21 | |
| 128 | | Lightpen |
| 129 | | -------- |
| 130 | | Paddle 5 x-axe |
| 131 | | Paddle 6 y-axe |
| 22 | The Max Machine was produced by Commodore Japan and was released along |
| 23 | with the C64 in Japan. Also known as "UltiMax" (in North America ads) |
| 24 | or "VC-10 / VIC-10" (in some European advertising), it was designed to be a |
| 25 | game console. It has no internal kernel and no BASIC, everything must be |
| 26 | supplied by the cart. A Mini BASIC and a BASIC carts were produced (the |
| 27 | latter with support for LOAD/SAVE commands as well). The character rom |
| 28 | is not present either and its content was, again, in the cart. Max Machine |
| 29 | carts can be run by both C64 and C128. |
| 132 | 30 | |
| 133 | | Tape |
| 134 | | ---- |
| 135 | | (DAC 1 volume in noise volume) |
| 136 | | loading of wav, prg and prg files in zip archiv |
| 137 | | commandline -cassette image |
| 138 | | wav: |
| 139 | | 8 or 16(not tested) bit, mono, 125000 Hz minimum |
| 140 | | has the same problems like an original tape drive (tone head must |
| 141 | | be adjusted to get working(no load error,...) wav-files) |
| 142 | | zip: |
| 143 | | must be placed in current directory |
| 144 | | prg's are played in the order of the files in zip file |
| 31 | CPU: MOS Technology 6510 (1Mhz) |
| 32 | RAM: 4 kilobytes (2 kilobytes?) |
| 33 | ROM: none |
| 34 | Video: MOS 6566 "VIC-II" (320 x 200 Hi-Resolution, 40 columns text, 16 |
| 35 | colors) |
| 36 | Sound: MOS 6581 "SID" (3 voice stereo synthesizer/digital sound |
| 37 | capabilities) |
| 38 | Ports: 6526 CIA (Power switch; 2 Commodore "Joystick" ports; 'EXPANSION' |
| 39 | port; "TV" port; CBM Datasette port) |
| 40 | Keyboard: Full-sized QWERTY "Contact-Pad" |
| 145 | 41 | |
| 146 | | use LOAD or LOAD"" or LOAD"",1 for loading of normal programs |
| 147 | | use LOAD"",1,1 for loading programs to their special address |
| 148 | 42 | |
| 149 | | several programs relies on more features |
| 150 | | (loading other file types, writing, ...) |
| 43 | * Commodore 64 (1982) |
| 151 | 44 | |
| 152 | | Discs |
| 153 | | ----- |
| 154 | | only file load from drive 8 and 9 implemented |
| 155 | | loads file from rom directory (*.prg,*.p00,*.t64) (must NOT be specified on |
| 156 | | commandline) |
| 157 | | or file from d64 image (here also directory LOAD"$",8 supported) |
| 158 | | use LOAD"filename",8 |
| 159 | | or LOAD"filename",8,1 (for loading machine language programs at their address) |
| 160 | | for loading |
| 161 | | type RUN or the appropriate sys call to start them |
| 45 | Released in August 1982 in the US and marketed as a lower end home |
| 46 | computer, the C64 dominated the home computer market for a few years, |
| 47 | outselling competitors like Apple computers, IBM PCs and TRS-80s. |
| 48 | During the early stages of the project it was called VIC-40, but the |
| 49 | named was changed in the end probably to fit the name scheme used at |
| 50 | time for business product (letter + memory size: P128 & B256). |
| 51 | It was also advertised as VC 64 in Germany, and as VIC 64S in Sweden |
| 52 | (the latter came with a modified character set) |
| 162 | 53 | |
| 163 | | several programs rely on more features |
| 164 | | (loading other file types, writing, ...) |
| 54 | CPU: CSG 6510 (1Mhz) |
| 55 | RAM: 64 kilobytes |
| 56 | ROM: 20 kilobytes |
| 57 | Video: MOS 6569 "VIC-II" (320 x 200 Hi-Resolution, 40 columns text, 16 |
| 58 | colors) |
| 59 | Sound: MOS 6581 "SID" (3 voice stereo synthesizer/digital sound |
| 60 | capabilities) |
| 61 | Ports: MOS 6526 CIA x2 (Power switch; 2 Commodore Joystick/Mouse ports; |
| 62 | CBM Serial port; CBM Datasette port; parallel programmable "User" |
| 63 | port; CBM Monitor port; C64 expansion port) |
| 64 | Keyboard: Full-sized 62 key QWERTY (8 programmable function keys; 2 |
| 65 | cursor keys, 2 directions each) |
| 165 | 66 | |
| 166 | | most games rely on starting own programs in the floppy drive |
| 167 | | (and therefor cpu level emulation is needed) |
| 67 | BIOS: |
| 68 | kernal.901227-02.bin |
| 69 | basic.901226-01.bin |
| 70 | characters.901225-01.bin |
| 168 | 71 | |
| 169 | | Roms |
| 170 | | ---- |
| 171 | | .prg |
| 172 | | .crt |
| 173 | | .80 .90 .a0 .b0 .e0 .f0 |
| 174 | | files with boot-sign in it |
| 175 | | recogniced as roms |
| 176 | 72 | |
| 177 | | .prg files loaded at address in its first two bytes |
| 178 | | .?0 files to address specified in extension |
| 179 | | .crt roms to addresses in crt file |
| 73 | * Commodore 64 (1982, Japan) |
| 180 | 74 | |
| 181 | | Quickloader |
| 182 | | ----------- |
| 183 | | .prg, .p00 and .t64 files supported (.t64s must be standard single entry type |
| 184 | | with a start address of $0801 - which covers most T64 files) |
| 185 | | loads program into memory and sets program end pointer |
| 186 | | (works with most programs) |
| 187 | | program ready to get started with RUN |
| 188 | | loads first rom when you press quickload key (f8) |
| 75 | Released in Japan at the same time as Max Machine, in the hope to repeat |
| 76 | the success of the VIC-1001, this system was a flop. Technically it is the |
| 77 | same as the C64, but it has native support for the Katakana character set. |
| 189 | 78 | |
| 190 | | when problems start with -log and look into error.log file |
| 79 | Video: MOS 6569 "VIC-II" (320 x 200 Hi-Resolution, 40 columns text, 16 |
| 80 | colors) |
| 81 | Keyboard: Full-sized 62 key QWERTY (8 programmable function keys; 2 |
| 82 | cursor keys, 2 directions each; Katakana characters accessible through |
| 83 | C= key) |
| 84 | |
| 85 | BIOS |
| 86 | kernal.906145-02.bin |
| 87 | basic.901226-01.bin |
| 88 | characters.906143-02.bin |
| 89 | |
| 90 | |
| 91 | * PET 64 (1983) |
| 92 | |
| 93 | Also known as CBM 4064, it was a C64 fitted in a PET case and with a PET |
| 94 | monochrome screen. Exactly like the C64, it features a VIC-II video chip, |
| 95 | a SID sound chip, 2 x CIA 6526, 64K of memory and BASIC 2.0. Being forced |
| 96 | to display on a monochrome screen, color codes were removed from the front |
| 97 | of number keys. The kernel itself was modified to output only white |
| 98 | characters on a black background. A plate with BASIC commands and other hints |
| 99 | was put above the keyboard. |
| 100 | |
| 101 | Video: MOS 6569 "VIC-II" (320 x 200 Hi-Resolution, 40 columns text, 16 |
| 102 | colors, monochrome 14" monitor support) |
| 103 | Sound: MOS 6581 "SID" (3 voice stereo synthesizer/digital sound |
| 104 | capabilities; Internal speaker) |
| 105 | Keyboard: Full-sized 62 key QWERTY (8 programmable function keys; 2 |
| 106 | cursor keys, 2 directions each; complete BASIC reference on keyboard |
| 107 | panel ) |
| 108 | |
| 109 | BIOS |
| 110 | kernal.4064.901246-01.bin |
| 111 | basic.901226-01.bin |
| 112 | characters.901225-01.bin |
| 113 | |
| 114 | |
| 115 | * Educator 64 (1983) |
| 116 | |
| 117 | Basically the same as the PET 64, but it uses a standard C64 kernel, |
| 118 | allowing to 'explore' all shades of green the monitor was capable of. Also |
| 119 | the BASIC plate is slightly different. There could have been an earlier |
| 120 | version, already called Educator 64, which came with no monitor and in a |
| 121 | C64 case. |
| 122 | |
| 123 | Keyboard: Full-sized 62 key QWERTY (8 programmable function keys; 2 |
| 124 | cursor keys, 2 directions each; complete BASIC reference on keyboard |
| 125 | panel ) |
| 126 | |
| 127 | BIOS |
| 128 | kernal.901227-02.bin |
| 129 | basic.901226-01.bin |
| 130 | characters.901225-01.bin |
| 131 | |
| 132 | |
| 133 | * SX-64 Executive Computer (1984) |
| 134 | |
| 135 | Portable color computer based on the C64 hardware. The unit is heavy, with |
| 136 | its metal case, features a built-in disk driver (mostly 1541 compatible) and |
| 137 | has a large handle to carry the computer around. The detachable keyboard can |
| 138 | be used as protective front plate. The SX-64 had a 4" full color screen and a |
| 139 | built-in speaker. The only differences between the C64 and the SX-64 are in |
| 140 | the start up colors and in the SX-64 better support for the internal floppy |
| 141 | drive. The tape drive support was removed in the portable system. |
| 142 | |
| 143 | CPU: MOS 6510 (1Mhz) |
| 144 | RAM: 64 kilobytes (68 with the 1541) |
| 145 | ROM: 20 kilobytes (36 with the 1541) |
| 146 | Video: MOS 6569 "VIC-II" (320 x 200 Hi-Resolution, 40 columns text, 16 |
| 147 | colors, 4" Full-color screen) |
| 148 | Sound: MOS 6581 "SID" (3 voice stereo synthesizer/digital sound |
| 149 | capabilities; Internal MONO speaker) |
| 150 | Ports: MOS 6526 CIA x2 (Power switch; 2 Commodore Joystick/Mouse ports; |
| 151 | CBM Serial port; CBM Datasette port; parallel programmable "User" |
| 152 | port; CBM Monitor port; C64 expansion port) |
| 153 | Keyboard: Full-sized 62 key QWERTY (8 programmable function keys; 2 |
| 154 | cursor keys, 2 directions each; detachable) |
| 155 | Additional hardware: Commodore 1541 Disk Drive (5.25" 170K SS SD Floppy) |
| 156 | |
| 157 | BIOS: |
| 158 | kernal.sx.251104-04.bin |
| 159 | basic.901226-01.bin |
| 160 | characters.901225-01.bin |
| 161 | |
| 162 | |
| 163 | * DX-64 (198?) |
| 164 | |
| 165 | Rumored version of a SX-64 variant featuring two floppy drives. Not sure |
| 166 | if it ever reached the prototype stage. |
| 167 | |
| 168 | |
| 169 | * Commodore 64C (1986) |
| 170 | |
| 171 | Redesigned version of the C64, released with slightly upgraded versions |
| 172 | of chips and peripherals. It came often bundled with GEOS, GUI based OS |
| 173 | by Berkeley Softworks (it was stored on floppy disks). It's also known as |
| 174 | C64-II but the name doesn't seems to have ever been official (only used |
| 175 | by magazines at early stage of ad & review). Another redesign, in a slightly |
| 176 | larger case (closer to the original C64) is known as Commodore 64G, because |
| 177 | mainly sold in Germany. Other repackaged versions followed, built around the |
| 178 | same kernel and chips. |
| 179 | |
| 180 | CPU: CSG 8500 (1 Mhz; 6510 compatible) |
| 181 | RAM: 64 kilobytes |
| 182 | ROM: 20 kilobytes |
| 183 | Video: MOS 8565 "VIC-II" (320 x 200 Hi-Resolution, 40 columns text, 16 |
| 184 | colors) |
| 185 | Sound: CSG 8580 "SID" (3 voice stereo synthesizer/digital sound |
| 186 | capabilities) |
| 187 | Ports: MOS 6526 CIA x2 (Power switch; 2 Commodore Joystick/Mouse ports; |
| 188 | CBM Serial port; CBM Datasette port; parallel programmable "User" |
| 189 | port; CBM Monitor port; C64 expansion port) |
| 190 | Keyboard: Full-sized 62 key QWERTY (8 programmable function keys; 2 |
| 191 | cursor keys, 2 directions each) |
| 192 | |
| 193 | BIOS: |
| 194 | 64c.251913-01.bin |
| 195 | characters.901225-01.bin |
| 196 | |
| 197 | |
| 198 | * Commodore 64 Games System (1990) |
| 199 | |
| 200 | Repackaged C64 with neither keyboard, nor ports. Basically, the |
| 201 | system came far too late to enter the console market of the 90s. |
| 202 | |
| 203 | CPU: CSG 6510 (1 Mhz) |
| 204 | RAM: 64 kilobytes |
| 205 | ROM: 16 kilobytes |
| 206 | Video: MOS 8565 "VIC-II" (320 x 200 Hi-Resolution, 40 columns text, 16 |
| 207 | colors) |
| 208 | Sound: CSG 8580 "SID" (3 voice stereo synthesizer/digital sound |
| 209 | capabilities) |
| 210 | Ports: MOS 6526 CIA (Power switch; 2 Commodore Joystick/Mouse ports; |
| 211 | CBM Monitor port; C64 expansion port) |
| 212 | |
| 213 | BIOS: |
| 214 | 64gs.390852-01.bin |
| 215 | characters.901225-01.bin |
| 216 | |
| 217 | * Commodore 64 "Gold" (1984, US - 1986, Germany) |
| 218 | |
| 219 | Commemorative version released to celebrate the one millionth Commodore 64 |
| 220 | sold in the country. The whole case is golden colored. It is also reasonable |
| 221 | to assume that the US version is based on the original C64, while the German |
| 222 | version is based on the C64C. |
| 223 | |
| 224 | |
| 225 | [Rumored / Unconfirmed] |
| 226 | |
| 227 | VC-10 - Ultimax with built-in (even if stripped down) BASIC 2.0 |
| 228 | SX-100 - Rumored SX-64 prototype with built-in b&w screen |
| 229 | C64CGS - C64GS in a C64C-like case, sold in Ireland (?), with a keyboard (?) |
| 230 | |
| 231 | |
| 232 | [Known Fake / Unofficial BIOS] |
| 233 | |
| 234 | Max Machine - These are BASIC V2.0 and kernel contained in the MAX BASIC |
| 235 | cart, not a real Max BIOS. |
| 236 | basic.901230-01.bin |
| 237 | kernal.901231-01.bin |
| 238 | |
| 239 | Character roms |
| 240 | c64-german.bin - amateur hack |
| 241 | c64-hungarian.bin - amateur hack |
| 242 | kauno.bin - calligraphic font for the C64, data saved from a 1985 tape |
| 243 | |
| 244 | [Peripherals] |
| 245 | |
| 246 | - CBM 1530 Datasette Recorder |
| 247 | - VIC 1541 / 1541-II / 1571 / 1581 disk drive (up to 5 at a time) |
| 248 | - Commodore Modem Cartridge 1650 / 1660 / 1670 |
| 249 | - IEEE Interface Expansion Card |
| 250 | - Commodore CBM 8050 / 4040 Dual Floppy Disk Drives (through IEEE Interface) |
| 251 | - Commodore 6400 Letter Quality Printer (through IEEE Interface) |
| 252 | - Commodore 8023 Dot Matrix Printer (through IEEE Interface) |
| 253 | - Commodore 1520 Printer / Plotter |
| 254 | - Commodore 1701 / 1702 Monitor |
| 255 | |
| 256 | - Lt. Kernal Hard Drive |
| 257 | - CMD HD-Series |
| 258 | |
| 259 | - Commodore Joysticks |
| 260 | - Commodore Paddles |
| 261 | - Commodore 1350 / 1351 Mouse |
| 262 | - CMD SmartMouse |
| 263 | - Inkwell Light Pen |
| 264 | - Koala Pad |
| 265 | - Commodore Music Maker overlay |
| 266 | - External music keyboard (to be plugged into the Sound Expander) |
| 267 | |
| 268 | - Commodore REU: REU stands for RAM Expansion Unit for C64 & C128. Three |
| 269 | models 1700 (128 KB) and 1750 (512 KB), and later the 1764 (256 KB, for the |
| 270 | C64) |
| 271 | - Commodore Sound Expander Cart |
| 272 | - Commodore Sound Sampler Cart |
| 273 | - Berkeley Softworks GeoRAM |
| 274 | - Schnedler Systems Turbo Master CPU |
| 275 | - Creative Micro Designs (CMD) RAMDrive, RAMLink and Super CPU Accelerator |
| 276 | - CMD SID symphony cartridge |
| 277 | - Commodore Universal Btx Decoder: Same design of the REU, it's a decoder |
| 278 | for the Bildschirmtext, a sort of videotext online service similar to the |
| 279 | French Minitel. It allowed the C64 + Decoder to replace the very expensive |
| 280 | standalone decoder. |
| 281 | |
| 282 | Freezer Carts: Datel "Action Replay", Freeze Frame MK III B, Trilogic |
| 283 | "Expert", "The Final Cartridge III", "Retro Replay" |
| 284 | Kernal Replacement: SpeedDOS, DolphinDOS, JiffyDOS etc. |
| 285 | |
| 286 | [TO DO] |
| 287 | |
| 288 | * Floppy drives: |
| 289 | |
| 290 | - Drives 8 & 9 supported, but limited compatibility. Real 1541 emulation is |
| 291 | needed. |
| 292 | |
| 293 | * Cartridges: |
| 294 | |
| 295 | - Currently only Type 0 hardware is supported (check cart code in |
| 296 | machine/c64.c for more notes). Other Types may load but not work. |
| 297 | |
| 298 | * Datasette: |
| 299 | |
| 300 | - Currently, .t64 images are supported as Quickload device. This only works |
| 301 | if the file contains a single entry with a start address of $0801. This |
| 302 | covers most of the existing files, but the format is desinged to be much |
| 303 | more flexible and it could be implemented as a real tape format. |
| 304 | |
| 305 | * Other Peripherals: |
| 306 | |
| 307 | - Lightpen support is unfinished |
| 308 | - Missing support for (it might or might not be added eventually): |
| 309 | printers; IEEE488; CPM cartridge, Speech cartridge, FM Sound cartridge |
| 310 | and other expansion modules; userport; rs232/v.24 interface; Super CPU; |
| 311 | dual SID configuration |
| 312 | |
| 313 | * Informations / BIOS / Supported Sets: |
| 314 | |
| 315 | - Find out if C64 was sold both as VIC 64S and C64 in Sweden, and which |
| 316 | were inner/outer differences. For sure advertising was using the VIC 64S |
| 317 | name. |
| 318 | - Was it really sold as VC 64 in Germany, or was it just a nickname used |
| 319 | at launch to indicate standard C64 units? |
| 320 | - What's the difference between Educator 64-1 and Educator 64-2? My guess |
| 321 | is that Edu64-1 was a standard PET64/CBMB4064 with a different name, while |
| 322 | the Edu64-1 used the full C64 BIOS. Confirmations are needed, anyway. |
| 191 | 323 | */ |
| 192 | 324 | |
| 193 | 325 | #include "driver.h" |
| r3189 | r3190 | |
| 203 | 335 | #include "includes/c64.h" |
| 204 | 336 | |
| 205 | 337 | |
| 338 | /************************************* |
| 339 | * |
| 340 | * Main CPU memory handlers |
| 341 | * |
| 342 | *************************************/ |
| 343 | |
| 206 | 344 | static ADDRESS_MAP_START(ultimax_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 207 | 345 | AM_RANGE(0x0000, 0x0fff) AM_RAM AM_BASE(&c64_memory) |
| 208 | 346 | AM_RANGE(0x8000, 0x9fff) AM_ROM AM_BASE(&c64_roml) |
| r3189 | r3190 | |
| 322 | 460 | |
| 323 | 461 | |
| 324 | 462 | |
| 463 | /************************************* |
| 464 | * |
| 465 | * Graphics definitions |
| 466 | * |
| 467 | *************************************/ |
| 468 | |
| 469 | |
| 325 | 470 | static PALETTE_INIT( pet64 ) |
| 326 | 471 | { |
| 327 | 472 | int i; |
| 328 | | for (i=0; i<16; i++) |
| 329 | | palette_set_color_rgb(machine, i, 0, vic2_palette[i*3+1], 0); |
| 473 | for (i = 0; i < 16; i++) |
| 474 | palette_set_color_rgb(machine, i, 0, vic2_palette[i * 3 + 1], 0); |
| 330 | 475 | } |
| 331 | 476 | |
| 332 | | ROM_START (ultimax) |
| 333 | | ROM_REGION (0x10000, "main", ROMREGION_ERASEFF) |
| 334 | | ROM_END |
| 335 | 477 | |
| 336 | | ROM_START (c64gs) |
| 337 | | ROM_REGION (0x19400, "main", 0) |
| 338 | | /* standard basic, modified kernel */ |
| 339 | | ROM_LOAD ("390852.01", 0x10000, 0x4000, CRC(b0a9c2da) SHA1(21940ef5f1bfe67d7537164f7ca130a1095b067a)) |
| 340 | | ROM_LOAD ("901225.01", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa)) |
| 341 | | ROM_END |
| 478 | /************************************* |
| 479 | * |
| 480 | * Sound definitions |
| 481 | * |
| 482 | *************************************/ |
| 342 | 483 | |
| 343 | | ROM_START (c64) |
| 344 | | ROM_REGION (0x19400, "main", 0) |
| 345 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 346 | | ROM_LOAD ("901227.03", 0x12000, 0x2000, CRC(dbe3e7c7) SHA1(1d503e56df85a62fee696e7618dc5b4e781df1bb)) |
| 347 | | ROM_LOAD ("901225.01", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa)) |
| 348 | | ROM_END |
| 349 | 484 | |
| 350 | | ROM_START (c64pal) |
| 351 | | ROM_REGION (0x19400, "main", 0) |
| 352 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 353 | | ROM_LOAD ("901227.03", 0x12000, 0x2000, CRC(dbe3e7c7) SHA1(1d503e56df85a62fee696e7618dc5b4e781df1bb)) |
| 354 | | ROM_LOAD ("901225.01", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa)) |
| 355 | | ROM_END |
| 356 | | |
| 357 | | ROM_START (vic64s) |
| 358 | | ROM_REGION (0x19400, "main", 0) |
| 359 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 360 | | ROM_LOAD ("kernel.swe", 0x12000, 0x2000, CRC(f10c2c25) SHA1(e4f52d9b36c030eb94524eb49f6f0774c1d02e5e)) |
| 361 | | ROM_LOAD ("charswe.bin",0x14000, 0x1000, CRC(bee9b3fd) SHA1(446ae58f7110d74d434301491209299f66798d8a)) |
| 362 | | ROM_END |
| 363 | | |
| 364 | | ROM_START (sx64) |
| 365 | | ROM_REGION (0x19400, "main", 0) |
| 366 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 367 | | ROM_LOAD( "251104.04", 0x12000, 0x2000, CRC(2c5965d4) SHA1(aa136e91ecf3c5ac64f696b3dbcbfc5ba0871c98)) |
| 368 | | ROM_LOAD ("901225.01", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa)) |
| 369 | | VC1541_ROM ("cpu_vc1540") |
| 370 | | ROM_END |
| 371 | | |
| 372 | | ROM_START (dx64) |
| 373 | | ROM_REGION (0x19400, "main", 0) |
| 374 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 375 | | ROM_LOAD( "dx64kern.bin", 0x12000, 0x2000, CRC(58065128)) |
| 376 | | // vc1541 roms were not included in submission |
| 377 | | VC1541_ROM ("cpu_vc1540") |
| 378 | | // VC1541_ROM (" ") |
| 379 | | ROM_END |
| 380 | | |
| 381 | | ROM_START (vip64) |
| 382 | | ROM_REGION (0x19400, "main", 0) |
| 383 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 384 | | ROM_LOAD( "kernelsx.swe", 0x12000, 0x2000, CRC(7858d3d7) SHA1(097cda60469492a8916c2677b7cce4e12a944bc0)) |
| 385 | | ROM_LOAD ("charswe.bin", 0x14000, 0x1000, CRC(bee9b3fd) SHA1(446ae58f7110d74d434301491209299f66798d8a)) |
| 386 | | VC1541_ROM ("cpu_vc1540") |
| 387 | | ROM_END |
| 388 | | |
| 389 | | ROM_START (pet64) |
| 390 | | ROM_REGION (0x19400, "main", 0) |
| 391 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 392 | | ROM_LOAD( "901246.01", 0x12000, 0x2000, CRC(789c8cc5) SHA1(6c4fa9465f6091b174df27dfe679499df447503c)) |
| 393 | | ROM_LOAD ("901225.01", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa)) |
| 394 | | ROM_END |
| 395 | | |
| 396 | | #if 0 |
| 397 | | ROM_START (flash8) |
| 398 | | ROM_REGION (0x1009400, "main", 0) |
| 399 | | #if 1 |
| 400 | | ROM_LOAD ("flash8", 0x010000, 0x002000, CRC(3c4fb703)) // basic |
| 401 | | ROM_CONTINUE( 0x014000, 0x001000) // empty |
| 402 | | ROM_CONTINUE( 0x014000, 0x001000) // characterset |
| 403 | | ROM_CONTINUE( 0x012000, 0x002000) // c64 mode kernel |
| 404 | | ROM_CONTINUE( 0x015000, 0x002000) // kernel |
| 405 | | #else |
| 406 | | ROM_LOAD ("flash8", 0x012000-0x6000, 0x008000, CRC(3c4fb703)) |
| 407 | | #endif |
| 408 | | ROM_END |
| 409 | | #endif |
| 410 | | |
| 411 | | #if 0 |
| 412 | | /* character rom */ |
| 413 | | ROM_LOAD ("901225.01", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa)) |
| 414 | | ROM_LOAD ("charswe.bin", 0x14000, 0x1000, CRC(bee9b3fd) SHA1(446ae58f7110d74d434301491209299f66798d8a)) |
| 415 | | |
| 416 | | /* basic */ |
| 417 | | ROM_LOAD ("901226.01", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e)) |
| 418 | | |
| 419 | | /* in c16 and some other commodore machines: |
| 420 | | cbm version in kernel at 0xff80 (offset 0x3f80) |
| 421 | | 0x80 means pal version */ |
| 422 | | |
| 423 | | /* scrap */ |
| 424 | | /* modified for alec 64, not booting */ |
| 425 | | ROM_LOAD( "alec64.e0", 0x12000, 0x2000, CRC(2b1b7381 )) |
| 426 | | /* unique copyright, else speeddos? */ |
| 427 | | ROM_LOAD( "a.e0", 0x12000, 0x2000, CRC(b8f49365 )) |
| 428 | | /* ? */ |
| 429 | | ROM_LOAD( "kernelx.e0", 0x12000, 0x2000, CRC(beed6d49 )) |
| 430 | | ROM_LOAD( "kernelx2.e0", 0x12000, 0x2000, CRC(cfb58230 )) |
| 431 | | /* basic x 2 */ |
| 432 | | ROM_LOAD( "frodo.e0", 0x12000, 0x2000, CRC(6ec94629 )) |
| 433 | | |
| 434 | | /* commodore versions */ |
| 435 | | /* 901227-01 */ |
| 436 | | ROM_LOAD( "901227.01", 0x12000, 0x2000, CRC(dce782fa )) |
| 437 | | /* 901227-02 */ |
| 438 | | ROM_LOAD( "901227.02", 0x12000, 0x2000, CRC(a5c687b3 )) |
| 439 | | /* 901227-03 */ |
| 440 | | ROM_LOAD( "901227.03", 0x12000, 0x2000, CRC(dbe3e7c7) SHA1(1d503e56df85a62fee696e7618dc5b4e781df1bb)) |
| 441 | | /* 901227-03? swedish */ |
| 442 | | ROM_LOAD( "kernel.swe", 0x12000, 0x2000, CRC(f10c2c25) SHA1(e4f52d9b36c030eb94524eb49f6f0774c1d02e5e)) |
| 443 | | /* c64c 901225-01 + 901227-03 */ |
| 444 | | ROM_LOAD ("251913.01", 0x10000, 0x4000, CRC(0010ec31)) |
| 445 | | /* c64gs 901225-01 with other fillbyte, modified kernel */ |
| 446 | | ROM_LOAD ("390852.01", 0x10000, 0x4000, CRC(b0a9c2da) SHA1(21940ef5f1bfe67d7537164f7ca130a1095b067a)) |
| 447 | | /* sx64 */ |
| 448 | | ROM_LOAD( "251104.04", 0x12000, 0x2000, CRC(2c5965d4 )) |
| 449 | | /* 251104.04? swedish */ |
| 450 | | ROM_LOAD( "kernel.swe", 0x12000, 0x2000, CRC(7858d3d7 )) |
| 451 | | /* 4064, Pet64, Educator 64 */ |
| 452 | | ROM_LOAD( "901246.01", 0x12000, 0x2000, CRC(789c8cc5 )) |
| 453 | | |
| 454 | | /* few differences to above versions */ |
| 455 | | ROM_LOAD( "901227.02b", 0x12000, 0x2000, CRC(f80eb87b )) |
| 456 | | ROM_LOAD( "901227.03b", 0x12000, 0x2000, CRC(8e5c500d )) |
| 457 | | ROM_LOAD( "901227.03c", 0x12000, 0x2000, CRC(c13310c2 )) |
| 458 | | |
| 459 | | /* 64er system v1 |
| 460 | | ieee interface extension for c64 and vc1541!? */ |
| 461 | | ROM_LOAD( "64ersys1.e0", 0x12000, 0x2000, CRC(97d9a4df )) |
| 462 | | /* 64er system v3 */ |
| 463 | | ROM_LOAD( "64ersys3.e0", 0x12000, 0x2000, CRC(5096b3bd )) |
| 464 | | |
| 465 | | /* exos v3 */ |
| 466 | | ROM_LOAD( "exosv3.e0", 0x12000, 0x2000, CRC(4e54d020 )) |
| 467 | | /* 2 bytes different */ |
| 468 | | ROM_LOAD( "exosv3.e0", 0x12000, 0x2000, CRC(26f3339e )) |
| 469 | | |
| 470 | | /* jiffydos v6.01 by cmd */ |
| 471 | | ROM_LOAD( "jiffy.e0", 0x12000, 0x2000, CRC(2f79984c )) |
| 472 | | |
| 473 | | /* dolphin with dolphin vc1541 */ |
| 474 | | ROM_LOAD( "mager.e0", 0x12000, 0x2000, CRC(c9bb21bc )) |
| 475 | | ROM_LOAD( "dos20.e0", 0x12000, 0x2000, CRC(ffaeb9bc )) |
| 476 | | |
| 477 | | /* speeddos plus |
| 478 | | parallel interface on userport to modified vc1541 !? */ |
| 479 | | ROM_LOAD( "speeddos.e0", 0x12000, 0x2000, CRC(8438e77b )) |
| 480 | | /* speeddos plus + */ |
| 481 | | ROM_LOAD( "speeddos.e0", 0x12000, 0x2000, CRC(10aee0ae )) |
| 482 | | /* speeddos plus and 80 column text */ |
| 483 | | ROM_LOAD( "rom80.e0", 0x12000, 0x2000, CRC(e801dadc )) |
| 484 | | #endif |
| 485 | | |
| 486 | 485 | static const sid6581_interface c64_sound_interface = |
| 487 | 486 | { |
| 488 | 487 | c64_paddle_read |
| 489 | 488 | }; |
| 490 | 489 | |
| 490 | |
| 491 | /************************************* |
| 492 | * |
| 493 | * Machine driver |
| 494 | * |
| 495 | *************************************/ |
| 496 | |
| 497 | |
| 491 | 498 | static MACHINE_DRIVER_START( c64 ) |
| 492 | 499 | /* basic machine hardware */ |
| 493 | 500 | MDRV_CPU_ADD("main", M6510, VIC6567_CLOCK) |
| r3189 | r3190 | |
| 578 | 585 | #endif |
| 579 | 586 | MACHINE_DRIVER_END |
| 580 | 587 | |
| 581 | | #define rom_max rom_ultimax |
| 588 | |
| 589 | /************************************* |
| 590 | * |
| 591 | * ROM definition(s) |
| 592 | * |
| 593 | *************************************/ |
| 594 | |
| 595 | |
| 596 | ROM_START( max ) |
| 597 | ROM_REGION( 0x10000, "main", ROMREGION_ERASEFF ) |
| 598 | ROM_END |
| 599 | |
| 600 | ROM_START( c64 ) |
| 601 | ROM_REGION( 0x19400, "main", 0 ) |
| 602 | ROM_LOAD( "901226-01.bin", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e) ) // BASIC |
| 603 | ROM_SYSTEM_BIOS(0, "default", "Kernal rev. 3" ) |
| 604 | ROMX_LOAD( "901227-03.bin", 0x12000, 0x2000, CRC(dbe3e7c7) SHA1(1d503e56df85a62fee696e7618dc5b4e781df1bb), ROM_BIOS(1) ) // Kernal |
| 605 | ROM_SYSTEM_BIOS(1, "rev1", "Kernal rev. 1" ) |
| 606 | ROMX_LOAD( "901227-01.bin", 0x12000, 0x2000, CRC(dce782fa) SHA1(87cc04d61fc748b82df09856847bb5c2754a2033), ROM_BIOS(2) ) // Kernal |
| 607 | ROM_SYSTEM_BIOS(2, "rev2", "Kernal rev. 2" ) |
| 608 | ROMX_LOAD( "901227-02.bin", 0x12000, 0x2000, CRC(a5c687b3) SHA1(0e2e4ee3f2d41f00bed72f9ab588b83e306fdb13), ROM_BIOS(3) ) // Kernal |
| 609 | ROM_LOAD( "901225-01.bin", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa) ) // Character |
| 610 | ROM_END |
| 611 | |
| 612 | #define rom_c64pal rom_c64 |
| 613 | |
| 614 | ROM_START( c64jpn ) |
| 615 | ROM_REGION( 0x19400, "main", 0 ) |
| 616 | ROM_LOAD( "901226-01.bin", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e) ) |
| 617 | ROM_LOAD( "906145-02.bin", 0x12000, 0x2000, CRC(3a9ef6f1) SHA1(4ff0f11e80f4b57430d8f0c3799ed0f0e0f4565d) ) |
| 618 | ROM_LOAD( "906143-02.bin", 0x14000, 0x1000, CRC(1604f6c1) SHA1(0fad19dbcdb12461c99657b2979dbb5c2e47b527) ) |
| 619 | ROM_END |
| 620 | |
| 621 | |
| 622 | ROM_START( vic64s ) |
| 623 | ROM_REGION( 0x19400, "main", 0 ) |
| 624 | ROM_LOAD( "901226-01.bin", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e) ) |
| 625 | ROM_LOAD( "kernel.swe", 0x12000, 0x2000, CRC(f10c2c25) SHA1(e4f52d9b36c030eb94524eb49f6f0774c1d02e5e) ) |
| 626 | ROM_SYSTEM_BIOS(0, "default", "Swedish Characters" ) |
| 627 | ROMX_LOAD( "charswe.bin",0x14000, 0x1000, CRC(bee9b3fd) SHA1(446ae58f7110d74d434301491209299f66798d8a), ROM_BIOS(1) ) |
| 628 | ROM_SYSTEM_BIOS(1, "default", "Swedish Characters (Alt)" ) |
| 629 | ROMX_LOAD( "charswe2.bin",0x14000, 0x1000, CRC(377a382b) SHA1(20df25e0ba1c88f31689c1521397c96968967fac), ROM_BIOS(2) ) |
| 630 | ROM_END |
| 631 | |
| 632 | #define rom_c64swe rom_vic64s |
| 633 | |
| 634 | ROM_START( pet64 ) |
| 635 | ROM_REGION( 0x19400, "main", 0 ) |
| 636 | ROM_LOAD( "901226-01.bin", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e) ) |
| 637 | ROM_LOAD( "901246-01.bin", 0x12000, 0x2000, CRC(789c8cc5) SHA1(6c4fa9465f6091b174df27dfe679499df447503c) ) |
| 638 | ROM_LOAD( "901225-01.bin", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa) ) |
| 639 | ROM_END |
| 640 | |
| 582 | 641 | #define rom_cbm4064 rom_pet64 |
| 642 | #define rom_edu64 rom_c64 |
| 583 | 643 | |
| 644 | ROM_START( sx64 ) |
| 645 | ROM_REGION( 0x19400, "main", 0 ) |
| 646 | ROM_LOAD( "901226-01.bin", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e) ) |
| 647 | ROM_LOAD( "251104-04.bin", 0x12000, 0x2000, CRC(2c5965d4) SHA1(aa136e91ecf3c5ac64f696b3dbcbfc5ba0871c98) ) |
| 648 | ROM_LOAD( "901225-01.bin", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa) ) |
| 584 | 649 | |
| 650 | VC1541_ROM( "cpu_vc1540" ) |
| 651 | ROM_END |
| 652 | |
| 653 | ROM_START( dx64 ) |
| 654 | ROM_REGION( 0x19400, "main", 0 ) |
| 655 | ROM_LOAD( "901226-01.bin", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e) ) |
| 656 | ROM_LOAD( "dx64kern.bin", 0x12000, 0x2000, CRC(58065128) ) |
| 657 | |
| 658 | // vc1541 roms were not included in submission |
| 659 | VC1541_ROM ("cpu_vc1540") |
| 660 | // VC1541_ROM (" ") |
| 661 | ROM_END |
| 662 | |
| 663 | ROM_START( vip64 ) |
| 664 | ROM_REGION( 0x19400, "main", 0 ) |
| 665 | ROM_LOAD( "901226-01.bin", 0x10000, 0x2000, CRC(f833d117) SHA1(79015323128650c742a3694c9429aa91f355905e) ) |
| 666 | ROM_LOAD( "kernelsx.swe", 0x12000, 0x2000, CRC(7858d3d7) SHA1(097cda60469492a8916c2677b7cce4e12a944bc0) ) |
| 667 | ROM_LOAD( "charswe.bin", 0x14000, 0x1000, CRC(bee9b3fd) SHA1(446ae58f7110d74d434301491209299f66798d8a) ) |
| 668 | |
| 669 | VC1541_ROM( "cpu_vc1540" ) |
| 670 | ROM_END |
| 671 | |
| 672 | |
| 673 | ROM_START( c64c ) |
| 674 | ROM_REGION( 0x19400, "main", 0 ) |
| 675 | /* standard basic, modified kernel */ |
| 676 | ROM_LOAD( "251913-01.bin", 0x10000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) |
| 677 | ROM_LOAD( "901225-01.bin", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa) ) |
| 678 | ROM_END |
| 679 | |
| 680 | #define rom_c64cpal rom_c64c |
| 681 | #define rom_c64g rom_c64c |
| 682 | |
| 683 | ROM_START( c64gs ) |
| 684 | ROM_REGION( 0x19400, "main", 0 ) |
| 685 | /* standard basic, modified kernel */ |
| 686 | ROM_LOAD( "390852-01.bin", 0x10000, 0x4000, CRC(b0a9c2da) SHA1(21940ef5f1bfe67d7537164f7ca130a1095b067a) ) |
| 687 | ROM_LOAD( "901225-01.bin", 0x14000, 0x1000, CRC(ec4272ee) SHA1(adc7c31e18c7c7413d54802ef2f4193da14711aa) ) |
| 688 | ROM_END |
| 689 | |
| 690 | |
| 691 | |
| 692 | /************************************* |
| 693 | * |
| 694 | * System configuration(s) |
| 695 | * |
| 696 | *************************************/ |
| 697 | |
| 698 | |
| 585 | 699 | static SYSTEM_CONFIG_START(c64) |
| 586 | 700 | CONFIG_DEVICE(c64_cartslot_getinfo) |
| 587 | 701 | CONFIG_DEVICE(cbmfloppy_device_getinfo) |
| r3189 | r3190 | |
| 602 | 716 | CONFIG_DEVICE(c64_cartslot_getinfo) |
| 603 | 717 | SYSTEM_CONFIG_END |
| 604 | 718 | |
| 719 | |
| 605 | 720 | /*************************************************************************** |
| 606 | 721 | |
| 607 | 722 | Game driver(s) |
| 608 | 723 | |
| 609 | 724 | ***************************************************************************/ |
| 610 | 725 | |
| 611 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 612 | | COMP(1982, c64, 0, 0, c64, c64, c64, c64, "Commodore Business Machines Co.", "Commodore 64 (NTSC)", 0) |
| 613 | | COMP(1982, c64pal, c64, 0, c64pal, c64, c64pal, c64, "Commodore Business Machines Co.", "Commodore 64/VC64/VIC64 (PAL)", 0) |
| 614 | | COMP(1982, cbm4064, c64, 0, pet64, c64, c64, c64, "Commodore Business Machines Co.", "CBM4064/PET64/Educator64 (NTSC)", 0) |
| 615 | | COMP(1982, vic64s, c64, 0, c64pal, vic64s, c64pal, c64, "Commodore Business Machines Co.", "Commodore 64 Swedish (PAL)", 0) |
| 616 | | COMP(1982, max, 0, 0, ultimax, ultimax,ultimax,ultimax, "Commodore Business Machines Co.", "Commodore Max (Ultimax/VC10)", 0) |
| 617 | | CONS(1987, c64gs, c64, 0, c64gs, c64gs, c64gs, c64gs, "Commodore Business Machines Co.", "C64GS (PAL)", 0) |
| 726 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 618 | 727 | |
| 619 | | COMP(1983, sx64, c64, 0, sx64, sx64, sx64, sx64, "Commodore Business Machines Co.", "SX64 (PAL)", GAME_NOT_WORKING) |
| 620 | | COMP(1983, vip64, c64, 0, sx64, vip64, sx64, sx64, "Commodore Business Machines Co.", "VIP64 (SX64 PAL), Swedish Expansion Kit", GAME_NOT_WORKING) |
| 621 | | // sx64 with second disk drive |
| 622 | | COMP(198?, dx64, c64, 0, sx64, sx64, sx64, sx64, "Commodore Business Machines Co.", "DX64 (Prototype, PAL)", GAME_NOT_WORKING) |
| 623 | | /*c64 II (cbm named it still c64) */ |
| 624 | | /*c64c (bios in 1 chip) */ |
| 625 | | /*c64g late 8500/8580 based c64, sold at aldi/germany */ |
| 626 | | /*c64cgs late c64, sold in ireland, gs bios?, but with keyboard */ |
| 728 | COMP(1982, max, 0, 0, ultimax, ultimax, ultimax, ultimax, "Commodore Business Machines Co.", "Commodore Max Machine", 0) |
| 729 | |
| 730 | COMP(1982, c64, 0, 0, c64, c64, c64, c64, "Commodore Business Machines Co.", "Commodore 64 (NTSC)", 0) |
| 731 | COMP(1982, c64pal, c64, 0, c64pal, c64, c64pal, c64, "Commodore Business Machines Co.", "Commodore 64 (PAL)", 0) |
| 732 | COMP(1982, c64jpn, c64, 0, c64, c64, c64, c64, "Commodore Business Machines Co.", "Commodore 64 (Japan)", 0) |
| 733 | COMP(1982, vic64s, c64, 0, c64pal, vic64s, c64pal, c64, "Commodore Business Machines Co.", "VIC 64S", 0) |
| 734 | COMP(1982, c64swe, c64, 0, c64pal, vic64s, c64pal, c64, "Commodore Business Machines Co.", "Commodore 64 (Sweden)", 0) |
| 735 | |
| 736 | COMP(1983, pet64, c64, 0, pet64, c64, c64, c64, "Commodore Business Machines Co.", "PET 64 (NTSC)", 0) |
| 737 | COMP(1983, cbm4064, c64, 0, pet64, c64, c64, c64, "Commodore Business Machines Co.", "CBM 4064 (NTSC)", 0) |
| 738 | COMP(1983, edu64, c64, 0, pet64, c64, c64, c64, "Commodore Business Machines Co.", "Educator 64 (NTSC)", 0) // maybe different palette? |
| 739 | |
| 740 | // missing floppy emulation, among other things |
| 741 | COMP(1984, sx64, c64, 0, sx64, sx64, sx64, sx64, "Commodore Business Machines Co.", "SX-64 Executive Computer (PAL)", GAME_NOT_WORKING) |
| 742 | COMP(1984, vip64, c64, 0, sx64, vip64, sx64, sx64, "Commodore Business Machines Co.", "VIP64 (SX64 PAL), Swedish Expansion Kit", GAME_NOT_WORKING) |
| 743 | COMP(198?, dx64, c64, 0, sx64, sx64, sx64, sx64, "Commodore Business Machines Co.", "DX-64 (Prototype, PAL)", GAME_NOT_WORKING) |
| 744 | |
| 745 | COMP(1986, c64c, c64, 0, c64, c64, c64, c64, "Commodore Business Machines Co.", "Commodore 64C (NTSC)", 0) |
| 746 | COMP(1986, c64cpal, c64, 0, c64pal, c64, c64pal, c64, "Commodore Business Machines Co.", "Commodore 64C (PAL)", 0) |
| 747 | COMP(1986, c64g, c64, 0, c64pal, c64, c64pal, c64, "Commodore Business Machines Co.", "Commodore 64G (PAL)", 0) |
| 748 | |
| 749 | CONS(1990, c64gs, c64, 0, c64gs, c64gs, c64gs, c64gs, "Commodore Business Machines Co.", "Commodore 64 Games System (PAL)", 0) |