Question about `mame apple2p` and language card [message #333990] |
Sat, 10 December 2016 16:01 |
zellyn
Messages: 173 Registered: April 2013
Karma: 0
|
Senior Member |
|
|
Hi folks,
I'm having some different behavior in various emulators, and have narrowed it down to what I think might be a bug in the Mame "apple2" and "apple2p" language card emulation, but I wanted to check here that there aren't more subtleties involved.
I've narrowed it down to a few bytes, that can be poked into $300...
Specifically, this returns:
0300- AD 80 C0 LDA $C080
0303- AD 82 C0 LDA $C082
0306- 60 RTS
but this doesn't, because the language card RAM is left enabled, and there's no monitor to return to:
0300- AD 80 C0 LDA $C080
0303- AD 81 C0 LDA $C081
0306- 60 RTS
(If I put four NOPs between the two LDAs, I get the same behavior, fwiw.)
At least in the Apple Language Card manual, both $C081 and $C082 are supposed to "Deselect RAM read (enable ROM).
Are there wrinkles I'm unaware of, or is this a genuine bug?
Thanks,
Zellyn
|
|
|
Re: Question about `mame apple2p` and language card [message #334010 is a reply to message #333990] |
Sun, 11 December 2016 00:11 |
gids.rs
Messages: 1395 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
On Saturday, December 10, 2016 at 3:01:03 PM UTC-6, Zellyn wrote:
> Hi folks,
>
> I'm having some different behavior in various emulators, and have narrowed it down to what I think might be a bug in the Mame "apple2" and "apple2p" language card emulation, but I wanted to check here that there aren't more subtleties involved.
>
> I've narrowed it down to a few bytes, that can be poked into $300...
>
> Specifically, this returns:
>
> 0300- AD 80 C0 LDA $C080
> 0303- AD 82 C0 LDA $C082
> 0306- 60 RTS
>
> but this doesn't, because the language card RAM is left enabled, and there's no monitor to return to:
>
> 0300- AD 80 C0 LDA $C080
> 0303- AD 81 C0 LDA $C081
> 0306- 60 RTS
>
> (If I put four NOPs between the two LDAs, I get the same behavior, fwiw.)
>
> At least in the Apple Language Card manual, both $C081 and $C082 are supposed to "Deselect RAM read (enable ROM).
>
> Are there wrinkles I'm unaware of, or is this a genuine bug?
>
> Thanks,
>
> Zellyn
C081 does a READ ROM and a WRITE RAM, but it requires 2 accesses.
What does this do?
0300: LDA $C080
0303: LDA $C081
0306: LDA $C081
0309: RTS
|
|
|
Re: Question about `mame apple2p` and language card [message #334031 is a reply to message #334010] |
Sun, 11 December 2016 14:02 |
qkumba
Messages: 1584 Registered: March 2013
Karma: 0
|
Senior Member |
|
|
I found the same bug recently, and I'm working to fix it.
You need two identical accesses to enable any access in MAME II+ mode, which is wrong (the IIe mode behaves properly).
This doesn't work:
lda $c083
lda $c083 ;bank in RAM
lda $c081 ;bank it out again
It requires another $c081.
|
|
|