src/mame/drivers/megadriv.c
| r9226 | r9227 | |
| 2314 | 2314 | |
| 2315 | 2315 | static WRITE16_HANDLER( _32x_68k_dram_w ) |
| 2316 | 2316 | { |
| 2317 | | COMBINE_DATA(&_32x_access_dram[offset]); |
| 2317 | if ((mem_mask&0xffff) == 0xffff) |
| 2318 | { |
| 2319 | // 16-bit accesses are normal |
| 2320 | COMBINE_DATA(&_32x_access_dram[offset]); |
| 2321 | } |
| 2322 | else |
| 2323 | { |
| 2324 | // 8-bit writes act as if they were going to the overwrite region! |
| 2325 | // bc-racers and world series baseball rely on this! |
| 2326 | // (tested on real hw) |
| 2327 | |
| 2328 | if ((mem_mask & 0xffff) == 0xff00) |
| 2329 | { |
| 2330 | if ((data & 0xff00) != 0x0000) |
| 2331 | { |
| 2332 | _32x_access_dram[offset] = (data & 0xff00) | (_32x_access_dram[offset] & 0x00ff); |
| 2333 | } |
| 2334 | } |
| 2335 | else if ((mem_mask & 0xffff) == 0x00ff) |
| 2336 | { |
| 2337 | if ((data & 0x00ff) != 0x0000) |
| 2338 | { |
| 2339 | _32x_access_dram[offset] = (data & 0x00ff) | (_32x_access_dram[offset] & 0xff00); |
| 2340 | } |
| 2341 | } |
| 2342 | } |
| 2318 | 2343 | } |
| 2319 | 2344 | |
| 2320 | 2345 | static READ16_HANDLER( _32x_68k_dram_overwrite_r ) |