Previous 15994 Revisions Next

r6653 Wednesday 16th December, 2009 at 08:26:16 UTC by Miodrag Milanović
TRS and V1050 drivers enabled
[src/mess]mess.mak messdriv.c
[src/mess/drivers]coco.c mc10.c v1050.c
[src/mess/machine]coco.c trs80.c
[src/mess/video]coco3.c

src/mess/video/coco3.c
r6652r6653
814814
815815   /* incidentals */
816816   machine->generic.paletteram.u8 = video->palette_ram;
817   memory_set_bankptr(machine, 10, machine->generic.paletteram.u8);
817   memory_set_bankptr(machine, "bank10", machine->generic.paletteram.u8);
818818
819819   /* font */
820820   rom = memory_region(machine, "maincpu");
src/mess/messdriv.c
r6652r6653
766766    DRIVER( mbee64 )    /* Microbee 64K (CP/M)                              */
767767
768768    /* Tandy / Radio Shack */
769//mess0135u3    DRIVER( trs80 )     /* TRS-80 Model I - Level I BASIC                   */
770//mess0135u3    DRIVER( trs80l2 )   /* TRS-80 Model I - Level II BASIC                  */
771//mess0135u3    DRIVER( sys80 )     /* EACA System 80                                   */
772//mess0135u3    DRIVER( lnw80 )     /* LNW Research LNW-80                              */
773//mess0135u3    DRIVER( trs80m3 )   /* TRS-80 Model III - Radio Shack/Tandy             */
774//mess0135u3    DRIVER( trs80m4 )
775//mess0135u3    DRIVER( trs80m4p )
776//mess0135u3    DRIVER( ht1080z ) /* Hradstechnika Szvetkezet HT-1080Z */
777//mess0135u3    DRIVER( ht1080z2 ) /* Hradstechnika Szvetkezet HT-1080Z Series II */
778//mess0135u3    DRIVER( ht108064 ) /* Hradstechnika Szvetkezet HT-1080Z/64 */
779//mess0135u3    DRIVER( radionic )  /* Radionic */
780//mess0135u3
781//mess0135u3    DRIVER( coco )      /* Color Computer                                   */
782//mess0135u3    DRIVER( cocoe )     /* Color Computer (Extended BASIC 1.0)              */
783//mess0135u3    DRIVER( coco2 )     /* Color Computer 2                                 */
784//mess0135u3    DRIVER( coco2b )    /* Color Computer 2B (uses M6847T1 video chip)      */
785//mess0135u3    DRIVER( coco3 )     /* Color Computer 3 (NTSC)                          */
786//mess0135u3    DRIVER( coco3p )    /* Color Computer 3 (PAL)                           */
787//mess0135u3    DRIVER( coco3h )    /* Hacked Color Computer 3 (6309)                   */
788//mess0135u3    DRIVER( dragon32 )  /* Dragon 32                                        */
789//mess0135u3    DRIVER( dragon64 )  /* Dragon 64                                        */
790//mess0135u3    DRIVER( d64plus )   /* Dragon 64 + Compusense Plus addon                */
791//mess0135u3    DRIVER( dgnalpha )  /* Dragon Alpha                                     */
792//mess0135u3    DRIVER( dgnbeta )   /* Dragon Beta                                      */
793//mess0135u3    DRIVER( tanodr64 )  /* Tano Dragon 64 (NTSC)                            */
794//mess0135u3    DRIVER( cp400 )     /* Prologica CP400                                  */
795//mess0135u3    DRIVER( mc10 )      /* MC-10                                            */
796//mess0135u3    DRIVER( alice )     /* Matra & Hachette Ordinateur Alice                */
769    DRIVER( trs80 )     /* TRS-80 Model I - Level I BASIC                   */
770    DRIVER( trs80l2 )   /* TRS-80 Model I - Level II BASIC                  */
771    DRIVER( sys80 )     /* EACA System 80                                   */
772    DRIVER( lnw80 )     /* LNW Research LNW-80                              */
773    DRIVER( trs80m3 )   /* TRS-80 Model III - Radio Shack/Tandy             */
774    DRIVER( trs80m4 )
775    DRIVER( trs80m4p )
776    DRIVER( ht1080z ) /* Hradstechnika Szvetkezet HT-1080Z */
777    DRIVER( ht1080z2 ) /* Hradstechnika Szvetkezet HT-1080Z Series II */
778    DRIVER( ht108064 ) /* Hradstechnika Szvetkezet HT-1080Z/64 */
779    DRIVER( radionic )  /* Radionic */
797780
781    DRIVER( coco )      /* Color Computer                                   */
782    DRIVER( cocoe )     /* Color Computer (Extended BASIC 1.0)              */
783    DRIVER( coco2 )     /* Color Computer 2                                 */
784    DRIVER( coco2b )    /* Color Computer 2B (uses M6847T1 video chip)      */
785    DRIVER( coco3 )     /* Color Computer 3 (NTSC)                          */
786    DRIVER( coco3p )    /* Color Computer 3 (PAL)                           */
787    DRIVER( coco3h )    /* Hacked Color Computer 3 (6309)                   */
788    DRIVER( dragon32 )  /* Dragon 32                                        */
789    DRIVER( dragon64 )  /* Dragon 64                                        */
790    DRIVER( d64plus )   /* Dragon 64 + Compusense Plus addon                */
791    DRIVER( dgnalpha )  /* Dragon Alpha                                     */
792    DRIVER( dgnbeta )   /* Dragon Beta                                      */
793    DRIVER( tanodr64 )  /* Tano Dragon 64 (NTSC)                            */
794    DRIVER( cp400 )     /* Prologica CP400                                  */
795    DRIVER( mc10 )      /* MC-10                                            */
796    DRIVER( alice )     /* Matra & Hachette Ordinateur Alice                */
797
798798    /* EACA */
799799    DRIVER( cgenie )    /* Colour Genie EG2000                              */
800800    /* system 80 trs80 compatible */
r6652r6653
14581458    DRIVER( kontiki )
14591459    DRIVER( tiki100 )
14601460    DRIVER( vcs80 )
1461//mess0135u3    DRIVER( v1050 )
1461    DRIVER( v1050 )
14621462    DRIVER( xerox820 )
14631463    DRIVER( xor100 )
14641464    DRIVER( iq151 )
src/mess/machine/coco.c
r6652r6653
20432043   int       block_index;      /* Index of block being processed */
20442044   int       wbank;         /* bank no to go in this block */
20452045   UINT8       *offset;      /* offset into coco rom for rom mapping */
2046
2046   char   bank[10];
2047     
20472048   /* Set last RAM block dependent on map type */
20482049   if (maptype)
20492050      last_ram_block=15;
r6652r6653
20532054   /* Map RAM blocks */
20542055   for(block_index=0;block_index<=last_ram_block;block_index++)
20552056   {
2057      sprintf(bank,"bank%d",block_index+1);
20562058      /* Lookup the apropreate wbank value dependent on ram size */
20572059      if (memsize==0)
20582060         wbank=memmap[block_index].wbank4;
r6652r6653
20702072      {
20712073         /* This deals with the bottom 32K page switch and the Dragon Plus paged ram */
20722074         if(block_index<8)
2073            memory_set_bankptr(machine, block_index+1,&bottom_32k[memmap[wbank-1].start]);
2075            memory_set_bankptr(machine, bank, &bottom_32k[memmap[wbank-1].start]);
20742076         else
2075            memory_set_bankptr(machine, block_index+1,&messram_get_ptr(devtag_get_device(machine, "messram"))[memmap[wbank-1].start]);
2077            memory_set_bankptr(machine, bank,&messram_get_ptr(devtag_get_device(machine, "messram"))[memmap[wbank-1].start]);
20762078
2077         memory_install_read_handler(space, memmap[block_index].start, memmap[block_index].end, 0, 0, block_index+1);
2078         memory_install_write_handler(space, memmap[block_index].start, memmap[block_index].end, 0, 0, block_index+1);
2079         memory_install_readwrite_bank(space, memmap[block_index].start, memmap[block_index].end, 0, 0, bank);
20792080      }
20802081      else
20812082      {
2082         memory_install_read_handler(space, memmap[block_index].start, memmap[block_index].end, 0, 0, STATIC_NOP);
2083         memory_install_write_handler(space, memmap[block_index].start, memmap[block_index].end, 0, 0, STATIC_NOP);
2083         memory_nop_readwrite(space, memmap[block_index].start, memmap[block_index].end, 0, 0);
20842084      }
20852085   }
20862086
r6652r6653
20922092
20932093      for(block_index=0;block_index<=7;block_index++)
20942094      {
2095         sprintf(bank,"bank%d",block_index+9);
20952096         /* If we are in the BASIC rom area $8000-$BFFF, then we map to the bas_rom_bank */
20962097         /* as this may be in a different block of coco_rom, in the Dragon 64 and Alpha */
20972098         /* as these machines have mutiple bios roms that can ocupy this area */
r6652r6653
21002101         else
21012102            offset = &cart_rom[(0x1000*(block_index-4)) % cart_length];
21022103
2103         memory_set_bankptr(machine, block_index + 9,offset);
2104         memory_install_write_handler(space, memmap[block_index+8].start, memmap[block_index+8].end, 0, 0, STATIC_NOP);
2104         memory_set_bankptr(machine, bank,offset);
2105         memory_nop_write(space, memmap[block_index+8].start, memmap[block_index+8].end, 0, 0);
21052106      }
21062107   }
21072108}
r6652r6653
23782379   };
23792380
23802381   const address_space *space = cputag_get_address_space( machine, "maincpu", ADDRESS_SPACE_PROGRAM );
2381   int i, offset, writebank;
2382   int i, offset;
23822383   UINT8 *readbank;
23832384   UINT8 *cart_rom = memory_region(machine, "cart");
2384
2385   char bank[10];
2386   
23852387   for (i = lowblock; i <= hiblock; i++)
23862388   {
2389      sprintf(bank,"bank%d",i+1);
2390     
23872391      offset = coco3_mmu_translate(machine, i, 0);
23882392      if (offset & 0x80000000)
23892393      {
r6652r6653
23922396            readbank = &cart_rom[offset & ~0x80008000];
23932397         else
23942398            readbank = &coco_rom[offset & ~0x80000000];
2395         writebank = STATIC_UNMAP;
2399         memory_unmap_write(space, bank_info[i].start, bank_info[i].end, 0, 0);
23962400      }
23972401      else
23982402      {
23992403         /* offset into normal RAM */
2400         readbank = &messram_get_ptr(devtag_get_device(machine, "messram"))[offset];
2401         writebank = i + 1;
2404         readbank = &messram_get_ptr(devtag_get_device(machine, "messram"))[offset];         
2405         memory_install_write_bank(space, bank_info[i].start, bank_info[i].end, 0, 0, bank);
24022406      }
24032407
24042408      /* set up the banks */
2405      memory_set_bankptr(machine, i + 1, readbank);
2406      memory_install_write_handler(space, bank_info[i].start, bank_info[i].end, 0, 0, writebank);
2409      memory_set_bankptr(machine, bank, readbank);     
24072410
24082411      if (LOG_MMU)
24092412      {
r6652r6653
25152518            }
25162519            else
25172520            {
2518               memory_install_read8_handler(space, 0xFF40, 0xFF5F, 0, 0, SMH_NOP);
2519               memory_install_write8_handler(space, 0xFF40, 0xFF5F, 0, 0, SMH_NOP);
2521               memory_nop_readwrite(space, 0xFF40, 0xFF5F, 0, 0);
25202522            }
25212523         }
25222524         break;
r6652r6653
28382840static void generic_coco12_dragon_init(running_machine *machine, const machine_init_interface *init)
28392841{
28402842   /* Set default RAM mapping */
2841   memory_set_bankptr(machine, 1, &messram_get_ptr(devtag_get_device(machine, "messram"))[0]);
2843   memory_set_bankptr(machine, "bank1", &messram_get_ptr(devtag_get_device(machine, "messram"))[0]);
28422844
28432845   /* Do generic Inits */
28442846   generic_init_machine(machine, init);
src/mess/machine/trs80.c
r6652r6653
343343         if (trs80_model4 & 4)   /* Model 4P gets RAM while Model 4 gets ROM */
344344         {
345345            if (trs80_model4 & 8)
346               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
346               memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu"));
347347            else
348               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000);
348               memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu") + 0x10000);
349349
350            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000);
351            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea);
350            memory_set_bankptr(mem->machine, "bank2", memory_region(mem->machine, "maincpu") + 0x11000);
351            memory_set_bankptr(mem->machine, "bank4", memory_region(mem->machine, "maincpu") + 0x137ea);
352352         }
353353         else
354354         {
355            memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
356            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x01000);
357            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x037ea);
355            memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu"));
356            memory_set_bankptr(mem->machine, "bank2", memory_region(mem->machine, "maincpu") + 0x01000);
357            memory_set_bankptr(mem->machine, "bank4", memory_region(mem->machine, "maincpu") + 0x037ea);
358358         }
359359
360         memory_set_bankptr(mem->machine, 7, memory_region(mem->machine, "maincpu") + 0x14000);
361         memory_set_bankptr(mem->machine, 8, memory_region(mem->machine, "maincpu") + 0x1f400);
362         memory_set_bankptr(mem->machine, 9, memory_region(mem->machine, "maincpu") + 0x1f800);
363         memory_set_bankptr(mem->machine, 11, memory_region(mem->machine, "maincpu") + 0x05000);
364         memory_set_bankptr(mem->machine, 12, memory_region(mem->machine, "maincpu") + 0x06000);
365         memory_set_bankptr(mem->machine, 14, memory_region(mem->machine, "maincpu") + 0x09000);
366         memory_set_bankptr(mem->machine, 15, memory_region(mem->machine, "maincpu") + 0x0a000);
367         memory_set_bankptr(mem->machine, 17, memory_region(mem->machine, "maincpu") + 0x14000);
368         memory_set_bankptr(mem->machine, 18, memory_region(mem->machine, "maincpu") + 0x1f400);
369         memory_set_bankptr(mem->machine, 19, memory_region(mem->machine, "maincpu") + 0x1f800);
360         memory_set_bankptr(mem->machine, "bank7", memory_region(mem->machine, "maincpu") + 0x14000);
361         memory_set_bankptr(mem->machine, "bank8", memory_region(mem->machine, "maincpu") + 0x1f400);
362         memory_set_bankptr(mem->machine, "bank9", memory_region(mem->machine, "maincpu") + 0x1f800);
363         memory_set_bankptr(mem->machine, "bank11", memory_region(mem->machine, "maincpu") + 0x05000);
364         memory_set_bankptr(mem->machine, "bank12", memory_region(mem->machine, "maincpu") + 0x06000);
365         memory_set_bankptr(mem->machine, "bank14", memory_region(mem->machine, "maincpu") + 0x09000);
366         memory_set_bankptr(mem->machine, "bank15", memory_region(mem->machine, "maincpu") + 0x0a000);
367         memory_set_bankptr(mem->machine, "bank17", memory_region(mem->machine, "maincpu") + 0x14000);
368         memory_set_bankptr(mem->machine, "bank18", memory_region(mem->machine, "maincpu") + 0x1f400);
369         memory_set_bankptr(mem->machine, "bank19", memory_region(mem->machine, "maincpu") + 0x1f800);
370370         memory_install_readwrite8_handler (mem, 0x37e8, 0x37e9, 0, 0, trs80_printer_r, trs80_printer_w);   /* 3 & 13 */
371371         memory_install_read8_handler (mem, 0x3800, 0x3bff, 0, 0, trs80_keyboard_r);   /* 5 */
372372         memory_install_readwrite8_handler (mem, 0x3c00, 0x3fff, 0, 0, trs80_videoram_r, trs80_videoram_w);   /* 6 & 16 */
r6652r6653
377377         if (trs80_model4 & 4)   /* Model 4P gets RAM while Model 4 gets ROM */
378378         {
379379            if (trs80_model4 & 8)
380               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
380               memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu"));
381381            else
382               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000);
382               memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu") + 0x10000);
383383
384            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000);
385            memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x137e8);
386            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea);
384            memory_set_bankptr(mem->machine, "bank2", memory_region(mem->machine, "maincpu") + 0x11000);
385            memory_set_bankptr(mem->machine, "bank3", memory_region(mem->machine, "maincpu") + 0x137e8);
386            memory_set_bankptr(mem->machine, "bank4", memory_region(mem->machine, "maincpu") + 0x137ea);
387387         }
388388         else
389389         {
390            memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
391            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x01000);
392            memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x037e8);
393            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x037ea);
390            memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu"));
391            memory_set_bankptr(mem->machine, "bank2", memory_region(mem->machine, "maincpu") + 0x01000);
392            memory_set_bankptr(mem->machine, "bank3", memory_region(mem->machine, "maincpu") + 0x037e8);
393            memory_set_bankptr(mem->machine, "bank4", memory_region(mem->machine, "maincpu") + 0x037ea);
394394         }
395395
396         memory_set_bankptr(mem->machine, 7, memory_region(mem->machine, "maincpu") + 0x14000);
397         memory_set_bankptr(mem->machine, 8, memory_region(mem->machine, "maincpu") + 0x1f400);
398         memory_set_bankptr(mem->machine, 9, memory_region(mem->machine, "maincpu") + 0x1f800);
399         memory_set_bankptr(mem->machine, 11, memory_region(mem->machine, "maincpu") + 0x10000);
400         memory_set_bankptr(mem->machine, 12, memory_region(mem->machine, "maincpu") + 0x11000);
401         memory_set_bankptr(mem->machine, 13, memory_region(mem->machine, "maincpu") + 0x137e8);
402         memory_set_bankptr(mem->machine, 14, memory_region(mem->machine, "maincpu") + 0x137ea);
403         memory_set_bankptr(mem->machine, 15, memory_region(mem->machine, "maincpu") + 0x0a000);
404         memory_set_bankptr(mem->machine, 17, memory_region(mem->machine, "maincpu") + 0x14000);
405         memory_set_bankptr(mem->machine, 18, memory_region(mem->machine, "maincpu") + 0x1f400);
406         memory_set_bankptr(mem->machine, 19, memory_region(mem->machine, "maincpu") + 0x1f800);
396         memory_set_bankptr(mem->machine, "bank7", memory_region(mem->machine, "maincpu") + 0x14000);
397         memory_set_bankptr(mem->machine, "bank8", memory_region(mem->machine, "maincpu") + 0x1f400);
398         memory_set_bankptr(mem->machine, "bank9", memory_region(mem->machine, "maincpu") + 0x1f800);
399         memory_set_bankptr(mem->machine, "bank11", memory_region(mem->machine, "maincpu") + 0x10000);
400         memory_set_bankptr(mem->machine, "bank12", memory_region(mem->machine, "maincpu") + 0x11000);
401         memory_set_bankptr(mem->machine, "bank13", memory_region(mem->machine, "maincpu") + 0x137e8);
402         memory_set_bankptr(mem->machine, "bank14", memory_region(mem->machine, "maincpu") + 0x137ea);
403         memory_set_bankptr(mem->machine, "bank15", memory_region(mem->machine, "maincpu") + 0x0a000);
404         memory_set_bankptr(mem->machine, "bank17", memory_region(mem->machine, "maincpu") + 0x14000);
405         memory_set_bankptr(mem->machine, "bank18", memory_region(mem->machine, "maincpu") + 0x1f400);
406         memory_set_bankptr(mem->machine, "bank19", memory_region(mem->machine, "maincpu") + 0x1f800);
407407         memory_install_read8_handler (mem, 0x3800, 0x3bff, 0, 0, trs80_keyboard_r);   /* 5 */
408408         memory_install_readwrite8_handler (mem, 0x3c00, 0x3fff, 0, 0, trs80_videoram_r, trs80_videoram_w);   /* 6 & 16 */
409409         break;
410410
411411      case 2:   /* keyboard and video are moved to high memory, and the rest is ram */
412         memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000);
413         memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000);
414         memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x137e8);
415         memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea);
416         memory_set_bankptr(mem->machine, 5, memory_region(mem->machine, "maincpu") + 0x13800);
417         memory_set_bankptr(mem->machine, 6, memory_region(mem->machine, "maincpu") + 0x13c00);
418         memory_set_bankptr(mem->machine, 7, memory_region(mem->machine, "maincpu") + 0x14000);
419         memory_set_bankptr(mem->machine, 11, memory_region(mem->machine, "maincpu") + 0x10000);
420         memory_set_bankptr(mem->machine, 12, memory_region(mem->machine, "maincpu") + 0x11000);
421         memory_set_bankptr(mem->machine, 13, memory_region(mem->machine, "maincpu") + 0x137e8);
422         memory_set_bankptr(mem->machine, 14, memory_region(mem->machine, "maincpu") + 0x137ea);
423         memory_set_bankptr(mem->machine, 15, memory_region(mem->machine, "maincpu") + 0x13800);
424         memory_set_bankptr(mem->machine, 16, memory_region(mem->machine, "maincpu") + 0x13c00);
425         memory_set_bankptr(mem->machine, 17, memory_region(mem->machine, "maincpu") + 0x14000);
426         memory_set_bankptr(mem->machine, 18, memory_region(mem->machine, "maincpu") + 0x0a000);
412         memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu") + 0x10000);
413         memory_set_bankptr(mem->machine, "bank2", memory_region(mem->machine, "maincpu") + 0x11000);
414         memory_set_bankptr(mem->machine, "bank3", memory_region(mem->machine, "maincpu") + 0x137e8);
415         memory_set_bankptr(mem->machine, "bank4", memory_region(mem->machine, "maincpu") + 0x137ea);
416         memory_set_bankptr(mem->machine, "bank5", memory_region(mem->machine, "maincpu") + 0x13800);
417         memory_set_bankptr(mem->machine, "bank6", memory_region(mem->machine, "maincpu") + 0x13c00);
418         memory_set_bankptr(mem->machine, "bank7", memory_region(mem->machine, "maincpu") + 0x14000);
419         memory_set_bankptr(mem->machine, "bank11", memory_region(mem->machine, "maincpu") + 0x10000);
420         memory_set_bankptr(mem->machine, "bank12", memory_region(mem->machine, "maincpu") + 0x11000);
421         memory_set_bankptr(mem->machine, "bank13", memory_region(mem->machine, "maincpu") + 0x137e8);
422         memory_set_bankptr(mem->machine, "bank14", memory_region(mem->machine, "maincpu") + 0x137ea);
423         memory_set_bankptr(mem->machine, "bank15", memory_region(mem->machine, "maincpu") + 0x13800);
424         memory_set_bankptr(mem->machine, "bank16", memory_region(mem->machine, "maincpu") + 0x13c00);
425         memory_set_bankptr(mem->machine, "bank17", memory_region(mem->machine, "maincpu") + 0x14000);
426         memory_set_bankptr(mem->machine, "bank18", memory_region(mem->machine, "maincpu") + 0x0a000);
427427         memory_install_read8_handler (mem, 0xf400, 0xf7ff, 0, 0, trs80_keyboard_r);   /* 8 */
428428         memory_install_readwrite8_handler (mem, 0xf800, 0xffff, 0, 0, trs80_videoram_r, trs80_videoram_w);   /* 9 & 19 */
429429         trs80_model4++;
430430         break;
431431
432432      case 3:   /* 64k of ram */
433         memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000);
434         memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000);
435         memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x137e8);
436         memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea);
437         memory_set_bankptr(mem->machine, 5, memory_region(mem->machine, "maincpu") + 0x13800);
438         memory_set_bankptr(mem->machine, 6, memory_region(mem->machine, "maincpu") + 0x13c00);
439         memory_set_bankptr(mem->machine, 7, memory_region(mem->machine, "maincpu") + 0x14000);
440         memory_set_bankptr(mem->machine, 8, memory_region(mem->machine, "maincpu") + 0x1f400);
441         memory_set_bankptr(mem->machine, 9, memory_region(mem->machine, "maincpu") + 0x1f800);
442         memory_set_bankptr(mem->machine, 11, memory_region(mem->machine, "maincpu") + 0x10000);
443         memory_set_bankptr(mem->machine, 12, memory_region(mem->machine, "maincpu") + 0x11000);
444         memory_set_bankptr(mem->machine, 13, memory_region(mem->machine, "maincpu") + 0x137e8);
445         memory_set_bankptr(mem->machine, 14, memory_region(mem->machine, "maincpu") + 0x137ea);
446         memory_set_bankptr(mem->machine, 15, memory_region(mem->machine, "maincpu") + 0x13800);
447         memory_set_bankptr(mem->machine, 16, memory_region(mem->machine, "maincpu") + 0x13c00);
448         memory_set_bankptr(mem->machine, 17, memory_region(mem->machine, "maincpu") + 0x14000);
449         memory_set_bankptr(mem->machine, 18, memory_region(mem->machine, "maincpu") + 0x1f400);
450         memory_set_bankptr(mem->machine, 19, memory_region(mem->machine, "maincpu") + 0x1f800);
433         memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu") + 0x10000);
434         memory_set_bankptr(mem->machine, "bank2", memory_region(mem->machine, "maincpu") + 0x11000);
435         memory_set_bankptr(mem->machine, "bank3", memory_region(mem->machine, "maincpu") + 0x137e8);
436         memory_set_bankptr(mem->machine, "bank4", memory_region(mem->machine, "maincpu") + 0x137ea);
437         memory_set_bankptr(mem->machine, "bank5", memory_region(mem->machine, "maincpu") + 0x13800);
438         memory_set_bankptr(mem->machine, "bank6", memory_region(mem->machine, "maincpu") + 0x13c00);
439         memory_set_bankptr(mem->machine, "bank7", memory_region(mem->machine, "maincpu") + 0x14000);
440         memory_set_bankptr(mem->machine, "bank8", memory_region(mem->machine, "maincpu") + 0x1f400);
441         memory_set_bankptr(mem->machine, "bank9", memory_region(mem->machine, "maincpu") + 0x1f800);
442         memory_set_bankptr(mem->machine, "bank11", memory_region(mem->machine, "maincpu") + 0x10000);
443         memory_set_bankptr(mem->machine, "bank12", memory_region(mem->machine, "maincpu") + 0x11000);
444         memory_set_bankptr(mem->machine, "bank13", memory_region(mem->machine, "maincpu") + 0x137e8);
445         memory_set_bankptr(mem->machine, "bank14", memory_region(mem->machine, "maincpu") + 0x137ea);
446         memory_set_bankptr(mem->machine, "bank15", memory_region(mem->machine, "maincpu") + 0x13800);
447         memory_set_bankptr(mem->machine, "bank16", memory_region(mem->machine, "maincpu") + 0x13c00);
448         memory_set_bankptr(mem->machine, "bank17", memory_region(mem->machine, "maincpu") + 0x14000);
449         memory_set_bankptr(mem->machine, "bank18", memory_region(mem->machine, "maincpu") + 0x1f400);
450         memory_set_bankptr(mem->machine, "bank19", memory_region(mem->machine, "maincpu") + 0x1f800);
451451         break;
452452   }
453453}
r6652r6653
477477      switch (trs80_model4 & 8)
478478      {
479479         case 0:      /* Read-only RAM replaces rom */
480            memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000);
480            memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu") + 0x10000);
481481            break;
482482         case 8:      /* Normal setup - rom enabled */
483            memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
483            memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu"));
484484            break;
485485      }
486486   }
r6652r6653
676676
677677   if (data & 8)
678678   {
679      memory_install_readwrite8_handler (mem, 0x0000, 0x3fff, 0, 0, SMH_UNMAP, SMH_UNMAP);
679      memory_unmap_readwrite (mem, 0x0000, 0x3fff, 0, 0);
680680      memory_install_readwrite8_handler (mem, 0x0000, 0x3fff, 0, 0, trs80_gfxram_r, trs80_gfxram_w);
681681   }
682682   else
683683   {
684      memory_install_readwrite8_handler (mem, 0x0000, 0x3fff, 0, 0, SMH_UNMAP, SMH_UNMAP);
685       memory_install_read8_handler (mem, 0x0000, 0x2fff, 0, 0, SMH_BANK(1));
686      memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
684      memory_unmap_readwrite (mem, 0x0000, 0x3fff, 0, 0);
685       memory_install_read_bank (mem, 0x0000, 0x2fff, 0, 0, "bank1");
686      memory_set_bankptr(mem->machine, "bank1", memory_region(mem->machine, "maincpu"));
687687      memory_install_readwrite8_handler (mem, 0x37e0, 0x37e3, 0, 0, trs80_irq_status_r, trs80_motor_w);
688688      memory_install_readwrite8_handler (mem, 0x37e8, 0x37eb, 0, 0, trs80_printer_r, trs80_printer_w);
689689      memory_install_readwrite8_device_handler (mem, trs80_fdc, 0x37ec, 0x37ec, 0, 0, trs80_wd179x_r, wd17xx_command_w);
r6652r6653
958958{
959959   const address_space *mem = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
960960   MACHINE_RESET_CALL(trs80);
961   memory_install_readwrite8_handler (mem, 0x0000, 0x0fff, 0, 0, SMH_BANK(1), SMH_BANK(11));
962   memory_install_readwrite8_handler (mem, 0x1000, 0x37e7, 0, 0, SMH_BANK(2), SMH_BANK(12));
963   memory_install_readwrite8_handler (mem, 0x37e8, 0x37e9, 0, 0, SMH_BANK(3), SMH_BANK(13));
964   memory_install_readwrite8_handler (mem, 0x37ea, 0x37ff, 0, 0, SMH_BANK(4), SMH_BANK(14));
965   memory_install_readwrite8_handler (mem, 0x3800, 0x3bff, 0, 0, SMH_BANK(5), SMH_BANK(15));
966   memory_install_readwrite8_handler (mem, 0x3c00, 0x3fff, 0, 0, SMH_BANK(6), SMH_BANK(16));
967   memory_install_readwrite8_handler (mem, 0x4000, 0xf3ff, 0, 0, SMH_BANK(7), SMH_BANK(17));
968   memory_install_readwrite8_handler (mem, 0xf400, 0xf7ff, 0, 0, SMH_BANK(8), SMH_BANK(18));
969   memory_install_readwrite8_handler (mem, 0xf800, 0xffff, 0, 0, SMH_BANK(9), SMH_BANK(19));
961   memory_install_read_bank (mem, 0x0000, 0x0fff, 0, 0, "bank1");
962   memory_install_read_bank (mem, 0x1000, 0x37e7, 0, 0, "bank2");
963   memory_install_read_bank (mem, 0x37e8, 0x37e9, 0, 0, "bank3");
964   memory_install_read_bank (mem, 0x37ea, 0x37ff, 0, 0, "bank4");
965   memory_install_read_bank (mem, 0x3800, 0x3bff, 0, 0, "bank5");
966   memory_install_read_bank (mem, 0x3c00, 0x3fff, 0, 0, "bank6");
967   memory_install_read_bank (mem, 0x4000, 0xf3ff, 0, 0, "bank7");
968   memory_install_read_bank (mem, 0xf400, 0xf7ff, 0, 0, "bank8");
969   memory_install_read_bank (mem, 0xf800, 0xffff, 0, 0, "bank9");
970
971   memory_install_write_bank (mem, 0x0000, 0x0fff, 0, 0, "bank11");
972   memory_install_write_bank (mem, 0x1000, 0x37e7, 0, 0, "bank12");
973   memory_install_write_bank (mem, 0x37e8, 0x37e9, 0, 0, "bank13");
974   memory_install_write_bank (mem, 0x37ea, 0x37ff, 0, 0, "bank14");
975   memory_install_write_bank (mem, 0x3800, 0x3bff, 0, 0, "bank15");
976   memory_install_write_bank (mem, 0x3c00, 0x3fff, 0, 0, "bank16");
977   memory_install_write_bank (mem, 0x4000, 0xf3ff, 0, 0, "bank17");
978   memory_install_write_bank (mem, 0xf400, 0xf7ff, 0, 0, "bank18");
979   memory_install_write_bank (mem, 0xf800, 0xffff, 0, 0, "bank19");
970980   trs80m4p_9c_w(mem, 0, 1);   /* Enable the ROM */
971981   trs80m4_84_w(mem, 0, 0);   /* switch in devices at power-on */
972982}
src/mess/mess.mak
r6652r6653
373373   $(MESSOBJ)/vtech.a \
374374   $(MESSOBJ)/xerox.a \
375375   $(MESSOBJ)/zvt.a \
376   $(MESSOBJ)/visual.a \
377   $(MESSOBJ)/trs.a \
376378   $(MESSOBJ)/shared.a \
377379#   $(MESSOBJ)/atari.a \
378380#   $(MESSOBJ)/apple.a \
r6652r6653
381383#   $(MESSOBJ)/hp.a \
382384#   $(MESSOBJ)/luxor.a \
383385#   $(MESSOBJ)/ti.a \
384#   $(MESSOBJ)/trs.a \
385#   $(MESSOBJ)/visual.a \
386386
387387#-------------------------------------------------
388388# the following files are general components and
src/mess/drivers/coco.c
r6652r6653
5353#define JOYSTICK_SENSITIVITY   100
5454
5555static ADDRESS_MAP_START( coco_map, ADDRESS_SPACE_PROGRAM, 8 )
56   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK(1)
57   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK(2)
58   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK(3)
59   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK(4)
60   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK(5)
61   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK(6)
62   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK(7)
63   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK(8)
64   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK(9)
65   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK(10)
66   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK(11)
67   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK(12)
68   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK(13)
69   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK(14)
70   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK(15)
71   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK(16)
56   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK("bank1")
57   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK("bank2")
58   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK("bank3")
59   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK("bank4")
60   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK("bank5")
61   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK("bank6")
62   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK("bank7")
63   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK("bank8")
64   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK("bank9")
65   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK("bank10")
66   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK("bank11")
67   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK("bank12")
68   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK("bank13")
69   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK("bank14")
70   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK("bank15")
71   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK("bank16")
7272   AM_RANGE(0xff00, 0xff1f) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
7373   AM_RANGE(0xff20, 0xff3f) AM_DEVREADWRITE("pia_1", pia6821_r, coco_pia_1_w)
7474   AM_RANGE(0xff40, 0xff7f) AM_DEVREADWRITE("coco_cartslot", coco_cartridge_r, coco_cartridge_w)
r6652r6653
8080
8181
8282static ADDRESS_MAP_START( dragon_map, ADDRESS_SPACE_PROGRAM, 8 )
83   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK(1)
84   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK(2)
85   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK(3)
86   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK(4)
87   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK(5)
88   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK(6)
89   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK(7)
90   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK(8)
91   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK(9)
92   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK(10)
93   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK(11)
94   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK(12)
95   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK(13)
96   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK(14)
97   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK(15)
98   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK(16)
83   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK("bank1")
84   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK("bank2")
85   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK("bank3")
86   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK("bank4")
87   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK("bank5")
88   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK("bank6")
89   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK("bank7")
90   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK("bank8")
91   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK("bank9")
92   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK("bank10")
93   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK("bank11")
94   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK("bank12")
95   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK("bank13")
96   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK("bank14")
97   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK("bank15")
98   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK("bank16")
9999   AM_RANGE(0xff00, 0xff1f) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
100100   AM_RANGE(0xff20, 0xff3f) AM_DEVREADWRITE("pia_1", pia6821_r, coco_pia_1_w)
101101   AM_RANGE(0xff40, 0xff7f) AM_DEVREADWRITE("coco_cartslot", coco_cartridge_r, coco_cartridge_w)
r6652r6653
115115 * which would make sense, but I'm not sure.
116116 */
117117static ADDRESS_MAP_START( coco3_map, ADDRESS_SPACE_PROGRAM, 8 )
118   AM_RANGE(0x0000, 0x1fff) AM_RAMBANK(1)
119   AM_RANGE(0x2000, 0x3fff) AM_RAMBANK(2)
120   AM_RANGE(0x4000, 0x5fff) AM_RAMBANK(3)
121   AM_RANGE(0x6000, 0x7fff) AM_RAMBANK(4)
122   AM_RANGE(0x8000, 0x9fff) AM_RAMBANK(5)
123   AM_RANGE(0xa000, 0xbfff) AM_RAMBANK(6)
124   AM_RANGE(0xc000, 0xdfff) AM_RAMBANK(7)
125   AM_RANGE(0xe000, 0xfdff) AM_RAMBANK(8)
126   AM_RANGE(0xfe00, 0xfeff) AM_RAMBANK(9)
118   AM_RANGE(0x0000, 0x1fff) AM_RAMBANK("bank1")
119   AM_RANGE(0x2000, 0x3fff) AM_RAMBANK("bank2")
120   AM_RANGE(0x4000, 0x5fff) AM_RAMBANK("bank3")
121   AM_RANGE(0x6000, 0x7fff) AM_RAMBANK("bank4")
122   AM_RANGE(0x8000, 0x9fff) AM_RAMBANK("bank5")
123   AM_RANGE(0xa000, 0xbfff) AM_RAMBANK("bank6")
124   AM_RANGE(0xc000, 0xdfff) AM_RAMBANK("bank7")
125   AM_RANGE(0xe000, 0xfdff) AM_RAMBANK("bank8")
126   AM_RANGE(0xfe00, 0xfeff) AM_RAMBANK("bank9")
127127   AM_RANGE(0xff00, 0xff1f) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
128128   AM_RANGE(0xff20, 0xff3f) AM_DEVREADWRITE("pia_1", pia6821_r, coco_pia_1_w)
129129   AM_RANGE(0xff40, 0xff7f) AM_DEVREADWRITE("coco_cartslot", coco_cartridge_r, coco_cartridge_w)
130130   AM_RANGE(0xff80, 0xff85) AM_DEVREADWRITE("vhd", coco_vhd_io_r, coco_vhd_io_w)
131131   AM_RANGE(0xff90, 0xff9f) AM_READWRITE(coco3_gime_r, coco3_gime_w)
132132   AM_RANGE(0xffa0, 0xffaf) AM_READWRITE(coco3_mmu_r, coco3_mmu_w)
133   AM_RANGE(0xffb0, 0xffbf) AM_READWRITE(SMH_BANK(10), coco3_palette_w)
133   AM_RANGE(0xffb0, 0xffbf) AM_READ_BANK("bank10") AM_WRITE(coco3_palette_w)
134134   AM_RANGE(0xffc0, 0xffdf) AM_DEVWRITE("sam", sam6883_w)
135135   AM_RANGE(0xffe0, 0xffef) AM_NOP
136136   AM_RANGE(0xfff0, 0xffff) AM_ROM AM_REGION("maincpu", 0x7ff0)
r6652r6653
139139
140140
141141static ADDRESS_MAP_START( d64_map, ADDRESS_SPACE_PROGRAM, 8 )
142   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK(1)
143   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK(2)
144   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK(3)
145   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK(4)
146   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK(5)
147   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK(6)
148   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK(7)
149   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK(8)
150   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK(9)
151   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK(10)
152   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK(11)
153   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK(12)
154   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK(13)
155   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK(14)
156   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK(15)
157   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK(16)
142   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK("bank1")
143   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK("bank2")
144   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK("bank3")
145   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK("bank4")
146   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK("bank5")
147   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK("bank6")
148   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK("bank7")
149   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK("bank8")
150   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK("bank9")
151   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK("bank10")
152   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK("bank11")
153   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK("bank12")
154   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK("bank13")
155   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK("bank14")
156   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK("bank15")
157   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK("bank16")
158158   AM_RANGE(0xff00, 0xff03) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)      AM_MIRROR(0x0018)
159159   AM_RANGE(0xff04, 0xff07) AM_DEVREADWRITE("acia", acia_6551_r,         acia_6551_w)   AM_MIRROR(0x0018)
160160   AM_RANGE(0xff20, 0xff3f) AM_DEVREADWRITE("pia_1", pia6821_r, coco_pia_1_w)
r6652r6653
173173*/
174174
175175static ADDRESS_MAP_START( d64_plus_map, ADDRESS_SPACE_PROGRAM, 8 )
176   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK(1)
177   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK(2)
178   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK(3)
179   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK(4)
180   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK(5)
181   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK(6)
182   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK(7)
183   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK(8)
184   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK(9)
185   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK(10)
186   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK(11)
187   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK(12)
188   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK(13)
189   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK(14)
190   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK(15)
191   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK(16)
176   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK("bank1")
177   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK("bank2")
178   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK("bank3")
179   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK("bank4")
180   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK("bank5")
181   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK("bank6")
182   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK("bank7")
183   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK("bank8")
184   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK("bank9")
185   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK("bank10")
186   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK("bank11")
187   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK("bank12")
188   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK("bank13")
189   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK("bank14")
190   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK("bank15")
191   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK("bank16")
192192   AM_RANGE(0xff00, 0xff03) AM_DEVREADWRITE("pia_0", pia6821_r,pia6821_w)      AM_MIRROR(0x0018)
193193   AM_RANGE(0xff04, 0xff07) AM_DEVREADWRITE("acia", acia_6551_r,acia_6551_w)   AM_MIRROR(0x0018)
194194   AM_RANGE(0xff20, 0xff3f) AM_DEVREADWRITE("pia_1", pia6821_r, coco_pia_1_w)
r6652r6653
251251
252252
253253static ADDRESS_MAP_START( dgnalpha_map, ADDRESS_SPACE_PROGRAM, 8 )
254   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK(1)
255   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK(2)
256   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK(3)
257   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK(4)
258   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK(5)
259   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK(6)
260   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK(7)
261   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK(8)
262   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK(9)
263   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK(10)
264   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK(11)
265   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK(12)
266   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK(13)
267   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK(14)
268   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK(15)
269   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK(16)
254   AM_RANGE(0x0000, 0x0FFF) AM_RAMBANK("bank1")
255   AM_RANGE(0x1000, 0x1FFF) AM_RAMBANK("bank2")
256   AM_RANGE(0x2000, 0x2FFF) AM_RAMBANK("bank3")
257   AM_RANGE(0x3000, 0x3FFF) AM_RAMBANK("bank4")
258   AM_RANGE(0x4000, 0x4FFF) AM_RAMBANK("bank5")
259   AM_RANGE(0x5000, 0x5FFF) AM_RAMBANK("bank6")
260   AM_RANGE(0x6000, 0x6FFF) AM_RAMBANK("bank7")
261   AM_RANGE(0x7000, 0x7FFF) AM_RAMBANK("bank8")
262   AM_RANGE(0x8000, 0x8FFF) AM_RAMBANK("bank9")
263   AM_RANGE(0x9000, 0x9FFF) AM_RAMBANK("bank10")
264   AM_RANGE(0xA000, 0xAFFF) AM_RAMBANK("bank11")
265   AM_RANGE(0xB000, 0xBFFF) AM_RAMBANK("bank12")
266   AM_RANGE(0xC000, 0xCFFF) AM_RAMBANK("bank13")
267   AM_RANGE(0xD000, 0xDFFF) AM_RAMBANK("bank14")
268   AM_RANGE(0xE000, 0xEFFF) AM_RAMBANK("bank15")
269   AM_RANGE(0xF000, 0xFEFF) AM_RAMBANK("bank16")
270270   AM_RANGE(0xff00, 0xff03) AM_DEVREADWRITE("pia_0", pia6821_r, pia6821_w)
271271   AM_RANGE(0xff04, 0xff07) AM_DEVREADWRITE("acia", acia_6551_r, acia_6551_w)
272272   AM_RANGE(0xff20, 0xff23) AM_DEVREADWRITE("pia_1", pia6821_r, coco_pia_1_w)
src/mess/drivers/v1050.c
r6652r6653
154154
155155   if (BIT(state->bank, 0))
156156   {
157      memory_install_readwrite8_handler(program, 0x0000, 0x1fff, 0, 0, SMH_BANK(1), SMH_BANK(1));
158      memory_set_bank(machine, 1, bank);
157      memory_install_readwrite_bank(program, 0x0000, 0x1fff, 0, 0, "bank1");
158      memory_set_bank(machine, "bank1", bank);
159159   }
160160   else
161161   {
162      memory_install_readwrite8_handler(program, 0x0000, 0x1fff, 0, 0, SMH_BANK(1), SMH_UNMAP);
163      memory_set_bank(machine, 1, 3);
162      memory_install_read_bank(program, 0x0000, 0x1fff, 0, 0, "bank1");
163      memory_unmap_write(program, 0x0000, 0x1fff, 0, 0);
164      memory_set_bank(machine, "bank1", 3);
164165   }
165166
166   memory_set_bank(machine, 2, bank);
167   memory_set_bank(machine, "bank2", bank);
167168
168169   if (bank == 2)
169170   {
170      memory_install_readwrite8_handler(program, 0x4000, 0xbfff, 0, 0, SMH_UNMAP, SMH_UNMAP);
171      memory_unmap_readwrite(program, 0x4000, 0xbfff, 0, 0);
171172   }
172173   else
173174   {
174      memory_install_readwrite8_handler(program, 0x4000, 0x7fff, 0, 0, SMH_BANK(3), SMH_BANK(3));
175      memory_install_readwrite8_handler(program, 0x8000, 0xbfff, 0, 0, SMH_BANK(4), SMH_BANK(4));
176      memory_set_bank(machine, 3, bank);
177      memory_set_bank(machine, 4, bank);
175      memory_install_readwrite_bank(program, 0x4000, 0x7fff, 0, 0, "bank3");
176      memory_install_readwrite_bank(program, 0x8000, 0xbfff, 0, 0, "bank4");
177      memory_set_bank(machine, "bank3", bank);
178      memory_set_bank(machine, "bank4", bank);
178179   }
179180
180   memory_set_bank(machine, 5, bank);
181   memory_set_bank(machine, "bank5", bank);
181182}
182183
183184/* Keyboard HACK */
r6652r6653
420421
421422static ADDRESS_MAP_START( v1050_mem, ADDRESS_SPACE_PROGRAM, 8 )
422423   ADDRESS_MAP_UNMAP_HIGH
423   AM_RANGE(0x0000, 0x1fff) AM_RAMBANK(1)
424   AM_RANGE(0x2000, 0x3fff) AM_RAMBANK(2)
425   AM_RANGE(0x4000, 0x7fff) AM_RAMBANK(3)
426   AM_RANGE(0x8000, 0xbfff) AM_RAMBANK(4)
427   AM_RANGE(0xc000, 0xffff) AM_RAMBANK(5)
424   AM_RANGE(0x0000, 0x1fff) AM_RAMBANK("bank1")
425   AM_RANGE(0x2000, 0x3fff) AM_RAMBANK("bank2")
426   AM_RANGE(0x4000, 0x7fff) AM_RAMBANK("bank3")
427   AM_RANGE(0x8000, 0xbfff) AM_RAMBANK("bank4")
428   AM_RANGE(0xc000, 0xffff) AM_RAMBANK("bank5")
428429ADDRESS_MAP_END
429430
430431static ADDRESS_MAP_START( v1050_io, ADDRESS_SPACE_IO, 8 )
r6652r6653
11231124   cpu_set_irq_callback(cputag_get_cpu(machine, Z80_TAG), v1050_int_ack);
11241125
11251126   /* setup memory banking */
1126   memory_configure_bank(machine, 1, 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")), 0x10000);
1127   memory_configure_bank(machine, 1, 2, 1, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x1c000, 0);
1128   memory_configure_bank(machine, 1, 3, 1, memory_region(machine, Z80_TAG), 0);
1127   memory_configure_bank(machine, "bank1", 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")), 0x10000);
1128   memory_configure_bank(machine, "bank1", 2, 1, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x1c000, 0);
1129   memory_configure_bank(machine, "bank1", 3, 1, memory_region(machine, Z80_TAG), 0);
11291130
1130   memory_install_readwrite8_handler(program, 0x2000, 0x3fff, 0, 0, SMH_BANK(2), SMH_BANK(2));
1131   memory_configure_bank(machine, 2, 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x2000, 0x10000);
1132   memory_configure_bank(machine, 2, 2, 1, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x1e000, 0);
1131   memory_install_readwrite_bank(program, 0x2000, 0x3fff, 0, 0, "bank2");
1132   memory_configure_bank(machine, "bank2", 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x2000, 0x10000);
1133   memory_configure_bank(machine, "bank2", 2, 1, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x1e000, 0);
11331134
1134   memory_install_readwrite8_handler(program, 0x4000, 0x7fff, 0, 0, SMH_BANK(3), SMH_BANK(3));
1135   memory_configure_bank(machine, 3, 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x4000, 0x10000);
1135   memory_install_readwrite_bank(program, 0x4000, 0x7fff, 0, 0, "bank3");
1136   memory_configure_bank(machine, "bank3", 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x4000, 0x10000);
11361137
1137   memory_install_readwrite8_handler(program, 0x8000, 0xbfff, 0, 0, SMH_BANK(4), SMH_BANK(4));
1138   memory_configure_bank(machine, 4, 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x8000, 0x10000);
1138   memory_install_readwrite_bank(program, 0x8000, 0xbfff, 0, 0, "bank4");
1139   memory_configure_bank(machine, "bank4", 0, 2, messram_get_ptr(devtag_get_device(machine, "messram")) + 0x8000, 0x10000);
11391140
1140   memory_install_readwrite8_handler(program, 0xc000, 0xffff, 0, 0, SMH_BANK(5), SMH_BANK(5));
1141   memory_configure_bank(machine, 5, 0, 3, messram_get_ptr(devtag_get_device(machine, "messram")) + 0xc000, 0);
1141   memory_install_readwrite_bank(program, 0xc000, 0xffff, 0, 0, "bank5");
1142   memory_configure_bank(machine, "bank5", 0, 3, messram_get_ptr(devtag_get_device(machine, "messram")) + 0xc000, 0);
11421143
11431144   v1050_bankswitch(machine);
11441145
src/mess/drivers/mc10.c
r6652r6653
162162   mc10->ram = messram_get_ptr(devtag_get_device(machine, "messram"));
163163   mc10->ram_size = messram_get_size(devtag_get_device(machine, "messram"));
164164
165   memory_set_bankptr(machine, 1, mc10->ram);
165   memory_set_bankptr(machine, "bank1", mc10->ram);
166166
167167   /* initialize memory expansion */
168168   if (mc10->ram_size == 20*1024)
169      memory_set_bankptr(machine, 2, mc10->ram + 0x1000);
169      memory_set_bankptr(machine, "bank2", mc10->ram + 0x1000);
170170   else
171      memory_install_readwrite8_handler(prg, 0x5000, 0x8fff, 0, 0, SMH_NOP, SMH_NOP);
171      memory_nop_readwrite(prg, 0x5000, 0x8fff, 0, 0);
172172
173173   /* register for state saving */
174174   state_save_register_global(machine, mc10->keyboard_strobe);
r6652r6653
181181
182182static ADDRESS_MAP_START( mc10_mem, ADDRESS_SPACE_PROGRAM, 8 )
183183   AM_RANGE(0x0100, 0x3fff) AM_NOP /* unused */
184   AM_RANGE(0x4000, 0x4fff) AM_RAMBANK(1) /* 4k internal ram */
185   AM_RANGE(0x5000, 0x8fff) AM_RAMBANK(2) /* 16k memory expansion */
184   AM_RANGE(0x4000, 0x4fff) AM_RAMBANK("bank1") /* 4k internal ram */
185   AM_RANGE(0x5000, 0x8fff) AM_RAMBANK("bank2") /* 16k memory expansion */
186186   AM_RANGE(0x9000, 0xbffe) AM_NOP /* unused */
187187   AM_RANGE(0xbfff, 0xbfff) AM_READWRITE(mc10_bfff_r, mc10_bfff_w)
188188   AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("maincpu", 0x0000) /* ROM */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team