src/mess/devices/ti99cart.c
| r6507 | r6508 | |
| 2020 | 2020 | |
| 2021 | 2021 | static READ16_DEVICE_HANDLER( ti99_cart_r_legacy ) |
| 2022 | 2022 | { |
| 2023 | | /* if (hsgpl_crdena) |
| 2024 | | return ti99_hsgpl_rom6_r(space, offset, mem_mask); |
| 2025 | | */ |
| 2026 | 2023 | int slotmbx, slotmini, slotebr2, slotrom; |
| 2027 | 2024 | ti99_multicart_t *cartslots = (ti99_multicart_t *)device->token; |
| 2028 | 2025 | |
| 2026 | #if 0 |
| 2027 | if (hsgpl_crdena) |
| 2028 | return ti99_hsgpl_rom6_r(space, offset, mem_mask); |
| 2029 | #endif |
| 2030 | |
| 2029 | 2031 | slotmbx = cartslots->legacy_slotnumber[SLOTC_MBX]; |
| 2030 | 2032 | |
| 2031 | 2033 | if ((slotmbx != -1) && (offset >= 0x0600) && (offset <= 0x07fe)) |
| r6507 | r6508 | |
| 2063 | 2065 | |
| 2064 | 2066 | static WRITE16_DEVICE_HANDLER( ti99_cart_w_legacy ) |
| 2065 | 2067 | { |
| 2066 | | |
| 2067 | | /* if (hsgpl_crdena) |
| 2068 | | ti99_hsgpl_rom6_w(space, offset, data, mem_mask); |
| 2069 | | return; |
| 2070 | | */ |
| 2071 | 2068 | int slotmbx, slotmini, slotebr2, slotrom; |
| 2072 | 2069 | ti99_multicart_t *cartslots = (ti99_multicart_t *)device->token; |
| 2073 | 2070 | |
| 2071 | #if 0 |
| 2072 | if (hsgpl_crdena) |
| 2073 | { |
| 2074 | ti99_hsgpl_rom6_w(space, offset, data, mem_mask); |
| 2075 | return; |
| 2076 | } |
| 2077 | #endif |
| 2074 | 2078 | slotmbx = cartslots->legacy_slotnumber[SLOTC_MBX]; |
| 2075 | 2079 | slotrom = cartslots->legacy_slotnumber[SLOTC_CROM]; |
| 2076 | 2080 | slotebr2 = cartslots->legacy_slotnumber[SLOTC_DROM]; |
| r6507 | r6508 | |
| 2115 | 2119 | */ |
| 2116 | 2120 | static READ8_DEVICE_HANDLER( ti99_cart_r_legacy8 ) |
| 2117 | 2121 | { |
| 2118 | | /* if (hsgpl_crdena) |
| 2119 | | return ti99_hsgpl_rom6_r(space, offset, mem_mask); |
| 2120 | | */ |
| 2121 | 2122 | int slotmbx, slotmini, slotebr2, slotrom; |
| 2122 | 2123 | ti99_multicart_t *cartslots = (ti99_multicart_t *)device->token; |
| 2123 | 2124 | |
| 2125 | #if 0 |
| 2126 | if (hsgpl_crdena) |
| 2127 | return ti99_hsgpl_rom6_r(space, offset, mem_mask); |
| 2128 | #endif |
| 2129 | |
| 2124 | 2130 | slotmbx = cartslots->legacy_slotnumber[SLOTC_MBX]; |
| 2125 | 2131 | |
| 2126 | 2132 | if ((slotmbx != -1) && (offset >= 0x0c00) && (offset <= 0x0ffd)) |
| r6507 | r6508 | |
| 2161 | 2167 | */ |
| 2162 | 2168 | static WRITE8_DEVICE_HANDLER( ti99_cart_w_legacy8 ) |
| 2163 | 2169 | { |
| 2164 | | |
| 2165 | | /* if (hsgpl_crdena) |
| 2166 | | ti99_hsgpl_rom6_w(space, offset, data, mem_mask); |
| 2167 | | return; |
| 2168 | | */ |
| 2169 | 2170 | int slotmbx, slotmini, slotebr2, slotrom; |
| 2170 | 2171 | ti99_multicart_t *cartslots = (ti99_multicart_t *)device->token; |
| 2171 | 2172 | |
| 2173 | #if 0 |
| 2174 | if (hsgpl_crdena) |
| 2175 | { |
| 2176 | ti99_hsgpl_rom6_w(space, offset, data, mem_mask); |
| 2177 | return; |
| 2178 | } |
| 2179 | #endif |
| 2172 | 2180 | slotmbx = cartslots->legacy_slotnumber[SLOTC_MBX]; |
| 2173 | 2181 | slotrom = cartslots->legacy_slotnumber[SLOTC_CROM]; |
| 2174 | 2182 | slotebr2 = cartslots->legacy_slotnumber[SLOTC_DROM]; |
| r6507 | r6508 | |
| 2243 | 2251 | /* There is a circuitry in TI99/4(a) that resets the console when a |
| 2244 | 2252 | cartridge is inserted or removed. We emulate this instead of resetting |
| 2245 | 2253 | the emulator (which is the default in MESS). */ |
| 2246 | | /*cpu_set_input_line(machine->firstcpu, INPUT_LINE_RESET, PULSE_LINE); |
| 2254 | #if 0 |
| 2255 | cpu_set_input_line(machine->firstcpu, INPUT_LINE_RESET, PULSE_LINE); |
| 2247 | 2256 | tms9901_reset(0); |
| 2248 | 2257 | if (! has_evpc) |
| 2249 | 2258 | TMS9928A_reset(); |
| 2250 | 2259 | if (has_evpc) |
| 2251 | | v9938_reset(0);*/ |
| 2260 | v9938_reset(0); |
| 2261 | #endif |
| 2252 | 2262 | |
| 2253 | 2263 | ch = strrchr(name, '.'); |
| 2254 | 2264 | ch2 = (ch-1 >= name) ? ch-1 : ""; |
src/mess/tools/imgtool/modules/ti99.c
| r6507 | r6508 | |
| 761 | 761 | crc2 = c; |
| 762 | 762 | calc_crc(& crc, c); |
| 763 | 763 | |
| 764 | #if 0 |
| 764 | 765 | /* CRC seems to be completely hosed */ |
| 765 | | /*if (crc) |
| 766 | | printf("aargh!");*/ |
| 766 | if (crc) |
| 767 | printf("aargh!"); |
| 768 | #endif |
| 767 | 769 | if ((seclen != 256) || (crc1 != 0xf7) || (crc2 != 0xf7) |
| 768 | 770 | || (cylinder != expected_cylinder) || (head != expected_head) |
| 769 | 771 | || ((pass == 1) && ((cylinder >= geometry->cylinders) |
| r6507 | r6508 | |
| 859 | 861 | crc2 = c; |
| 860 | 862 | calc_crc(& crc, c); |
| 861 | 863 | |
| 864 | #if 0 |
| 862 | 865 | /* CRC seems to be completely hosed */ |
| 863 | | /*if (crc) |
| 864 | | printf("aargh!");*/ |
| 866 | if (crc) |
| 867 | printf("aargh!"); |
| 868 | #endif |
| 865 | 869 | if ((crc1 != 0xf7) || (crc2 != 0xf7)) |
| 866 | 870 | continue; |
| 867 | 871 | |
| r6507 | r6508 | |
| 990 | 994 | return IMGTOOLERR_CORRUPTIMAGE; /* TODO: support 512-byte sectors */ |
| 991 | 995 | } |
| 992 | 996 | |
| 997 | #if 0 |
| 993 | 998 | /* read vib */ |
| 994 | | /*reply = read_absolute_physrec(l1_img, 0, vib); |
| 995 | | if (reply) |
| 996 | | return reply;*/ |
| 999 | reply = read_absolute_physrec(l1_img, 0, vib); |
| 1000 | if (reply) |
| 1001 | return reply; |
| 1002 | #endif |
| 997 | 1003 | } |
| 998 | 1004 | else |
| 999 | 1005 | { |
| r6507 | r6508 | |
| 1294 | 1300 | geometry (I): disk image geometry |
| 1295 | 1301 | address (O): physical sector address |
| 1296 | 1302 | */ |
| 1297 | | /*static void win_aphysrec_to_sector_address(int aphysrec, const ti99_geometry *geometry, ti99_sector_address *address) |
| 1303 | #ifdef UNUSED_FUNCTION |
| 1304 | static void win_aphysrec_to_sector_address(int aphysrec, const ti99_geometry *geometry, ti99_sector_address *address) |
| 1298 | 1305 | { |
| 1299 | 1306 | address.sector = aphysrec % l1_img->geometry.secspertrack; |
| 1300 | 1307 | aphysrec /= l1_img->geometry.secspertrack; |
| 1301 | 1308 | address.side = aphysrec % l1_img->geometry.heads; |
| 1302 | 1309 | address.cylinder = aphysrec / l1_img->geometry.heads; |
| 1303 | | }*/ |
| 1310 | } |
| 1311 | #endif |
| 1304 | 1312 | |
| 1305 | 1313 | /* |
| 1306 | 1314 | Read one 256-byte physical record from a disk image |
| r6507 | r6508 | |
| 1318 | 1326 | |
| 1319 | 1327 | if (l1_img->img_format == if_harddisk) |
| 1320 | 1328 | { |
| 1321 | | /*win_aphysrec_to_sector_address(aphysrec, & l1_img->geometry, & address); |
| 1329 | #if 0 |
| 1330 | win_aphysrec_to_sector_address(aphysrec, & l1_img->geometry, & address); |
| 1331 | return read_sector(l1_img, & address, dest); |
| 1332 | #endif |
| 1322 | 1333 | |
| 1323 | | return read_sector(l1_img, & address, dest);*/ |
| 1324 | | |
| 1325 | 1334 | return imghd_read(&l1_img->harddisk_handle, aphysrec, dest) != IMGTOOLERR_SUCCESS; |
| 1326 | 1335 | } |
| 1327 | 1336 | else |
| r6507 | r6508 | |
| 1348 | 1357 | |
| 1349 | 1358 | if (l1_img->img_format == if_harddisk) |
| 1350 | 1359 | { |
| 1351 | | /*win_aphysrec_to_sector_address(aphysrec, & l1_img->geometry, & address); |
| 1360 | #if 0 |
| 1361 | win_aphysrec_to_sector_address(aphysrec, & l1_img->geometry, & address); |
| 1362 | return write_sector(l1_img, & address, dest); |
| 1363 | #endif |
| 1352 | 1364 | |
| 1353 | | return write_sector(l1_img, & address, dest);*/ |
| 1354 | | |
| 1355 | 1365 | return imghd_write(&l1_img->harddisk_handle, aphysrec, src) != IMGTOOLERR_SUCCESS; |
| 1356 | 1366 | } |
| 1357 | 1367 | else |
| r6507 | r6508 | |
| 3013 | 3023 | /* clear remainder of cluster table */ |
| 3014 | 3024 | for (; i<54; i++) |
| 3015 | 3025 | { |
| 3016 | | /*set_UINT16BE(&cur_fdr->clusters[i][0], 0); |
| 3017 | | set_UINT16BE(&cur_fdr->clusters[i][1], 0);*/ |
| 3026 | #if 0 |
| 3027 | set_UINT16BE(&cur_fdr->clusters[i][0], 0); |
| 3028 | set_UINT16BE(&cur_fdr->clusters[i][1], 0); |
| 3029 | #endif |
| 3018 | 3030 | if ((get_UINT16BE(cur_fdr->clusters[i][0]) != 0) || (get_UINT16BE(cur_fdr->clusters[i][1]) != 0)) |
| 3019 | 3031 | return IMGTOOLERR_CORRUPTIMAGE; |
| 3020 | 3032 | } |
| r6507 | r6508 | |
| 3284 | 3296 | /* |
| 3285 | 3297 | Write a field in every fdr record associated to a file |
| 3286 | 3298 | */ |
| 3287 | | /*static int set_win_fdr_field(ti99_lvl2_fileref *l2_file, size_t offset, size_t size, void *data) |
| 3299 | #ifdef UNUSED_FUNCTION |
| 3300 | static int set_win_fdr_field(ti99_lvl2_fileref *l2_file, size_t offset, size_t size, void *data) |
| 3288 | 3301 | { |
| 3289 | 3302 | win_fdr fdr_buf; |
| 3290 | 3303 | unsigned fdr_aphysrec; |
| r6507 | r6508 | |
| 3303 | 3316 | } |
| 3304 | 3317 | |
| 3305 | 3318 | return errorcode; |
| 3306 | | }*/ |
| 3319 | } |
| 3320 | #endif |
| 3307 | 3321 | |
| 3308 | 3322 | static UINT8 get_file_flags(ti99_lvl2_fileref *l2_file) |
| 3309 | 3323 | { |
| r6507 | r6508 | |
| 4542 | 4556 | return errorcode; |
| 4543 | 4557 | |
| 4544 | 4558 | get_file_creation_date(&src_file, &date_time); |
| 4545 | | /*if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4559 | #if 0 |
| 4560 | if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4546 | 4561 | || (date_time.date_MSB == 0) || (date_time.date_LSB == 0)) |
| 4547 | | current_date_time(&date_time);*/ |
| 4562 | current_date_time(&date_time); |
| 4563 | #endif |
| 4548 | 4564 | set_file_creation_date(&dst_file, date_time); |
| 4549 | 4565 | |
| 4550 | 4566 | get_file_update_date(&src_file, &date_time); |
| 4551 | | /*if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4567 | #if 0 |
| 4568 | if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4552 | 4569 | || (date_time.date_MSB == 0) || (date_time.date_LSB == 0)) |
| 4553 | | current_date_time(&date_time);*/ |
| 4570 | current_date_time(&date_time); |
| 4571 | #endif |
| 4554 | 4572 | set_file_update_date(&dst_file, date_time); |
| 4555 | 4573 | |
| 4556 | 4574 | if (stream_write(destf, & dst_file.u.tifiles.hdr, 128) != 128) |
| r6507 | r6508 | |
| 4707 | 4725 | return errorcode; |
| 4708 | 4726 | |
| 4709 | 4727 | get_file_creation_date(&src_file, &date_time); |
| 4710 | | /*if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4728 | #if 0 |
| 4729 | if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4711 | 4730 | || (date_time.date_MSB == 0) || (date_time.date_LSB == 0)) |
| 4712 | | current_date_time(&date_time);*/ |
| 4731 | current_date_time(&date_time); |
| 4732 | #endif |
| 4713 | 4733 | set_file_creation_date(&dst_file, date_time); |
| 4714 | 4734 | |
| 4715 | 4735 | get_file_update_date(&src_file, &date_time); |
| 4716 | | /*if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4736 | #if 0 |
| 4737 | if ((date_time.time_MSB == 0) || (date_time.time_LSB == 0) |
| 4717 | 4738 | || (date_time.date_MSB == 0) || (date_time.date_LSB == 0)) |
| 4718 | | current_date_time(&date_time);*/ |
| 4739 | current_date_time(&date_time); |
| 4740 | #endif |
| 4719 | 4741 | set_file_update_date(&dst_file, date_time); |
| 4720 | 4742 | |
| 4721 | 4743 | /* alloc data physrecs */ |
| r6507 | r6508 | |
| 4947 | 4969 | } |
| 4948 | 4970 | /* the condition below is an error, but it should not prevent us from |
| 4949 | 4971 | deleting the file */ |
| 4950 | | /*if (i<fphysrecs) |
| 4951 | | return IMGTOOLERR_CORRUPTIMAGE;*/ |
| 4972 | #if 0 |
| 4973 | if (i<fphysrecs) |
| 4974 | return IMGTOOLERR_CORRUPTIMAGE; |
| 4975 | #endif |
| 4952 | 4976 | |
| 4953 | 4977 | /* free fdr AU */ |
| 4954 | 4978 | cur_AU = catalog->files[catalog_index].fdr_ptr / image->AUformat.physrecsperAU; |
src/mess/tools/imgtool/modules/mac.c
| r6507 | r6508 | |
| 432 | 432 | Return a zero if s1 and s2 are equal, a negative value if s1 is less than |
| 433 | 433 | s2, and a positive value if s1 is greater than s2. |
| 434 | 434 | */ |
| 435 | | /*static int mac_strcmp(const UINT8 *s1, const UINT8 *s2) |
| 435 | #ifdef UNUSED_FUNCTION |
| 436 | static int mac_strcmp(const UINT8 *s1, const UINT8 *s2) |
| 436 | 437 | { |
| 437 | 438 | size_t common_len; |
| 438 | 439 | |
| 439 | 440 | common_len = (s1[0] <= s2[0]) ? s1[0] : s2[0]; |
| 440 | 441 | |
| 441 | 442 | return memcmp(s1+1, s2+1, common_len) || ((int)s1[0] - s2[0]); |
| 442 | | }*/ |
| 443 | } |
| 444 | #endif |
| 443 | 445 | |
| 444 | 446 | /* |
| 445 | 447 | mac_stricmp() |
| r6507 | r6508 | |
| 1395 | 1397 | |
| 1396 | 1398 | newABEof = (newEof + fileref->l2_img->blocksperAB * 512 - 1) / (fileref->l2_img->blocksperAB * 512); |
| 1397 | 1399 | |
| 1398 | | /*if (fileref->pLen % (fileref->l2_img->blocksperAB * 512)) |
| 1399 | | return IMGTOOLERR_CORRUPTIMAGE;*/ |
| 1400 | #if 0 |
| 1401 | if (fileref->pLen % (fileref->l2_img->blocksperAB * 512)) |
| 1402 | return IMGTOOLERR_CORRUPTIMAGE; |
| 1403 | #endif |
| 1400 | 1404 | |
| 1401 | 1405 | if (newEof < fileref->eof) |
| 1402 | 1406 | fileref->eof = newEof; |
| r6507 | r6508 | |
| 1421 | 1425 | return err; |
| 1422 | 1426 | |
| 1423 | 1427 | /* update current pos if beyond new EOF */ |
| 1424 | | /*if (fileref->crPs > newEof) |
| 1425 | | { |
| 1426 | | if ((fileref->crPs / 512) != (newEof / 512)) |
| 1427 | | fileref->reload_buf = TRUE; |
| 1428 | #if 0 |
| 1429 | if (fileref->crPs > newEof) |
| 1430 | { |
| 1431 | if ((fileref->crPs / 512) != (newEof / 512)) |
| 1432 | fileref->reload_buf = TRUE; |
| 1428 | 1433 | |
| 1429 | | fileref->crPs = newEof; |
| 1430 | | }*/ |
| 1434 | fileref->crPs = newEof; |
| 1435 | } |
| 1436 | #endif |
| 1431 | 1437 | |
| 1432 | 1438 | return IMGTOOLERR_SUCCESS; |
| 1433 | 1439 | } |
| r6507 | r6508 | |
| 4088 | 4094 | /* this check is unecessary because the current consistency checks |
| 4089 | 4095 | that forward and back linking match and that node height is correct |
| 4090 | 4096 | are enough to detect such errors */ |
| 4091 | | /*if (bitmap[cur_node >> 3] & (0x80 >> (cur_node & 7))) |
| 4097 | #if 0 |
| 4098 | if (bitmap[cur_node >> 3] & (0x80 >> (cur_node & 7))) |
| 4092 | 4099 | { |
| 4093 | 4100 | err = IMGTOOLERR_CORRUPTIMAGE; |
| 4094 | 4101 | goto bail; |
| 4095 | | }*/ |
| 4102 | } |
| 4103 | #endif |
| 4096 | 4104 | /* add node in bitmap */ |
| 4097 | 4105 | bitmap[cur_node >> 3] |= (0x80 >> (cur_node & 7)); |
| 4098 | 4106 | /* read node */ |
| r6507 | r6508 | |
| 4202 | 4210 | } |
| 4203 | 4211 | /* next test is not necessary because we have checked that |
| 4204 | 4212 | the root node has no successor */ |
| 4205 | | /*if (i < BTref->treeDepth-1) |
| 4206 | | {*/ |
| 4213 | #if 0 |
| 4214 | if (i < BTref->treeDepth-1) |
| 4215 | { |
| 4216 | #endif |
| 4207 | 4217 | data_nodes[i+1].cur_rec++; |
| 4208 | | /*} |
| 4209 | | else |
| 4210 | | { |
| 4211 | | err = IMGTOOLERR_CORRUPTIMAGE; |
| 4212 | | goto bail; |
| 4213 | | }*/ |
| 4218 | #if 0 |
| 4219 | } |
| 4220 | else |
| 4221 | { |
| 4222 | err = IMGTOOLERR_CORRUPTIMAGE; |
| 4223 | goto bail; |
| 4224 | } |
| 4225 | #endif |
| 4214 | 4226 | } |
| 4215 | 4227 | i++; |
| 4216 | 4228 | } |
| r6507 | r6508 | |
| 4383 | 4395 | /* this check is unecessary because the current consistency checks that |
| 4384 | 4396 | forward and back linking match and that node height is correct are |
| 4385 | 4397 | enough to detect such errors */ |
| 4386 | | /*if (bitmap[cur_node >> 3] & (0x80 >> (cur_node & 7))) |
| 4398 | #if 0 |
| 4399 | if (bitmap[cur_node >> 3] & (0x80 >> (cur_node & 7))) |
| 4387 | 4400 | { |
| 4388 | 4401 | err = IMGTOOLERR_CORRUPTIMAGE; |
| 4389 | 4402 | goto bail; |
| 4390 | | }*/ |
| 4403 | } |
| 4404 | #endif |
| 4391 | 4405 | /* add node in bitmap */ |
| 4392 | 4406 | bitmap[cur_node >> 3] |= (0x80 >> (cur_node & 7)); |
| 4393 | 4407 | /* read map node */ |
| r6507 | r6508 | |
| 5650 | 5664 | mac_dirent cat_info; |
| 5651 | 5665 | mac_fileref fileref; |
| 5652 | 5666 | UINT32 fork_len; |
| 5653 | | /*UINT16 commentID; |
| 5654 | | mac_str255 comment;*/ |
| 5667 | /*UINT16 commentID;*/ |
| 5668 | /*mac_str255 comment;*/ |
| 5655 | 5669 | UINT8 buf[512]; |
| 5656 | 5670 | UINT32 i, run_len; |
| 5657 | 5671 | imgtoolerr_t err; |
| r6507 | r6508 | |
| 5666 | 5680 | if (err) |
| 5667 | 5681 | return err; |
| 5668 | 5682 | |
| 5669 | | /*if (header.version_old != 0) |
| 5670 | | return IMGTOOLERR_UNIMPLEMENTED;*/ |
| 5683 | #if 0 |
| 5684 | if (header.version_old != 0) |
| 5685 | return IMGTOOLERR_UNIMPLEMENTED; |
| 5686 | #endif |
| 5671 | 5687 | /*mac_strcpy(filename, header.filename);*/ |
| 5672 | 5688 | memset(&cat_info, 0, sizeof(cat_info)); |
| 5673 | 5689 | set_UINT32BE(&cat_info.flFinderInfo.type, 0x3F3F3F3F); |
src/mess/video/pdp1.c
| r6507 | r6508 | |
| 573 | 573 | { |
| 574 | 574 | if (previous_lightpen_state.active) |
| 575 | 575 | { |
| 576 | | /*if (previous_lightpen_state.x>0) |
| 577 | | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2-1, previous_lightpen_state.y/2, pen_black); |
| 578 | | if (previous_lightpen_state.x<1023) |
| 579 | | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2+1, previous_lightpen_state.y/2, pen_black); |
| 580 | | if (previous_lightpen_state.y>0) |
| 581 | | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2, previous_lightpen_state.y/2-1, pen_black); |
| 582 | | if (previous_lightpen_state.y<1023) |
| 583 | | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2, previous_lightpen_state.y/2+1, pen_black);*/ |
| 576 | #if 0 |
| 577 | if (previous_lightpen_state.x>0) |
| 578 | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2-1, previous_lightpen_state.y/2, pen_black); |
| 579 | if (previous_lightpen_state.x<1023) |
| 580 | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2+1, previous_lightpen_state.y/2, pen_black); |
| 581 | if (previous_lightpen_state.y>0) |
| 582 | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2, previous_lightpen_state.y/2-1, pen_black); |
| 583 | if (previous_lightpen_state.y<1023) |
| 584 | pdp1_plot_pixel(bitmap, previous_lightpen_state.x/2, previous_lightpen_state.y/2+1, pen_black); |
| 585 | #endif |
| 584 | 586 | pdp1_draw_circle(bitmap, previous_lightpen_state.x, previous_lightpen_state.y, previous_lightpen_state.radius, pen_black); |
| 585 | 587 | } |
| 586 | 588 | } |
| r6507 | r6508 | |
| 590 | 592 | if (lightpen_state.active) |
| 591 | 593 | { |
| 592 | 594 | int color_ = lightpen_state.down ? pen_lightpen_pressed : pen_lightpen_nonpressed; |
| 593 | | /*if (lightpen_state.x>0) |
| 594 | | pdp1_plot_pixel(bitmap, lightpen_state.x/2-1, lightpen_state.y/2, color); |
| 595 | | if (lightpen_state.x<1023) |
| 596 | | pdp1_plot_pixel(bitmap, lightpen_state.x/2+1, lightpen_state.y/2, color); |
| 597 | | if (lightpen_state.y>0) |
| 598 | | pdp1_plot_pixel(bitmap, lightpen_state.x/2, lightpen_state.y/2-1, color); |
| 599 | | if (lightpen_state.y<1023) |
| 600 | | pdp1_plot_pixel(bitmap, lightpen_state.x/2, lightpen_state.y/2+1, color);*/ |
| 595 | #if 0 |
| 596 | if (lightpen_state.x>0) |
| 597 | pdp1_plot_pixel(bitmap, lightpen_state.x/2-1, lightpen_state.y/2, color); |
| 598 | if (lightpen_state.x<1023) |
| 599 | pdp1_plot_pixel(bitmap, lightpen_state.x/2+1, lightpen_state.y/2, color); |
| 600 | if (lightpen_state.y>0) |
| 601 | pdp1_plot_pixel(bitmap, lightpen_state.x/2, lightpen_state.y/2-1, color); |
| 602 | if (lightpen_state.y<1023) |
| 603 | pdp1_plot_pixel(bitmap, lightpen_state.x/2, lightpen_state.y/2+1, color); |
| 604 | #endif |
| 601 | 605 | pdp1_draw_circle(bitmap, lightpen_state.x, lightpen_state.y, lightpen_state.radius, color_); |
| 602 | 606 | } |
| 603 | 607 | previous_lightpen_state = lightpen_state; |
src/mess/video/gb.c
| r6507 | r6508 | |
| 1238 | 1238 | }; |
| 1239 | 1239 | |
| 1240 | 1240 | /* |
| 1241 | | For an AGS in CGB mode this data is: |
| 1241 | For an AGS in CGB mode this data is: */ |
| 1242 | #if 0 |
| 1242 | 1243 | static const UINT8 abs_oam_fingerprint[0x100] = { |
| 1243 | 1244 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1244 | 1245 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| r6507 | r6508 | |
| 1257 | 1258 | 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, |
| 1258 | 1259 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF |
| 1259 | 1260 | }; |
| 1260 | | */ |
| 1261 | #endif |
| 1261 | 1262 | |
| 1262 | 1263 | enum { |
| 1263 | 1264 | GB_LCD_STATE_LYXX_M3=1, |
src/mess/video/aim65.c
| r6507 | r6508 | |
| 109 | 109 | |
| 110 | 110 | WRITE8_DEVICE_HANDLER( aim65_printer_data_a ) |
| 111 | 111 | { |
| 112 | | /* if (flag_a == 0) { |
| 113 | | printerRAM[(printer_y * 20) + printer_x] |= data; |
| 114 | | flag_a = 1; |
| 115 | | }*/ |
| 112 | #if 0 |
| 113 | if (flag_a == 0) { |
| 114 | printerRAM[(printer_y * 20) + printer_x] |= data; |
| 115 | flag_a = 1; |
| 116 | } |
| 117 | #endif |
| 116 | 118 | } |
| 117 | 119 | |
| 118 | 120 | WRITE8_DEVICE_HANDLER( aim65_printer_data_b ) |
| 119 | 121 | { |
| 120 | | /* data &= 0x03; |
| 122 | #if 0 |
| 123 | data &= 0x03; |
| 121 | 124 | |
| 122 | | if (flag_b == 0) { |
| 123 | | printerRAM[(printer_y * 20) + printer_x ] |= (data << 8); |
| 124 | | flag_b = 1; |
| 125 | | }*/ |
| 125 | if (flag_b == 0) { |
| 126 | printerRAM[(printer_y * 20) + printer_x ] |= (data << 8); |
| 127 | flag_b = 1; |
| 128 | } |
| 129 | #endif |
| 126 | 130 | } |
| 127 | 131 | |
| 128 | 132 | VIDEO_START( aim65 ) |
| 129 | 133 | { |
| 130 | 134 | print_timer = timer_alloc(machine, aim65_printer_timer, NULL); |
| 131 | 135 | |
| 132 | | /* |
| 133 | | videoram_size = 600 * 10 * 2; |
| 134 | | printerRAM = auto_alloc_array(machine, UINT16, videoram_size / 2); |
| 135 | | memset(printerRAM, 0, videoram_size); |
| 136 | | printer_x = 0; |
| 137 | | printer_y = 0; |
| 138 | | printer_dir = 0; |
| 139 | | flag_a=0; |
| 140 | | flag_b=0; |
| 136 | #if 0 |
| 137 | videoram_size = 600 * 10 * 2; |
| 138 | printerRAM = auto_alloc_array(machine, UINT16, videoram_size / 2); |
| 139 | memset(printerRAM, 0, videoram_size); |
| 140 | printer_x = 0; |
| 141 | printer_y = 0; |
| 142 | printer_dir = 0; |
| 143 | flag_a=0; |
| 144 | flag_b=0; |
| 141 | 145 | |
| 142 | 146 | |
| 143 | | printer_level = 0; |
| 147 | printer_level = 0; |
| 144 | 148 | |
| 145 | | VIDEO_START_CALL(generic); |
| 146 | | */ |
| 149 | VIDEO_START_CALL(generic); |
| 150 | #endif |
| 147 | 151 | } |
| 148 | 152 | |
| 149 | 153 | |
| r6507 | r6508 | |
| 151 | 155 | VIDEO_UPDATE( aim65 ) |
| 152 | 156 | { |
| 153 | 157 | /* Display printer output */ |
| 154 | | /* dir = 1; |
| 155 | | for(y = 0; y<500;y++) |
| 156 | | { |
| 157 | | for(x = 0; x< 10; x++) |
| 158 | | { |
| 159 | | if (dir == 1) { |
| 160 | | data = printerRAM[y * 10 + x]; |
| 161 | | } |
| 162 | | else { |
| 163 | | data = printerRAM[(y * 10) + (9 - x)]; |
| 164 | | } |
| 158 | #if 0 |
| 159 | dir = 1; |
| 160 | for(y = 0; y<500;y++) |
| 161 | { |
| 162 | for(x = 0; x< 10; x++) |
| 163 | { |
| 164 | if (dir == 1) { |
| 165 | data = printerRAM[y * 10 + x]; |
| 166 | } |
| 167 | else { |
| 168 | data = printerRAM[(y * 10) + (9 - x)]; |
| 169 | } |
| 165 | 170 | |
| 166 | 171 | |
| 167 | | for (b = 0; b<10; b++) |
| 168 | | { |
| 169 | | color=machine->pens[(data & 0x1)?2:0]; |
| 170 | | plot_pixel(bitmap,700 - ((b * 10) + x), y,color); |
| 171 | | data = data >> 1; |
| 172 | | } |
| 173 | | } |
| 172 | for (b = 0; b<10; b++) |
| 173 | { |
| 174 | color=machine->pens[(data & 0x1)?2:0]; |
| 175 | plot_pixel(bitmap,700 - ((b * 10) + x), y,color); |
| 176 | data = data >> 1; |
| 177 | } |
| 178 | } |
| 174 | 179 | |
| 175 | | if (dir == 0) |
| 176 | | dir = 1; |
| 177 | | else |
| 178 | | dir = 0; |
| 179 | | } */ |
| 180 | if (dir == 0) |
| 181 | dir = 1; |
| 182 | else |
| 183 | dir = 0; |
| 184 | } |
| 185 | #endif |
| 180 | 186 | |
| 181 | 187 | return 0; |
| 182 | 188 | } |
src/mess/machine/sst39vfx.c
| r6507 | r6508 | |
| 103 | 103 | #define OFFSET_SWAP(offset,width) (offset & (~(width - 1))) | (width - 1 - (offset & (width - 1))) |
| 104 | 104 | */ |
| 105 | 105 | |
| 106 | | /* |
| 106 | #ifdef UNUSED_FUNCTION |
| 107 | 107 | READ8_HANDLER( sst39vfx_r ) |
| 108 | 108 | { |
| 109 | | _logerror( 1, ("sst39vfx_r (%08X)\n", offset)); |
| 110 | | if (flash->swap) offset = OFFSET_SWAP( offset, flash->swap); |
| 111 | | return flash->data[offset]; |
| 109 | _logerror( 1, ("sst39vfx_r (%08X)\n", offset)); |
| 110 | if (flash->swap) offset = OFFSET_SWAP( offset, flash->swap); |
| 111 | return flash->data[offset]; |
| 112 | 112 | } |
| 113 | | */ |
| 114 | 113 | |
| 115 | | /* |
| 116 | 114 | WRITE8_HANDLER( sst39vfx_w ) |
| 117 | 115 | { |
| 118 | | _logerror( 1, ("sst39vfx_w (%08X/%02X)\n", offset, data)); |
| 119 | | if (flash->swap) offset = OFFSET_SWAP( offset, flash->swap); |
| 120 | | flash->data[offset] = data; |
| 116 | _logerror( 1, ("sst39vfx_w (%08X/%02X)\n", offset, data)); |
| 117 | if (flash->swap) offset = OFFSET_SWAP( offset, flash->swap); |
| 118 | flash->data[offset] = data; |
| 121 | 119 | } |
| 122 | | */ |
| 120 | #endif |
| 123 | 121 | |
| 124 | 122 | static void sst39vfx_swap( const device_config *device) |
| 125 | 123 | { |
| r6507 | r6508 | |
| 154 | 152 | if (flash->swap) sst39vfx_swap(device); |
| 155 | 153 | } |
| 156 | 154 | |
| 157 | | /* |
| 155 | #if 0 |
| 158 | 156 | NVRAM_HANDLER( sst39vfx ) |
| 159 | 157 | { |
| 160 | 158 | _logerror( 0, ("nvram_handler_sst39vfx (%p/%d)\n", file, read_or_write)); |
| r6507 | r6508 | |
| 174 | 172 | } |
| 175 | 173 | } |
| 176 | 174 | } |
| 177 | | */ |
| 175 | #endif |
| 178 | 176 | |
| 179 | 177 | |
| 180 | 178 | /*------------------------------------------------- |
src/mess/machine/sms.c
| r6507 | r6508 | |
| 1045 | 1045 | { |
| 1046 | 1046 | if (!strncmp((char*)&magic[0x7ff0], "TMR SEGA", 8)) |
| 1047 | 1047 | { |
| 1048 | | /* Technically, it should be this, but remove for now until verified: |
| 1049 | | if (!strcmp(sysname, "gamegear")) |
| 1050 | | { |
| 1051 | | if ((unsigned char)magic[0x7ffd] < 0x50) |
| 1052 | | retval = IMAGE_VERIFY_PASS; |
| 1053 | | } |
| 1054 | | if (!strcmp(sysname, "sms")) |
| 1055 | | { |
| 1056 | | if ((unsigned char)magic[0x7ffd] >= 0x50) |
| 1057 | | retval = IMAGE_VERIFY_PASS; |
| 1058 | | } |
| 1059 | | */ |
| 1048 | #if 0 |
| 1049 | /* Technically, it should be this, but remove for now until verified: */ |
| 1050 | if (!strcmp(sysname, "gamegear")) |
| 1051 | { |
| 1052 | if ((unsigned char)magic[0x7ffd] < 0x50) |
| 1053 | retval = IMAGE_VERIFY_PASS; |
| 1054 | } |
| 1055 | if (!strcmp(sysname, "sms")) |
| 1056 | { |
| 1057 | if ((unsigned char)magic[0x7ffd] >= 0x50) |
| 1058 | retval = IMAGE_VERIFY_PASS; |
| 1059 | } |
| 1060 | #endif |
| 1060 | 1061 | retval = IMAGE_VERIFY_PASS; |
| 1061 | 1062 | } |
| 1062 | | } |
| 1063 | 1063 | |
| 1064 | #if 0 |
| 1064 | 1065 | /* Check at $81f0 also */ |
| 1065 | | //if (!retval) { |
| 1066 | | // if (!strncmp(&magic[0x81f0], "TMR SEGA", 8)) { |
| 1067 | | /* Technically, it should be this, but remove for now until verified: |
| 1068 | | if (!strcmp(sysname, "gamegear")) |
| 1066 | if (!retval) |
| 1067 | { |
| 1068 | if (!strncmp(&magic[0x81f0], "TMR SEGA", 8)) |
| 1069 | 1069 | { |
| 1070 | | if ((unsigned char)magic[0x81fd] < 0x50) |
| 1071 | | retval = IMAGE_VERIFY_PASS; |
| 1072 | | } |
| 1073 | | if (!strcmp(sysname, "sms")) |
| 1074 | | { |
| 1075 | | if ((unsigned char)magic[0x81fd] >= 0x50) |
| 1076 | | retval = IMAGE_VERIFY_PASS; |
| 1077 | | } |
| 1078 | | */ |
| 1079 | | // retval = IMAGE_VERIFY_PASS; |
| 1080 | | // } |
| 1081 | | //} |
| 1070 | #if 0 |
| 1071 | /* Technically, it should be this, but remove for now until verified: */ |
| 1072 | if (!strcmp(sysname, "gamegear")) |
| 1073 | { |
| 1074 | if ((unsigned char)magic[0x81fd] < 0x50) |
| 1075 | retval = IMAGE_VERIFY_PASS; |
| 1076 | } |
| 1077 | if (!strcmp(sysname, "sms")) |
| 1078 | { |
| 1079 | if ((unsigned char)magic[0x81fd] >= 0x50) |
| 1080 | retval = IMAGE_VERIFY_PASS; |
| 1081 | } |
| 1082 | #endif |
| 1083 | retval = IMAGE_VERIFY_PASS; |
| 1084 | } |
| 1085 | } |
| 1086 | #endif |
| 1082 | 1087 | |
| 1088 | } |
| 1089 | |
| 1083 | 1090 | return retval; |
| 1084 | 1091 | } |
| 1085 | 1092 | |
src/mess/machine/mz700.c
| r6507 | r6508 | |
| 526 | 526 | Bit 3 outputs a string of pulses to the Clock pin, and therefore cannot be used to control |
| 527 | 527 | the motor directly. |
| 528 | 528 | For the moment, the user can use the UI to select play, stop, etc. |
| 529 | | If you load from the command-line or the software-picker, type in L <enter> immediately. |
| 529 | If you load from the command-line or the software-picker, type in L <enter> immediately. */ |
| 530 | #if 0 |
| 531 | cassette_change_state( |
| 532 | devtag_get_device(device->machine, "cassette"), |
| 533 | ((data & 0x08) && mz700_motor_on) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, |
| 534 | CASSETTE_MOTOR_DISABLED); |
| 530 | 535 | |
| 531 | | cassette_change_state( |
| 532 | | devtag_get_device(device->machine, "cassette"), |
| 533 | | ((data & 0x08) && mz700_motor_on) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, |
| 534 | | CASSETTE_MOTOR_DISABLED); |
| 536 | #endif |
| 535 | 537 | |
| 536 | | */ |
| 537 | | |
| 538 | 538 | LOG(2,"mz700_pio_port_c_w",("%02X\n", data),device->machine); |
| 539 | 539 | |
| 540 | 540 | cassette_output(devtag_get_device(device->machine, "cassette"), (data & 0x02) ? +1.0 : -1.0); |
src/mess/machine/lisa.c
| r6507 | r6508 | |
| 222 | 222 | if (parity_error_pending) |
| 223 | 223 | return; /* don't touch anything... */ |
| 224 | 224 | |
| 225 | | /*if (RSIR) |
| 226 | | // serial interrupt |
| 227 | | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_6, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 228 | | else if (int0) |
| 229 | | // external interrupt |
| 230 | | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 231 | | else if (int1) |
| 232 | | // external interrupt |
| 233 | | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 234 | | else if (int2) |
| 235 | | // external interrupt |
| 236 | | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_3, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 237 | | else*/ if (KBIR) |
| 225 | #if 0 |
| 226 | if (RSIR) |
| 227 | // serial interrupt |
| 228 | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_6, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 229 | else if (int0) |
| 230 | // external interrupt |
| 231 | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 232 | else if (int1) |
| 233 | // external interrupt |
| 234 | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 235 | else if (int2) |
| 236 | // external interrupt |
| 237 | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_3, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 238 | else |
| 239 | #endif |
| 240 | if (KBIR) |
| 238 | 241 | /* COPS VIA interrupt */ |
| 239 | 242 | cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_2, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); |
| 240 | 243 | else if (FDIR || VTIR) |
| r6507 | r6508 | |
| 446 | 449 | int diff_x = 0, diff_y = 0; |
| 447 | 450 | int new_mx, new_my; |
| 448 | 451 | |
| 449 | | /*if (COPS_force_unplug) |
| 450 | | return;*/ /* ???? */ |
| 452 | #if 0 |
| 453 | if (COPS_force_unplug) |
| 454 | return; /* ???? */ |
| 455 | #endif |
| 451 | 456 | |
| 452 | 457 | new_mx = input_port_read(machine, "MOUSE_X"); |
| 453 | 458 | new_my = input_port_read(machine, "MOUSE_Y"); |
| r6507 | r6508 | |
| 1082 | 1087 | #endif |
| 1083 | 1088 | } |
| 1084 | 1089 | |
| 1085 | | /*void init_lisa1(void) |
| 1090 | #ifdef UNUSED_FUNCTION |
| 1091 | void init_lisa1(void) |
| 1086 | 1092 | { |
| 1087 | | lisa_model = lisa1; |
| 1088 | | lisa_features.has_fast_timers = 0; |
| 1089 | | lisa_features.floppy_hardware = twiggy; |
| 1090 | | lisa_features.has_double_sided_floppy = 1; |
| 1091 | | lisa_features.has_mac_xl_video = 0; |
| 1092 | | }*/ |
| 1093 | lisa_model = lisa1; |
| 1094 | lisa_features.has_fast_timers = 0; |
| 1095 | lisa_features.floppy_hardware = twiggy; |
| 1096 | lisa_features.has_double_sided_floppy = 1; |
| 1097 | lisa_features.has_mac_xl_video = 0; |
| 1098 | } |
| 1099 | #endif |
| 1093 | 1100 | |
| 1094 | 1101 | DRIVER_INIT( lisa2 ) |
| 1095 | 1102 | { |
| r6507 | r6508 | |
| 1324 | 1331 | break; |
| 1325 | 1332 | case 5: |
| 1326 | 1333 | /*HDS = offset & 1;*/ /* head select (-> disk side) on twiggy */ |
| 1327 | | /*if (lisa_features.floppy_hardware == twiggy) |
| 1328 | | twiggy_set_head_line(offset & 1); |
| 1329 | | else*/ if (lisa_features.floppy_hardware == sony_lisa210) |
| 1334 | #if 0 |
| 1335 | if (lisa_features.floppy_hardware == twiggy) |
| 1336 | twiggy_set_head_line(offset & 1); |
| 1337 | else |
| 1338 | #endif |
| 1339 | if (lisa_features.floppy_hardware == sony_lisa210) |
| 1330 | 1340 | sony_set_sel_line(devtag_get_device(machine, "fdc"), offset & 1); |
| 1331 | 1341 | break; |
| 1332 | 1342 | case 6: |
| r6507 | r6508 | |
| 1383 | 1393 | |
| 1384 | 1394 | case 2: /* writes the PWM register */ |
| 1385 | 1395 | /* the written value is used to generate the motor speed control signal */ |
| 1386 | | /*if (lisa_features.floppy_hardware == twiggy) |
| 1387 | | twiggy_set_speed((256-data) * ??? + ???); |
| 1388 | | else*/ if (lisa_features.floppy_hardware == sony_lisa210) |
| 1396 | #if 0 |
| 1397 | if (lisa_features.floppy_hardware == twiggy) |
| 1398 | twiggy_set_speed((256-data) * 1.3 /* ??? */ + 237 /* ??? */); |
| 1399 | else |
| 1400 | #endif |
| 1401 | if (lisa_features.floppy_hardware == sony_lisa210) |
| 1389 | 1402 | sony_set_speed(((256-data) * 1.3) + 237); |
| 1390 | 1403 | break; |
| 1391 | 1404 | |
src/mess/machine/geneve.c
| r6507 | r6508 | |
| 325 | 325 | { |
| 326 | 326 | /* Weirdly enough, we are always seeing some problems even though |
| 327 | 327 | everything is working fine. */ |
| 328 | | /*attotime time_to_ready = double_to_attotime(tms5220_time_to_ready()); |
| 329 | | logerror("ti99/4a speech says aaargh!\n"); |
| 330 | | logerror("(time to ready: %f -> %d)\n", time_to_ready, (int) ceil(3000000*time_to_ready));*/ |
| 328 | #if 0 |
| 329 | attotime time_to_ready = double_to_attotime(tms5220_time_to_ready()); |
| 330 | logerror("ti99/4a speech says aaargh!\n"); |
| 331 | logerror("(time to ready: %f -> %d)\n", time_to_ready, (int) ceil(3000000*time_to_ready)); |
| 332 | #endif |
| 331 | 333 | } |
| 332 | 334 | } |
| 333 | 335 | |
| r6507 | r6508 | |
| 653 | 655 | page_lookup[offset-0xf110] = data; |
| 654 | 656 | return; |
| 655 | 657 | |
| 656 | | /*case 0xf118: // read-only register??? |
| 657 | | key_buf = data; |
| 658 | | return*/ |
| 658 | #if 0 |
| 659 | case 0xf118: // read-only register??? |
| 660 | key_buf = data; |
| 661 | return; |
| 662 | #endif |
| 659 | 663 | |
| 660 | 664 | case 0xf120: |
| 661 | 665 | sn76496_w(devtag_get_device(space->machine, "sn76496"), 0, data); |
| r6507 | r6508 | |
| 706 | 710 | page_lookup[offset-0x8000] = data; |
| 707 | 711 | return; |
| 708 | 712 | |
| 709 | | /*case 0x8008: // read-only register??? |
| 710 | | key_buf = data; |
| 711 | | return*/ |
| 713 | #if 0 |
| 714 | case 0x8008: // read-only register??? |
| 715 | key_buf = data; |
| 716 | return |
| 717 | #endif |
| 712 | 718 | |
| 713 | 719 | case 0x8010: |
| 714 | 720 | case 0x8011: |
| r6507 | r6508 | |
| 1274 | 1280 | /* |
| 1275 | 1281 | set the state of int2 (called by tms9928 core) |
| 1276 | 1282 | */ |
| 1277 | | /*void tms9901_set_int2(int state) |
| 1283 | #ifdef UNUSED_FUNCTION |
| 1284 | void tms9901_set_int2(int state) |
| 1278 | 1285 | { |
| 1279 | | tms9901_set_single_int(devtag_get_device(machine, "tms9901"), 2, state); |
| 1280 | | }*/ |
| 1286 | tms9901_set_single_int(devtag_get_device(machine, "tms9901"), 2, state); |
| 1287 | } |
| 1288 | #endif |
| 1281 | 1289 | |
| 1282 | 1290 | /* |
| 1283 | 1291 | Called by the 9901 core whenever the state of INTREQ and IC0-3 changes |
src/mess/machine/cybiko.c
| r6507 | r6508 | |
| 108 | 108 | // NVRAM HANDLERS // |
| 109 | 109 | //////////////////// |
| 110 | 110 | |
| 111 | | /* |
| 111 | #ifdef UNUSED_FUNCTION |
| 112 | 112 | NVRAM_HANDLER( cybikov1 ) |
| 113 | 113 | { |
| 114 | | _logerror( 0, ("nvram_handler_cybikov1 (%p/%d)\n", file, read_or_write)); |
| 115 | | nvram_handler_at45dbxx( machine, file, read_or_write); |
| 116 | | nvram_handler_pcf8593( machine, file, read_or_write); |
| 114 | _logerror( 0, ("nvram_handler_cybikov1 (%p/%d)\n", file, read_or_write)); |
| 115 | nvram_handler_at45dbxx( machine, file, read_or_write); |
| 116 | nvram_handler_pcf8593( machine, file, read_or_write); |
| 117 | 117 | } |
| 118 | | */ |
| 119 | 118 | |
| 120 | | /* |
| 121 | 119 | NVRAM_HANDLER( cybikov2 ) |
| 122 | 120 | { |
| 123 | | _logerror( 0, ("nvram_handler_cybikov2 (%p/%d)\n", file, read_or_write)); |
| 124 | | nvram_handler_at45dbxx( machine, file, read_or_write); |
| 125 | | nvram_handler_sst39vfx( machine, file, read_or_write); |
| 126 | | nvram_handler_pcf8593( machine, file, read_or_write); |
| 121 | _logerror( 0, ("nvram_handler_cybikov2 (%p/%d)\n", file, read_or_write)); |
| 122 | nvram_handler_at45dbxx( machine, file, read_or_write); |
| 123 | nvram_handler_sst39vfx( machine, file, read_or_write); |
| 124 | nvram_handler_pcf8593( machine, file, read_or_write); |
| 127 | 125 | } |
| 128 | | */ |
| 129 | 126 | |
| 130 | | /* |
| 131 | 127 | NVRAM_HANDLER( cybikoxt ) |
| 132 | 128 | { |
| 133 | | _logerror( 0, ("nvram_handler_cybikoxt (%p/%d)\n", file, read_or_write)); |
| 134 | | nvram_handler_sst39vfx( machine, file, read_or_write); |
| 135 | | nvram_handler_pcf8593( machine, file, read_or_write); |
| 129 | _logerror( 0, ("nvram_handler_cybikoxt (%p/%d)\n", file, read_or_write)); |
| 130 | nvram_handler_sst39vfx( machine, file, read_or_write); |
| 131 | nvram_handler_pcf8593( machine, file, read_or_write); |
| 136 | 132 | } |
| 137 | | */ |
| 133 | #endif |
| 138 | 134 | |
| 139 | 135 | /////////////////// |
| 140 | 136 | // MACHINE START // |
src/mess/machine/ti99_4x.c
| r6507 | r6508 | |
| 357 | 357 | |
| 358 | 358 | /* set up memory pointers */ |
| 359 | 359 | xRAM_ptr = (UINT16 *) (memory_region(machine, "maincpu") + offset_xram_4p); |
| 360 | | /* console_GROMs.data_ptr = memory_region(machine, region_grom); |
| 361 | | create_grom_high2k(0x0000, 0x5fff); */ |
| 360 | #if 0 |
| 361 | console_GROMs.data_ptr = memory_region(machine, region_grom); |
| 362 | create_grom_high2k(0x0000, 0x5fff); |
| 363 | #endif |
| 362 | 364 | } |
| 363 | 365 | |
| 364 | 366 | static const TMS9928a_interface tms9918_interface = |
| r6507 | r6508 | |
| 470 | 472 | memory_set_bankptr(machine, 1, memory_region(machine, "maincpu") + offset_sram); |
| 471 | 473 | } |
| 472 | 474 | |
| 473 | | /* if (ti99_model != model_99_4p) |
| 474 | | { |
| 475 | | if (ti99_model == model_99_8) |
| 476 | | current_page_ptr_8 = cartridge_pages_8[0]; |
| 477 | | else |
| 478 | | current_page_ptr = cartridge_pages[0]; |
| 479 | | } */ |
| 475 | #if 0 |
| 476 | if (ti99_model != model_99_4p) |
| 477 | { |
| 478 | if (ti99_model == model_99_8) |
| 479 | current_page_ptr_8 = cartridge_pages_8[0]; |
| 480 | else |
| 481 | current_page_ptr = cartridge_pages[0]; |
| 482 | } |
| 483 | #endif |
| 480 | 484 | |
| 481 | 485 | if (!has_evpc) TMS9928A_reset(); |
| 482 | 486 | else v9938_reset(0); |
| r6507 | r6508 | |
| 1267 | 1271 | mapper_reg = ti99_8_mapper_regs[page]; |
| 1268 | 1272 | offset = (mapper_reg + (offset & 0x0fff)) & 0x00ffffff; |
| 1269 | 1273 | |
| 1274 | #if 0 |
| 1270 | 1275 | /* test read protect */ |
| 1271 | | /*if (mapper_reg & 0x20000000) |
| 1272 | | ;*/ |
| 1276 | if (mapper_reg & 0x20000000) |
| 1277 | ; |
| 1273 | 1278 | |
| 1274 | 1279 | /* test execute protect */ |
| 1275 | | /*if (mapper_reg & 0x40000000) |
| 1276 | | ;*/ |
| 1280 | if (mapper_reg & 0x40000000) |
| 1281 | ; |
| 1282 | #endif |
| 1277 | 1283 | |
| 1278 | 1284 | if (offset < 0x010000) |
| 1279 | 1285 | /* Read RAM */ |
| r6507 | r6508 | |
| 1446 | 1452 | /* 4 KiB page size */ |
| 1447 | 1453 | offset = (mapper_reg + (offset & 0x0fff)) & 0x00ffffff; |
| 1448 | 1454 | |
| 1455 | #if 0 |
| 1449 | 1456 | /* test write protect */ |
| 1450 | | /*if (mapper_reg & 0x80000000) |
| 1451 | | ;*/ |
| 1457 | if (mapper_reg & 0x80000000) |
| 1458 | ; |
| 1459 | #endif |
| 1452 | 1460 | |
| 1453 | 1461 | if (offset < 0x010000) |
| 1454 | 1462 | { /* Write RAM */ |
| r6507 | r6508 | |
| 2066 | 2074 | } |
| 2067 | 2075 | |
| 2068 | 2076 | /* we don't take CS2 into account, as CS2 is a write-only unit */ |
| 2069 | | /*if (cassette_input(devtag_get_device(device->machine, "cassette1")) > 0) |
| 2070 | | answer |= 8;*/ |
| 2077 | #if 0 |
| 2078 | if (cassette_input(devtag_get_device(device->machine, "cassette1")) > 0) |
| 2079 | answer |= 8; |
| 2080 | #endif |
| 2071 | 2081 | |
| 2072 | 2082 | return answer; |
| 2073 | 2083 | } |
| r6507 | r6508 | |
| 2202 | 2212 | } |
| 2203 | 2213 | |
| 2204 | 2214 | /* we don't take CS2 into account, as CS2 is a write-only unit */ |
| 2205 | | /*if (cassette_input(devtag_get_device(machine, "cassette")) > 0) |
| 2206 | | answer |= 8;*/ |
| 2215 | #if 0 |
| 2216 | if (cassette_input(devtag_get_device(machine, "cassette")) > 0) |
| 2217 | answer |= 8; |
| 2218 | #endif |
| 2207 | 2219 | |
| 2208 | 2220 | return answer; |
| 2209 | 2221 | } |
| r6507 | r6508 | |
| 2634 | 2646 | int i; |
| 2635 | 2647 | |
| 2636 | 2648 | /* Not required at run-time */ |
| 2637 | | /*memory_install_read16_handler(space, 0x2000, 0x2fff, SMH_BANK(3)); |
| 2649 | #if 0 |
| 2650 | memory_install_read16_handler(space, 0x2000, 0x2fff, SMH_BANK(3)); |
| 2638 | 2651 | memory_install_write16_handler(space, 0x2000, 0x2fff, SMH_BANK(3)); |
| 2639 | 2652 | memory_install_read16_handler(space, 0x3000, 0x3fff, SMH_BANK(4)); |
| 2640 | 2653 | memory_install_write16_handler(space, 0x3000, 0x3fff, SMH_BANK(4)); |
| r6507 | r6508 | |
| 2649 | 2662 | memory_install_read16_handler(space, 0xe000, 0xefff, SMH_BANK(9)); |
| 2650 | 2663 | memory_install_write16_handler(space, 0xe000, 0xefff, SMH_BANK(9)); |
| 2651 | 2664 | memory_install_read16_handler(space, 0xf000, 0xffff, SMH_BANK(10)); |
| 2652 | | memory_install_write16_handler(space, 0xf000, 0xffff, SMH_BANK(10));*/ |
| 2665 | memory_install_write16_handler(space, 0xf000, 0xffff, SMH_BANK(10)); |
| 2666 | #endif |
| 2653 | 2667 | |
| 2654 | 2668 | ti99_peb_set_16bit_card_handlers(0x1e00, & ti99_4p_mapper_handlers); |
| 2655 | 2669 | |
src/mess/drivers/cdi.c
| r6507 | r6508 | |
| 3187 | 3187 | cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); |
| 3188 | 3188 | } |
| 3189 | 3189 | } |
| 3190 | | /* |
| 3190 | #if 0 |
| 3191 | 3191 | if(mcd212_regs.channel[1].csrr & MCD212_CSR2R_IT2) |
| 3192 | 3192 | { |
| 3193 | 3193 | UINT8 interrupt = scc68070_regs.lir & 7; |
| r6507 | r6508 | |
| 3197 | 3197 | cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); |
| 3198 | 3198 | } |
| 3199 | 3199 | } |
| 3200 | | */ |
| 3200 | #endif |
| 3201 | 3201 | break; |
| 3202 | 3202 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: // RELOAD DISPLAY PARAMETERS |
| 3203 | 3203 | verboselog(machine, 6, "%08x: %08x: ICA %d: RELOAD DISPLAY PARAMETERS\n", addr * 2 + channel * 0x200000, cmd, channel ); |
| r6507 | r6508 | |
| 3276 | 3276 | cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); |
| 3277 | 3277 | } |
| 3278 | 3278 | } |
| 3279 | | /* |
| 3279 | #if 0 |
| 3280 | 3280 | if(mcd212_regs.channel[1].csrr & MCD212_CSR2R_IT2) |
| 3281 | 3281 | { |
| 3282 | 3282 | UINT8 interrupt = scc68070_regs.lir & 7; |
| r6507 | r6508 | |
| 3286 | 3286 | cputag_set_input_line(machine, "maincpu", M68K_IRQ_1 + (interrupt - 1), ASSERT_LINE); |
| 3287 | 3287 | } |
| 3288 | 3288 | } |
| 3289 | | */ |
| 3289 | #endif |
| 3290 | 3290 | break; |
| 3291 | 3291 | case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f: // RELOAD DISPLAY PARAMETERS |
| 3292 | 3292 | verboselog(machine, 6, "%08x: %08x: DCA %d: RELOAD DISPLAY PARAMETERS\n", addr * 2 + channel * 0x200000, cmd, channel ); |
src/mess/drivers/x68k.c
| r6507 | r6508 | |
| 186 | 186 | x68k_sys.mfp.irqline = 6; // MFP is connected to 68000 IRQ line 6 |
| 187 | 187 | x68k_sys.mfp.current_irq = -1; // No current interrupt |
| 188 | 188 | |
| 189 | | /* mfp_timer[0] = timer_alloc(machine, mfp_timer_a_callback, NULL); |
| 189 | #if 0 |
| 190 | mfp_timer[0] = timer_alloc(machine, mfp_timer_a_callback, NULL); |
| 190 | 191 | mfp_timer[1] = timer_alloc(machine, mfp_timer_b_callback, NULL); |
| 191 | 192 | mfp_timer[2] = timer_alloc(machine, mfp_timer_c_callback, NULL); |
| 192 | 193 | mfp_timer[3] = timer_alloc(machine, mfp_timer_d_callback, NULL); |
| 193 | 194 | mfp_irq = timer_alloc(machine, mfp_update_irq, NULL); |
| 194 | 195 | timer_adjust_periodic(mfp_irq, attotime_zero, 0, ATTOTIME_IN_USEC(32)); |
| 195 | | */ |
| 196 | #endif |
| 196 | 197 | } |
| 197 | 198 | |
| 198 | 199 | #ifdef UNUSED_FUNCTION |
| r6507 | r6508 | |
| 1261 | 1262 | } |
| 1262 | 1263 | } |
| 1263 | 1264 | |
| 1264 | | /*static READ16_HANDLER( x68k_mfp_r ) |
| 1265 | #ifdef UNUSED_FUNCTION |
| 1266 | static READ16_HANDLER( x68k_mfp_r ) |
| 1265 | 1267 | { |
| 1266 | | const device_config *x68k_mfp = devtag_get_device(space->machine, MC68901_TAG); |
| 1268 | const device_config *x68k_mfp = devtag_get_device(space->machine, MC68901_TAG); |
| 1267 | 1269 | |
| 1268 | | return mc68901_register_r(x68k_mfp, offset); |
| 1269 | | }*/ |
| 1270 | return mc68901_register_r(x68k_mfp, offset); |
| 1271 | } |
| 1272 | #endif |
| 1270 | 1273 | |
| 1271 | 1274 | static READ16_HANDLER( x68k_mfp_r ) |
| 1272 | 1275 | { |
| r6507 | r6508 | |
| 1276 | 1279 | // logerror("MFP: [%08x] Reading offset %i\n",cpu_get_pc(space->cpu),offset); |
| 1277 | 1280 | switch(offset) |
| 1278 | 1281 | { |
| 1279 | | /* case 0x00: // GPIP - General purpose I/O register (read-only) |
| 1282 | #if 0 |
| 1283 | case 0x00: // GPIP - General purpose I/O register (read-only) |
| 1280 | 1284 | ret = 0x23; |
| 1281 | 1285 | if(video_screen_get_vpos(machine->primary_screen) == x68k_sys.crtc.reg[9]) |
| 1282 | 1286 | ret |= 0x40; |
| r6507 | r6508 | |
| 1317 | 1321 | case 17: // TCDR |
| 1318 | 1322 | return x68k_sys.mfp.timer[2].counter; |
| 1319 | 1323 | case 18: // TDDR |
| 1320 | | return x68k_sys.mfp.timer[3].counter;*/ |
| 1324 | return x68k_sys.mfp.timer[3].counter; |
| 1325 | #endif |
| 1321 | 1326 | case 21: // RSR |
| 1322 | 1327 | return x68k_sys.mfp.rsr; |
| 1323 | 1328 | case 22: // TSR |
| r6507 | r6508 | |
| 1354 | 1359 | */ |
| 1355 | 1360 | switch(offset) |
| 1356 | 1361 | { |
| 1357 | | /* case 0: // GPDR |
| 1362 | #if 0 |
| 1363 | case 0: // GPDR |
| 1358 | 1364 | // All bits are inputs generally, so no action taken. |
| 1359 | 1365 | break; |
| 1360 | 1366 | case 1: // AER |
| r6507 | r6508 | |
| 1431 | 1437 | break; |
| 1432 | 1438 | case 20: |
| 1433 | 1439 | x68k_sys.mfp.ucr = data; |
| 1434 | | break;*/ |
| 1440 | break; |
| 1441 | #endif |
| 1435 | 1442 | case 21: |
| 1436 | 1443 | if(data & 0x01) |
| 1437 | 1444 | x68k_sys.mfp.usart.recv_enable = 1; |
| r6507 | r6508 | |
| 1512 | 1519 | // return 0x0000; |
| 1513 | 1520 | if(offset == 0x08/2) |
| 1514 | 1521 | return messram_get_size(devtag_get_device(space->machine, "messram")) >> 16; // RAM size |
| 1515 | | /*if(offset == 0x46/2) |
| 1522 | #if 0 |
| 1523 | if(offset == 0x46/2) |
| 1516 | 1524 | return 0x0024; |
| 1517 | 1525 | if(offset == 0x6e/2) |
| 1518 | 1526 | return 0xff00; |
| 1519 | 1527 | if(offset == 0x70/2) |
| 1520 | | return 0x0700;*/ |
| 1528 | return 0x0700; |
| 1529 | #endif |
| 1521 | 1530 | return space->machine->generic.nvram.u16[offset]; |
| 1522 | 1531 | } |
| 1523 | 1532 | |
| r6507 | r6508 | |
| 1525 | 1534 | { |
| 1526 | 1535 | if(offset == 0x08/4) |
| 1527 | 1536 | return (messram_get_size(devtag_get_device(space->machine, "messram")) & 0xffff0000); // RAM size |
| 1528 | | /*if(offset == 0x46/2) |
| 1537 | #if 0 |
| 1538 | if(offset == 0x46/2) |
| 1529 | 1539 | return 0x0024; |
| 1530 | 1540 | if(offset == 0x6e/2) |
| 1531 | 1541 | return 0xff00; |
| 1532 | 1542 | if(offset == 0x70/2) |
| 1533 | | return 0x0700;*/ |
| 1543 | return 0x0700; |
| 1544 | #endif |
| 1534 | 1545 | return space->machine->generic.nvram.u32[offset]; |
| 1535 | 1546 | } |
| 1536 | 1547 | |