Mercurial > repos > blastem
comparison sega_mapper.c @ 2496:187bc857a76a default tip
Fix bug in MED mapper protection bit implementation
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 28 Apr 2024 23:33:11 -0700 |
parents | b9cd3c64652d |
children |
comparison
equal
deleted
inserted
replaced
2495:d437b8e8ba62 | 2496:187bc857a76a |
---|---|
210 } | 210 } |
211 address &= 0xE; | 211 address &= 0xE; |
212 address >>= 1; | 212 address >>= 1; |
213 if (!address) { | 213 if (!address) { |
214 if (gen->mapper_type == MAPPER_SEGA_MED_V2) { | 214 if (gen->mapper_type == MAPPER_SEGA_MED_V2) { |
215 if (!value & 0x8000) { | 215 if (!(value & 0x8000)) { |
216 //writes without protection bit set are ignored | 216 //writes without protection bit set are ignored |
217 return context; | 217 return context; |
218 } | 218 } |
219 gen->bank_regs[8] = value >> 8; | 219 gen->bank_regs[8] = value >> 8; |
220 void *new_ptr = gen->cart + 0x40000*(value & 0x1F); | 220 void *new_ptr = gen->cart + 0x40000*(value & 0x1F); |