Previous 199869 Revisions Next

r22024 Friday 22nd March, 2013 at 11:03:16 UTC by Fabio Priuli
(MESS) speeding up slot implementation of the SVP add-on chip. nw.
[src/mess/machine]md_slot.c md_slot.h md_svp.c md_svp.h

trunk/src/mess/machine/md_svp.c
r22023r22024
314314//-------------------------------------------------
315315
316316ADDRESS_MAP_START( md_svp_ssp_map, AS_PROGRAM, 16, md_rom_svp_device )
317   AM_RANGE(0x0000, 0x03ff) AM_READ(rom_read1)
318   AM_RANGE(0x0400, 0xffff) AM_READ(rom_read2)
319//   AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("bank3")
320//   AM_RANGE(0x0400, 0xffff) AM_ROMBANK("bank4")
317//   AM_RANGE(0x0000, 0x03ff) AM_READ(rom_read1)
318//   AM_RANGE(0x0400, 0xffff) AM_READ(rom_read2)
319   AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("iram_svp")
320   AM_RANGE(0x0400, 0xffff) AM_ROMBANK("cart_svp")
321321ADDRESS_MAP_END
322322
323323//-------------------------------------------------
r22023r22024
361361}
362362
363363
364void md_rom_svp_device::set_bank_to_rom(const char *banktag, UINT32 offset)
365{
366   if (membank(banktag))
367      membank(banktag)->set_base(m_rom + offset);
368}
369
370
364371void md_rom_svp_device::device_start()
365372{
366373   memset(m_pmac_read, 0, ARRAY_LENGTH(m_pmac_read));
r22023r22024
373380   m_xst2 = 0;
374381
375382   /* SVP stuff */
383   // DRAM
376384   m_dram = auto_alloc_array(machine(), UINT8, 0x20000);
385   // IRAM
377386   m_iram = auto_alloc_array(machine(), UINT8, 0x800);
387   this->membank("iram_svp")->set_base(m_iram);
388   // the other bank, "cart_svp", is setup at call_load
378389}
379390
380391READ16_MEMBER(md_rom_svp_device::read)
trunk/src/mess/machine/md_svp.h
r22023r22024
2424   virtual void device_config_complete() { m_shortname = "md_rom_svp"; }
2525   virtual machine_config_constructor device_mconfig_additions() const;
2626   virtual ioport_constructor device_input_ports() const;
27   virtual void set_bank_to_rom(const char *banktag, UINT32 offset);
2728   
2829   required_device<device_t> m_svp;
2930   required_ioport m_test_ipt;
trunk/src/mess/machine/md_slot.c
r22023r22024
335335
336336      if (res == IMAGE_INIT_PASS)
337337      {
338         //speed-up rom access from SVP add-on, if present
339         if (m_type == SEGA_SVP)
340            m_cart->set_bank_to_rom("cart_svp", 0x800/2);
341
338342         // STEP 3: install memory handlers for this type of cart
339343         setup_custom_mappers();
340344
trunk/src/mess/machine/md_slot.h
r22023r22024
109109   virtual UINT16* get_nvram_base() { return m_nvram; };
110110   virtual UINT32 get_rom_size() { return m_rom_size; };
111111   virtual UINT32 get_nvram_size() { return m_nvram_size; };
112   virtual void set_bank_to_rom(const char *banktag, UINT32 offset) {};
112113
113114   void rom_map_setup(UINT32 size);
114115   UINT32 get_padded_size(UINT32 size);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team