Previous 199869 Revisions Next

r31011 Tuesday 17th June, 2014 at 19:20:01 UTC by hap
allow 8kb and 48kb sizes
[src/emu/bus/msx_cart]cartridge.c
[src/emu/bus/msx_slot]cartridge.c

trunk/src/emu/bus/msx_slot/cartridge.c
r31010r31011
137137      else
138138      {
139139         UINT32 length = this->length();
140
141         UINT32 length_aligned = 0x4000;
142         while (length_aligned < length )
140         
141         // determine how much space to allocate
142         UINT32 length_aligned = 0x10000;
143         
144         if (length <= 0x2000)
145            length_aligned = 0x2000;
146         else if (length <= 0x4000)
147            length_aligned = 0x4000;
148         else if (length <= 0x8000)
149            length_aligned = 0x8000;
150         else if (length <= 0xc000)
151            length_aligned = 0xc000;
152         else
143153         {
144            length_aligned *= 2;
154            while (length_aligned < length )
155               length_aligned *= 2;
145156         }
146157
147158         m_cartridge->rom_alloc(length_aligned);
trunk/src/emu/bus/msx_cart/cartridge.c
r31010r31011
6666
6767void msx_cart_interface::rom_alloc(UINT32 size)
6868{
69   m_rom.resize(size);
69   m_rom.resize_and_clear(size, 0xff);
7070}
7171
7272void msx_cart_interface::rom_vlm5030_alloc(UINT32 size)
7373{
74   m_rom_vlm5030.resize(size);
74   m_rom_vlm5030.resize_and_clear(size, 0xff);
7575}
7676
7777void msx_cart_interface::ram_alloc(UINT32 size)
7878{
79   m_ram.resize(size);
79   m_ram.resize_and_clear(size);
8080}
8181
8282void msx_cart_interface::sram_alloc(UINT32 size)
8383{
84   m_sram.resize(size);
84   m_sram.resize_and_clear(size);
8585}
8686
8787

Previous 199869 Revisions Next


© 1997-2024 The MAME Team