Previous 15994 Revisions Next

r6692 Thursday 17th December, 2009 at 15:07:13 UTC by Miodrag Milanović
Enabled HP driver and placed libraries in correct order in mess.mak
[src/mess]mess.mak messdriv.c
[src/mess/machine]hp48.c

src/mess/messdriv.c
r6691r6692
10691069    DRIVER( comquest )  /* Comquest Plus German                             */
10701070
10711071    /* Hewlett Packard */
1072//mess0135u3    DRIVER( hp38g )
1073//mess0135u3    DRIVER( hp39g )
1074//mess0135u3    DRIVER( hp48s )     /* HP 48S */
1075//mess0135u3    DRIVER( hp48sx )    /* HP 48SX */
1076//mess0135u3    DRIVER( hp48g )     /* HP 48G */
1077//mess0135u3    DRIVER( hp48gx )    /* HP 48GX */
1078//mess0135u3    DRIVER( hp48gp )        /* HP 48G+ */
1079//mess0135u3    DRIVER( hp49g )
1080//mess0135u3    DRIVER( hp16500b )
1072    DRIVER( hp38g )
1073    DRIVER( hp39g )
1074    DRIVER( hp48s )     /* HP 48S */
1075    DRIVER( hp48sx )    /* HP 48SX */
1076    DRIVER( hp48g )     /* HP 48G */
1077    DRIVER( hp48gx )    /* HP 48GX */
1078    DRIVER( hp48gp )        /* HP 48G+ */
1079    DRIVER( hp49g )
1080    DRIVER( hp16500b )
10811081
10821082    /* SpectraVideo */
10831083    DRIVER( svi318 )    /* SVI-318 (PAL)                                    */
src/mess/machine/hp48.c
r6691r6692
5353   read8_space_func read;
5454   write8_space_func write;
5555   void* data;                  /* non-NULL for banks */
56
56   int isnop;
57   
5758   /* configurable part */
5859   UINT8  state;                /* one of HP48_MODULE_ */
5960   UINT32 base;                 /* base address */
r6691r6692
800801      UINT32 mirror = nselect_mask & ~off_mask;
801802      UINT32 end = base + (off_mask & nselect_mask);
802803      char bank[10];
803
804      sprintf(bank,"bank%d",i);
805     
804806      if ( hp48_modules[i].state != HP48_MODULE_CONFIGURED ) continue;
805807
806808      if ( (i == 4) && !nce2_enable ) continue;
r6691r6692
812814              select_mask, hp48_module_names[i] );
813815         continue;
814816      }
815      memory_install_read8_handler( space, base, end, 0, mirror, hp48_modules[i].read );
816      memory_install_write8_handler( space, base, end, 0, mirror, hp48_modules[i].write );
817
817      if ((hp48_modules[i].data == NULL) && (hp48_modules[i].write == NULL) && (hp48_modules[i].read == NULL)) {
818         memory_unmap_readwrite(space, base, end, 0, mirror);
819      } else {
820         if (hp48_modules[i].data !=NULL) {
821            memory_install_read_bank( space, base, end, 0, mirror, bank );
822         } else {
823            memory_install_read8_handler( space, base, end, 0, mirror, hp48_modules[i].read );
824         }
825         if (hp48_modules[i].isnop == 1) {
826            memory_nop_write(space, base, end, 0, mirror);
827         } else {
828            if (hp48_modules[i].data !=NULL) {
829               memory_install_write_bank( space, base, end, 0, mirror, bank );
830            } else {
831               memory_install_write8_handler( space, base, end, 0, mirror, hp48_modules[i].write );
832            }
833         }
834      }
818835      LOG(( "hp48_apply_modules: module %s configured at %05x-%05x, mirror %05x\n",
819836            hp48_module_names[i], base, end, mirror ));
820837
821838      if ( hp48_modules[i].data )
822839      {
823         sprintf(bank,"bank%d",i);
824840         memory_set_bankptr( space->machine, bank, hp48_modules[i].data );
825841      }
826842
r6691r6692
10041020   hp48_port_data[conf->port] = malloc( 2 * size );
10051021   memset( hp48_port_data[conf->port], 0, 2 * size );
10061022   hp48_modules[conf->module].off_mask = 2 * (( size > 128 * 1024 ) ? 128 * 1024 : size) - 1;
1007   hp48_modules[conf->module].read     = SMH_BANK((FPTR)conf->module);
1008   hp48_modules[conf->module].write    = hp48_port_write[conf->port] ? (void*)SMH_BANK((FPTR)conf->module) : SMH_NOP;
1023   hp48_modules[conf->module].read     = NULL;
1024   hp48_modules[conf->module].write    = NULL;
1025   hp48_modules[conf->module].isnop    = 0;
1026   if (hp48_port_write[conf->port]) {
1027      hp48_modules[conf->module].isnop    = 1;
1028   }
10091029   hp48_modules[conf->module].data     = hp48_port_data[conf->port];
10101030   hp48_apply_modules( image->machine, NULL );
10111031}
r6691r6692
10151035{
10161036   struct hp48_port_config* conf = (struct hp48_port_config*) image->static_config;
10171037   hp48_modules[conf->module].off_mask = 0x00fff;  /* 2 KB */
1018   hp48_modules[conf->module].read     = SMH_UNMAP;
1019   hp48_modules[conf->module].write    = SMH_UNMAP;
1038   hp48_modules[conf->module].read     = NULL;
1039   hp48_modules[conf->module].write    = NULL;
10201040   hp48_modules[conf->module].data     = NULL;
10211041}
10221042
r6691r6692
11221142   for ( i = 0; i < 6; i++ )
11231143   {
11241144      hp48_modules[i].off_mask = 0x00fff;  /* 2 KB */
1125      hp48_modules[i].read     = SMH_UNMAP;
1126      hp48_modules[i].write    = SMH_UNMAP;
1145      hp48_modules[i].read     = NULL;
1146      hp48_modules[i].write    = NULL;
11271147      hp48_modules[i].data     = NULL;
11281148   }
11291149   hp48_port_size[0] = 0;
r6691r6692
11681188   hp48_bank_switch = 0;
11691189
11701190   /* static module configuration */
1171
1191   memset(hp48_modules,0,sizeof(hp48_modules)); // to put all on 0
11721192   /* I/O RAM */
11731193   hp48_modules[0].off_mask = 0x0003f;  /* 32 B */
11741194   hp48_modules[0].read     = hp48_io_r;
r6691r6692
11761196
11771197   /* internal RAM */
11781198   hp48_modules[1].off_mask = 2 * ram_size - 1;
1179   hp48_modules[1].read     = SMH_BANK(1);
1180   hp48_modules[1].write    = SMH_BANK(1);
1199   hp48_modules[1].read    = NULL;
1200   hp48_modules[1].write    = NULL;
11811201   hp48_modules[1].data     = ram;
11821202
11831203   if ( HP48_G_SERIES )
r6691r6692
11851205                /* bank switcher */
11861206      hp48_modules[2].off_mask = 0x00fff;  /* 2 KB */
11871207      hp48_modules[2].read     = hp48_bank_r;
1188      hp48_modules[2].write    = SMH_NOP;
1208      hp48_modules[2].write    = NULL;
11891209   }
11901210
11911211   /* ROM */
11921212   hp48_modules[5].off_mask = 2 * rom_size - 1;
1193   hp48_modules[5].read     = SMH_BANK(5);
1194   hp48_modules[5].write    = SMH_NOP;
1213   hp48_modules[5].read    = NULL;
1214   hp48_modules[5].write    = NULL;
1215   hp48_modules[5].isnop    = 1;
11951216   hp48_modules[5].data     = rom;
11961217
11971218   /* timers */
src/mess/mess.mak
r6691r6692
248248   $(MESSOBJ)/amiga.a \
249249   $(MESSOBJ)/amstrad.a \
250250   $(MESSOBJ)/apf.a \
251   $(MESSOBJ)/apple.a \
251252   $(MESSOBJ)/applied.a \
252253   $(MESSOBJ)/arcadia.a \
253254   $(MESSOBJ)/ascii.a \
254255   $(MESSOBJ)/at.a \
256   $(MESSOBJ)/atari.a \
255257   $(MESSOBJ)/bally.a \
256258   $(MESSOBJ)/bandai.a \
259   $(MESSOBJ)/be.a \
257260   $(MESSOBJ)/bnpo.a \
258261   $(MESSOBJ)/bondwell.a \
259262   $(MESSOBJ)/booth.a \
r6691r6692
267270   $(MESSOBJ)/coleco.a \
268271   $(MESSOBJ)/comx.a \
269272   $(MESSOBJ)/concept.a \
273   $(MESSOBJ)/conitec.a \
270274   $(MESSOBJ)/cybiko.a \
271275   $(MESSOBJ)/dai.a \
272276   $(MESSOBJ)/ddr.a \
r6691r6692
296300   $(MESSOBJ)/hegener.a \
297301   $(MESSOBJ)/homebrew.a \
298302   $(MESSOBJ)/homelab.a \
303   $(MESSOBJ)/hp.a \
299304   $(MESSOBJ)/intel.a \
300305   $(MESSOBJ)/intelgnt.a \
301306   $(MESSOBJ)/interact.a \
r6691r6692
305310   $(MESSOBJ)/kaypro.a \
306311   $(MESSOBJ)/koei.a \
307312   $(MESSOBJ)/kyocera.a \
313   $(MESSOBJ)/luxor.a \
308314   $(MESSOBJ)/magnavox.a \
309315   $(MESSOBJ)/matsushi.a \
310316   $(MESSOBJ)/mattel.a \
r6691r6692
364370   $(MESSOBJ)/tem.a \
365371   $(MESSOBJ)/tesla.a \
366372   $(MESSOBJ)/thomson.a \
373   $(MESSOBJ)/ti.a \
367374   $(MESSOBJ)/tiger.a \
368375   $(MESSOBJ)/tiki.a \
369376   $(MESSOBJ)/tomy.a \
377   $(MESSOBJ)/trs.a \
370378   $(MESSOBJ)/unisys.a \
371379   $(MESSOBJ)/veb.a \
380   $(MESSOBJ)/visual.a \
372381   $(MESSOBJ)/votrax.a \
373382   $(MESSOBJ)/vtech.a \
374383   $(MESSOBJ)/xerox.a \
375384   $(MESSOBJ)/zvt.a \
376   $(MESSOBJ)/visual.a \
377   $(MESSOBJ)/trs.a \
378   $(MESSOBJ)/conitec.a \
379   $(MESSOBJ)/atari.a \
380   $(MESSOBJ)/ti.a \
381   $(MESSOBJ)/luxor.a \
382   $(MESSOBJ)/be.a \
383   $(MESSOBJ)/apple.a \
384385   $(MESSOBJ)/shared.a \
385#   $(MESSOBJ)/hp.a \
386386
387387#-------------------------------------------------
388388# the following files are general components and

Previous 15994 Revisions Next


© 1998-2018 The MESS Team