src/mess/tools/imgtool/windows/assocdlg.c
| r4036 | r4037 | |
| 67 | 67 | LRESULT font; |
| 68 | 68 | LONG_PTR l; |
| 69 | 69 | RECT r1, r2; |
| 70 | | int xmargin, ymargin, y, width, i; |
| 70 | int xmargin, /*ymargin,*/ y, width, i; |
| 71 | 71 | int height = 20; |
| 72 | 72 | int id; |
| 73 | 73 | DWORD style; |
| r4036 | r4037 | |
| 89 | 89 | GetWindowRect(cancel_button, &r1); |
| 90 | 90 | GetWindowRect(dialog, &r2); |
| 91 | 91 | xmargin = r1.left - r2.left; |
| 92 | | ymargin = y = r1.top - r2.top - 20; |
| 92 | //ymargin = y = r1.top - r2.top - 20; |
| 93 | 93 | width = r2.right - r2.left - xmargin * 2; |
| 94 | 94 | |
| 95 | 95 | for (i = 0; i < dlginfo->extension_count; i++) |
src/mess/tools/imgtool/modules/macbin.c
| r4036 | r4037 | |
| 237 | 237 | UINT64 total_size; |
| 238 | 238 | UINT32 creation_time; |
| 239 | 239 | UINT32 lastmodified_time; |
| 240 | | int version; |
| 240 | //int version; |
| 241 | 241 | imgtool_attribute attr_values[10]; |
| 242 | 242 | |
| 243 | 243 | UINT32 type_code; |
| r4036 | r4037 | |
| 277 | 277 | if (pick_integer_be(header, 124, 2) != ccitt_crc16(0, header, 124)) |
| 278 | 278 | { |
| 279 | 279 | /* the CRC does not match; this file is MacBinary I */ |
| 280 | | version = 1; |
| 280 | //version = 1; |
| 281 | 281 | } |
| 282 | 282 | else if (pick_integer_be(header, 102, 4) != 0x6D42494E) |
| 283 | 283 | { |
| r4036 | r4037 | |
| 286 | 286 | return IMGTOOLERR_CORRUPTFILE; |
| 287 | 287 | if (header[123] < 0x81) |
| 288 | 288 | return IMGTOOLERR_CORRUPTFILE; |
| 289 | | version = 2; |
| 289 | //version = 2; |
| 290 | 290 | } |
| 291 | 291 | else |
| 292 | 292 | { |
| r4036 | r4037 | |
| 295 | 295 | return IMGTOOLERR_CORRUPTFILE; |
| 296 | 296 | if (header[123] < 0x81) |
| 297 | 297 | return IMGTOOLERR_CORRUPTFILE; |
| 298 | | version = 3; |
| 298 | //version = 3; |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | type_code = pick_integer_be(header, 65, 4); |
src/mess/tools/imgtool/modules/nccard.c
| r4036 | r4037 | |
| 641 | 641 | int current_block; |
| 642 | 642 | int previous_block; |
| 643 | 643 | unsigned long block_offset; |
| 644 | | unsigned long file_offset = 0; |
| 644 | //unsigned long file_offset = 0; |
| 645 | 645 | unsigned long length_remaining = length; |
| 646 | 646 | struct nc_card_dir_entry *dir_entry; |
| 647 | 647 | int copy_length; |
| r4036 | r4037 | |
| 692 | 692 | return IMGTOOLERR_WRITEERROR; |
| 693 | 693 | |
| 694 | 694 | length_remaining -=copy_length; |
| 695 | | file_offset+=copy_length; |
| 695 | //file_offset+=copy_length; |
| 696 | 696 | |
| 697 | 697 | /* mark block as used */ |
| 698 | 698 | memcard_fat_write(&nc_card->memcard,current_block, NC_FAT_END_OF_LIST); |
src/mess/tools/imgtool/modules/fat.c
| r4036 | r4037 | |
| 384 | 384 | fat_partition_info *info; |
| 385 | 385 | UINT32 fat_bits, total_sectors_l, total_sectors_h, sector_size; |
| 386 | 386 | UINT64 available_sectors; |
| 387 | | int has_extended_bios_param_block = TRUE; |
| 387 | //int has_extended_bios_param_block = TRUE; |
| 388 | 388 | |
| 389 | 389 | info = fat_get_partition_info(partition); |
| 390 | 390 | |
| r4036 | r4037 | |
| 409 | 409 | else |
| 410 | 410 | { |
| 411 | 411 | fat_bits = 8; |
| 412 | | has_extended_bios_param_block = FALSE; |
| 412 | //has_extended_bios_param_block = FALSE; |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | info->fat_bits = fat_bits; |
src/mess/machine/adam.c
| r4036 | r4037 | |
| 521 | 521 | If you have the source listing or the Rom dump, please send us. |
| 522 | 522 | */ |
| 523 | 523 | int DCB_Num, deviceNum, statusDCB; |
| 524 | | int i, buffer, byteCount, sectorNmbr, sectorCount, currentSector; |
| 524 | int i, buffer, byteCount, sectorNmbr, /*sectorCount,*/ currentSector; |
| 525 | 525 | UINT8 kbcode; |
| 526 | 526 | static const UINT8 interleave[8] = {0,5,2,7,4,1,6,3}; |
| 527 | 527 | const device_config *image; |
| r4036 | r4037 | |
| 647 | 647 | if (image_exists(image)) |
| 648 | 648 | { |
| 649 | 649 | sectorNmbr = ((ram[statusDCB+5])+(ram[statusDCB+6]<<8)+(ram[statusDCB+7]<<16)+(ram[statusDCB+8]<<24))<<1; |
| 650 | | sectorCount = (byteCount/512)+(byteCount%512==0)? 0:1; |
| 650 | /* sectorCount = (byteCount/512)+(byteCount%512==0)? 0:1; */ |
| 651 | 651 | for(i=0;i<=1;i++) |
| 652 | 652 | { |
| 653 | 653 | currentSector = floppy_drive_get_current_track(image); |
src/mess/machine/serial.c
| r4036 | r4037 | |
| 382 | 382 | case SERIAL_PARITY_ODD: |
| 383 | 383 | case SERIAL_PARITY_EVEN: |
| 384 | 384 | { |
| 385 | | unsigned char computed_parity; |
| 386 | | unsigned char parity_received; |
| 385 | //unsigned char computed_parity; |
| 386 | //unsigned char parity_received; |
| 387 | 387 | |
| 388 | 388 | /* get state of parity bit received */ |
| 389 | | parity_received = (receive_reg->register_data>>data_form->stop_bit_count) & 0x01; |
| 389 | //parity_received = (receive_reg->register_data>>data_form->stop_bit_count) & 0x01; |
| 390 | 390 | |
| 391 | 391 | /* compute parity for received bits */ |
| 392 | | computed_parity = serial_helper_get_parity(data); |
| 392 | //computed_parity = serial_helper_get_parity(data); |
| 393 | 393 | |
| 394 | 394 | if (data_form->parity == SERIAL_PARITY_ODD) |
| 395 | 395 | { |
src/mess/machine/wd17xx.c
| r4036 | r4037 | |
| 412 | 412 | int track = w->buffer[i+1]; |
| 413 | 413 | int side = w->buffer[i+2]; |
| 414 | 414 | int sector = w->buffer[i+3]; |
| 415 | | int len = w->buffer[i+4]; |
| 415 | //int len = w->buffer[i+4]; |
| 416 | 416 | int filler = 0xe5; /* IBM and Thomson */ |
| 417 | 417 | int density = w->density; |
| 418 | 418 | floppy_drive_format_sector(wd17xx_current_image(device),side,sector,track, |
| 419 | 419 | w->hd,sector,density?1:0,filler); |
| 420 | | (void)len; |
| 421 | 420 | i += 128; /* at least... */ |
| 422 | 421 | } |
| 423 | 422 | else |
src/mess/machine/apple2.c
| r4036 | r4037 | |
| 621 | 621 | |
| 622 | 622 | // vars |
| 623 | 623 | // |
| 624 | | int i, Hires, Mixed, Page2, _80Store, ScanLines, VSyncLine, ScanCycles, |
| 624 | int i, Hires, Mixed, Page2, _80Store, ScanLines, /* VSyncLine, ScanCycles,*/ |
| 625 | 625 | h_clock, h_state, h_0, h_1, h_2, h_3, h_4, h_5, |
| 626 | | v_line, v_state, v_A, v_B, v_C, v_0, v_1, v_2, v_3, v_4, v_5, |
| 626 | v_line, v_state, v_A, v_B, v_C, v_0, v_1, v_2, v_3, v_4, /* v_5, */ |
| 627 | 627 | _hires, addend0, addend1, addend2, sum, address; |
| 628 | 628 | |
| 629 | 629 | // video scanner data |
| r4036 | r4037 | |
| 640 | 640 | // calculate video parameters according to display standard |
| 641 | 641 | // |
| 642 | 642 | ScanLines = 1 ? kNTSCScanLines : kPALScanLines; // FIX: NTSC only? |
| 643 | | VSyncLine = 1 ? kNTSCVSyncLine : kPALVSyncLine; // FIX: NTSC only? |
| 644 | | ScanCycles = ScanLines * kHClocks; |
| 643 | // VSyncLine = 1 ? kNTSCVSyncLine : kPALVSyncLine; // FIX: NTSC only? |
| 644 | // ScanCycles = ScanLines * kHClocks; |
| 645 | 645 | |
| 646 | 646 | // calculate horizontal scanning state |
| 647 | 647 | // |
| r4036 | r4037 | |
| 674 | 674 | v_2 = (v_state >> 5) & 1; |
| 675 | 675 | v_3 = (v_state >> 6) & 1; |
| 676 | 676 | v_4 = (v_state >> 7) & 1; |
| 677 | | v_5 = (v_state >> 8) & 1; |
| 677 | //v_5 = (v_state >> 8) & 1; |
| 678 | 678 | |
| 679 | 679 | // calculate scanning memory address |
| 680 | 680 | // |
src/mess/osd/winui/messui.c
| r4036 | r4037 | |
| 848 | 848 | BOOL bResult; |
| 849 | 849 | mess_image_type imagetypes[64]; |
| 850 | 850 | HWND hwndList; |
| 851 | | int gamenum; |
| 851 | //int gamenum; |
| 852 | 852 | |
| 853 | 853 | hwndList = GetDlgItem(GetMainWindow(), IDC_LIST); |
| 854 | | gamenum = Picker_GetSelectedItem(hwndList); |
| 854 | /*gamenum = */Picker_GetSelectedItem(hwndList); |
| 855 | 855 | |
| 856 | 856 | SetupImageTypes(config, imagetypes, sizeof(imagetypes) / sizeof(imagetypes[0]), TRUE, dev); |
| 857 | 857 | bResult = CommonFileImageDialog(last_directory, GetOpenFileName, pszFilename, config, imagetypes); |
| r4036 | r4037 | |
| 866 | 866 | BOOL bResult; |
| 867 | 867 | mess_image_type imagetypes[64]; |
| 868 | 868 | HWND hwndList; |
| 869 | | int gamenum; |
| 869 | //int gamenum; |
| 870 | 870 | |
| 871 | 871 | hwndList = GetDlgItem(GetMainWindow(), IDC_LIST); |
| 872 | | gamenum = Picker_GetSelectedItem(hwndList); |
| 872 | /*gamenum = */Picker_GetSelectedItem(hwndList); |
| 873 | 873 | |
| 874 | 874 | SetupImageTypes(config, imagetypes, sizeof(imagetypes) / sizeof(imagetypes[0]), TRUE, dev); |
| 875 | 875 | bResult = CommonFileImageDialog(last_directory, GetSaveFileName, pszFilename, config, imagetypes); |
src/mess/formats/thom_dsk.c
| r4036 | r4037 | |
| 667 | 667 | for ( i = 0; i < d->tracks * d->sectors; i++ ) |
| 668 | 668 | { |
| 669 | 669 | UINT16 crc; |
| 670 | | int j, fmt, prot, track, sector; |
| 670 | int j, fmt, /*prot,*/ track, sector; |
| 671 | 671 | |
| 672 | 672 | /* load */ |
| 673 | 673 | image_fseek( image, i * (d->sector_size + 6) + 66, SEEK_SET ); |
| 674 | 674 | image_fread( image, buf, d->sector_size + 6 ); |
| 675 | 675 | fmt = buf[0]; |
| 676 | | prot = buf[1]; |
| 676 | /* prot = buf[1]; */ |
| 677 | 677 | track = buf[2]; |
| 678 | 678 | sector = buf[3]; |
| 679 | 679 | |
src/mess/formats/cbm_tap.c
| r4036 | r4037 | |
| 181 | 181 | /* These waveamp_* values are currently stored but not used. |
| 182 | 182 | Further investigations are needed to find real pulse amplitude |
| 183 | 183 | in Commodore tapes. Implementation here would follow */ |
| 184 | | int waveamp_high, waveamp_low; |
| 184 | /* int waveamp_high, waveamp_low; */ |
| 185 | 185 | |
| 186 | 186 | /* Log .TAP info but only once */ |
| 187 | 187 | if (!(buffer == NULL)) |
| r4036 | r4037 | |
| 236 | 236 | if (byte != 0x00) |
| 237 | 237 | { |
| 238 | 238 | byte_samples = tap_data_to_samplecount(byte, tap_frequency); |
| 239 | | waveamp_high = WAVE_HIGH; |
| 239 | /* waveamp_high = WAVE_HIGH; */ |
| 240 | 240 | } |
| 241 | 241 | else |
| 242 | 242 | { |
| 243 | 243 | byte_samples = tap_data_to_samplecount(PAUSE, tap_frequency); // tap2wav value |
| 244 | 244 | // byte_samples = tap_data_to_samplecount(0x100, tap_frequency); // vice value |
| 245 | | waveamp_high = WAVE_PAUSE; |
| 245 | /* waveamp_high = WAVE_PAUSE; */ |
| 246 | 246 | } |
| 247 | | waveamp_low = WAVE_LOW; |
| 247 | /* waveamp_low = WAVE_LOW; */ |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | /* .TAP v1 & v2 */ |
| r4036 | r4037 | |
| 257 | 257 | if ((byte != 0x00) && !j) |
| 258 | 258 | { |
| 259 | 259 | byte_samples = tap_data_to_samplecount(byte, tap_frequency); |
| 260 | | waveamp_high = WAVE_HIGH; |
| 260 | /* waveamp_high = WAVE_HIGH; */ |
| 261 | 261 | } |
| 262 | 262 | else |
| 263 | 263 | { |
| r4036 | r4037 | |
| 279 | 279 | { |
| 280 | 280 | over_pulse_length = ((over_pulse_bytes[2] << 16) | (over_pulse_bytes[1] << 8) | over_pulse_bytes[0]) >> 3; |
| 281 | 281 | byte_samples = tap_data_to_samplecount(over_pulse_length, tap_frequency); |
| 282 | | waveamp_high = WAVE_PAUSE; |
| 282 | /* waveamp_high = WAVE_PAUSE; */ |
| 283 | 283 | j = 0; |
| 284 | 284 | } |
| 285 | 285 | } |
| r4036 | r4037 | |
| 293 | 293 | } |
| 294 | 294 | else j = 1; |
| 295 | 295 | } |
| 296 | | waveamp_low = WAVE_LOW; |
| 296 | /* waveamp_low = WAVE_LOW; */ |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | if (j == 0) |