Previous 15994 Revisions Next

r10340 Tuesday 8th February, 2011 at 22:52:27 UTC by Michael Zapf
MEMEX expansion card for the Geneve now fully emulated. Fixed Genmod and
made it a mode of the Geneve, instead of a separate system.
[docs]messnew.txt
[src/mess]mess.mak messdriv.c
[src/mess/drivers]geneve.c ti99_4p.c ti99_4x.c ti99_8.c
[src/mess/machine/ti99]bwg.c evpc.c genboard.c genboard.h hfdc.c hsgpl.c memex.c* memex.h* p_code.c peribox.c peribox.h sgcpu.c spchsyn.c ti32kmem.c ti99defs.h ti_fdc.c ti_rs232.c tn_ide.c tn_usbsm.c

src/mess/machine/ti99/hsgpl.c
r10339r10340
209209{
210210   int port;
211211   hsgpl_state *card = get_safe_token(device);
212
213212   //activecpu_adjust_icount(-4);
214213
215214   // 1001 10bb bbbb bba0
r10339r10340
398397   hsgpl_state *card = get_safe_token(device);
399398   if (card->dsr_enabled)
400399   {
401      *value = at29c040a_r(card->dsr, (offset-0x4000) + 0x2000 * card->dsr_page);
400      *value = at29c040a_r(card->dsr, (offset & 0x1fff) + 0x2000 * card->dsr_page);
402401//      logerror("hsgpl: read dsr %04x[%02x] -> %02x\n", offset, card->dsr_page, *value);
403402   }
404403}
r10339r10340
417416
418417   if ((port < 2) && (card->ram_enabled))
419418   {
420      *value = card->ram6[(offset-0x6000) + 0x2000*card->current_bank + 0x8000*port];
419      *value = card->ram6[(offset & 0x1fff) + 0x2000*card->current_bank + 0x8000*port];
421420//      logerror("hsgpl cart ram read %04x -> %02x\n", offset, *value);
422421      return;
423422   }
424423
425424   if (port < 16)
426425   {
427      *value = at29c040a_r(card->rom6, (offset-0x6000) + 0x2000*card->current_bank + 0x8000*port);
426      *value = at29c040a_r(card->rom6, (offset & 0x1fff) + 0x2000*card->current_bank + 0x8000*port);
428427//      logerror("hsgpl cart read %04x -> %02x\n", offset, *value);
429428   }
430429   else
431430   {
432431      if (port==32 || port==33)
433432      {
434         *value = card->ram6[(offset-0x6000) + 0x2000*card->current_bank + 0x8000*(port-32)];
433         *value = card->ram6[(offset & 0x1fff) + 0x2000*card->current_bank + 0x8000*(port-32)];
435434      }
436435      else
437436      {
r10339r10340
473472   {
474473      if ((port < 2) && (card->ram_enabled))
475474      {
476         card->ram6[(offset-0x6000) + 0x2000*card->current_bank + 0x8000*port ] = data;
475         card->ram6[(offset & 0x1fff) + 0x2000*card->current_bank + 0x8000*port ] = data;
477476      }
478477      else
479478      {   // keep in mind that these lines are also reached for port < 2
r10339r10340
491490         {
492491            if (port==32 || port==33)
493492            {
494               card->ram6[(offset-0x6000) + 0x2000*card->current_bank + 0x8000*(port-32)] = data;
493               card->ram6[(offset & 0x1fff) + 0x2000*card->current_bank + 0x8000*(port-32)] = data;
495494            }
496495            else
497496            {
r10339r10340
507506*/
508507static READ8Z_DEVICE_HANDLER ( data_rz )
509508{
510   if ((offset & 0xe000)==0x4000)
509   if ((offset & 0x7e000)==0x74000)
511510   {
512      hsgpl_dsrspace_rz(device, offset, value);
511      hsgpl_dsrspace_rz(device, offset & 0xffff, value);
513512   }
514513
515   if ((offset & 0xe000)==0x6000)
514   if ((offset & 0x7e000)==0x76000)
516515   {
517      hsgpl_cartspace_rz(device, offset, value);
516      hsgpl_cartspace_rz(device, offset & 0xffff, value);
518517   }
519518
520519   // 1001 1wbb bbbb bba0
521   if ((offset & 0xfc01)==0x9800)
520   if ((offset & 0x7fc01)==0x79800)
522521   {
523      hsgpl_grom_rz(device, offset, value);
522      hsgpl_grom_rz(device, offset & 0xffff, value);
524523   }
525524}
526525
r10339r10340
529528*/
530529static WRITE8_DEVICE_HANDLER ( data_w )
531530{
532   if ((offset & 0xe000)==0x6000)
531   if ((offset & 0x7e000)==0x76000)
533532   {
534      hsgpl_cartspace_w(device, offset, data);
533      hsgpl_cartspace_w(device, offset & 0xffff, data);
535534   }
536535
537536   // 1001 1wbb bbbb bba0
538   if ((offset & 0xfc01)==0x9c00)
537   if ((offset & 0x7fc01)==0x79c00)
539538   {
540      hsgpl_grom_w(device, offset, data);
539      hsgpl_grom_w(device, offset & 0xffff, data);
541540   }
542541}
543542
src/mess/machine/ti99/genboard.c
r10339r10340
7474   int      keep_keybuf;
7575   int      zero_wait;
7676
77   int      genmod;
78
7779   /* GROM simulation */
7880   int      grom_address;
7981   int      gromraddr_LSB;
r10339r10340
324326         // speech
325327         // ++++ ++-- ---- ---+
326328         // 1001 0000 0000 0000
327         // 0x17000 represents the proper AMA/B/C setting; will be masked away currently
328         ti99_peb_data_rz(board->peribox, offset | 0x17000, &value);
329         // We need to add the address prefix bits
330         ti99_peb_data_rz(board->peribox, offset | ((board->genmod)? 0x170000 : 0x070000), &value);
329331         return value;
330332      }
331333      if ((offset & 0xfc01)==0x9800)
r10339r10340
364366
365367   physaddr |= (offset & 0x1fff);
366368
367   if ((physaddr & 0x180000)==0x000000)
369   if (((physaddr & 0x180000)==0x000000) && !board->genmod)
368370   {
369      // DRAM. One wait state.
371      // DRAM. One wait state (only if not GenMod, in which case we route this to the P-Box)
370372      cpu_adjust_icount(board->cpu, -4);
371373      value = board->dram[physaddr & 0x07ffff];
372374      return value;
373375   }
374   if ((physaddr & 0x180000)==0x080000)
375   {
376      // Memex in PEB
377      // 0 1aaa xxxx xxxx xxxx xxxx
378      ti99_peb_data_rz(board->peribox, physaddr, &value);
379      return value;
380   }
381   if ((physaddr & 0x180000)==0x100000)
382   {
383      // 1 0aaa xxxx xxxx xxxx xxxx p-box address block
384      // Cards in PEB (aaa = AMC, AMB, AMA)
385      ti99_peb_data_rz(board->peribox, physaddr, &value);
386      return value;
387   }
388376
389377   if ((physaddr & 0x1e0000)==0x1e0000)
390378   {
r10339r10340
394382      return value;
395383   }
396384
397   if ((physaddr & board->sram_mask)==board->sram_val)
385   if (((physaddr & board->sram_mask)==board->sram_val) && !board->genmod)
398386   {
399387      //  1 100. .... .... .... .... on-board sram (128K) -+
400388      //  1 101. .... .... .... .... on-board sram (128K) -+-- maximum SRAM expansion
r10339r10340
402390      //  1 1101 0... .... .... .... on-board sram (32K) - additional 32 KiB required for MDOS 2.50s and higher
403391      //  1 1101 1... .... .... .... on-board sram (32K) - standard setup
404392      // NOTE: This must be tested after the EPROM test above
393      // Also note that we assume a full Genmod which also replaces the SRAM
405394      value = board->sram[physaddr & 0x00ffff];
406395      return value;
407396   }
408397
409   return 0;
398   // Route everything else to the P-Box
399   //   0x000000-0x07ffff for the stock Geneve (AMC,AMB,AMA,A0 ...,A15)
400   //   0x000000-0x1fffff for the GenMod.(AME,AMD,AMC,AMB,AMA,A0 ...,A15)
401   // Add a wait state (if not GenMod)
402   if (board->genmod)
403   {
404      physaddr = (physaddr & 0x001fffff);  // 21 bit address for Genmod (with AMA..AME)
405   }
406   else
407   {
408      // Add one wait state
409      cpu_adjust_icount(board->cpu,-4);
410      physaddr = (physaddr & 0x0007ffff);  // 19 bit address (with AMA..AMC)
411   }
412   ti99_peb_data_rz(board->peribox, physaddr, &value);
413   return value;
410414}
411415/*
412416Geneve mode:
r10339r10340
504508         // speech
505509         // ++++ ++-- ---- ---+
506510         // 1001 0100 0000 0000
507         ti99_peb_data_w(board->peribox, offset | 0x17000, data);
511         // We need to add the address prefix bits
512         ti99_peb_data_w(board->peribox, offset | ((board->genmod)? 0x170000 : 0x070000), data);
508513         return;
509514      }
510515      if ((offset & 0xfc01)==0x9c00)
r10339r10340
553558
554559   physaddr |= offset & 0x1fff;
555560
556   if ((physaddr & 0x180000)==0x000000)
561   if (((physaddr & 0x180000)==0x000000) && !board->genmod)
557562   {
558      // DRAM write. One wait state.
563      // DRAM write. One wait state. (only for normal Geneve)
559564      cpu_adjust_icount(board->cpu, -4);
560565      board->dram[physaddr & 0x07ffff] = data;
561566      return;
562567   }
563   if ((physaddr & 0x180000)==0x080000)
564   {
565      // Memex in PEB
566      ti99_peb_data_w(board->peribox, physaddr, data);
567      return;
568   }
569   if ((physaddr & 0x180000)==0x100000)
570   {
571      // Classic cards in PEB
572      ti99_peb_data_w(board->peribox, physaddr, data);
573      return;
574   }
575568
576569   if ((physaddr & 0x1e0000)==0x1e0000)
577570   {
r10339r10340
581574      return;
582575   }
583576
584   if ((physaddr & board->sram_mask)==board->sram_val)
577   if (((physaddr & board->sram_mask)==board->sram_val) && !board->genmod)
585578   {
586579      //  1 100. .... .... .... .... on-board sram (128K) -+
587580      //  1 101. .... .... .... .... on-board sram (128K) -+-- maximum SRAM expansion
r10339r10340
592585      board->sram[physaddr & 0x00ffff] = data;
593586      return;
594587   }
588
589   // Route everything else to the P-Box
590   // Add a wait state
591   if (board->genmod)
592   {
593      physaddr = (physaddr & 0x001fffff);  // 21 bit address for Genmod
594   }
595   else
596   {
597      cpu_adjust_icount(board->cpu,-4);
598      // only AMA, AMB, AMC are used; AMD=0, AME=1
599      physaddr = (physaddr & 0x0007ffff) | 0x00100000;  // 19 bit address
600   }
601   ti99_peb_data_w(board->peribox, physaddr, data);
595602}
596603
597604/*
r10339r10340
6376441 111. ..1. .... .... .... on-board boot2
638645
639646
647Mapping issues (in original hardware)
648
649The standard Geneve routes all accesses from 0x040000 to 0x17ffff to the P-Box.
650The standard TI puts AMA/B/C to 1, and all cards decode these, assuming them
651to be set to 1.
652
653The 2 MiB Memex occupies the whole address space, which means that some
654portions of it must remain unaccessible. As the standard Geneve only uses the
655AMA/B/C lines but cannot use AMD/E, the 2 MiB reduce to 512 KiB, mirrored three
656more times.
657
658Pages
65900-3f are internal (DRAM)
66040-7f are 512 KiB usable for the Memex
66180-bf are a mirror of 40-7f
662c0-ff are internal (SRAM, EPROM)
663
664However, pages 70-7f mirror to pages b0-bf which are used for the legacy cards.
665Thus they have to be blocked. If only cards are used which occupy the address
666space 4000-5fff, only page ba needs to be blocked (bc for the speech synthesizer).
667
668If there is a card in the system which does not decode AMA/B/C, all pages must
669be blocked that mirror to ba on a 16-bit base: 4a, 5a, 6a, 7a, 8a, 9a, aa, ba.
670
640671*/
641672
642673/****************************************************************************
r10339r10340
716747      }
717748   }
718749   else
750   {
719751      ti99_peb_cru_w(board->peribox, addroff, data);
752   }
720753}
721754
722755
r10339r10340
12301263{
12311264   logerror("Starting Geneve board\n");
12321265   genboard_state *board = get_safe_token(device);
1266
12331267   board->video = device->siblingdevice("video");
12341268   board->tms9901 = device->siblingdevice("tms9901");
12351269   board->peribox = device->siblingdevice("peribox");
r10339r10340
12941328   board->cartridge7_writable = 0;
12951329   for (int i=0; i < 8; i++) board->map[i] = 0;
12961330
1297   if (input_port_read(device->machine, "BOOTROM")==0)
1331   board->genmod = FALSE;
1332   if (input_port_read(device->machine, "MODE")==0)
12981333   {
1299      board->eprom = device->machine->region("maincpu")->base() + 0x4000;
1334      switch (input_port_read(device->machine, "BOOTROM"))
1335      {
1336      case GENEVE_098:
1337         logerror("Geneve 9640: Using 0.98 boot eprom\n");
1338         board->eprom = device->machine->region("maincpu")->base() + 0x4000;
1339         break;
1340      case GENEVE_100:
1341         logerror("Geneve 9640: Using 1.00 boot eprom\n");
1342         board->eprom = device->machine->region("maincpu")->base();
1343         break;
1344      }
13001345   }
1346   else
1347   {
1348      logerror("Geneve 9640: Using GenMod modification\n");
1349      board->eprom = device->machine->region("maincpu")->base() + 0x8000;
1350      if (board->eprom[0] != 0xf0)
1351      {
1352         fatalerror("GenMod boot rom missing.\n");
1353      }
1354      board->genmod = TRUE;
1355   }
13011356
13021357   switch (input_port_read(device->machine, "SRAM"))
13031358   {
src/mess/machine/ti99/sgcpu.c
r10339r10340
66    This component implements the address decoder and mapper logic from the
77    SGCPU expansion card (inofficially called TI-99/4P).
88
9    AMA/B/C: According to the manual, the 19-bit address extension is not
10    supported by the SGCPU, due to some cards not checking these lines (like
11    the Horizon Ramdisk)
12
913    Michael Zapf, October 2010
1014
1115    TODO: Check for wait states
src/mess/machine/ti99/genboard.h
r10339r10340
33
44#include "machine/tms9901.h"
55
6enum
7{
8   MDIP1 = 0x01,
9   MDIP2 = 0x02,
10   MDIP3 = 0x04,
11   MDIP4 = 0x08,
12   MDIP5 = 0x10,
13   MDIP6 = 0x20,
14   MDIP7 = 0x40,
15   MDIP8 = 0x80
16};
17
18#define GENMOD 0x01
19
620READ8_DEVICE_HANDLER( geneve_r );
721WRITE8_DEVICE_HANDLER( geneve_w );
822READ8_DEVICE_HANDLER( geneve_cru_r );
r10339r10340
1933WRITE_LINE_DEVICE_HANDLER( board_intb );
2034WRITE_LINE_DEVICE_HANDLER( board_ready );
2135
36enum
37{
38   GENEVE_098 = 0,
39   GENEVE_100 = 1
40};
41
2242#define MCFG_GENEVE_BOARD_ADD(_tag )         \
2343   MCFG_DEVICE_ADD(_tag, GENBOARD, 0)
2444
src/mess/machine/ti99/ti_fdc.c
r10339r10340
2828   /* When TRUE, card is accessible. Indicated by a LED. */
2929   int               selected;
3030
31   /* Used for GenMod. */
32   int               select_mask;
33   int               select_value;
34
3135   /* When TRUE, keeps DVENA high. */
3236   int               strobe_motor;
3337
r10339r10340
235239
236240   if (card->selected)
237241   {
238      if ((offset & 0xe000)==0x4000)
242      if ((offset & card->select_mask)==card->select_value)
239243      {
240244         // only use the even addresses from 1ff0 to 1ff6.
241245         // Note that data is inverted.
r10339r10340
260264   ti99_fdc_state *card = get_safe_token(device);
261265   if (card->selected)
262266   {
263      if ((offset & 0xe000)==0x4000)
267      if ((offset & card->select_mask)==card->select_value)
264268      {
265269         // only use the even addresses from 1ff8 to 1ffe.
266270         // Note that data is inverted.
r10339r10340
373377      card->DVENA = 0;
374378      card->strobe_motor = 0;
375379
380      card->select_mask = 0x7e000;
381      card->select_value = 0x74000;
382
383      if (input_port_read(device->machine, "MODE")==GENMOD)
384      {
385         // GenMod card modification
386         card->select_mask = 0x1fe000;
387         card->select_value = 0x174000;
388      }
389
376390      ti99_set_80_track_drives(FALSE);
377391
378392      floppy_type_t type = FLOPPY_STANDARD_5_25_DSDD_40;
src/mess/machine/ti99/p_code.c
r10339r10340
148148
149149   if (card->selected)
150150   {
151      if ((offset & 0xe000)==0x4000)
151      if ((offset & 0x7e000)==0x74000)
152152      {
153153         if ((offset & 0xfffd)==GROMBASE)
154154         {
r10339r10340
157157            return;
158158         }
159159
160         if (offset < 0x5000)
160         if ((offset & 0x1000) == 0x0000)
161161         {
162162            /* Accesses ROM 4732 (4K) */
163            *value = card->rom0[offset-0x4000];
163            *value = card->rom0[offset & 0x0fff];
164164         }
165165         else
166166            // Accesses ROM 4764 (2*4K)
167167         // We have two banks here which are activated according
168168         // to the setting of CRU bit 4
169         *value = (card->bank_select==0)? card->rom1[offset-0x5000] : card->rom2[offset-0x5000];
169         *value = (card->bank_select==0)? card->rom1[offset & 0x0fff] : card->rom2[offset & 0x0fff];
170170      }
171171   }
172172}
r10339r10340
180180   ti99_pcoden_state *card = get_safe_token(device);
181181   if (card->selected)
182182   {
183      if ((offset & 0xfffd)==(GROMBASE|0x0400))
183      if ((offset & 0x7fffd)==(GROMBASE|0x70400))
184184      {
185185         for (int i=0; i < 8; i++)
186186            ti99grom_w(card->gromdev[i], offset, data);
src/mess/machine/ti99/tn_usbsm.c
r10339r10340
4848   device_t *strata;
4949
5050   int    selected;
51
52   /* Used for GenMod */
53   int    select_mask;
54   int      select_value;
55
5156   int      feeprom_page;
5257   int      sram_page;
5358   int      cru_register;
r10339r10340
259264
260265/*
261266    Memory read
267    TODO: Check whether AMA/B/C is actually checked
262268*/
263269static READ8Z_DEVICE_HANDLER( data_rz )
264270{
265271   tn_usbsm_state *card = get_safe_token(device);
266272
267   if (((offset & 0xe000)==0x4000) && card->selected)
273   if (((offset & card->select_mask)==card->select_value) && card->selected)
268274   {
269275      if (card->tms9995_mode ? (!(offset & 1)) : (offset & 1))
270276      {   /* first read triggers 16-bit read cycle */
271         card->input_latch = usbsm_mem_16_r(device, offset >> 1);
277         card->input_latch = usbsm_mem_16_r(device, (offset >> 1)&0xffff);
272278      }
273279
274280      /* return latched input */
r10339r10340
283289{
284290   tn_usbsm_state *card = get_safe_token(device);
285291
286   if (((offset & 0xe000)==0x4000) && card->selected)
292   if (((offset & card->select_mask)==card->select_value) && card->selected)
287293   {
288294      /* latch write */
289295      if (offset & 1)
r10339r10340
293299
294300      if ((card->tms9995_mode)? (offset & 1) : (!(offset & 1)))
295301      {   /* second write triggers 16-bit write cycle */
296         usbsm_mem_16_w(device, offset >> 1, card->output_latch);
302         usbsm_mem_16_w(device, (offset >> 1)&0xffff, card->output_latch);
297303      }
298304   }
299305}
r10339r10340
335341      card->sram_page = 0;
336342      card->cru_register = 0;
337343      card->tms9995_mode = (device->type()==TMS9995);
344
345      card->select_mask = 0x7e000;
346      card->select_value = 0x74000;
347
348      if (input_port_read(device->machine, "MODE")==GENMOD)
349      {
350         // GenMod card modification
351         card->select_mask = 0x1fe000;
352         card->select_value = 0x174000;
353      }
338354   }
339355}
340356
src/mess/machine/ti99/ti32kmem.c
r10339r10340
2727static READ8Z_DEVICE_HANDLER( mem32k_rz )
2828{
2929   ti99_mem32k_state *card = get_safe_token(device);
30
31   if (((offset & 0xe000)==0x2000) || ((offset & 0xe000)==0xa000) || ((offset & 0xc000)==0xc000))
30   if (((offset & 0x7e000)==0x72000) || ((offset & 0x7e000)==0x7a000) || ((offset & 0x7c000)==0x7c000))
3231   {
33      if (offset < 0xa000)
34         *value = card->memory[offset-0x2000];
32      if ((offset & 0xffff) < 0xa000)
33         *value = card->memory[offset & 0x1fff];
3534      else
36         *value = card->memory[offset-0x8000];
35         *value = card->memory[offset & 0x7fff];
3736   }
3837}
3938
r10339r10340
4342static WRITE8_DEVICE_HANDLER( mem32k_w )
4443{
4544   ti99_mem32k_state *card = get_safe_token(device);
46
47   if (((offset & 0xe000)==0x2000) || ((offset & 0xe000)==0xa000) || ((offset & 0xc000)==0xc000))
45   if (((offset & 0x7e000)==0x72000) || ((offset & 0x7e000)==0x7a000) || ((offset & 0x7c000)==0x7c000))
4846   {
49      if (offset < 0xa000)
50         card->memory[offset-0x2000] = data;
47      if ((offset & 0xffff) < 0xa000)
48         card->memory[offset & 0x1fff] = data;
5149      else
52         card->memory[offset-0x8000] = data;
50         card->memory[offset & 0x7fff] = data;
5351   }
5452}
5553
src/mess/machine/ti99/evpc.c
r10339r10340
163163         return;
164164      }
165165
166      if ((offset & 0xe000)==0x4000)
166      if ((offset & 0x7e000)==0x74000)
167167      {
168168         if ((offset & 0x1ff0)==0x1ff0)
169169         {
r10339r10340
247247   ti99_evpc_state *card = get_safe_token(device);
248248   if (card->selected)
249249   {
250      if ((offset & 0xe000)==0x4000)
250      if ((offset & 0x7e000)==0x74000)
251251      {
252252         if ((offset & 0x1ff0)==0x1ff0)
253253         {
src/mess/machine/ti99/tn_ide.c
r10339r10340
5353{
5454   int    selected;
5555
56   /* Used for GenMod */
57   int      select_mask;
58   int      select_value;
59
5660   device_t      *rtc;
5761   device_t      *ide;
5862
r10339r10340
159163   tn_ide_state *card = get_safe_token(device);
160164   UINT8 reply = 0;
161165
162   if (((offset & 0xe000)==0x4000) && card->selected)
166   if (((offset & card->select_mask)==card->select_value) && card->selected)
163167   {
164168      int addr = offset & 0x1fff;
165169
r10339r10340
225229{
226230   tn_ide_state *card = get_safe_token(device);
227231
228   if (((offset & 0xe000)==0x4000) && card->selected)
232   if (((offset & card->select_mask)==card->select_value) && card->selected)
229233   {
230234      if (card->cru_register & cru_reg_page_switching)
231235      {
r10339r10340
369373      card->cur_page = 0;
370374      card->sram_enable = 0;
371375      card->cru_register = 0;
376
377      card->select_mask = 0x7e000;
378      card->select_value = 0x74000;
379
380      if (input_port_read(device->machine, "MODE")==GENMOD)
381      {
382         // GenMod card modification
383         card->select_mask = 0x1fe000;
384         card->select_value = 0x174000;
385      }
386
372387      card->tms9995_mode =  (device->type()==TMS9995);
373388   }
374389}
src/mess/machine/ti99/hfdc.c
r10339r10340
3232   /* When TRUE, card is accessible. Indicated by a LED. */
3333   int               selected;
3434
35   /* Card select mask. Required to support Genmod. */
36   int               select_mask;
37
38   /* Card select mask. Required to support Genmod. */
39   int               select_value;
40
3541   /* When TRUE, triggers motor monoflop. */
3642   int               strobe_motor;
3743
r10339r10340
162168         /* CRU bits */
163169         if (card->cru_select)
164170         {
165            /* DIP switches.  Logic levels are inverted (on->0, off->1).  CRU
166                bit order is the reverse of DIP-switch order, too (dip 1 -> bit 7,
167                dip 8 -> bit 0).
168
169                MZ: 00 should not be used since there is a bug in the
170                DSR of the HFDC which causes problems with SD disks
171                (controller tries DD and then fails to fall back to SD) */
171            // DIP switches.  Logic levels are inverted (on->0, off->1).  CRU
172            // bit order is the reverse of DIP-switch order, too (dip 1 -> bit 7,
173            // dip 8 -> bit 0).
174            // MZ: 00 should not be used since there is a bug in the
175            // DSR of the HFDC which causes problems with SD disks
176            // (controller tries DD and then fails to fall back to SD) */
172177            reply = ~(input_port_read(device->machine, "HFDCDIP"));
173178         }
174179         else
r10339r10340
281286{
282287   ti99_hfdc_state *card = get_safe_token(device);
283288
284   if (card->selected && (offset & 0xe000)==0x4000)
289   if (card->selected && ((offset & card->select_mask)==card->select_value))
285290   {
286291      /* DSR region */
287292      if ((offset & 0x1000)==0x0000)
r10339r10340
336341static WRITE8_DEVICE_HANDLER( data_w )
337342{
338343   ti99_hfdc_state *card = get_safe_token(device);
339   if (card->selected && (offset & 0xe000)==0x4000)
344   if (card->selected && ((offset & card->select_mask)==card->select_value))
340345   {
341346      // Tape: 4fc0...4fcf
342347      if ((offset & 0x1ff0)==TAPE_ADDR)
r10339r10340
683688      int success = mount_card(peb, device, &hfdc_card, get_pebcard_config(device)->slot);
684689      if (!success) return;
685690
691      card->select_mask = 0x7e000;
692      card->select_value = 0x74000;
693
694      if (input_port_read(device->machine, "MODE")==GENMOD)
695      {
696         // GenMod card modification
697         logerror("HFDC: Configuring for GenMod\n");
698         card->select_mask = 0x1fe000;
699         card->select_value = 0x174000;
700      }
701
686702      // Allocate 32 KiB for on-board buffer memory
687703      if (card->ram==NULL)
688704      {
src/mess/machine/ti99/ti99defs.h
r10339r10340
99#define READ8Z_DEVICE_HANDLER(name)      void name(ATTR_UNUSED device_t *device, ATTR_UNUSED offs_t offset, UINT8 *value)
1010#define READ16Z_DEVICE_HANDLER(name)      void name(ATTR_UNUSED device_t *device, ATTR_UNUSED offs_t offset, UINT16 *value)
1111
12#define GM_NEVER 42
13#define GENMOD 0x01
14
1215enum
1316{
1417   RAM_NONE = 0,
src/mess/machine/ti99/ti_rs232.c
r10339r10340
3434   device_t *uart0, *uart1, *serdev0, *serdev1, *piodev;
3535
3636   int    selected;
37   int      select_mask;
38   int      select_value;
3739
3840   // PIO flags
3941   int pio_direction;      // a.k.a. PIOOC pio in output mode if 0
r10339r10340
330332      // lines are there.
331333      card->ila = 0;
332334   }
333   if (((offset & 0xe000)==0x4000) && card->selected)
335   if (((offset & card->select_mask)==card->select_value) && card->selected)
334336   {
335337      if ((offset & 0x1000)==0x0000)
336338      {
r10339r10340
350352{
351353   ti_rs232_state *card = get_safe_token(device);
352354
353   if (((offset & 0xe000)==0x4000) && card->selected)
355   if (((offset & card->select_mask)==card->select_value) && card->selected)
354356   {
355357      if ((offset & 0x1001)==0x1000)
356358      {
r10339r10340
539541      card->cts2 = 0;
540542      card->led = 0;
541543      card->pio_write = 1;
544
545      card->select_mask = 0x7e000;
546      card->select_value = 0x74000;
547
548      if (input_port_read(device->machine, "MODE")==GENMOD)
549      {
550         // GenMod card modification
551         card->select_mask = 0x1fe000;
552         card->select_value = 0x174000;
553      }
542554   }
543555}
544556
src/mess/machine/ti99/peribox.c
r10339r10340
130130#include "hsgpl.h"
131131#include "spchsyn.h"
132132#include "evpc.h"
133#include "memex.h"
133134
134135#include "imagedev/flopdrv.h"
135136#include "imagedev/harddriv.h"
r10339r10340
166167
167168   int                  highest;
168169
170   /* Address bits that are preset to 1 (AMA/AMB/AMC) */
171   int                  address_prefix;
172
169173   // Callback to the main system
170174   ti99_peb_connect      lines;
171175
r10339r10340
289293   for (i=1; i <= peb->highest; i++)
290294   {
291295      if ((peb->slot[i].card != NULL) && (*peb->slot[i].intf->card_read_data))
292         (*peb->slot[i].intf->card_read_data)(peb->slot[i].card, offset, value);
296         (*peb->slot[i].intf->card_read_data)(peb->slot[i].card, peb->address_prefix | offset, value);
293297   }
294298}
295299
r10339r10340
300304   for (i=1; i <= peb->highest; i++)
301305   {
302306      if ((peb->slot[i].card != NULL) && (*peb->slot[i].intf->card_write_data))
303         (*peb->slot[i].intf->card_write_data)(peb->slot[i].card, offset, data);
307         (*peb->slot[i].intf->card_write_data)(peb->slot[i].card, peb->address_prefix | offset, data);
304308   }
305309}
306310
r10339r10340
336340   for (i=1; i <= peb->highest; i++)
337341   {
338342      if ((peb->slot[i].card != NULL) && (*peb->slot[i].intf->card_read_data16))
339         (*peb->slot[i].intf->card_read_data16)(peb->slot[i].card, offset, value);
343         (*peb->slot[i].intf->card_read_data16)(peb->slot[i].card, peb->address_prefix | offset, value);
340344   }
341345}
342346
r10339r10340
350354   for (i=1; i <= peb->highest; i++)
351355   {
352356      if ((peb->slot[i].card != NULL) && (*peb->slot[i].intf->card_write_data16))
353         (*peb->slot[i].intf->card_write_data16)(peb->slot[i].card, offset, data);
357         (*peb->slot[i].intf->card_write_data16)(peb->slot[i].card, peb->address_prefix | offset, data);
354358   }
355359}
356360
r10339r10340
401405   devcb_resolve_write_line(&peb->lines.ready, &ready, device);
402406   devcb_resolve_write_line(&peb->lines.inta, &inta, device);
403407   devcb_resolve_write_line(&peb->lines.intb, &intb, device);
408
409   peb->address_prefix = (pebconf->amx << 16);
404410}
405411
406412static DEVICE_STOP( ti99_peb )
r10339r10340
524530MACHINE_CONFIG_END
525531
526532static MACHINE_CONFIG_FRAGMENT( geneve_peb )
527   MCFG_PBOXCARD_ADD( "speech",      TISPEECH, 1 )
528   MCFG_PBOXCARD_ADD( "usbsmart",      USBSMART, 2 )
529   MCFG_PBOXCARD_ADD( "ide",         TNIDE,     3 )
533   MCFG_PBOXCARD_ADD( "memex",         GENMEMEX, 1 )
534   MCFG_PBOXCARD_ADD( "speech",      TISPEECH, 2 )
535   MCFG_PBOXCARD_ADD( "usbsmart",      USBSMART, 3 )
536   MCFG_PBOXCARD_ADD( "ide",         TNIDE,     4 )
530537   MCFG_PBOXCARD_ADD( "rs232_card",   TIRS232,  6 )
531538   MCFG_PBOXCARD_ADD( "ti_fdc",      TIFDC,     7 )
532539   MCFG_PBOXCARD_ADD( "hfdc",         HFDC,     7 )
src/mess/machine/ti99/memex.c
r0r10340
1/*
2    Geneve "Memex" memory expansion
3    Michael Zapf, February 2011
4*/
5 
6#include "emu.h"
7#include "peribox.h"
8#include "memex.h"
9 
10typedef ti99_pebcard_config gen_memex_config;
11 
12typedef struct _gen_memex_state
13{
14   UINT8   *memory;
15   UINT8   dip_switch[8];
16   int      genmod;
17} gen_memex_state;
18 
19INLINE gen_memex_state *get_safe_token(device_t *device)
20{
21   assert(device != NULL);
22   assert(device->type() == GENMEMEX);
23 
24   return (gen_memex_state *)downcast<legacy_device_base *>(device)->token();
25}
26 
27static int access_enabled(gen_memex_state *card, offs_t offset)
28{
29   // 1 0111 .... .... .... .... p-box address block 0xxx ... fxxx
30   // first two bits are AME, AMD bits available on Genmod only
31   // if AMD, AME are not available we assume AMD=0, AME=1
32   // must be set on the Geneve board
33   // Some traditional cards will not decode the AMx lines, so
34   // we may have to lock out those areas
35   int page = (offset >> 13)&0xff;
36   int index = 0;
37 
38   // SW2: "off" locks
39   //      10xxx010
40   //      10111010   also locked when "on"
41   if (page == 0xba) return FALSE;
42   if ((page & 0xc7)==0x82 && card->dip_switch[1]==FALSE)
43      return FALSE;
44 
45   // SW3: 111010xx    0=enabled 1=locked out
46   // SW4: 111011xx
47   // SW5: 111100xx
48   // SW6: 111101xx
49   // SW7: 111110xx
50   // SW8: 111111xx
51 
52   index = ((page >> 2)&0x3f);
53   if (index >= 0x3a && index <= 0x3f)
54   {
55      if (card->dip_switch[index - 0x38]==0) return TRUE;
56      else
57      {
58         return FALSE;
59      }
60   }
61   return TRUE;
62}
63 
64/*
65    Memory read. The memory is at locations 0x000000-0x1fffff. Some of these
66    regions are hidden by onboard devices of the Geneve. We must block some
67    areas which would otherwise interfere with peripheral cards.
68 
69    Note that the incomplete decoding of the standard Geneve must be
70    considered.
71*/
72static READ8Z_DEVICE_HANDLER( memex_rz )
73{
74   gen_memex_state *card = get_safe_token(device);
75 
76   /* If not Genmod, add the upper two address bits 10 */
77   if (!card->genmod) offset |= 0x100000;
78 
79   // The card is accessed for all addresses in the address space
80   if (access_enabled(card, offset))
81   {
82      *value = card->memory[offset];
83   }
84}
85 
86/*
87    Memory write
88*/
89static WRITE8_DEVICE_HANDLER( memex_w )
90{
91   gen_memex_state *card = get_safe_token(device);
92 
93   /* If not Genmod, add the upper two address bits 10 */
94   if (!card->genmod) offset |= 0x100000;
95 
96   // The card is accessed for all addresses in the address space
97   if (access_enabled(card, offset))
98   {
99      card->memory[offset] = data;
100   }
101}
102 
103/**************************************************************************/
104 
105static const ti99_peb_card memex_card =
106{
107   memex_rz, memex_w,            // memory access read/write
108   NULL, NULL,                  // CRU access (none here)
109   NULL, NULL,                  // SENILA/B access (none here)
110   NULL, NULL                  // 16 bit access (none here)
111};
112 
113static DEVICE_START( gen_memex )
114{
115   gen_memex_state *card = get_safe_token(device);
116   card->memory=NULL;
117}
118 
119static DEVICE_STOP( gen_memex )
120{
121   gen_memex_state *card = get_safe_token(device);
122   if (card->memory) free(card->memory);
123}
124 
125static DEVICE_RESET( gen_memex )
126{
127   gen_memex_state *card = get_safe_token(device);
128   /* Register the card */
129   device_t *peb = device->owner();
130 
131   if (input_port_read(device->machine, "EXTRAM")==1)
132   {
133      int success = mount_card(peb, device, &memex_card, get_pebcard_config(device)->slot);
134      if (!success) return;
135 
136      if (card->memory==NULL)
137      {
138         // Allocate 2 MiB
139         card->memory = (UINT8*)malloc(0x200000);
140      }
141 
142      UINT8 dips = input_port_read(device->machine, "MEMEXDIPS");
143      for (int i=0; i < 8; i++)
144      {
145         card->dip_switch[i] = ((dips & 0x01)!=0x00);
146         dips = dips >> 1;
147      }
148 
149      card->genmod = input_port_read(device->machine, "MODE");
150   }
151}
152 
153static const char DEVTEMPLATE_SOURCE[] = __FILE__;
154 
155#define DEVTEMPLATE_ID(p,s)             p##gen_memex##s
156#define DEVTEMPLATE_FEATURES            DT_HAS_START | DT_HAS_STOP | DT_HAS_RESET | DT_HAS_INLINE_CONFIG
157#define DEVTEMPLATE_NAME                "Geneve Memex Memory Expansion Card"
158#define DEVTEMPLATE_FAMILY              "Peripheral expansion"
159#include "devtempl.h"
160 
161DEFINE_LEGACY_DEVICE( GENMEMEX, gen_memex );
162 
src/mess/machine/ti99/peribox.h
r10339r10340
1313    inta: callback called when the state of INTA changes (may be NULL)
1414    intb: callback called when the state of INTB changes (may be NULL)
1515    ready: callback called when the state of INTB changes (may be NULL)
16    amx: Determines whether the AMA, AMB, and AMC address bus extension lines
17         must be preset to some value. The standard TI Flex Cable Interface
18         locks these valuies to 1. The Geneve, however, can drive these lines.
1619*/
1720
1821typedef struct _ti99_peb_config
1922{
20   write_line_device_func inta;
21   write_line_device_func intb;
22   write_line_device_func ready;
23   write_line_device_func   inta;
24   write_line_device_func   intb;
25   write_line_device_func   ready;
26   int                  amx;
2327} ti99_peb_config;
2428
2529/*
r10339r10340
128132   MCFG_DEVICE_ADD(_tag, PBOX4, 0)                     \
129133   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, inta, _inta)      \
130134   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, intb, _intb)      \
131   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)
135   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)      \
136   MCFG_DEVICE_CONFIG_DATA32(ti99_peb_config, amx, 0x07)
132137
133138#define MCFG_PBOX4A_ADD(_tag, _inta, _intb, _ready)         \
134139   MCFG_DEVICE_ADD(_tag, PBOX4A, 0)                     \
135140   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, inta, _inta)      \
136141   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, intb, _intb)      \
137   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)
142   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)      \
143   MCFG_DEVICE_CONFIG_DATA32(ti99_peb_config, amx, 0x07)
138144
139145#define MCFG_PBOXEV_ADD(_tag, _inta, _intb, _ready)         \
140146   MCFG_DEVICE_ADD(_tag, PBOXEV, 0)                     \
141147   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, inta, _inta)      \
142148   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, intb, _intb)      \
143   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)
149   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)      \
150   MCFG_DEVICE_CONFIG_DATA32(ti99_peb_config, amx, 0x07)
144151
145152#define MCFG_PBOX8_ADD(_tag, _inta, _intb, _ready)         \
146153   MCFG_DEVICE_ADD(_tag, PBOX8, 0)                     \
147154   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, inta, _inta)      \
148155   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, intb, _intb)      \
149   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)
156   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)      \
157   MCFG_DEVICE_CONFIG_DATA32(ti99_peb_config, amx, 0x07)
150158
151159#define MCFG_PBOXSG_ADD(_tag, _inta, _intb, _ready)         \
152160   MCFG_DEVICE_ADD(_tag, PBOXSG, 0)                     \
153161   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, inta, _inta)      \
154162   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, intb, _intb)      \
155   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)
163   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)   \
164   MCFG_DEVICE_CONFIG_DATA32(ti99_peb_config, amx, 0x07)
156165
157166#define MCFG_PBOXGEN_ADD(_tag, _inta, _intb, _ready)         \
158167   MCFG_DEVICE_ADD(_tag, PBOXGEN, 0)                     \
159168   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, inta, _inta)      \
160169   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, intb, _intb)      \
161   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)
170   MCFG_DEVICE_CONFIG_DATAPTR(ti99_peb_config, ready, _ready)   \
171   MCFG_DEVICE_CONFIG_DATA32(ti99_peb_config, amx, 0x00)
162172
163173#endif /* __PBOX__ */
src/mess/machine/ti99/bwg.c
r10339r10340
4343   /* When TRUE, card is accessible. Indicated by a LED. */
4444   int               selected;
4545
46   /* Used for GenMod. */
47   int               select_mask;
48   int               select_value;
49
4650   /* When TRUE, keeps DVENA high. */
4751   int               strobe_motor;
4852
r10339r10340
378382
379383   if (card->selected)
380384   {
381      if ((offset & 0xe000)==0x4000)
385      if ((offset & card->select_mask)==card->select_value)
382386      {
383387         // 010x xxxx xxxx xxxx
384388         if ((offset & 0x1c00)==0x1c00)
r10339r10340
437441
438442   if (card->selected)
439443   {
440      if ((offset & 0xe000)==0x4000)
444      if ((offset & card->select_mask)==card->select_value)
441445      {
442446         // 010x xxxx xxxx xxxx
443447         if ((offset & 0x1c00)==0x1c00)
r10339r10340
544548      card->rom_offset = 0;
545549      card->rtc_enabled = 0;
546550
551      card->select_mask = 0x7e000;
552      card->select_value = 0x74000;
553
554      if (input_port_read(device->machine, "MODE")==GENMOD)
555      {
556         // GenMod card modification
557         card->select_mask = 0x1fe000;
558         card->select_value = 0x174000;
559      }
560
547561      wd17xx_dden_w(card->controller, CLEAR_LINE);   // Correct?
548562   }
549563}
src/mess/machine/ti99/memex.h
r0r10340
1/*
2    Geneve "Memex" memory expansion
3    Michael Zapf, February 2011
4*/
5 
6#ifndef __MEMEXMEM__
7#define __MEMEXMEM__
8 
9DECLARE_LEGACY_DEVICE( GENMEMEX, gen_memex );
10#endif
src/mess/machine/ti99/spchsyn.c
r10339r10340
2424
2525typedef struct _ti99_speech_state
2626{
27   device_t         *vsp;
27   device_t            *vsp;
2828   UINT8               *speechrom_data;      /* pointer to speech ROM data */
2929   int                load_pointer;         /* which 4-bit nibble will be affected by load address */
3030   int                ROM_bits_count;            /* current bit position in ROM */
r10339r10340
3232   UINT32               speechROMlen;         /* length of data pointed by speechrom_data, from 0 to 2^18 */
3333   ti99_peb_connect      lines;
3434
35   int                  select_mask;
36   int                  select_value;
3537} ti99_speech_state;
3638
3739INLINE ti99_speech_state *get_safe_token(device_t *device)
r10339r10340
133135{
134136   ti99_speech_state *adapter = get_safe_token(device);
135137
136   if ((offset & 0xfc01)==0x9000)
138   if ((offset & adapter->select_mask)==adapter->select_value)
137139   {
138140      cpu_adjust_icount(device->machine->device("maincpu"),-(18+3));      /* this is just a minimum, it can be more */
139141      *value = tms5220_status_r(adapter->vsp, offset) & 0xff;
r10339r10340
147149{
148150   ti99_speech_state *adapter = get_safe_token(device);
149151
150   if ((offset & 0xfc01)==0x9400)
152   if ((offset & adapter->select_mask)==(adapter->select_value | 0x0400))
151153   {
152154      cpu_adjust_icount(device->machine->device("maincpu"),-(54+3));      /* this is just an approx. minimum, it can be much more */
153155
r10339r10340
214216      adapter->speechROMaddr = 0;
215217      adapter->load_pointer = 0;
216218      adapter->ROM_bits_count = 0;
219
220      adapter->select_mask = 0x7fc01;
221      adapter->select_value = 0x79000;
222
223      if (input_port_read(device->machine, "MODE")==GENMOD)
224      {
225         // GenMod card modification
226         adapter->select_mask = 0x1ffc01;
227         adapter->select_value = 0x179000;
228      }
217229   }
218230}
219231
src/mess/messdriv.c
r10339r10340
818818   DRIVER( tutor )     /* 1983? Tomy Tutor    */
819819   DRIVER( pyuuta )   /* 1982 Tomy Pyuuta     */
820820   DRIVER( geneve )   /* 1987? Myarc Geneve 9640    */
821   DRIVER( genmod )   /* 199?? Myarc Geneve 9640    */
822821   DRIVER( ti99_4p )   /* 1996 SNUG 99/4P (a.k.a. SGCPU)      */
823822
824823   DRIVER( avigo )    /*   */
src/mess/mess.mak
r10339r10340
13731373$(MESSOBJ)/sanyo.a:            \
13741374   $(MESS_DRIVERS)/phc25.o      \
13751375   $(MESS_DRIVERS)/mbc55x.o   \
1376   $(MESS_MACHINE)/mbc55x.o     \
1377   $(MESS_VIDEO)/mbc55x.o       \
1376   $(MESS_MACHINE)/mbc55x.o   \
1377   $(MESS_VIDEO)/mbc55x.o     \
13781378
13791379$(MESSOBJ)/sega.a:            \
13801380   $(MESS_DRIVERS)/saturn.o   \
r10339r10340
14221422   $(MESS_FORMATS)/x1_tap.o   \
14231423   $(MESS_DRIVERS)/mz2500.o   \
14241424   $(MESS_DRIVERS)/pce220.o   \
1425   
1425
14261426$(MESSOBJ)/sinclair.a:         \
14271427   $(MESS_VIDEO)/spectrum.o   \
14281428   $(MESS_VIDEO)/timex.o      \
r10339r10340
15711571   $(MESS_MACHINE)/ti99/gromport.o   \
15721572   $(MESS_MACHINE)/ti99/ti32kmem.o   \
15731573   $(MESS_MACHINE)/ti99/samsmem.o   \
1574   $(MESS_MACHINE)/ti99/memex.o   \
15741575   $(MESS_MACHINE)/ti99/myarcmem.o   \
15751576   $(MESS_MACHINE)/ti99/ti_fdc.o   \
15761577   $(MESS_MACHINE)/ti99/hfdc.o   \
r10339r10340
15791580   $(MESS_MACHINE)/ti99/tn_usbsm.o   \
15801581   $(MESS_MACHINE)/ti99/tn_ide.o   \
15811582   $(MESS_MACHINE)/ti99/spchsyn.o  \
1582   $(MESS_MACHINE)/ti99/evpc.o    \
1583   $(MESS_MACHINE)/ti99/evpc.o    \
15831584   $(MESS_MACHINE)/ti99/videowrp.o \
15841585   $(MESS_MACHINE)/ti99/mapper8.o  \
15851586   $(MESS_MACHINE)/ti99/speech8.o  \
r10339r10340
17101711   $(MESS_DRIVERS)/busicom.o   \
17111712   $(MESS_VIDEO)/busicom.o      \
17121713   $(MESS_DRIVERS)/c10.o      \
1713   $(MESS_DRIVERS)/casloopy.o    \
1714   $(MESS_DRIVERS)/casloopy.o   \
17141715   $(MESS_DRIVERS)/chaos.o    \
17151716   $(MESS_DRIVERS)/cd2650.o   \
17161717   $(MESS_DRIVERS)/codata.o   \
src/mess/drivers/ti99_8.c
r10339r10340
306306      PORT_CONFSETTING( 0x00, "No delay")
307307      PORT_CONFSETTING( 0x01, "Realistic")
308308
309   // We do not want to show this setting; makes only sense for Geneve
310   PORT_START( "MODE" )
311   PORT_CONFNAME( 0x01, 0x00, "Ext. cards modification" ) PORT_CONDITION( "HFDCDIP", 0xff, PORTCOND_EQUALS, GM_NEVER )
312      PORT_CONFSETTING(    0x00, "Standard" )
313      PORT_CONFSETTING(    GENMOD, "GenMod" )
314
309315   /* 3 ports for mouse */
310316   PORT_START("MOUSEX") /* Mouse - X AXIS */
311317   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1)
src/mess/drivers/geneve.c
r10339r10340
241241
242242/* 101-key PC XT keyboard + TI joysticks */
243243static INPUT_PORTS_START(geneve)
244   PORT_START( "BOOTROM" )   /* config */
245   PORT_CONFNAME( 0x01, 0x00, "Boot ROM" )
246      PORT_CONFSETTING(    0x00, "Version 0.9" )
247      PORT_CONFSETTING(    0x01, "Version 1.0" )
248244
245   PORT_START( "MODE" )
246   PORT_CONFNAME( 0x01, 0x00, "Operating mode" )
247      PORT_CONFSETTING(    0x00, "Standard" )
248      PORT_CONFSETTING(    GENMOD, "GenMod" )
249
250   PORT_START( "BOOTROM" )
251   PORT_CONFNAME( 0x01, 0x00, "Boot ROM" ) PORT_CONDITION( "MODE", 0x01, PORTCOND_EQUALS, 0x00 )
252      PORT_CONFSETTING(    0x00, "Version 0.98" )
253      PORT_CONFSETTING(    0x01, "Version 1.00" )
254
249255   PORT_START( "SPEECH" )
250256   PORT_CONFNAME( 0x01, 0x00, "Speech synthesizer" )
251257      PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
252258      PORT_CONFSETTING( 0x01, DEF_STR( On ) )
253259
254260   PORT_START( "SRAM" )
255   PORT_CONFNAME( 0x03, 0x01, "Onboard SRAM" )
261   PORT_CONFNAME( 0x03, 0x01, "Onboard SRAM" ) PORT_CONDITION( "MODE", 0x01, PORTCOND_EQUALS, 0x00 )
256262      PORT_CONFSETTING( 0x00, "32 KiB" )
257263      PORT_CONFSETTING( 0x01, "64 KiB" )
258264      PORT_CONFSETTING( 0x02, "384 KiB" )
259265
266   PORT_START( "EXTRAM" )
267   PORT_CONFNAME( 0x01, 0x01, "Memory expansion" )
268      PORT_CONFSETTING( 0x00, DEF_STR( None ) )
269      PORT_CONFSETTING( 0x01, "Memex 2 MiB" )
270
260271   PORT_START( "DISKCTRL" )
261272   PORT_CONFNAME( 0x07, 0x03, "Disk controller" )
262273      PORT_CONFSETTING(    0x00, DEF_STR( None ) )
r10339r10340
279290      PORT_CONFSETTING(    0x00, DEF_STR( None ) )
280291      PORT_CONFSETTING(    0x01, "TI RS-232 card" )
281292
293   PORT_START( "MEMEXDIPS" )
294   PORT_DIPNAME( MDIP1, MDIP1, "MEMEX SW1" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
295      PORT_DIPSETTING( 0x00, "LED half-bright for 0 WS")
296      PORT_DIPSETTING( MDIP1, "LED full-bright")
297   PORT_DIPNAME( MDIP2, 0x00, "MEMEX SW2" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
298      PORT_DIPSETTING( 0x00, "Lock out all BA mirrors")
299      PORT_DIPSETTING( MDIP2, "Lock out page BA only")
300   PORT_DIPNAME( MDIP3, 0x00, "MEMEX SW3" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
301      PORT_DIPSETTING( 0x00, "Enable pages E8-EB")
302      PORT_DIPSETTING( MDIP3, "Lock out pages E8-EB")
303   PORT_DIPNAME( MDIP4, 0x00, "MEMEX SW4" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
304      PORT_DIPSETTING( 0x00, "Enable pages EC-EF")
305      PORT_DIPSETTING( MDIP4, "Lock out pages EC-EF")
306   PORT_DIPNAME( MDIP5, 0x00, "MEMEX SW5" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
307      PORT_DIPSETTING( 0x00, "Enable pages F0-F3")
308      PORT_DIPSETTING( MDIP5, "Lock out pages F0-F3")
309   PORT_DIPNAME( MDIP6, 0x00, "MEMEX SW6" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
310      PORT_DIPSETTING( 0x00, "Enable pages F4-F7")
311      PORT_DIPSETTING( MDIP6, "Lock out pages F4-F7")
312   PORT_DIPNAME( MDIP7, 0x00, "MEMEX SW7" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
313      PORT_DIPSETTING( 0x00, "Enable pages F8-FB")
314      PORT_DIPSETTING( MDIP7, "Lock out pages F8-FB")
315   PORT_DIPNAME( MDIP8, 0x00, "MEMEX SW8" ) PORT_CONDITION( "EXTRAM", 0x01, PORTCOND_EQUALS, 0x01 )
316      PORT_DIPSETTING( 0x00, "Enable pages FC-FF")
317      PORT_DIPSETTING( MDIP8, "Lock out pages FC-FF")
318
282319   PORT_START( "HFDCDIP" )
283320   PORT_DIPNAME( 0xff, 0x55, "HFDC drive config" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 )
284321      PORT_DIPSETTING( 0x00, "40 track, 16 ms")
r10339r10340
455492
456493INPUT_PORTS_END
457494
458static DRIVER_INIT( genmod )
459{
460   /*has_genmod = TRUE;*/
461}
462
463495static DRIVER_INIT( geneve )
464496{
465   /*has_genmod = FALSE;*/
466497}
467498
468499static MACHINE_START( geneve )
r10339r10340
495526   MCFG_SOUND_ADD("soundgen", SN76496, 3579545)   /* 3.579545 MHz */
496527   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
497528
498   /* Peripheral Box. Take the same as the TI-99/4A. */
529   /* Peripheral Box. Take the Geneve combo. */
499530   MCFG_PBOXGEN_ADD( "peribox", board_inta, board_intb, board_ready )
500531
532   /* tms9901 */
501533   MCFG_TMS9901_ADD("tms9901", tms9901_wiring_geneve)
502534
503   /* tms9901 */
535   /* Main board. Slight mods for the GenMod system. */
504536   MCFG_GENEVE_BOARD_ADD("geneve_board")
505537MACHINE_CONFIG_END
506538
r10339r10340
512544
513545ROM_START(geneve)
514546   /*CPU memory space*/
515   ROM_REGION(0x8000, "maincpu", 0)
547   ROM_REGION(0xc000, "maincpu", 0)
516548   ROM_LOAD("genbt100.bin", 0x0000, 0x4000, CRC(8001e386) SHA1(b44618b54dabac3882543e18555d482b299e0109)) /* CPU ROMs */
517549   ROM_LOAD_OPTIONAL("genbt090.bin", 0x4000, 0x4000, CRC(b2e20df9) SHA1(2d5d09177afe97d63ceb3ad59b498b1c9e2153f7)) /* CPU ROMs */
550   ROM_LOAD_OPTIONAL("gnmbt100.bin", 0x8000, 0x4000, CRC(19b89479) SHA1(6ef297eda78dc705946f6494e9d7e95e5216ec47)) /* CPU ROMs */
518551ROM_END
519552
520ROM_START(genmod)
521   /*CPU memory space*/
522   ROM_REGION(0x8000, "maincpu", 0)
523   ROM_LOAD("gnmbt100.bin", 0x0000, 0x4000, CRC(19b89479) SHA1(6ef297eda78dc705946f6494e9d7e95e5216ec47)) /* CPU ROMs */
524   ROM_LOAD_OPTIONAL("genbt090.bin", 0x4000, 0x4000, CRC(b2e20df9) SHA1(2d5d09177afe97d63ceb3ad59b498b1c9e2153f7)) /* CPU ROMs */
553/*ROM_START(genmod)
554    ROM_REGION(0x8000, "maincpu", 0)
555    ROM_LOAD("gnmbt100.bin", 0x0000, 0x4000, CRC(19b89479) SHA1(6ef297eda78dc705946f6494e9d7e95e5216ec47))
556    ROM_LOAD_OPTIONAL("genbt090.bin", 0x4000, 0x4000, CRC(b2e20df9) SHA1(2d5d09177afe97d63ceb3ad59b498b1c9e2153f7))
525557ROM_END
526
558*/
527559/*    YEAR  NAME      PARENT    COMPAT  MACHINE      INPUT    INIT       COMPANY     FULLNAME */
528560COMP( 1987,geneve,   0,      0,      geneve_60hz,  geneve,  geneve,      "Myarc",   "Geneve 9640" , 0)
529COMP( 1990,genmod,   geneve,   0,      geneve_60hz,  geneve,  genmod,   "Myarc",   "Geneve 9640 (with Genmod modification)" , 0)
561//COMP( 1990,genmod,   geneve,  0,      genmod_60hz,  geneve,  geneve,  "Myarc",    "Geneve 9640 (with Genmod modification)" , 0)
530562
src/mess/drivers/ti99_4p.c
r10339r10340
125125      PORT_CONFSETTING(    0x01, "Flash" )
126126      PORT_CONFSETTING(    0x02, DEF_STR( On ) )
127127
128   // We do not want to show this setting; makes only sense for Geneve
129   PORT_START( "MODE" )
130   PORT_CONFNAME( 0x01, 0x00, "Ext. cards modification" ) PORT_CONDITION( "HFDCDIP", 0xff, PORTCOND_EQUALS, GM_NEVER )
131      PORT_CONFSETTING(    0x00, "Standard" )
132      PORT_CONFSETTING(    GENMOD, "GenMod" )
133
128134   PORT_START( "HFDCDIP" )
129135   PORT_DIPNAME( 0xff, 0x55, "HFDC drive config" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 )
130136      PORT_DIPSETTING( 0x00, "40 track, 16 ms")
r10339r10340
135141   PORT_START( "V9938-MEM" )
136142   PORT_CONFNAME( 0x01, 0x00, "V9938 RAM size" )
137143      PORT_CONFSETTING(   0x00, "128 KiB" )
138      PORT_CONFSETTING(   0x01, "192 KiB" )   
144      PORT_CONFSETTING(   0x01, "192 KiB" )
139145
140146   PORT_START( "DRVSPD" )
141147   PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 )
src/mess/drivers/ti99_4x.c
r10339r10340
9999   PORT_CONFNAME( 0x07, 0x01, "RAM extension" )
100100      PORT_CONFSETTING(    0x00, DEF_STR( None ) )
101101      PORT_CONFSETTING(    0x01, "Console 32 KiB (16 bit)" )
102      PORT_CONFSETTING(    0x02, "TI Memexp card 32 KiB" )
102      PORT_CONFSETTING(    0x02, "TI 32 KiB card" )
103103      PORT_CONFSETTING(    0x03, "Super AMS 1MiB" )
104104      PORT_CONFSETTING(    0x07, "Myarc 512 KiB" )
105105
r10339r10340
144144      PORT_CONFSETTING(    0x00, DEF_STR( Off ) )
145145      PORT_CONFSETTING(    0x01, "Mechatronics Mouse" )
146146
147   // We do not want to show this setting; makes only sense for Geneve
148   PORT_START( "MODE" )
149   PORT_CONFNAME( 0x01, 0x00, "Ext. cards modification" ) PORT_CONDITION( "HFDCDIP", 0x0f, PORTCOND_EQUALS, GM_NEVER )
150      PORT_CONFSETTING(    0x00, "Standard" )
151      PORT_CONFSETTING(    GENMOD, "GenMod" )
152
147153   PORT_START( "CARTSLOT" )
148154   PORT_DIPNAME( 0x0f, CART_AUTO, "Cartridge slot" )
149155      PORT_DIPSETTING(    CART_AUTO, "Auto" )
r10339r10340
327333   PORT_DIPNAME( 0x01, 0x00, "EVPC Configuration" )
328334      PORT_DIPSETTING(    0x00, "DIP" )
329335      PORT_DIPSETTING(    0x01, "NOVRAM" )
330     
336
331337   PORT_START( "V9938-MEM" )
332338   PORT_CONFNAME( 0x01, 0x00, "V9938 RAM size" )
333339      PORT_CONFSETTING(   0x00, "128 KiB" )
334      PORT_CONFSETTING(   0x01, "192 KiB" )   
340      PORT_CONFSETTING(   0x01, "192 KiB" )
335341
336342INPUT_PORTS_END
337343
r10339r10340
343349
344350   PORT_START( "RAM" )   /* config */
345351   PORT_CONFNAME( 0x07, 0x01, "RAM extension" )
352      PORT_CONFSETTING(    0x00, DEF_STR( None ) )
346353      PORT_CONFSETTING(    0x01, "Console 32 KiB (16 bit)" )
347      PORT_CONFSETTING(    0x02, "Texas Instruments 32 KiB" )
354      PORT_CONFSETTING(    0x02, "TI 32 KiB card" )
348355      PORT_CONFSETTING(    0x03, "Super AMS 1MiB" )
349      PORT_CONFSETTING(    0x04, "Foundation 128 KiB" )
350      PORT_CONFSETTING(    0x05, "Foundation 512 KiB" )
351      PORT_CONFSETTING(    0x06, "Myarc 128 KiB" )
352356      PORT_CONFSETTING(    0x07, "Myarc 512 KiB" )
353357
354358   PORT_START( "SPEECH" )
r10339r10340
435439      PORT_DIPSETTING( 0x55, "80 track, 2 ms")
436440      PORT_DIPSETTING( 0xff, "80 track HD, 2 ms")
437441
442   // We do not want to show this setting; makes only sense for Geneve
443   PORT_START( "MODE" )
444   PORT_CONFNAME( 0x01, 0x00, "Ext. cards modification" ) PORT_CONDITION( "HFDCDIP", 0x0f, PORTCOND_EQUALS, GM_NEVER )
445      PORT_CONFSETTING(    0x00, "Standard" )
446      PORT_CONFSETTING(    GENMOD, "GenMod" )
447
438448   PORT_START( "DRVSPD" )
439449   PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 )
440450      PORT_CONFSETTING( 0x00, "No delay")
docs/messnew.txt
r10339r10340
5959- [GBA] Removed "Metroid Fusion" DMA hack. This fixes the lockup in
6060  "Caesar's Palace Advance". [Tim Schuerewegen]
6161
62- [GENEVE] Made SRAM size configurable. [Michael Zapf]
63 
62- [GENEVE] Made SRAM size configurable. Added MEMEX emulation. Genmod is now
63  a mode of the Geneve, not a separate system. Fixed Genmod. [Michael Zapf]
64 
6465- [M5] Added FD-5 floppy interface ROM, renamed driver to m5. [Curt Coder]
6566
6667- [PDP1] Made the CRT implementation a device.  [Atari Ace]

Previous 15994 Revisions Next


© 1998-2018 The MESS Team