src/mess/machine/gb.c
| r1633 | r1634 | |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | static WRITE8_HANDLER( gb_ram_bank_select_mbc6 ) { |
| 452 | | logerror( "0x%04X: writei to mbc6 ram enable area: %04X <- 0x%02X\n", activecpu_get_pc(), offset, data ); |
| 452 | logerror( "0x%04X: write to mbc6 ram enable area: %04X <- 0x%02X\n", activecpu_get_pc(), offset, data ); |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | static WRITE8_HANDLER( gb_rom_bank_select_mbc6_1 ) { |
| r1633 | r1634 | |
| 1153 | 1153 | |
| 1154 | 1154 | for( I = 0; I < 2048; I++ ) |
| 1155 | 1155 | { |
| 1156 | | col = program_read_byte_8 (0x8800 + (I*2)); |
| 1157 | | col |= (UINT16)(program_read_byte_8 (0x8800 + (I*2) + 1)) << 8; |
| 1156 | col = ( gb_vram[ 0x0800 + (I*2) + 1 ] << 8 ) | gb_vram[ 0x0800 + (I*2) ]; |
| 1158 | 1157 | sgb_pal_data[I] = col; |
| 1159 | 1158 | } |
| 1160 | 1159 | } |
| r1633 | r1634 | |
| 1198 | 1197 | memcpy( sgb_tile_map, gb_vram + 0x1000, 2048 ); |
| 1199 | 1198 | for( I = 0; I < 64; I++ ) |
| 1200 | 1199 | { |
| 1201 | | col = program_read_byte_8 (0x8800 + (I*2)); |
| 1202 | | col |= (UINT16)(program_read_byte_8 (0x8800 + (I*2) + 1)) << 8; |
| 1200 | col = ( gb_vram[ 0x0800 + (I*2) + 1 ] << 8 ) | gb_vram[ 0x0800 + (I*2) ]; |
| 1203 | 1201 | sgb_pal[SGB_BORDER_PAL_OFFSET + I] = col; |
| 1204 | 1202 | } |
| 1205 | 1203 | } |
| r1633 | r1634 | |
| 1208 | 1206 | memcpy( sgb_tile_map, gb_vram + 0x0800, 2048 ); |
| 1209 | 1207 | for( I = 0; I < 64; I++ ) |
| 1210 | 1208 | { |
| 1211 | | col = program_read_byte_8 (0x9000 + (I*2)); |
| 1212 | | col |= (UINT16)(program_read_byte_8 (0x9000 + (I*2) + 1)) << 8; |
| 1209 | col = ( gb_vram[ 0x1000 + (I*2) + 1 ] << 8 ) | gb_vram[ 0x1000 + (I*2) ]; |
| 1213 | 1210 | sgb_pal[SGB_BORDER_PAL_OFFSET + I] = col; |
| 1214 | 1211 | } |
| 1215 | 1212 | } |