src/mess/video/gb.c
| r14278 | r14279 | |
| 1236 | 1236 | if (mode == GB_VIDEO_CGB) vram_size = 0x4000; |
| 1237 | 1237 | |
| 1238 | 1238 | /* free regions if already allocated */ |
| 1239 | | if (machine.region("gfx1")->base()) machine.region_free("gfx1"); |
| 1240 | | if (machine.region("gfx2")->base()) machine.region_free("gfx2"); |
| 1239 | if (machine.region("gfx1")->base()) machine.region_free(":gfx1"); |
| 1240 | if (machine.region("gfx2")->base()) machine.region_free(":gfx2"); |
| 1241 | 1241 | |
| 1242 | | state->m_lcd.gb_vram = machine.region_alloc("gfx1", vram_size, 1, ENDIANNESS_LITTLE ); |
| 1243 | | state->m_lcd.gb_oam = machine.region_alloc("gfx2", 0x100, 1, ENDIANNESS_LITTLE ); |
| 1242 | state->m_lcd.gb_vram = machine.region_alloc(":gfx1", vram_size, 1, ENDIANNESS_LITTLE ); |
| 1243 | state->m_lcd.gb_oam = machine.region_alloc(":gfx2", 0x100, 1, ENDIANNESS_LITTLE ); |
| 1244 | 1244 | memset( state->m_lcd.gb_vram->base(), 0, vram_size ); |
| 1245 | 1245 | |
| 1246 | 1246 | state->m_lcd.gb_vram_ptr = state->m_lcd.gb_vram->base(); |