src/mess/drivers/x1.c
| r5604 | r5605 | |
| 15 | 15 | - x1turbo: understand how irq generation works for the ym-2151; |
| 16 | 16 | - There are various unclear video things, these are: |
| 17 | 17 | - Understand why some games still doesn't upload the proper PCG index; |
| 18 | | - Implement PCG reading, used by Maison Ikkoku, Mule and Gyajiko for kanji reading; |
| 18 | - Implement PCG reading, used by Maison Ikkoku, Mule and Gyajiko for kanji reading. |
| 19 | Is there a way to select which ROM to use? |
| 19 | 20 | - Implement the scrn regs; |
| 20 | 21 | - Interlace mode? |
| 21 | | - Some colors are still way wrong (check 1942 or Dialide), needs update_partial perhaps? |
| 22 | | - Maybe the colorram/videoram stuff is actually a converter for the BRG framebuffer in |
| 23 | | the end? |
| 24 | 22 | - Implement the new features of the x1turbo, namely the 4096 color feature amongst other |
| 25 | 23 | things |
| 26 | 24 | - (anything else?) |
| r5604 | r5605 | |
| 29 | 27 | - Bosconian: title screen background is completely white because it reverts the pen used |
| 30 | 28 | (it's gray in the Arcade version),could be either flickering for pseudo-alpha effect or it's |
| 31 | 29 | a btanb; |
| 32 | | - Super Mario Bros. SP: background color is black, should be blue. DMA issue? |
| 33 | | - Mappy (New Version): has color issues, should be identical to the Arcade version, sets PLY reg == 0xe; |
| 34 | | - Gradius: PCG tiles should be 16 colors or use the entire 8 color range, it's sure that the current palette |
| 35 | | bank isn't right (it's ok for the bitmaps only) |
| 36 | 30 | |
| 37 | 31 | Notes: |
| 38 | 32 | - An interesting feature of the Sharp X-1 is the extended i/o bank. When the ppi port c bit 5 |
| r5604 | r5605 | |
| 528 | 522 | |
| 529 | 523 | static WRITE8_HANDLER( sub_io_w ) |
| 530 | 524 | { |
| 525 | mame_system_time systime; |
| 526 | mame_get_base_datetime(space->machine, &systime); |
| 531 | 527 | /* TODO: check sub-routine at $10e */ |
| 532 | 528 | /* $17a -> floppy? */ |
| 533 | 529 | /* $094 -> ROM */ |
| r5604 | r5605 | |
| 574 | 570 | sub_cmd_length = 1; |
| 575 | 571 | logerror("CMT: Command 0xEB received, returning 0x%02x.\n",sub_val[0]); |
| 576 | 572 | break; |
| 577 | | case 0xed: |
| 573 | case 0xed: //get date |
| 574 | sub_val[0] = ((systime.local_time.mday / 10)<<4) | ((systime.local_time.mday % 10) & 0xf); |
| 575 | sub_val[1] = ((systime.local_time.month+1)<<4) | ((systime.local_time.weekday % 10) & 0xf); |
| 576 | sub_val[2] = (((systime.local_time.year % 100)/10)<<4) | ((systime.local_time.year % 10) & 0xf); |
| 578 | 577 | sub_cmd_length = 3; |
| 579 | 578 | break; |
| 580 | | case 0xef: |
| 579 | case 0xef: //get time |
| 580 | sub_val[0] = ((systime.local_time.hour / 10)<<4) | ((systime.local_time.hour % 10) & 0xf); |
| 581 | sub_val[1] = ((systime.local_time.minute / 10)<<4) | ((systime.local_time.minute % 10) & 0xf); |
| 582 | sub_val[2] = ((systime.local_time.second / 10)<<4) | ((systime.local_time.second % 10) & 0xf); |
| 581 | 583 | sub_cmd_length = 3; |
| 582 | 584 | break; |
| 583 | | //case 0xeb: sub_val = test; break; //used on device select |
| 584 | | //case 0xed: sub_val = test; break; |
| 585 | | //case 0xef: sub_val = test; break; //used on timer select? |
| 586 | 585 | #if 0 |
| 587 | 586 | default: |
| 588 | 587 | { |
| r5604 | r5605 | |
| 756 | 755 | |
| 757 | 756 | static READ8_HANDLER( x1_pcg_r ) |
| 758 | 757 | { |
| 759 | | #if 0 |
| 760 | 758 | int addr; |
| 761 | | UINT8 *BIOS_ROM = memory_region(space->machine, "cgrom"); |
| 762 | | static UINT8 bios_offset,res; |
| 759 | int calc_pcg_offset; |
| 760 | static UINT8 bios_offset,pcg_index_r[3],res; |
| 761 | UINT8 *gfx_data; |
| 763 | 762 | |
| 764 | 763 | addr = (offset & 0x300) >> 8; |
| 765 | 764 | |
| 766 | 765 | if(addr == 0) |
| 767 | 766 | { |
| 768 | | /* TODO: requires an offset conversion */ |
| 769 | | res = BIOS_ROM[0x1800+bios_offset+(pcg_write_addr*0x10)]; |
| 767 | gfx_data = memory_region(space->machine, "cgrom"); |
| 768 | res = gfx_data[0x0000+bios_offset+(pcg_write_addr*8)]; |
| 770 | 769 | |
| 771 | 770 | bios_offset++; |
| 772 | | bios_offset&=0xf; |
| 771 | bios_offset&=0x7; |
| 773 | 772 | return res; |
| 774 | 773 | } |
| 775 | 774 | else |
| 776 | 775 | { |
| 777 | | //... |
| 778 | | } |
| 779 | | #endif |
| 776 | gfx_data = memory_region(space->machine, "pcg"); |
| 777 | calc_pcg_offset = (pcg_index_r[addr-1]) | ((addr-1)*0x800); |
| 778 | res = gfx_data[0x0000+calc_pcg_offset+(pcg_write_addr*8)]; |
| 780 | 779 | |
| 780 | pcg_index_r[addr-1]++; |
| 781 | pcg_index_r[addr-1]&=0x7; |
| 782 | return res; |
| 783 | } |
| 784 | |
| 781 | 785 | return mame_rand(space->machine); |
| 782 | 786 | } |
| 783 | 787 | |
| r5604 | r5605 | |
| 1654 | 1658 | old_key2 = key2; |
| 1655 | 1659 | old_key3 = key3; |
| 1656 | 1660 | old_key4 = key4; |
| 1657 | | } |
| 1661 | } |
| 1658 | 1662 | } |
| 1659 | 1663 | } |
| 1660 | 1664 | |