Previous 15994 Revisions Next

r5605 Sunday 6th September, 2009 at 12:14:14 UTC by Angelo Salese
[X1]: Added basic PCG reading and RTC feature
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r5604r5605
1515   - x1turbo: understand how irq generation works for the ym-2151;
1616   - There are various unclear video things, these are:
1717      - 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?
1920      - Implement the scrn regs;
2021      - 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?
2422      - Implement the new features of the x1turbo, namely the 4096 color feature amongst other
2523        things
2624      - (anything else?)
r5604r5605
2927   - Bosconian: title screen background is completely white because it reverts the pen used
3028     (it's gray in the Arcade version),could be either flickering for pseudo-alpha effect or it's
3129     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)
3630
3731   Notes:
3832   - An interesting feature of the Sharp X-1 is the extended i/o bank. When the ppi port c bit 5
r5604r5605
528522
529523static WRITE8_HANDLER( sub_io_w )
530524{
525   mame_system_time systime;
526   mame_get_base_datetime(space->machine, &systime);
531527   /* TODO: check sub-routine at $10e */
532528   /* $17a -> floppy? */
533529   /* $094 -> ROM */
r5604r5605
574570         sub_cmd_length = 1;
575571         logerror("CMT: Command 0xEB received, returning 0x%02x.\n",sub_val[0]);
576572         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);
578577         sub_cmd_length = 3;
579578         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);
581583         sub_cmd_length = 3;
582584         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?
586585      #if 0
587586      default:
588587      {
r5604r5605
756755
757756static READ8_HANDLER( x1_pcg_r )
758757{
759   #if 0
760758   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;
763762
764763   addr = (offset & 0x300) >> 8;
765764
766765   if(addr == 0)
767766   {
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)];
770769
771770      bios_offset++;
772      bios_offset&=0xf;
771      bios_offset&=0x7;
773772      return res;
774773   }
775774   else
776775   {
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)];
780779
780       pcg_index_r[addr-1]++;
781      pcg_index_r[addr-1]&=0x7;
782       return res;
783    }
784
781785   return mame_rand(space->machine);
782786}
783787
r5604r5605
16541658         old_key2 = key2;
16551659         old_key3 = key3;
16561660         old_key4 = key4;
1657      }
1661      }
16581662   }
16591663}
16601664

Previous 15994 Revisions Next


© 1998-2018 The MESS Team