Previous 15994 Revisions Next

r10263 Tuesday 1st February, 2011 at 21:46:44 UTC by Michael Zapf
Geneve on-board SRAM size configurable
[docs]messnew.txt
[src/mess/drivers]geneve.c
[src/mess/machine/ti99]genboard.c

src/mess/machine/ti99/genboard.c
r10262r10263
11/***************************************************************************
22    Geneve 9640 system board
33
4    Michael Zapf, October 2010
4    Onboard SRAM configuration:
5    There is an adjustable SRAM configuration on board, representing the
6    various enhancements by users.
7
8    The standard memory configuration as reported by chkdsk (32 KiB):
9    557056 bytes of total memory
10
11    With 64 KiB SRAM:
12    589824 bytes of total memory
13
14    With 384 KiB SRAM:
15    917504 bytes of total memory
16
17    The original 32 KiB SRAM memory needs to be expanded to 64 KiB for
18    MDOS 2.50s and higher, or the system will lock up. Therefore the emulation
19    default is 64 KiB.
20
21    The ultimate expansion is a 512 KiB SRAM circuit wired to the gate array
22    to provide 48 pages of fast static RAM. This also requires to build an
23    adapter for a larger socket. From the 512 KiB, only 384 KiB will be
24    accessed, since the higher pages are hidden behind the EPROM pages.
25
26    Michael Zapf, February 2011
527***************************************************************************/
628
729#include "emu.h"
r10262r10263
1739#define KEYAUTOREPEATDELAY 30
1840#define KEYAUTOREPEATRATE 6
1941
20#define SRAM_SIZE 64*1024
42#define SRAM_SIZE 384*1024   // maximum expansion on-board
2143#define DRAM_SIZE 512*1024
2244
2345typedef struct _genboard_state
r10262r10263
6183   UINT8   *sram;
6284   UINT8   *dram;
6385   UINT8   *eprom;
86   int      sram_mask, sram_val;
6487
6588   /* Mapper */
6689   int    geneve_mode;
r10262r10263
362385      ti99_peb_data_rz(board->peribox, physaddr, &value);
363386      return value;
364387   }
365   if ((physaddr & 0x1f0000)==0x1d0000)
366   {
367      // 1 1101 xxxx xxxx xxxx xxxx on-board sram (64K)
368      value = board->sram[physaddr & 0x00ffff];
369      return value;
370   }
388
371389   if ((physaddr & 0x1e0000)==0x1e0000)
372390   {
373391      // 1 111. ..xx xxxx xxxx xxxx on-board eprom (16K)
r10262r10263
376394      return value;
377395   }
378396
397   if ((physaddr & board->sram_mask)==board->sram_val)
398   {
399      //  1 100. .... .... .... .... on-board sram (128K) -+
400      //  1 101. .... .... .... .... on-board sram (128K) -+-- maximum SRAM expansion
401      //  1 1100 .... .... .... .... on-board sram (64K) --+
402      //  1 1101 0... .... .... .... on-board sram (32K) - additional 32 KiB required for MDOS 2.50s and higher
403      //  1 1101 1... .... .... .... on-board sram (32K) - standard setup
404      // NOTE: This must be tested after the EPROM test above
405      value = board->sram[physaddr & 0x00ffff];
406      return value;
407   }
408
379409   return 0;
380410}
381411/*
r10262r10263
542572      ti99_peb_data_w(board->peribox, physaddr, data);
543573      return;
544574   }
545   if ((physaddr & 0x1f0000)==0x1d0000)
575
576   if ((physaddr & 0x1e0000)==0x1e0000)
546577   {
547      // SRAM write
578      // 1 111. ..xx xxxx xxxx xxxx on-board eprom (16K)
579      // mirrored for f0, f2, f4, ...; f1, f3, f5, ...
580      // Ignore EPROM write
581      return;
582   }
583
584   if ((physaddr & board->sram_mask)==board->sram_val)
585   {
586      //  1 100. .... .... .... .... on-board sram (128K) -+
587      //  1 101. .... .... .... .... on-board sram (128K) -+-- maximum SRAM expansion
588      //  1 1100 .... .... .... .... on-board sram (64K) --+
589      //  1 1101 0... .... .... .... on-board sram (32K) - additional 32 KiB required for MDOS 2.50s and higher
590      //  1 1101 1... .... .... .... on-board sram (32K) - standard setup
591      // NOTE: This must be tested after the EPROM test above
548592      board->sram[physaddr & 0x00ffff] = data;
549593      return;
550594   }
551   // Ignore EPROM write
552595}
553596
554597/*
r10262r10263
5846271 0111 101. .... .... .... p-box address block axxx
5856281 0111 11.. .... .... .... p-box address block cxxx, exxx
586629
5871 1101 .... .... .... .... on-board sram (64K)
6301 100. .... .... .... .... on-board sram (128K) -+
6311 101. .... .... .... .... on-board sram (128K) -+-- maximum SRAM expansion
6321 1100 .... .... .... .... on-board sram (64K) --+
6331 1101 0... .... .... .... on-board sram (32K) - additional 32 KiB required for MDOS 2.50s and higher
6341 1101 1... .... .... .... on-board sram (32K) - standard setup
635
5886361 111. ..0. .... .... .... on-board boot1
5896371 111. ..1. .... .... .... on-board boot2
590638
r10262r10263
12501298   {
12511299      board->eprom = device->machine->region("maincpu")->base() + 0x4000;
12521300   }
1301
1302   switch (input_port_read(device->machine, "SRAM"))
1303   {
1304/*  1 100. .... .... .... .... on-board sram (128K) -+
1305    1 101. .... .... .... .... on-board sram (128K) -+-- maximum SRAM expansion
1306    1 1100 .... .... .... .... on-board sram (64K) --+
1307    1 1101 0... .... .... .... on-board sram (32K) - additional 32 KiB required for MDOS 2.50s and higher
1308    1 1101 1... .... .... .... on-board sram (32K) - standard setup
1309*/
1310   case 0: // 32 KiB
1311      board->sram_mask =   0x1f8000;
1312      board->sram_val =   0x1d8000;
1313      break;
1314   case 1: // 64 KiB
1315      board->sram_mask =   0x1f0000;
1316      board->sram_val =   0x1d0000;
1317      break;
1318   case 2: // 384 KiB (actually 512 KiB, but the EPROM masks the upper 128 KiB)
1319      board->sram_mask =   0x180000;
1320      board->sram_val =   0x180000;
1321      break;
1322   }
12531323}
12541324
12551325static const char DEVTEMPLATE_SOURCE[] = __FILE__;
src/mess/drivers/geneve.c
r10262r10263
251251      PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
252252      PORT_CONFSETTING( 0x01, DEF_STR( On ) )
253253
254   PORT_START( "SRAM" )
255   PORT_CONFNAME( 0x03, 0x01, "Onboard SRAM" )
256      PORT_CONFSETTING( 0x00, "32 KiB" )
257      PORT_CONFSETTING( 0x01, "64 KiB" )
258      PORT_CONFSETTING( 0x02, "384 KiB" )
259
254260   PORT_START( "DISKCTRL" )
255261   PORT_CONFNAME( 0x07, 0x03, "Disk controller" )
256262      PORT_CONFSETTING(    0x00, DEF_STR( None ) )
r10262r10263
279285      PORT_DIPSETTING( 0xaa, "40 track, 8 ms")
280286      PORT_DIPSETTING( 0x55, "80 track, 2 ms")
281287      PORT_DIPSETTING( 0xff, "80 track HD, 2 ms")
282     
288
283289   PORT_START( "V9938-MEM" )
284290   PORT_CONFNAME( 0x01, 0x00, "V9938 RAM size" )
285291      PORT_CONFSETTING(   0x00, "128 KiB" )
286      PORT_CONFSETTING(   0x01, "192 KiB" )   
292      PORT_CONFSETTING(   0x01, "192 KiB" )
287293
288294   PORT_START( "DRVSPD" )
289295   PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 )
docs/messnew.txt
r10262r10263
5353
5454- [GBA] Removed "Metroid Fusion" DMA hack. This fixes the lockup in
5555  "Caesar's Palace Advance". [Tim Schuerewegen]
56
57- [GENEVE] Made SRAM size configurable. [Michael Zapf]
5658 
5759- [M5] Added FD-5 floppy interface ROM, renamed driver to m5. [Curt Coder]
5860

Previous 15994 Revisions Next


© 1998-2018 The MESS Team