src/emu/machine/scsihd.c
| r6447 | r6448 | |
| 222 | 222 | switch ( command[0] ) |
| 223 | 223 | { |
| 224 | 224 | case 0x0a: // WRITE(6) |
| 225 | case 0x2a: // WRITE(10) |
| 225 | 226 | if ((our_this->disk) && (our_this->blocks)) |
| 226 | 227 | { |
| 228 | printf("We have a disc and we have %d blocks, with a data length of %d, time to write\n", our_this->blocks, dataLength); |
| 227 | 229 | while (dataLength > 0) |
| 228 | 230 | { |
| 231 | printf("Attempting to write some data at LBA %08x\n", our_this->lba); |
| 229 | 232 | if (!hard_disk_write(our_this->disk, our_this->lba, data)) |
| 230 | 233 | { |
| 231 | 234 | logerror("SCSIHD: HD write error!\n"); |
| r6447 | r6448 | |
| 306 | 309 | return 0; |
| 307 | 310 | |
| 308 | 311 | case SCSIOP_WRITE_DATA: |
| 312 | printf("intparm = %08x%08x\n", (UINT32)(intparm >> 32), (UINT32)(intparm & 0x00000000ffffffff)); |
| 309 | 313 | scsihd_write_data( (SCSIInstance *)file, (UINT8 *)ptrparm, intparm ); |
| 310 | 314 | return 0; |
| 311 | 315 | |
src/emu/machine/wd33c93.c
| r6447 | r6448 | |
| 172 | 172 | typedef void (*cmd_handler)(running_machine *machine); |
| 173 | 173 | #define CMD_HANDLER(name) void name(running_machine *machine) |
| 174 | 174 | |
| 175 | | #define TEMP_INPUT_LEN 65536 |
| 175 | #define TEMP_INPUT_LEN 262144 |
| 176 | 176 | #define FIFO_SIZE 12 |
| 177 | 177 | |
| 178 | 178 | /* internal controller data definition */ |
| r6447 | r6448 | |
| 815 | 815 | |
| 816 | 816 | void wd33c93_get_dma_data( int bytes, UINT8 *pData ) |
| 817 | 817 | { |
| 818 | | int len = bytes; |
| 818 | int len = bytes; |
| 819 | 819 | |
| 820 | 820 | if ( len >= wd33c93_get_xfer_count() ) |
| 821 | 821 | len = wd33c93_get_xfer_count(); |
| r6447 | r6448 | |
| 829 | 829 | len = TEMP_INPUT_LEN - len; |
| 830 | 830 | } |
| 831 | 831 | |
| 832 | assert(len); |
| 833 | |
| 832 | 834 | memcpy( pData, &scsi_data.temp_input[scsi_data.temp_input_pos], len ); |
| 833 | 835 | |
| 834 | 836 | scsi_data.temp_input_pos += len; |