src/mess/drivers/atarist.c
| r818 | r819 | |
| 23 | 23 | - US keyboard layout |
| 24 | 24 | - add serial communications to HD63701 cpu core |
| 25 | 25 | - connect mouse to ikbd |
| 26 | | - floppy image device_load |
| 27 | 26 | - MFP interrupts |
| 28 | 27 | - accurate screen timing |
| 29 | 28 | - fdc.dma_int ? |
| r818 | r819 | |
| 656 | 655 | |
| 657 | 656 | static struct acia6850_interface acia_ikbd_intf = |
| 658 | 657 | { |
| 659 | | 500000, |
| 660 | | 500000, |
| 658 | Y2/64, |
| 659 | Y2/64, |
| 661 | 660 | &acia_ikbd_rx, |
| 662 | 661 | &acia_ikbd_tx, |
| 663 | 662 | acia_interrupt |
| r818 | r819 | |
| 665 | 664 | |
| 666 | 665 | static struct acia6850_interface acia_midi_intf = |
| 667 | 666 | { |
| 668 | | 500000, |
| 669 | | 500000, |
| 667 | Y2/64, |
| 668 | Y2/64, |
| 670 | 669 | &acia_midi_rx, |
| 671 | 670 | &acia_midi_tx, |
| 672 | 671 | acia_interrupt |
| r818 | r819 | |
| 690 | 689 | */ |
| 691 | 690 | |
| 692 | 691 | UINT8 data = 0; |
| 693 | | int centronics_handshake = centronics_read_handshake(1); |
| 692 | int centronics_handshake = centronics_read_handshake(0); |
| 694 | 693 | |
| 695 | 694 | if ((centronics_handshake & CENTRONICS_NOT_BUSY) == 0) |
| 696 | 695 | { |
| r818 | r819 | |
| 935 | 934 | |
| 936 | 935 | static DEVICE_LOAD( atarist_floppy ) |
| 937 | 936 | { |
| 938 | | int tracks = 80 , heads = 2, sectors = 16; |
| 939 | | |
| 940 | 937 | if (image_has_been_created(image)) |
| 941 | 938 | return INIT_FAIL; |
| 942 | 939 | |
| 943 | 940 | if (device_load_basicdsk_floppy(image) == INIT_PASS) |
| 944 | 941 | { |
| 945 | | /* drive, tracks, heads, sectors per track, sector length, first sector id, offset track zero, track skipping */ |
| 946 | | basicdsk_set_geometry(image, tracks, heads, sectors, 512, 1, 0, FALSE); |
| 947 | | return INIT_PASS; |
| 942 | UINT8 bootsector[512]; |
| 943 | image_fseek(image, 0, SEEK_SET); |
| 944 | |
| 945 | if (image_fread(image, bootsector, 512)) |
| 946 | { |
| 947 | int sectors = bootsector[0x18]; |
| 948 | int heads = bootsector[0x1a]; |
| 949 | int tracks = (bootsector[0x13] | (bootsector[0x14] << 8)) / sectors / heads; |
| 950 | |
| 951 | /* drive, tracks, heads, sectors per track, sector length, first sector id, offset track zero, track skipping */ |
| 952 | basicdsk_set_geometry(image, tracks, heads, sectors, 512, 1, 0, FALSE); |
| 953 | |
| 954 | return INIT_PASS; |
| 955 | } |
| 948 | 956 | } |
| 949 | 957 | |
| 950 | 958 | return INIT_FAIL; |
| r818 | r819 | |
| 1027 | 1035 | { |
| 1028 | 1036 | if (image_fread(image, ptr, filesize) == filesize) |
| 1029 | 1037 | { |
| 1030 | | memory_install_read16_handler (0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MRA16_BANK2); |
| 1031 | | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MWA16_BANK2); |
| 1038 | memory_install_read16_handler (0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MRA16_BANK3); |
| 1039 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xfa0000, 0xfbffff, 0, 0, MWA16_BANK3); |
| 1032 | 1040 | |
| 1033 | 1041 | return INIT_PASS; |
| 1034 | 1042 | } |