src/mess/video/dai.c
| r3613 | r3614 | |
| 101 | 101 | |
| 102 | 102 | while (current_scan_line < dai_scan_lines) |
| 103 | 103 | { |
| 104 | | mode = program_read_byte(current_video_memory_address--); |
| 105 | | colour = program_read_byte(current_video_memory_address--); |
| 104 | mode = memory_read_byte(space, current_video_memory_address--); |
| 105 | colour = memory_read_byte(space, current_video_memory_address--); |
| 106 | 106 | line_repeat_count = mode & 0x0f; |
| 107 | 107 | horizontal_resolution = (mode & 0x30) >> 4; |
| 108 | 108 | display_mode = (mode & 0xc0) >> 6; |
| r3613 | r3614 | |
| 122 | 122 | switch (unit_mode) |
| 123 | 123 | { |
| 124 | 124 | case 0: |
| 125 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 126 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 125 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 126 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 127 | 127 | |
| 128 | 128 | for (i=0; i<11; i++) |
| 129 | 129 | { |
| r3613 | r3614 | |
| 142 | 142 | case 1: |
| 143 | 143 | for (i=0; i<11; i++) |
| 144 | 144 | { |
| 145 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 146 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 145 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 146 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 147 | 147 | for (j=0; j<=line_repeat_count; j++) |
| 148 | 148 | { |
| 149 | 149 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 162 | 162 | switch (unit_mode) |
| 163 | 163 | { |
| 164 | 164 | case 0: |
| 165 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 166 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 165 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 166 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 167 | 167 | for (i=0; i<22; i++) |
| 168 | 168 | { |
| 169 | 169 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 181 | 181 | case 1: |
| 182 | 182 | for (i=0; i<22; i++) |
| 183 | 183 | { |
| 184 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 185 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 184 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 185 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 186 | 186 | for (j=0; j<=line_repeat_count; j++) |
| 187 | 187 | { |
| 188 | 188 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 201 | 201 | switch (unit_mode) |
| 202 | 202 | { |
| 203 | 203 | case 0: |
| 204 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 205 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 204 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 205 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 206 | 206 | for (i=0; i<44; i++) |
| 207 | 207 | { |
| 208 | 208 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 219 | 219 | case 1: |
| 220 | 220 | for (i=0; i<44; i++) |
| 221 | 221 | { |
| 222 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 223 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 222 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 223 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 224 | 224 | for (j=0; j<=line_repeat_count; j++) |
| 225 | 225 | { |
| 226 | 226 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 239 | 239 | switch (unit_mode) |
| 240 | 240 | { |
| 241 | 241 | case 0: |
| 242 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 243 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 242 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 243 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 244 | 244 | for (i=0; i<66; i++) |
| 245 | 245 | { |
| 246 | 246 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 257 | 257 | case 1: |
| 258 | 258 | for (i=0; i<66; i++) |
| 259 | 259 | { |
| 260 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 261 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 260 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 261 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 262 | 262 | for (j=0; j<=line_repeat_count; j++) |
| 263 | 263 | { |
| 264 | 264 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 283 | 283 | switch (unit_mode) |
| 284 | 284 | { |
| 285 | 285 | case 0: |
| 286 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 287 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 286 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 287 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 288 | 288 | current_video_memory_address-=2; |
| 289 | 289 | for (i=0; i<11; i++) |
| 290 | 290 | { |
| r3613 | r3614 | |
| 303 | 303 | case 1: |
| 304 | 304 | for (i=0; i<11; i++) |
| 305 | 305 | { |
| 306 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 307 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 306 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 307 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 308 | 308 | current_video_memory_address-=2; |
| 309 | 309 | for (j=0; j<=line_repeat_count; j++) |
| 310 | 310 | { |
| r3613 | r3614 | |
| 324 | 324 | switch (unit_mode) |
| 325 | 325 | { |
| 326 | 326 | case 0: |
| 327 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 328 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 327 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 328 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 329 | 329 | current_video_memory_address-=2; |
| 330 | 330 | for (i=0; i<22; i++) |
| 331 | 331 | { |
| r3613 | r3614 | |
| 344 | 344 | case 1: |
| 345 | 345 | for (i=0; i<22; i++) |
| 346 | 346 | { |
| 347 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 348 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 347 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 348 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 349 | 349 | current_video_memory_address-=2; |
| 350 | 350 | for (j=0; j<=line_repeat_count; j++) |
| 351 | 351 | { |
| r3613 | r3614 | |
| 365 | 365 | switch (unit_mode) |
| 366 | 366 | { |
| 367 | 367 | case 0: |
| 368 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 369 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 368 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 369 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 370 | 370 | current_video_memory_address-=2; |
| 371 | 371 | for (i=0; i<44; i++) |
| 372 | 372 | { |
| r3613 | r3614 | |
| 384 | 384 | case 1: |
| 385 | 385 | for (i=0; i<44; i++) |
| 386 | 386 | { |
| 387 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 388 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 387 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 388 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 389 | 389 | current_video_memory_address-=2; |
| 390 | 390 | for (j=0; j<=line_repeat_count; j++) |
| 391 | 391 | { |
| r3613 | r3614 | |
| 404 | 404 | switch (unit_mode) |
| 405 | 405 | { |
| 406 | 406 | case 0: |
| 407 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 408 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 407 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 408 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 409 | 409 | current_video_memory_address-=2; |
| 410 | 410 | for (i=0; i<66; i++) |
| 411 | 411 | { |
| r3613 | r3614 | |
| 423 | 423 | case 1: |
| 424 | 424 | for (i=0; i<66; i++) |
| 425 | 425 | { |
| 426 | | current_data_1 = program_read_byte(current_video_memory_address); |
| 427 | | current_data_2 = program_read_byte(current_video_memory_address-3); |
| 426 | current_data_1 = memory_read_byte(space, current_video_memory_address); |
| 427 | current_data_2 = memory_read_byte(space, current_video_memory_address-3); |
| 428 | 428 | current_video_memory_address-=2; |
| 429 | 429 | for (j=0; j<=line_repeat_count; j++) |
| 430 | 430 | { |
| r3613 | r3614 | |
| 449 | 449 | switch (unit_mode) |
| 450 | 450 | { |
| 451 | 451 | case 0: |
| 452 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 453 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 452 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 453 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 454 | 454 | |
| 455 | 455 | for (i=0; i<11; i++) |
| 456 | 456 | { |
| r3613 | r3614 | |
| 469 | 469 | case 1: |
| 470 | 470 | for (i=0; i<11; i++) |
| 471 | 471 | { |
| 472 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 473 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 472 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 473 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 474 | 474 | for (j=0; j<=line_repeat_count; j++) |
| 475 | 475 | { |
| 476 | 476 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 489 | 489 | switch (unit_mode) |
| 490 | 490 | { |
| 491 | 491 | case 0: |
| 492 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 493 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 492 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 493 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 494 | 494 | for (i=0; i<22; i++) |
| 495 | 495 | { |
| 496 | 496 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 508 | 508 | case 1: |
| 509 | 509 | for (i=0; i<22; i++) |
| 510 | 510 | { |
| 511 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 512 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 511 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 512 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 513 | 513 | for (j=0; j<=line_repeat_count; j++) |
| 514 | 514 | { |
| 515 | 515 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 528 | 528 | switch (unit_mode) |
| 529 | 529 | { |
| 530 | 530 | case 0: |
| 531 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 532 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 531 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 532 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 533 | 533 | for (i=0; i<44; i++) |
| 534 | 534 | { |
| 535 | 535 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 546 | 546 | case 1: |
| 547 | 547 | for (i=0; i<44; i++) |
| 548 | 548 | { |
| 549 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 550 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 549 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 550 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 551 | 551 | for (j=0; j<=line_repeat_count; j++) |
| 552 | 552 | { |
| 553 | 553 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 566 | 566 | switch (unit_mode) |
| 567 | 567 | { |
| 568 | 568 | case 0: |
| 569 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 570 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 569 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 570 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 571 | 571 | for (i=0; i<66; i++) |
| 572 | 572 | { |
| 573 | 573 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 584 | 584 | case 1: |
| 585 | 585 | for (i=0; i<66; i++) |
| 586 | 586 | { |
| 587 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 588 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 587 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 588 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 589 | 589 | for (j=0; j<=line_repeat_count; j++) |
| 590 | 590 | { |
| 591 | 591 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 609 | 609 | switch (unit_mode) |
| 610 | 610 | { |
| 611 | 611 | case 0: |
| 612 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 613 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 612 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 613 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 614 | 614 | for (i=0; i<11; i++) |
| 615 | 615 | { |
| 616 | 616 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 628 | 628 | case 1: |
| 629 | 629 | for (i=0; i<11; i++) |
| 630 | 630 | { |
| 631 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 632 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 631 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 632 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 633 | 633 | for (j=0; j<=line_repeat_count; j++) |
| 634 | 634 | { |
| 635 | 635 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 648 | 648 | switch (unit_mode) |
| 649 | 649 | { |
| 650 | 650 | case 0: |
| 651 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 652 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 651 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 652 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 653 | 653 | for (i=0; i<22; i++) |
| 654 | 654 | { |
| 655 | 655 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 667 | 667 | case 1: |
| 668 | 668 | for (i=0; i<22; i++) |
| 669 | 669 | { |
| 670 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 671 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 670 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 671 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 672 | 672 | for (j=0; j<=line_repeat_count; j++) |
| 673 | 673 | { |
| 674 | 674 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 687 | 687 | switch (unit_mode) |
| 688 | 688 | { |
| 689 | 689 | case 0: |
| 690 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 691 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 690 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 691 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 692 | 692 | for (i=0; i<44; i++) |
| 693 | 693 | { |
| 694 | 694 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 705 | 705 | case 1: |
| 706 | 706 | for (i=0; i<44; i++) |
| 707 | 707 | { |
| 708 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 709 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 708 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 709 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 710 | 710 | for (j=0; j<=line_repeat_count; j++) |
| 711 | 711 | { |
| 712 | 712 | for (k=0; k<8; k++) |
| r3613 | r3614 | |
| 724 | 724 | switch (unit_mode) |
| 725 | 725 | { |
| 726 | 726 | case 0: |
| 727 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 728 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 727 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 728 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 729 | 729 | for (i=0; i<66; i++) |
| 730 | 730 | { |
| 731 | 731 | for (j=0; j<=line_repeat_count; j++) |
| r3613 | r3614 | |
| 742 | 742 | case 1: |
| 743 | 743 | for (i=0; i<66; i++) |
| 744 | 744 | { |
| 745 | | current_data_1 = program_read_byte(current_video_memory_address--); |
| 746 | | current_data_2 = program_read_byte(current_video_memory_address--); |
| 745 | current_data_1 = memory_read_byte(space, current_video_memory_address--); |
| 746 | current_data_2 = memory_read_byte(space, current_video_memory_address--); |
| 747 | 747 | for (j=0; j<=line_repeat_count; j++) |
| 748 | 748 | { |
| 749 | 749 | for (k=0; k<8; k++) |
src/mess/machine/vtech1.c
| r3613 | r3614 | |
| 207 | 207 | switch (header[21]) |
| 208 | 208 | { |
| 209 | 209 | case VZ_BASIC: /* 0xF0 */ |
| 210 | | program_write_byte(0x78a4, start % 256); /* start of basic program */ |
| 211 | | program_write_byte(0x78a5, start / 256); |
| 212 | | program_write_byte(0x78f9, end % 256); /* end of basic program */ |
| 213 | | program_write_byte(0x78fa, end / 256); |
| 214 | | program_write_byte(0x78fb, end % 256); /* start variable table */ |
| 215 | | program_write_byte(0x78fc, end / 256); |
| 216 | | program_write_byte(0x78fd, end % 256); /* start free mem, end variable table */ |
| 217 | | program_write_byte(0x78fe, end / 256); |
| 210 | memory_write_byte(space, 0x78a4, start % 256); /* start of basic program */ |
| 211 | memory_write_byte(space, 0x78a5, start / 256); |
| 212 | memory_write_byte(space, 0x78f9, end % 256); /* end of basic program */ |
| 213 | memory_write_byte(space, 0x78fa, end / 256); |
| 214 | memory_write_byte(space, 0x78fb, end % 256); /* start variable table */ |
| 215 | memory_write_byte(space, 0x78fc, end / 256); |
| 216 | memory_write_byte(space, 0x78fd, end % 256); /* start free mem, end variable table */ |
| 217 | memory_write_byte(space, 0x78fe, end / 256); |
| 218 | 218 | image_message(image, " %s (B)\nsize=%04X : start=%04X : end=%04X",pgmname,size,start,end); |
| 219 | 219 | break; |
| 220 | 220 | |
| 221 | 221 | case VZ_MCODE: /* 0xF1 */ |
| 222 | | program_write_byte(0x788e, start % 256); /* usr subroutine address */ |
| 223 | | program_write_byte(0x788f, start / 256); |
| 222 | memory_write_byte(space, 0x788e, start % 256); /* usr subroutine address */ |
| 223 | memory_write_byte(space, 0x788f, start / 256); |
| 224 | 224 | image_message(image, " %s (M)\nsize=%04X : start=%04X : end=%04X",pgmname,size,start,end); |
| 225 | 225 | cpunum_set_reg(0, REG_PC, start); /* start program */ |
| 226 | 226 | break; |
src/mess/machine/trs80.c
| r3613 | r3614 | |
| 72 | 72 | |
| 73 | 73 | QUICKLOAD_LOAD( trs80_cmd ) |
| 74 | 74 | { |
| 75 | const address_space *space = cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM); |
| 75 | 76 | UINT16 entry = 0, block_ofs = 0, block_len = 0; |
| 76 | 77 | unsigned offs = 0; |
| 77 | 78 | UINT8 *cmd_buff; |
| r3613 | r3614 | |
| 100 | 101 | LOG(("trs80_cmd_load block ($%02X) %d at $%04X\n", data, block_len, block_ofs)); |
| 101 | 102 | while( block_len && quickload_size ) |
| 102 | 103 | { |
| 103 | | program_write_byte(block_ofs, cmd_buff[offs]); |
| 104 | memory_write_byte(space, block_ofs, cmd_buff[offs]); |
| 104 | 105 | offs++; |
| 105 | 106 | block_ofs++; |
| 106 | 107 | block_len--; |
| r3613 | r3614 | |
| 129 | 130 | quickload_size--; |
| 130 | 131 | } |
| 131 | 132 | } |
| 132 | | activecpu_set_reg(Z80_PC, entry); |
| 133 | cpu_set_reg(image->machine->activecpu, Z80_PC, entry); |
| 133 | 134 | |
| 134 | 135 | free(cmd_buff); |
| 135 | 136 | return INIT_PASS; |
| r3613 | r3614 | |
| 309 | 310 | WRITE8_HANDLER( trs80_port_ff_w ) |
| 310 | 311 | { |
| 311 | 312 | static const double levels[4] = { 0.0, -1.0, 0.0, 1.0 }; |
| 312 | | const device_config *cass = device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ); |
| 313 | const device_config *cass = device_list_find_by_tag(space->machine->config->devicelist, CASSETTE, "cassette" ); |
| 313 | 314 | |
| 314 | 315 | cassette_change_state( cass, ( data & 0x04 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); |
| 315 | 316 | |
| r3613 | r3614 | |
| 336 | 337 | if( (irq_status & IRQ_TIMER) == 0 ) |
| 337 | 338 | { |
| 338 | 339 | irq_status |= IRQ_TIMER; |
| 339 | | cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); |
| 340 | cpu_set_input_line(device, 0, HOLD_LINE); |
| 340 | 341 | } |
| 341 | 342 | } |
| 342 | 343 | |
| 343 | | INTERRUPT_GEN( trs80_fdc_interrupt ) |
| 344 | static void trs80_fdc_interrupt_internal(running_machine *machine) |
| 344 | 345 | { |
| 345 | 346 | if ((irq_status & IRQ_FDC) == 0) |
| 346 | 347 | { |
| r3613 | r3614 | |
| 349 | 350 | } |
| 350 | 351 | } |
| 351 | 352 | |
| 353 | INTERRUPT_GEN( trs80_fdc_interrupt ) |
| 354 | { |
| 355 | trs80_fdc_interrupt_internal(device->machine); |
| 356 | } |
| 357 | |
| 352 | 358 | void trs80_fdc_callback(running_machine *machine, wd17xx_state_t event, void *param) |
| 353 | 359 | { |
| 354 | 360 | switch (event) |
| r3613 | r3614 | |
| 357 | 363 | irq_status &= ~IRQ_FDC; |
| 358 | 364 | break; |
| 359 | 365 | case WD17XX_IRQ_SET: |
| 360 | | trs80_fdc_interrupt(machine, 0); |
| 366 | trs80_fdc_interrupt_internal(machine); |
| 361 | 367 | break; |
| 362 | 368 | case WD17XX_DRQ_CLR: |
| 363 | 369 | case WD17XX_DRQ_SET: |
| r3613 | r3614 | |
| 448 | 454 | /************************************* |
| 449 | 455 | * Keyboard * |
| 450 | 456 | *************************************/ |
| 451 | | READ8_HANDLER( trs80_keyboard_r ) |
| 457 | READ8_HANDLER( trs80_keyboard_r ) |
| 452 | 458 | { |
| 453 | 459 | int result = 0; |
| 454 | 460 | |
| 455 | 461 | if (offset & 1) |
| 456 | | result |= input_port_read(machine, "LINE0"); |
| 462 | result |= input_port_read(space->machine, "LINE0"); |
| 457 | 463 | if (offset & 2) |
| 458 | | result |= input_port_read(machine, "LINE1"); |
| 464 | result |= input_port_read(space->machine, "LINE1"); |
| 459 | 465 | if (offset & 4) |
| 460 | | result |= input_port_read(machine, "LINE2"); |
| 466 | result |= input_port_read(space->machine, "LINE2"); |
| 461 | 467 | if (offset & 8) |
| 462 | | result |= input_port_read(machine, "LINE3"); |
| 468 | result |= input_port_read(space->machine, "LINE3"); |
| 463 | 469 | if (offset & 16) |
| 464 | | result |= input_port_read(machine, "LINE4"); |
| 470 | result |= input_port_read(space->machine, "LINE4"); |
| 465 | 471 | if (offset & 32) |
| 466 | | result |= input_port_read(machine, "LINE5"); |
| 472 | result |= input_port_read(space->machine, "LINE5"); |
| 467 | 473 | if (offset & 64) |
| 468 | | result |= input_port_read(machine, "LINE6"); |
| 474 | result |= input_port_read(space->machine, "LINE6"); |
| 469 | 475 | if (offset & 128) |
| 470 | | result |= input_port_read(machine, "LINE7"); |
| 476 | result |= input_port_read(space->machine, "LINE7"); |
| 471 | 477 | |
| 472 | 478 | return result; |
| 473 | 479 | } |
src/mess/machine/jupiter.c
| r3613 | r3614 | |
| 47 | 47 | if (jupiter_data_type == JUPITER_ACE) |
| 48 | 48 | { |
| 49 | 49 | for (loop = 0; loop < 0x6000; loop++) |
| 50 | | program_write_byte(loop + 0x2000, jupiter_data[loop]); |
| 50 | memory_write_byte(space, loop + 0x2000, jupiter_data[loop]); |
| 51 | 51 | } |
| 52 | 52 | else if (jupiter_data_type == JUPITER_TAP) |
| 53 | 53 | { |
| 54 | 54 | |
| 55 | 55 | for (loop = 0; loop < jupiter_tape.dat_len; loop++) |
| 56 | | program_write_byte(loop + jupiter_tape.hdr_addr, jupiter_data[loop]); |
| 56 | memory_write_byte(space, loop + jupiter_tape.hdr_addr, jupiter_data[loop]); |
| 57 | 57 | |
| 58 | | program_write_byte(0x3c27, 0x01); |
| 58 | memory_write_byte(space, 0x3c27, 0x01); |
| 59 | 59 | |
| 60 | 60 | for (loop = 0; loop < 8; loop++) |
| 61 | | program_write_byte(loop + 0x3c31, jupiter_tape.hdr_vars[loop]); |
| 62 | | program_write_byte(0x3c39, 0x00); |
| 63 | | program_write_byte(0x3c3a, 0x00); |
| 61 | memory_write_byte(space, loop + 0x3c31, jupiter_tape.hdr_vars[loop]); |
| 62 | memory_write_byte(space, 0x3c39, 0x00); |
| 63 | memory_write_byte(space, 0x3c3a, 0x00); |
| 64 | 64 | |
| 65 | | tmpword = program_read_byte(0x3c3b) + program_read_byte(0x3c3c) * 256 + jupiter_tape.hdr_len; |
| 65 | tmpword = memory_read_byte(space, 0x3c3b) + memory_read_byte(space, 0x3c3c) * 256 + jupiter_tape.hdr_len; |
| 66 | 66 | |
| 67 | | program_write_byte(0x3c3b, tmpword & 0xff); |
| 68 | | program_write_byte(0x3c3c, (tmpword >> 8) & 0xff); |
| 67 | memory_write_byte(space, 0x3c3b, tmpword & 0xff); |
| 68 | memory_write_byte(space, 0x3c3c, (tmpword >> 8) & 0xff); |
| 69 | 69 | |
| 70 | | program_write_byte(0x3c45, 0x0c); /* ? */ |
| 70 | memory_write_byte(space, 0x3c45, 0x0c); /* ? */ |
| 71 | 71 | |
| 72 | | program_write_byte(0x3c4c, jupiter_tape.hdr_3c4c); |
| 73 | | program_write_byte(0x3c4d, jupiter_tape.hdr_3c4d); |
| 72 | memory_write_byte(space, 0x3c4c, jupiter_tape.hdr_3c4c); |
| 73 | memory_write_byte(space, 0x3c4d, jupiter_tape.hdr_3c4d); |
| 74 | 74 | |
| 75 | | if (!program_read_byte(0x3c57) && !program_read_byte(0x3c58)) |
| 75 | if (!memory_read_byte(space, 0x3c57) && !memory_read_byte(space, 0x3c58)) |
| 76 | 76 | { |
| 77 | | program_write_byte(0x3c57, 0x49); |
| 78 | | program_write_byte(0x3c58, 0x3c); |
| 77 | memory_write_byte(space, 0x3c57, 0x49); |
| 78 | memory_write_byte(space, 0x3c58, 0x3c); |
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | } |