trunk/src/mess/machine/c64_sfx_sound_expander.c
| r20943 | r20944 | |
| 205 | 205 | |
| 206 | 206 | |
| 207 | 207 | //************************************************************************** |
| 208 | // INLINE HELPERS |
| 209 | //************************************************************************** |
| 210 | |
| 211 | //------------------------------------------------- |
| 212 | // get_offset - get passthru expansion port offset |
| 213 | //------------------------------------------------- |
| 214 | |
| 215 | inline offs_t c64_sfx_sound_expander_cartridge_device::get_offset(offs_t offset, int rw) |
| 216 | { |
| 217 | // assimilate the 3 different MIDI cartridge 6850 ACIA register mappings? |
| 218 | return (offset & 0xfffc) | (rw << 1) | BIT(offset, 1); |
| 219 | } |
| 220 | |
| 221 | |
| 222 | |
| 223 | //************************************************************************** |
| 208 | 224 | // LIVE DEVICE |
| 209 | 225 | //************************************************************************** |
| 210 | 226 | |
| r20943 | r20944 | |
| 244 | 260 | |
| 245 | 261 | void c64_sfx_sound_expander_cartridge_device::device_reset() |
| 246 | 262 | { |
| 263 | m_opl->reset(); |
| 247 | 264 | } |
| 248 | 265 | |
| 249 | 266 | |
| r20943 | r20944 | |
| 253 | 270 | |
| 254 | 271 | UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2) |
| 255 | 272 | { |
| 256 | | data = m_exp->cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2); |
| 273 | data = m_exp->cd_r(space, get_offset(offset, 1), data, sphi2, ba, roml, romh, io1, io2); |
| 257 | 274 | |
| 258 | 275 | if (!io2) |
| 259 | 276 | { |
| r20943 | r20944 | |
| 292 | 309 | ym3526_w(m_opl, space, BIT(offset, 4), data); |
| 293 | 310 | } |
| 294 | 311 | |
| 295 | | m_exp->cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2); |
| 312 | m_exp->cd_w(space, get_offset(offset, 0), data, sphi2, ba, roml, romh, io1, io2); |
| 296 | 313 | } |
| 297 | 314 | |
| 298 | 315 | |
| r20943 | r20944 | |
| 302 | 319 | |
| 303 | 320 | int c64_sfx_sound_expander_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram) |
| 304 | 321 | { |
| 305 | | return m_exp->game_r(offset, sphi2, ba, rw, hiram); |
| 322 | return m_exp->game_r(get_offset(offset, rw), sphi2, ba, rw, hiram); |
| 306 | 323 | } |
| 307 | 324 | |
| 308 | 325 | |
| r20943 | r20944 | |
| 312 | 329 | |
| 313 | 330 | int c64_sfx_sound_expander_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram) |
| 314 | 331 | { |
| 315 | | return m_exp->exrom_r(offset, sphi2, ba, rw, hiram); |
| 332 | return m_exp->exrom_r(get_offset(offset, rw), sphi2, ba, rw, hiram); |
| 316 | 333 | } |
trunk/src/mess/machine/c64_vizastar.c
| r20943 | r20944 | |
| 1 | 1 | /********************************************************************** |
| 2 | 2 | |
| 3 | | VizaWrite 64 cartridge emulation |
| 3 | VizaStar 64 XL4 cartridge emulation |
| 4 | 4 | |
| 5 | 5 | Copyright MESS Team. |
| 6 | 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| r20943 | r20944 | |
| 23 | 23 | |=| | |
| 24 | 24 | |===========================| |
| 25 | 25 | |
| 26 | | ROM - Hitachi HN462732G EPROM "V" |
| 26 | ROM - Hitachi HN462732G 4Kx8 EPROM "V" |
| 27 | 27 | |
| 28 | 28 | */ |
| 29 | 29 | |
| r20943 | r20944 | |
| 60 | 60 | //------------------------------------------------- |
| 61 | 61 | |
| 62 | 62 | c64_vizastar_cartridge_device::c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 63 | | device_t(mconfig, C64_VIZASTAR, "VizaStar 64", tag, owner, clock), |
| 63 | device_t(mconfig, C64_VIZASTAR, "VizaStar 64 XL4", tag, owner, clock), |
| 64 | 64 | device_c64_expansion_card_interface(mconfig, *this) |
| 65 | 65 | { |
| 66 | 66 | } |