Previous 15994 Revisions Next

r9543 Monday 8th November, 2010 at 19:19:23 UTC by Michael Zapf
srcclean, ti99_8/mapper8: handling peribox as a mapped device
[src/mess/drivers]ti99_4p.c ti99_4x.c ti99_8.c
[src/mess/machine/ti99]mapper8.c

src/mess/machine/ti99/mapper8.c
r9542r9543
174174         mapper->logcomp[index].write_select = write_sel;
175175         mapper->logcomp[index].read_byte = read;
176176         mapper->logcomp[index].write_byte = write;
177         // printf("registering the device at logical position %d, device %lx\n", index, busdevice);
177         logerror("ti99_8: registering a device at logical position %d\n", index);
178178      }
179179   }
180180   else
r9542r9543
197197         mapper->physcomp[index].select = address_bits;
198198         mapper->physcomp[index].read_byte = read;
199199         mapper->physcomp[index].write_byte = write;
200         // printf("registering the device at physical position %d, device %lx\n", index, busdevice);
200         logerror("ti99_8: registering a device at physical position %d\n", index);
201201      }
202202   }
203203   else
r9542r9543
214214{
215215   mapper8_state *mapper = get_safe_token(device);
216216   int found = FALSE;
217   // printf("ti99_8: read access %04x ... ", offset);
218217   // Look for components responding to the logical address
219218   for (int i=0; i < MAXLOGDEV; i++)
220219   {
r9542r9543
229228               if (adev->device == MAP8_SRAM)
230229               {
231230                  *value = mapper->sram[offset & ~adev->address_mask];
232                  // printf("sram");
233231                  found = TRUE;
234232               }
235233               else
r9542r9543
238236                  {
239237                     // Starts at 0000
240238                     *value = mapper->rom[offset & ~adev->address_mask];
241                     // printf("rom0");
242239                     found = TRUE;
243240                  }
244241                  else
r9542r9543
246243                     // device
247244                     if (adev->read_byte != NULL)
248245                     {
249                        // printf("device ");
250246                        adev->read_byte(adev->device, offset, value);
251247                        found = TRUE;
252248                     }
r9542r9543
265261   mapper8_state *mapper = get_safe_token(device);
266262   int found = FALSE;
267263
268   // printf("ti99_8: write access %04x ... ", offset);
269264   for (int i=0; i < MAXLOGDEV; i++)
270265   {
271266      log_addressed_device *adev = &mapper->logcomp[i];
r9542r9543
279274               if (adev->device == MAP8_SRAM)
280275               {
281276                  mapper->sram[offset & ~adev->address_mask] = data;
282                  // printf("sram");
283277                  found = TRUE;
284278               }
285279               else
286280               {
287281                  if (adev->device == MAP8_ROM0)
288282                  {
289                     // printf("rom0 (ignored)");
290283                     found = TRUE;
291284                  }
292285                  else
293286                  {
294287                     if (adev->write_byte != NULL)
295288                     {
296                        // printf("device ");
297289                        adev->write_byte(adev->device, offset, data);
298290                        found = TRUE;
299291                     }
r9542r9543
323315
324316   if (!found)
325317   {
326      // printf(" not logical ...");
327318      // In that case, the address decoder could not find a suitable device.
328319      // This means the logical address is transformed by the mapper.
329320      UINT32   pas_address = mapper->pas_offset[(offset & 0xf000)>>12] + (offset & 0xfff);
330      // printf("%08x ", pas_address);
331321
332322      // So now let's do the same as above with physical addresses
333323      for (int i=0; i < MAXPHYSDEV; i++)
r9542r9543
340330               if (adev->device == MAP8_DRAM)
341331               {
342332                  value = mapper->dram[pas_address & ~adev->address_mask];
343                  found = TRUE;
344                  // printf("dram");
345333               }
346334               else
347335               {
r9542r9543
349337                  {
350338                     // Starts at 2000 in the image, 8K
351339                     value = mapper->rom[0x2000 + (pas_address & 0x1fff)];
352                     found = TRUE;
353                     // printf("rom1");
354340                  }
355341                  else
356342                  {
r9542r9543
358344                     {
359345                        // Starts at 6000 in the image, 8K
360346                        value = mapper->rom[0x6000 + (pas_address & 0x1fff)];
361                        found = TRUE;
362                        // printf("rom1a");
363347                     }
364348                     else
365349                     {
366350                        if (adev->device == MAP8_INTS)
367351                        {
368352                           // Interrupt sense
369                           // printf("ti99_8: ILSENSE not implemented.\n");
370                           // printf("sense");
371                           found = TRUE;
353                           logerror("ti99_8: ILSENSE not implemented.\n");
372354                        }
373355                        else
374356                        {
375                           // only one option left: cartridge port (aka grom port)
357                           // devices
376358                           if (adev->read_byte != NULL)
377359                           {
378                              // printf("pdevice ");
379360                              adev->read_byte(adev->device, pas_address, &value);
380                              found = TRUE;
381361                           }
382362                        }
383363                     }
384364                  }
385365               }
366               if (adev->stop) break;
386367            }
387368         }
388         if (found && adev->stop) break;
389369      }
390
391      if (!found)
392      {
393         // Still not found? Then we route the physical address to the I/O port
394         // which has the peribox attached
395         // printf("not mapped ... ioport");
396         if (mapper->ioport!=NULL)
397            ti99_peb_data_rz(mapper->ioport, pas_address, &value);
398         // printf("ti99_8: io read %04x = %02x\n", offset, value);
399      }
400370   }
401   // printf(" %02x\n", value);
402371
403372   return value;
404373}
r9542r9543
412381   int found = FALSE;
413382   if (mapper->sram==NULL)
414383      return;
415//  // printf("ti99_8: write %04x = %02x\n", offset, data);
416384
417385   // Look for components responding to the logical address
418386   found = check_logically_addressed_w(device, offset, data);
419387
420388   if (!found)
421389   {
422      // printf(" not logical ...");
423390      // In that case, the address decoder could not find a suitable device.
424391      // This means the logical address is transformed by the mapper.
425392      UINT32 pas_address = mapper->pas_offset[(offset & 0xf000)>>12] + (offset & 0xfff);
r9542r9543
435402               if (adev->device == MAP8_DRAM)
436403               {
437404                  mapper->dram[pas_address & ~adev->address_mask] = data;
438                  // printf("dram base %08x", pas_address);
439                  found = TRUE;
440405               }
441406               else
442407               {
443408                  if (adev->device == MAP8_ROM1 || adev->device == MAP8_ROM1A)
444409                  {
445                     // printf("rom1 (ignored)");
446                     found = TRUE;
410                     logerror("ti99_8: write to rom1 ignored\n");
447411                  }
448412                  else
449413                  {
450414                     if (adev->device == MAP8_INTS)
451415                     {
452416                        // Interrupt sense
453                        // printf("ilsense (ignored)");
454                        found = TRUE;
417                        logerror("ti99_8: write to ilsense ignored\n");
455418                     }
456419                     else
457420                     {
458                        // only one option left: cartridge port (aka grom port)
421                        // cartridge port (aka grom port) or peribox
459422                        if (adev->write_byte != NULL)
460423                        {
461                           // printf("pdevice ");
462424                           adev->write_byte(adev->device, pas_address, data);
463                           found = TRUE;
464425                        }
465426                     }
466427                  }
467428               }
429               if (adev->stop) break;
468430            }
469431         }
470         if (found && adev->stop) break;
471432      }
472
473      if (!found)
474      {
475         // Still not found? Then we route the physical address to the I/O port
476         // which has the peribox attached
477         // printf("not mapped ... ioport");
478         if (mapper->ioport!=NULL)
479            ti99_peb_data_w(mapper->ioport, pas_address, data);
480         // printf("ti99_8: io write %04x = %02x\n", offset, data);
481      }
482433   }
483   // printf(" %02x\n", data);
484434}
485435
486436/*
r9542r9543
498448      int bankindx = (data & 0x0e)>>1;
499449      if (data & 1)
500450      {
501         // printf("mapper8: load from sram bank %02x", bankindx);
502451         // Load from SRAM
503452         for (int i=0; i < 16; i++)
504453         {
r9542r9543
508457               + (mapper->sram[i*4 + ptr+1] << 16)
509458               + (mapper->sram[i*4 + ptr+2] << 8)
510459               + (mapper->sram[i*4 + ptr+3]);
511//              // printf(" values (%04x) %02x %02x %02x %02x, ", i*4+ptr, mapper->sram[i*4 + ptr], mapper->sram[i*4 + ptr+1], mapper->sram[i*4 + ptr+2], mapper->sram[i*4 + ptr+3]);
512460         }
513461      }
514462      else
515463      {
516464         // Store in SRAM
517         // printf("mapper8: copy to sram bank %02x", bankindx);
518465         for (int i=0; i < 16; i++)
519466         {
520467            int ptr = (bankindx << 6);
r9542r9543
540487      //  Starts at 0x4000 in the image
541488      *value = mapper->rom[0x4000 + (offset & 0x1fff)];
542489   }
543   else
544   {
545      if (mapper->ioport!=NULL)
546         ti99_peb_data_rz(mapper->ioport, 0x4000 + (offset & 0x1fff), value);
547//      printf("ti99_8: io1 read %04x = %02x\n", offset, *value);
548   }
549490}
550491
551492
r9542r9543
564505      if (addr==2)
565506      {
566507         // TODO
567         // printf("ti-99/8: Hardware reset via CRU\n");
508         logerror("ti99_8: Hardware reset via CRU not implemented\n");
568509      }
569510   }
570511}
r9542r9543
573514{
574515   mapper8_state *mapper = get_safe_token(device);
575516   mapper->CRUS = data;
576   // printf("ti99_8: CRUS = %02x\n", data);
577517}
578518
579519WRITE8_DEVICE_HANDLER( mapper8_PTGEN_w )
580520{
581521   mapper8_state *mapper = get_safe_token(device);
582522   mapper->PTGEN = data;
583   // printf("ti99_8: PTGEN = %02x\n", data);
584523}
585524
586525/***************************************************************************
r9542r9543
589528
590529static DEVICE_START( mapper8 )
591530{
592//  // printf("Starting mapper\n");
531   logerror("ti99_8: Starting mapper\n");
593532   mapper8_state *mapper = get_safe_token(device);
594533   mapper->sram = (UINT8*)malloc(SRAM_SIZE);
595534   mapper->dram = (UINT8*)malloc(DRAM_SIZE);
596535   mapper->rom = memory_region(device->machine, "maincpu");
597536
537   memset(mapper->sram, 0x00, SRAM_SIZE);
538   memset(mapper->dram, 0x00, DRAM_SIZE);
539
598540   int i = 0;
599541   int done=FALSE;
600542
r9542r9543
627569      {
628570         for (int j=1; (j < 7) && (dev == NULL); j++)
629571         {
630            // printf("%s, %s\n", cons[i].name, list[j-1]);
631572            if (strcmp(cons[i].name, list[j-1])==0)
632573               dev = (void *)j;
633574         }
r9542r9543
658599
659600static DEVICE_STOP( mapper8 )
660601{
661   // printf("Stopping mapper\n");
602   logerror("ti99_8: Stopping mapper\n");
662603   mapper8_state *mapper = get_safe_token(device);
663604   free(mapper->sram);
664605   free(mapper->dram);
r9542r9543
666607
667608static DEVICE_RESET( mapper8 )
668609{
669   // printf("Resetting mapper\n");
610   logerror("ti99_8: Resetting mapper\n");
670611   mapper8_state *mapper = get_safe_token(device);
671612
672613   mapper->dsr_selected = FALSE;
src/mess/drivers/ti99_8.c
r9542r9543
146146    - INT6*-INT11*: row inputs (int6* is only used for joystick fire)
147147
148148ROM file contents:
149  0000-1fff ROM0            0x0000 (logical address)
149  0000-1fff ROM0                0x0000 (logical address)
150150  2000-3fff ROM1                0xffa000 - 0xffbfff
151  4000-5fff DSR1            0xff4000 (TTS)
151  4000-5fff DSR1                0xff4000 (TTS)
152152  6000-7fff ROM1a               0xffc000 - 0xffdfff
153  8000-9fff DSR2            0xff4000 (missing; Hexbus?)
153  8000-9fff DSR2                0xff4000 (missing; Hexbus?)
154154
155155===========================================================================
156156Known Issues (MZ, 2010-11-07)
157157
158  KEEP IN MIND THAT TEXAS INSTRUMENTS NEVER RELEASED THE TI-99/8 AND THAT
159  THERE ARE ONLY A FEW PROTOTYPES OF THE TI-99/8 AVAILABLE. ALL SOFTWARE
158  KEEP IN MIND THAT TEXAS INSTRUMENTS NEVER RELEASED THE TI-99/8 AND THAT
159  THERE ARE ONLY A FEW PROTOTYPES OF THE TI-99/8 AVAILABLE. ALL SOFTWARE
160160  MUST BE ASSUMED TO HAVE REMAINED IN A PRELIMINARY STATE.
161161
162162- Extended Basic II does not start when a floppy controller is present. This is
163163  a problem of the prototypical XB II which we cannot solve. It seems as if only
164  hexbus devices are properly supported, but we currently do not have an
164  hexbus devices are properly supported, but we currently do not have an
165165  emulation for those. Thus you can currently only use cassette to load and
166  save programs. You MUST turn off the floppy controller support in the
166  save programs. You MUST turn off the floppy controller support in the
167167  configuration before you enter XB II. Other cartridges (like Editor/Assembler)
168  seem to be not affected by this problem and can make use of the floppy
168  seem to be not affected by this problem and can make use of the floppy
169169  controllers.
170170    Technical detail: The designers of XB II seem to have decided to put PABs
171    (Peripheral access block; contains pointers to buffers, the file name, and
171    (Peripheral access block; contains pointers to buffers, the file name, and
172172    the access modes) into CPU RAM instead of the traditional storage in VDP
173    RAM. The existing peripheral cards are hard-coded to interpret the given
174    pointer to the PAB as pointing to a VDP RAM address. That is, as soon as
173    RAM. The existing peripheral cards are hard-coded to interpret the given
174    pointer to the PAB as pointing to a VDP RAM address. That is, as soon as
175175    the card is found, control is passed to the DSR (device service routine),
176176    the file name will not be found, and control returns with an error. It seems
177    as if XB II does not properly handle this situation and may lock up
177    as if XB II does not properly handle this situation and may lock up
178178    (sometimes it starts up, but file access is still not possible).
179179
180180- Multiple cartridges are not shown in the startup screen; only one
181181  cartridge is presented. You have to manually select the cartridges with the
182182  dip switch.
183 
183
184184- Emulation speed may still be incorrect.
185 
185
186186- SAVE and OLD MINIMEM do not work properly in XB II. It seems as if the
187187  mapper shadows the NVRAM of the cartridge. You will lose the contents when
188188  you turn off the machine.
r9542r9543
266266      PORT_DIPSETTING(    0x02, "Slot 2" )
267267      PORT_DIPSETTING(    0x03, "Slot 3" )
268268      PORT_DIPSETTING(    0x04, "Slot 4" )
269     
269
270270   PORT_START( "BWGDIP1" )
271271   PORT_DIPNAME( 0x01, 0x00, "BwG step rate" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 )
272272      PORT_DIPSETTING( 0x00, "6 ms")
r9542r9543
276276   PORT_DIPNAME( 0x01, 0x00, "BwG date/time display" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 )
277277      PORT_DIPSETTING( 0x00, "Hide")
278278      PORT_DIPSETTING( 0x01, "Show")
279     
279
280280   PORT_START( "BWGDIP34" )
281281   PORT_DIPNAME( 0x03, 0x00, "BwG drives" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 )
282282      PORT_DIPSETTING( 0x00, "DSK1 only")
r9542r9543
508508};
509509
510510/*
511   Format:
512   Name, mode, stop, mask, select, write, read8z function, write8 function
513   
514   Multiple devices may have the same select pattern; as in the real hardware,
515   care must be taken that only one device actually responds. In the case of
516   GROMs, each chip has an internal address counter and an ID, and the chip
517   only responds when the ID and the most significant 3 bits match.
511    Format:
512    Name, mode, stop, mask, select, write, read8z function, write8 function
513
514    Multiple devices may have the same select pattern; as in the real hardware,
515    care must be taken that only one device actually responds. In the case of
516    GROMs, each chip has an internal address counter and an ID, and the chip
517    only responds when the ID and the most significant 3 bits match.
518518*/
519519static const mapper8_dev_config mapper_devices[] =
520520{
521521   // TI-99/8 mode
522   { SRAMNAME,         0, 1, 0xf800, 0xf000, 0x0000, NULL,          NULL },
522   { SRAMNAME,         0, 1, 0xf800, 0xf000, 0x0000, NULL,          NULL },
523523   { "soundgen",      0, 1, 0xfff0, 0xf800, 0x0000, NULL,            sn76496_w },
524524   { "video",         0, 1, 0xfffd, 0xf810, 0x0000, ti8_tms991x_rz,   ti8_tms991x_w },
525   { "speech",         0, 1, 0xfff0, 0xf820, 0x0000, ti998spch_rz,    ti998spch_w },
526   { "grom_0",        0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz,       ti99grom_w },
527   { "grom_1",        0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz,      ti99grom_w },
525   { "speech",       0, 1, 0xfff0, 0xf820, 0x0000, ti998spch_rz,    ti998spch_w },
526   { "grom_0",        0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz,      ti99grom_w },
527   { "grom_1",       0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz,      ti99grom_w },
528528   { "grom_2",         0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz,     ti99grom_w },
529529   { "gromport",      0, 0, 0xfff1, 0xf830, 0x0400, gromportg_rz,      gromportg_w, },
530//   { "grom_tts_0",      2, 0, 0xfff1, 0xf840, 0x0000, 0, 0, ti99grom_rz,     ti99grom_w },  // up to 6 GROMs; no good dumps known
531//   { "grom_pcode1_0",    2, 0, 0xfff1, 0xf850, 0x0000, 0, 0, ti99grom_rz,     ti99grom_w },  // up to 6 GROMs; no good dumps known
532//   { "grom_pcode2_0",    2, 0, 0xfff1, 0xf860, 0x0000, 0, 0, ti99grom_rz,     ti99grom_w },  // up to 6 GROMs; no good dumps known
533   { "mapper",         0, 1, 0xfff0, 0xf870, 0x0000, NULL,         ti99_mapreg_w },
530//  { "grom_tts_0",     2, 0, 0xfff1, 0xf840, 0x0000, 0, 0, ti99grom_rz,    ti99grom_w },  // up to 6 GROMs; no good dumps known
531//  { "grom_pcode1_0",  2, 0, 0xfff1, 0xf850, 0x0000, 0, 0, ti99grom_rz,    ti99grom_w },  // up to 6 GROMs; no good dumps known
532//  { "grom_pcode2_0",  2, 0, 0xfff1, 0xf860, 0x0000, 0, 0, ti99grom_rz,    ti99grom_w },  // up to 6 GROMs; no good dumps known
533   { "mapper",       0, 1, 0xfff0, 0xf870, 0x0000, NULL,         ti99_mapreg_w },
534534
535535   // TI-99/4A mode
536536   // GROM: 1001 1000 0000 xxa0
r9542r9543
539539   { "grom_1",        1, 0, 0xfff1, 0x9800, 0x0400, ti99grom_rz,     ti99grom_w },
540540   { "grom_2",        1, 0, 0xfff1, 0x9800, 0x0400, ti99grom_rz,     ti99grom_w },
541541   { "gromport",      1, 0, 0xfff1, 0x9800, 0x0400, gromportg_rz,      gromportg_w, },
542   
543   { "mapper",         1, 1, 0xfff0, 0x8810, 0x0000, NULL,             ti99_mapreg_w },
544   { "soundgen",      1, 1, 0xfff0, 0x8400, 0x0000, NULL,            sn76496_w },
545   { "video",         1, 1, 0xfffd, 0x8800, 0x0400, ti8_tms991x_rz,    ti8_tms991x_w },
546   { "speech",         1, 1, 0xfff0, 0x9000, 0x0400, ti998spch_rz,    ti998spch_w },
547   { SRAMNAME,         1, 1, 0xf800, 0x8000, 0x0000, NULL,            NULL }, // write at the end; soundgen must be found earlier
548542
543   { "mapper",       1, 1, 0xfff0, 0x8810, 0x0000, NULL,            ti99_mapreg_w },
544   { "soundgen",      1, 1, 0xfff0, 0x8400, 0x0000, NULL,           sn76496_w },
545   { "video",         1, 1, 0xfffd, 0x8800, 0x0400, ti8_tms991x_rz,   ti8_tms991x_w },
546   { "speech",       1, 1, 0xfff0, 0x9000, 0x0400, ti998spch_rz,    ti998spch_w },
547   { SRAMNAME,         1, 1, 0xf800, 0x8000, 0x0000, NULL,            NULL }, // write at the end; soundgen must be found earlier
548
549549   // Physical (need to pack this into here as well)
550550   { DRAMNAME,       3, 1, 0xff0000, 0x000000, 0x000000, NULL, NULL },
551   { "mapper",         3, 1, 0xffe000, 0xff4000, 0x000000, ti998dsr_rz, NULL },   // DSR
552   { "gromport",       3, 1, 0xffe000, 0xff6000, 0x000000, gromportr_rz, gromportr_w  },
553   { "gromport",       3, 1, 0xffe000, 0xff8000, 0x000000, gromportr_rz, gromportr_w  },
551   { "mapper",         3, 0, 0xffe000, 0xff4000, 0x000000, ti998dsr_rz, NULL },   // DSR
552   { "gromport",      3, 1, 0xffe000, 0xff6000, 0x000000, gromportr_rz, gromportr_w  },
553   { "gromport",      3, 1, 0xffe000, 0xff8000, 0x000000, gromportr_rz, gromportr_w  },
554554   { ROM1NAME,       3, 1, 0xffe000, 0xffa000, 0x000000, NULL, NULL },
555   { ROM1ANAME,       3, 1, 0xffe000, 0xffc000, 0x000000, NULL, NULL },
556   { INTSNAME,       3, 1, 0xfffff0, 0xffe000, 0x000000, NULL, NULL },   
555   { ROM1ANAME,      3, 1, 0xffe000, 0xffc000, 0x000000, NULL, NULL },
556   { INTSNAME,       3, 1, 0xfffff0, 0xffe000, 0x000000, NULL, NULL },
557   { "peribox",      3, 1, 0x000000, 0x000000, 0x000000, ti99_peb_data_rz, ti99_peb_data_w },
557558
558559   { NULL, 0, 0, 0, 0, 0, NULL, NULL  }
559560};
560561
561static const cruconf_device cru_devices[] =
562static const cruconf_device cru_devices[] =
562563{
563564   { "mapper",    0xfff0, 0x2700, NULL, mapper8c_w },
564   { "gromport",    0xf800, 0x0800, gromportc_rz, gromportc_w },            // Check: Is this really limited?
565   { "peribox",     0x0000, 0x0000, ti99_peb_cru_rz, ti99_peb_cru_w },    // Peribox needs all addresses
565   { "gromport",   0xf800, 0x0800, gromportc_rz, gromportc_w },            // Check: Is this really limited?
566   { "peribox",   0x0000, 0x0000, ti99_peb_cru_rz, ti99_peb_cru_w },    // Peribox needs all addresses
566567   { NULL,       0, 0, NULL, NULL }
567568};
568569
r9542r9543
582583   MDRV_MACHINE_RESET( ti99_8 )
583584
584585   /* video hardware */
585   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9118_interface)   
586   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9118_interface)
586587
587588   MDRV_GFXDECODE(ti99_8)
588589
r9542r9543
627628   MDRV_MACHINE_RESET( ti99_8 )
628629
629630   /* video hardware */
630   MDRV_TI_TMS991x_ADD("video", tms9928a, 50, "screen", 2500, &tms9129_interface)   
631   MDRV_TI_TMS991x_ADD("video", tms9928a, 50, "screen", 2500, &tms9129_interface)
631632
632633   MDRV_GFXDECODE(ti99_8)
633634
r9542r9543
639640   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
640641
641642   MDRV_TISPEECH_ADD("speech")
642   
643
643644   MDRV_MAPPER8_ADD( "mapper", mapper_devices )
644645
645646   /* tms9901 */
src/mess/drivers/ti99_4p.c
r9542r9543
112112      PORT_CONFSETTING(    0x01, "TI RS-232 card" )
113113
114114   PORT_START( "EXTCARD" )
115   PORT_CONFNAME( 0x03, 0x02, "HSGPL extension" )
115   PORT_CONFNAME( 0x03, 0x02, "HSGPL extension" )
116116      PORT_CONFSETTING(    0x01, "Flash" )
117117      PORT_CONFSETTING(    0x02, DEF_STR( On ) )
118118
r9542r9543
129129      PORT_CONFSETTING( 0x01, "Realistic")
130130
131131   PORT_START( "EVPC-SW1" )
132   PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 )
132   PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 )
133133      PORT_DIPSETTING(    0x00, "PAL" )
134134      PORT_DIPSETTING(    0x01, "NTSC" )
135135
136136   PORT_START( "EVPC-SW3" )
137   PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 )
137   PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 )
138138      PORT_DIPSETTING(    0x00, DEF_STR( International ))
139139      PORT_DIPSETTING(    0x01, DEF_STR( German ))
140140
r9542r9543
272272   MDRV_CPU_VBLANK_INT_HACK(ti99_4p_hblank_interrupt, 262)   /* 262.5 in 60Hz, 312.5 in 50Hz */
273273
274274   /* video hardware */
275   MDRV_TI_V9938_ADD("video", 60, "screen", 2500, 512+32, (212+28)*2, tms9901_sg_set_int2)   
275   MDRV_TI_V9938_ADD("video", 60, "screen", 2500, 512+32, (212+28)*2, tms9901_sg_set_int2)
276276
277277   MDRV_MACHINE_START( ti99_4p )
278278   MDRV_MACHINE_RESET( ti99_4p )
src/mess/drivers/ti99_4x.c
r9542r9543
4949   AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAM         /*RAM PAD, mirrored 4 times*/
5050   AM_RANGE(0x8800, 0x8bff) AM_DEVREADWRITE("video", ti_tms991x_r16, ti_video_wnop)   /*vdp read*/
5151   AM_RANGE(0x8C00, 0x8fff) AM_DEVREADWRITE("video", ti_video_rnop, ti_tms991x_w16)   /*vdp write*/
52   AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("datamux_16_8", ti99_dmux_r, ti99_dmux_w)
52   AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("datamux_16_8", ti99_dmux_r, ti99_dmux_w)
5353ADDRESS_MAP_END
5454
5555static ADDRESS_MAP_START(memmap_4ev, ADDRESS_SPACE_PROGRAM, 16)
r9542r9543
5858   AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAM         /*RAM PAD, mirrored 4 times*/
5959   AM_RANGE(0x8800, 0x8bff) AM_DEVREADWRITE("video", ti_v9938_r16, ti_video_wnop)   /*vdp read*/
6060   AM_RANGE(0x8C00, 0x8fff) AM_DEVREADWRITE("video", ti_video_rnop, ti_v9938_w16)   /*vdp write*/
61   AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("datamux_16_8", ti99_dmux_r, ti99_dmux_w)
61   AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("datamux_16_8", ti99_dmux_r, ti99_dmux_w)
6262ADDRESS_MAP_END
6363
6464/*
r9542r9543
7979INPUT_CHANGED( gk_changed )
8080{
8181   running_device *cartsys = field->port->machine->device("gromport");
82   set_gk_switches(cartsys, (UINT8)((UINT64)param&0x07), newval); 
82   set_gk_switches(cartsys, (UINT8)((UINT64)param&0x07), newval);
8383}
8484
8585/* TI99/4a: 48-key keyboard, plus two optional joysticks (2 shift keys) */
r9542r9543
121121
122122   /* Flash setting is used to flash an empty HSGPL DSR ROM */
123123   PORT_START( "EXTCARD" )
124   PORT_CONFNAME( 0x03, 0x00, "HSGPL extension" )
124   PORT_CONFNAME( 0x03, 0x00, "HSGPL extension" )
125125      PORT_CONFSETTING(    0x00, DEF_STR( Off ) )
126126      PORT_CONFSETTING(    0x01, "Flash" )
127127      PORT_CONFSETTING(    0x02, DEF_STR( On ) )
r9542r9543
179179   PORT_DIPNAME( 0x01, 0x00, "BwG date/time display" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 )
180180      PORT_DIPSETTING( 0x00, "Hide")
181181      PORT_DIPSETTING( 0x01, "Show")
182     
182
183183   PORT_START( "BWGDIP34" )
184184   PORT_DIPNAME( 0x03, 0x00, "BwG drives" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 )
185185      PORT_DIPSETTING( 0x00, "DSK1 only")
r9542r9543
746746};
747747
748748/*
749   Format:
750   Name, address bus mask, select pattern, write select bit(s), read8z function, write8 function, Condition name, bits which must be set, bits which must not be set
751   
752   Multiple devices may have the same select pattern; as in the real hardware,
753   care must be taken that only one device actually responds. In the case of
754   GROMs, each chip has an internal address counter and an ID, and the chip
755   only responds when the ID and the most significant 3 bits match.
756   If the HSGPL extension is active, the console GROMs should be removed. In
757   reality, the chips should be pulled out of their sockets. Here we simulate
758   this by a condition.
749    Format:
750    Name, address bus mask, select pattern, write select bit(s), read8z function, write8 function, Condition name, bits which must be set, bits which must not be set
751
752    Multiple devices may have the same select pattern; as in the real hardware,
753    care must be taken that only one device actually responds. In the case of
754    GROMs, each chip has an internal address counter and an ID, and the chip
755    only responds when the ID and the most significant 3 bits match.
756    If the HSGPL extension is active, the console GROMs should be removed. In
757    reality, the chips should be pulled out of their sockets. Here we simulate
758    this by a condition.
759759*/
760760static const bus_device dmux_devices[] =
761761{
r9542r9543
769769   { NULL, 0, 0, 0, NULL, NULL, 0, 0  }
770770};
771771
772static const cruconf_device cru_devices[] =
772static const cruconf_device cru_devices[] =
773773{
774774   { "gromport", 0xf800, 0x0800, gromportc_rz, gromportc_w },            // Check: Is this really limited?
775775   { "peribox",  0x0000, 0x0000, ti99_peb_cru_rz, ti99_peb_cru_w },    // Peribox needs all addresses
r9542r9543
800800   // MDRV_SCREEN_REFRESH_RATE(60)
801801   // MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
802802
803   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9918_interface)   
803   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9918_interface)
804804   MDRV_GFXDECODE(ti99)
805805
806806   /* sound hardware */
r9542r9543
812812   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
813813
814814   MDRV_TI994_BOARD_ADD( "ti_board" )
815   
815
816816   /* tms9901 */
817817   MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4)
818818
819819   MDRV_CRUBUS_ADD( "crubus", cru_devices )
820820   MDRV_DMUX_ADD( "datamux_16_8", dmux_devices )
821   
821
822822   MDRV_GROM_ADD( "console_grom_0", 0, region_grom, 0x0000, 0x1800, console_ready )
823823   MDRV_GROM_ADD( "console_grom_1", 1, region_grom, 0x2000, 0x1800, console_ready )
824824   MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready )
825825
826826   MDRV_TI99_GROMPORT_ADD( "gromport", console_ready )
827   
827
828828   MDRV_PBOX4_ADD( "peribox", console_extint, console_notconnected, console_ready )
829829
830830   MDRV_CASSETTE_ADD( "cassette1", default_cassette_config )
831   MDRV_CASSETTE_ADD( "cassette2", default_cassette_config )   
831   MDRV_CASSETTE_ADD( "cassette2", default_cassette_config )
832832
833833   MDRV_MECMOUSE_ADD( "mecmouse" )
834   MDRV_HANDSET_ADD( "handset", "tms9901" )
834   MDRV_HANDSET_ADD( "handset", "tms9901" )
835835MACHINE_CONFIG_END
836836
837837static MACHINE_CONFIG_START( ti99_4_50hz, driver_device )
r9542r9543
845845   MDRV_MACHINE_RESET( ti99_4 )
846846
847847   /* video hardware */
848   MDRV_TI_TMS991x_ADD("video", tms9928a, 50, "screen", 2500, &tms9929_interface)   
848   MDRV_TI_TMS991x_ADD("video", tms9928a, 50, "screen", 2500, &tms9929_interface)
849849
850850   MDRV_GFXDECODE(ti99)
851   
851
852852   /* sound hardware */
853853   MDRV_SPEAKER_STANDARD_MONO("mono")
854854   MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8)   /* 3.579545 MHz */
r9542r9543
870870   MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready )
871871
872872   MDRV_TI99_GROMPORT_ADD( "gromport", console_ready )
873   
873
874874   MDRV_PBOX4_ADD( "peribox", console_extint, console_notconnected, console_ready )
875875
876876   MDRV_CASSETTE_ADD( "cassette1", default_cassette_config )
877877   MDRV_CASSETTE_ADD( "cassette2", default_cassette_config )
878   
878
879879   MDRV_MECMOUSE_ADD( "mecmouse" )
880   MDRV_HANDSET_ADD( "handset", "tms9901" )
880   MDRV_HANDSET_ADD( "handset", "tms9901" )
881881MACHINE_CONFIG_END
882882
883883static MACHINE_CONFIG_START( ti99_4a_60hz, driver_device )
r9542r9543
891891   MDRV_MACHINE_RESET( ti99_4a )
892892
893893   /* video hardware */
894   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9918a_interface)   
894   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9918a_interface)
895895   MDRV_GFXDECODE(ti99a)
896   
896
897897   /* sound hardware */
898898   MDRV_SPEAKER_STANDARD_MONO("mono")
899899   MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8)   /* 3.579545 MHz */
r9542r9543
915915   MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready )
916916
917917   MDRV_TI99_GROMPORT_ADD( "gromport", console_ready )
918   
918
919919   MDRV_PBOX4A_ADD( "peribox", console_extint, console_notconnected, console_ready )
920920
921921   MDRV_CASSETTE_ADD( "cassette1", default_cassette_config )
r9542r9543
931931   MDRV_CPU_PROGRAM_MAP(memmap)
932932   MDRV_CPU_IO_MAP(cru_map)
933933   MDRV_CPU_VBLANK_INT("screen", ti99_vblank_interrupt)
934   
934
935935   MDRV_MACHINE_RESET( ti99_4a )
936936
937937   /* video hardware */
938   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9929a_interface)   
938   MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9929a_interface)
939939   MDRV_GFXDECODE(ti99a)
940   
940
941941   /* sound hardware */
942942   MDRV_SPEAKER_STANDARD_MONO("mono")
943943   MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8)   /* 3.579545 MHz */
r9542r9543
947947   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
948948
949949   MDRV_TI994A_BOARD_ADD( "ti_board" )
950   
950
951951   /* tms9901 */
952952   MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4a)
953   
953
954954   MDRV_CRUBUS_ADD( "crubus", cru_devices )
955955   MDRV_DMUX_ADD( "datamux_16_8", dmux_devices )
956956
r9542r9543
959959   MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready )
960960
961961   MDRV_TI99_GROMPORT_ADD( "gromport", console_ready )
962   
962
963963   MDRV_PBOX4A_ADD( "peribox", console_extint, console_notconnected, console_ready )
964964
965965   MDRV_CASSETTE_ADD( "cassette1", default_cassette_config )
r9542r9543
990990   MDRV_MACHINE_RESET( ti99_4a )
991991
992992   /* video hardware */
993   MDRV_TI_V9938_ADD("video", 60, "screen", 2500, 512+32, (212+28)*2, tms9901_set_int2)   
993   MDRV_TI_V9938_ADD("video", 60, "screen", 2500, 512+32, (212+28)*2, tms9901_set_int2)
994994
995995   MDRV_GFXDECODE(ti99b)
996996
r9542r9543
10031003   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
10041004
10051005   MDRV_TI994A_BOARD_ADD( "ti_board" )
1006   
1006
10071007   MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4a)
10081008
10091009   MDRV_CRUBUS_ADD( "crubus", cru_devices )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team