Previous 15994 Revisions Next

r9392 Friday 15th October, 2010 at 14:55:20 UTC by Angelo Salese
[Mega CD]: Updated notes [David Haywood]
[src/mame/drivers]megadriv.c

src/mame/drivers/megadriv.c
r9391r9392
39373937         ((segacd_maincpu_has_ram_access) << 0);
39383938}
39393939
3940
3941/* I'm still not 100% clear how this works, the sources I have are a bit vague,
3942   it might still be incorrect in both modes
3943 */
3944
3945// DMNA = Decleration Mainram No Access (bit 0)
3946// RET = Return access (bit 1)
3947
3948/* In Mode 0
3949
3950*/
3951
3952/* In Mode 1
3953
3954
3955RET
3956
39570 = Main CPU Accesses WordRam0 (1st Half of WordRAM)
3958    Sub CPU  Accesses WordRam1 (2nd Half of WordRAM)
3959   
39601 = Main CPU Accesses WordRam1 (2nd Half of WordRAM)
3961    Sub  CPU Accesses WordRam0 (1st Half of WordRAM)
3962   
3963DMNA
3964
3965Setting this bis sends a Swap request to the SUB-CPU (Main CPU access only?)
3966  1 = Swap Reqested / In Progress
3967  0 = Swap Complete
3968
3969 (personal note, is this just a software flag? in this mode? sub p11/p12)
3970
3971*/
3972
39403973static WRITE16_HANDLER( scd_a12002_memory_mode_w )
39413974{
39423975   //printf("scd_a12002_memory_mode_w %04x %04x\n", data, mem_mask);
r9391r9392
39473980      //if (data&0x0001) printf("ret bit set (invalid? can't set from main68k?)\n");
39483981      if (data&0x0002)
39493982      {
3950         //printf("dmn set (swap requested)\n"); // give ram to sub?
3983         //printf("dmna set (swap requested)\n"); // give ram to sub?
39513984
39523985         // this should take some time?
39533986         segacd_maincpu_has_ram_access = 0;
r9391r9392
40024035      }
40034036
40044037
4005      //if (data&0x0002) printf("dmn set (swap requested) (invalid, can't be set from sub68k?\n");
4038      //if (data&0x0002) printf("dmna set (swap requested) (invalid, can't be set from sub68k?\n");
40064039
40074040      //if (data&0x0004)
40084041      {
r9391r9392
42824315   }
42834316   else if (segacd_ram_mode==1)
42844317   {
4285      printf("Unspported: segacd_main_dataram_part1_r in mode 1\n");
4286      return 0x0000;
4318
4319      if (offset<0x20000/2)
4320      {
4321         // wordram accees
4322         printf("Unspported: segacd_main_dataram_part1_r (word RAM) in mode 1\n");
4323         return 0x0000;
4324      }
4325      else
4326      {
4327         printf("Unspported: segacd_main_dataram_part1_r (Cell rearranged RAM) in mode 1\n");
4328         return 0x0000;
4329      }     
42874330   }
42884331
42894332   return 0x0000;
r9391r9392
43064349   }
43074350   else if (segacd_ram_mode==1)
43084351   {
4309      printf("Unspported: segacd_main_dataram_part1_w in mode 1\n");
4352      if (offset<0x20000/2)
4353      {
4354         printf("Unspported: segacd_main_dataram_part1_w (word RAM) in mode 1\n");
4355         // wordram accees
4356      }
4357      else
4358      {
4359         printf("Unspported: segacd_main_dataram_part1_w (Cell rearranged RAM) in mode 1 (illega?)\n"); // is this legal??
4360      }     
43104361   }
43114362}
43124363
r9391r9392
49865037   }
49875038   else if (segacd_ram_mode==1)
49885039   {
4989      printf("Unspported: segacd_sub_dataram_part1_r in mode 1\n");
5040      printf("Unspported: segacd_sub_dataram_part1_r in mode 1 (Word RAM Expander - 1 Byte Per Pixel)\n");
49905041      return 0x0000;
49915042   }
49925043
r9391r9392
50105061   }
50115062   else if (segacd_ram_mode==1)
50125063   {
5013      printf("Unspported: segacd_sub_dataram_part1_w in mode 1\n");
5064      printf("Unspported: segacd_sub_dataram_part1_w in mode 1 (Word RAM Expander - 1 Byte Per Pixel)\n");
50145065   }
50155066}
50165067
r9391r9392
50185069{
50195070   if (segacd_ram_mode==0)
50205071   {
5021      printf("ILLEGAL segacd_sub_dataram_part2_r in mode 1\n");
5072      printf("ILLEGAL segacd_sub_dataram_part2_r in mode 0\n"); // not mapepd to anything in mode 0
50225073      return 0x0000;
50235074   }
50245075   else if (segacd_ram_mode==1)
50255076   {
5026      printf("Unspported: segacd_sub_dataram_part2_r in mode 1\n");
5077      printf("Unspported: segacd_sub_dataram_part2_r in mode 1 (Word RAM)\n");
50275078      return 0x0000;
50285079   }
50295080
r9391r9392
50345085{
50355086   if (segacd_ram_mode==0)
50365087   {
5037      printf("ILLEGAL segacd_sub_dataram_part2_w in mode 1\n");
5088      printf("ILLEGAL segacd_sub_dataram_part2_w in mode 0\n"); // not mapepd to anything in mode 0
50385089   }
50395090   else if (segacd_ram_mode==1)
50405091   {
5041      printf("Unsupported: segacd_sub_dataram_part2_w in mode 1\n");
5092      printf("Unsupported: segacd_sub_dataram_part2_w in mode 1 (Word RAM)\n");
50425093   }
50435094}
50445095

Previous 15994 Revisions Next


© 1998-2018 The MESS Team