|
About two devices sharing the same memory mapped space, in an interleaved manner
#386672 - 06/09/20 02:24 AM
|
|
|
Recently during the stay-home days, I did some study on Jaleco's music & rhythm game "VJ" series. It shares the basic hardware with Jaleco's another series Rock'n Tread, which is simpler and has been well emulated in tetrisp2.cpp. While, VJ machines use two pieces of audio IC YMZ280b, instead of only one in Rock'n series.
These two 8-bit-port devices are mapped into the same memory space: map(0xa60000, 0xa60003). One IC uses only even byte addresses, while another uses odds.
The current code for the single audio IC in Rockn is like this: map(0xa60000, 0xa60003).w("ymz", FUNC(ymz280b_device::write)).umask16(0x00ff); // Sound Could some friends instruct me how to properly add the 2nd IC?
|
|
|
|
Re: About two devices sharing the same memory mapped space, in an interleaved manner
[Re: Naibo]
#386673 - 06/09/20 02:31 AM
|
|
|
I also tried to write a handler like this: WRITE16_MEMBER(stepstag_state::dual_ymz280b_w) { if (ACCESSING_BITS_0_7) ymz->write(data & 0xff, offset);
if (ACCESSING_BITS_8_15) ymz1->write(data >> 8, offset); }
However, when compiling (under gcc , it gives error messages: error: ‘ymz’ was not declared in this scope ymz->write(data & 0xff, offset); ^~~
The ymz has been added in the machine configuration function, then what is proper way to ref a device?
|
|
|
|
Re: About two devices sharing the same memory mapped space, in an interleaved manner
[Re: Naibo]
#386674 - 06/09/20 07:12 AM
|
|
|
map(0xa60000, 0xa60003).w(whatever the other IC is).umask16(0xff00);
Just select the other lanes in the umask for the other IC.
|
|
|
|
Re: About two devices sharing the same memory mapped space, in an interleaved manner
[Re: Vas Crabb]
#386697 - 06/12/20 05:46 AM
|
|
|
Thanks Vas. Just added it.
|
|
|