> Ok, gotcha about the offset. > > ...Sorry, what do you mean exactly? I can't ask anything about MAME programming > because I have to learn it by myself? > > If not so (and you can continue to answer to my questions)... > Can you be more specific about use of AM_MIRROR (some examples)? > > It is equivalent to the statement i wrote above? > If so, why I have to use: > AM_RANGE(0x1000, 0x1003) AM_MIRROR(0x3FC) > > and not: > AM_RANGE(0x1000, 0x13FF) > therefore without AM_MIRROR usage?
you can use the first statement and the offset will automatically be masked for you (the entire range of 0x1000-0x13ff is covered, but only 0x0-0x3 will be passed as an offset to the handler)
if you use the 2nd statement 0x000-0x3ff will be passed to the handler, so you might have to do masking in the actual handler.
quite a lot of the devices in MAME don't do their own masking, so the 2nd case wouldn't work for them whereas the first case would.
I'm not saying you can't ask any questions about MAME, but this is fairly basic stuff you're having to ask about, which doesn't really bode well as the majority of working on MAME is about self-learning and understanding things for which there is no documentation so I'm just advising you that you're going to encounter far more difficult tasks than this.
|