trunk/src/emu/bus/a7800/rom.c
| r31944 | r31945 | |
| 7 | 7 | - pokey or not |
| 8 | 8 | - 9 banks or not |
| 9 | 9 | etc... |
| 10 | | But we might merge many of these if they become too many (e.g. could there be banked 32L RAM also |
| 11 | | in a 9banks cart or in a cart with no bankswitch?) |
| 10 | But we might merge many of these if they become too many |
| 11 | |
| 12 | TODO: |
| 13 | - Are POKEY regs readable somewhere in SG 144K + POKEY homebrew? How do they detect |
| 14 | the POKEY otherwise?!? |
| 12 | 15 | |
| 13 | 16 | ***********************************************************************************************************/ |
| 14 | 17 | |
| r31944 | r31945 | |
| 182 | 185 | |
| 183 | 186 | -------------------------------------------------*/ |
| 184 | 187 | |
| 188 | READ8_MEMBER(a78_rom_pokey_device::read_40xx) |
| 189 | { |
| 190 | if (offset < 0x4000) |
| 191 | return m_pokey->read(space, offset & 0x0f); |
| 192 | |
| 193 | if (offset + 0x4000 < m_base_rom) |
| 194 | return 0xff; |
| 195 | else |
| 196 | return m_rom[offset + 0x4000 - m_base_rom]; |
| 197 | } |
| 198 | |
| 185 | 199 | WRITE8_MEMBER(a78_rom_pokey_device::write_40xx) |
| 186 | 200 | { |
| 187 | 201 | if (offset < 0x4000) |
| r31944 | r31945 | |
| 233 | 247 | Carts with SuperGame bankswitch + POKEY chip |
| 234 | 248 | As above + Pokey chip access |
| 235 | 249 | |
| 236 | | GAMES: Commando |
| 250 | GAMES: Commando and Barnyard Blaster |
| 237 | 251 | |
| 238 | 252 | -------------------------------------------------*/ |
| 239 | 253 | |
| 254 | READ8_MEMBER(a78_rom_sg_pokey_device::read_40xx) |
| 255 | { |
| 256 | if (offset < 0x4000) |
| 257 | return m_pokey->read(space, offset & 0x0f); |
| 258 | else if (offset < 0x8000) |
| 259 | return m_rom[(offset & 0x3fff) + (m_bank * 0x4000)]; |
| 260 | else |
| 261 | return m_rom[(offset & 0x3fff) + (m_bank_mask * 0x4000)]; // last bank |
| 262 | } |
| 263 | |
| 240 | 264 | WRITE8_MEMBER(a78_rom_sg_pokey_device::write_40xx) |
| 241 | 265 | { |
| 242 | 266 | if (offset < 0x4000) |