BeebEm failing to wrap (zp),Y loads at top of address space?

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
SteveF
Posts: 439
Joined: Fri Aug 28, 2015 8:34 pm

BeebEm failing to wrap (zp),Y loads at top of address space?

Postby SteveF » Mon Jan 02, 2017 1:42 am

While playing around with PLASMA (http://www.stardot.org.uk/forums/viewto ... 181279cfa5) I encountered a mysterious bug where code worked fine on b-em but consistently failed in BeebEm (Windows, 4.14, February 2012). It looks as though "LDA (zp),Y" doesn't wrap around to zero page if the two bytes at zp contain an address of the form &FFxx and &FFxx+Y>&FFFF. The following test program (attached as a zipped SSD as well) demonstrates the problem:

Code: Select all

DIM code% 256, data% 512
FOR opt%=0 TO 3 STEP 3
P%=code%
[OPT opt%
LDY #&FF
LDA (&70),Y
STA (&72),Y
RTS
]
NEXT
?&70=&75:?&71=&FF
?&72=data% MOD 256:?&73=data% DIV 256
FOR I%=0 TO 255
?&74=I%
?(data%+&FF)=0
CALL code%
IF I%<>?(data%+&FF) THEN PRINT "Failed (";I%;")":END
NEXT

I encountered this because I've written some PLASMA code which is trying to memcpy() from zero page into the middle of main RAM (say &3000 for the sake of argument). PLASMA's memcpy decides to use a reverse copy (because the destination address is larger than the source address) and its reverse copy decrements the high byte of the source and destination as a starting point. The code can be seen at label REVCPY in https://github.com/ZornsLemma/PLASMA/bl ... /bbcmd.pla, if anyone is interested; I mention this mainly to show that "real" code which I didn't just write is affected by this bug. :-)

Does anyone agree/disagree with my interpretation that this is an emulator bug?

Is anyone maintaining BeebEm at the moment? I'd be happy to try to come up with a patch if someone will take it...
Attachments
test.zip
(438 Bytes) Downloaded 21 times

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby tricky » Mon Jan 02, 2017 8:08 am

There is a github stardot beebem repository, but I'm not sure all the changes have been merged there.

User avatar
BigEd
Posts: 1499
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby BigEd » Mon Jan 02, 2017 8:20 am

FWIW, JSBeeb runs this test fine. The bug sounds like one Dominic recently squashed in his fast_6502 branch in PiTubeDirect.

User avatar
hoglet
Posts: 6626
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby hoglet » Mon Jan 02, 2017 8:27 am

It does look like this is a 6502 emulation bug in IndYAddrModeHandler_Data:
https://github.com/stardot/beebem/blob/ ... e.cpp#L894

This function should wrap the address, but doesn't.

Compare it to AbsXAddrModeHandler_Data, which seems to handle this correctly:
https://github.com/stardot/beebem/blob/ ... e.cpp#L939

Dave

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby tricky » Mon Jan 02, 2017 10:01 am

This may have been intensional as LDA (XP),y and sta (XP),y are very common instructions in inner loops.

User avatar
jgharston
Posts: 2764
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby jgharston » Sat Jan 07, 2017 2:15 pm

tricky wrote:There is a github stardot beebem repository, but I'm not sure all the changes have been merged there.

I'm going to be away from my Windows development system for the next few days. As a birthday present from myself I've done the last bit of coding I had outstanding over Christmas after getting distracted by some bugs in the IDE implementation. It can be merged into the main trunk by somebody who knows how to do that.

BeebEm414jgh.zip
The main updates are:
* Added &x3 and &03 emulator filing system traps so a VDFS-type filing system can access the host file system
* Fixed some bugs in IDE support returning incorrect status and selecting invalid drives

See CHANGES-jgh.txt for more details

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

chrisn
Posts: 311
Joined: Sat Apr 19, 2014 11:31 am
Location: UK

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby chrisn » Sat Mar 25, 2017 10:23 pm

SteveF wrote:While playing around with PLASMA (http://www.stardot.org.uk/forums/viewto ... 181279cfa5) I encountered a mysterious bug where code worked fine on b-em but consistently failed in BeebEm (Windows, 4.14, February 2012). It looks as though "LDA (zp),Y" doesn't wrap around to zero page if the two bytes at zp contain an address of the form &FFxx and &FFxx+Y>&FFFF.

[...]

Is anyone maintaining BeebEm at the moment? I'd be happy to try to come up with a patch if someone will take it...


I'm currently preparing a BeebEm 4.15 release at https://github.com/stardot/beebem-windows. It would be nice to include a fix for this if you'd like to prepare a patch or send a pull request.

jgharston wrote:As a birthday present from myself I've done the last bit of coding I had outstanding over Christmas after getting distracted by some bugs in the IDE implementation. It can be merged into the main trunk by somebody who knows how to do that.

BeebEm414jgh.zip
The main updates are:
* Added &x3 and &03 emulator filing system traps so a VDFS-type filing system can access the host file system
* Fixed some bugs in IDE support returning incorrect status and selecting invalid drives

See CHANGES-jgh.txt for more details

If you'd like to include your changes in 4.15, could you send a pull request please? I tried building your source, but I think it may be missing the changes to the resource file BeebEm.rc.

SteveF
Posts: 439
Joined: Fri Aug 28, 2015 8:34 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby SteveF » Fri Mar 31, 2017 10:51 pm

I've only just seen this, sorry! I will see if I can knock up a patch this weekend (main stumbling block is likely to be getting a Windows compiler installed...)

chrisn
Posts: 311
Joined: Sat Apr 19, 2014 11:31 am
Location: UK

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby chrisn » Fri Mar 31, 2017 11:10 pm

SteveF wrote:I've only just seen this, sorry! I will see if I can knock up a patch this weekend (main stumbling block is likely to be getting a Windows compiler installed...)


I've made a start on it, with help from ctr: https://github.com/stardot/beebem-windows/pull/9, please take a look and add your patch there.

The code builds under Visual Studio Express 2015, but you'll probably also need to install and configure the DirectX SDK.

SteveF
Posts: 439
Joined: Fri Aug 28, 2015 8:34 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby SteveF » Sat Apr 01, 2017 4:39 pm

chrisn wrote:
SteveF wrote:I've only just seen this, sorry! I will see if I can knock up a patch this weekend (main stumbling block is likely to be getting a Windows compiler installed...)

I've made a start on it, with help from ctr: https://github.com/stardot/beebem-windows/pull/9, please take a look and add your patch there.

I don't think there's anything left for me to patch, is there? It looks like the commit https://github.com/stardot/beebem-windo ... 6674e41d88 should fix this. I haven't tested it but it certainly looks right. Thanks for doing this!

If you think there's something I still need to do (you say "add your patch there"), please let me know...

Cheers.

Steve

chrisn
Posts: 311
Joined: Sat Apr 19, 2014 11:31 am
Location: UK

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby chrisn » Sat Apr 01, 2017 6:27 pm

SteveF wrote:I don't think there's anything left for me to patch, is there? It looks like the commit https://github.com/stardot/beebem-windo ... 6674e41d88 should fix this. I haven't tested it but it certainly looks right. Thanks for doing this!

If you think there's something I still need to do (you say "add your patch there"), please let me know...

Cheers.

Steve

There may be more changes needed, from the comment from ctr / mungre:
mungre wrote:I think there's another bug in the original code!

The high byte of the address comes from WholeRam[ZPAddr+1] . If ZPAddr is 0xFF then the high byte will come from 0x100, which doesn't seem like the kind of thing the 6502 would do.

I'm hoping that using a 6502 test suite will highlight if this is indeed another bug.

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sat Apr 01, 2017 7:53 pm

chrisn wrote:I'm hoping that using a 6502 test suite will highlight if this is indeed another bug.


I've made an ssd that detects what kind of beeb it's running on and runs Klaus Dormann's and Bruce Clark's tests. Unfortunately, they don't cover these two edge cases so I just need to add tests for them.

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sat Apr 01, 2017 9:24 pm

I've added tests for wrapping at the top of the address space and wrapping at lda(&ff),y. There is a new SSD here.

The code tests that lda(&ff),y loads the base address from &ff and &00. beebem currently fails this test. I expect a real 6502 to pass it, but I don't have a beeb to confirm it.

SteveF
Posts: 439
Joined: Fri Aug 28, 2015 8:34 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby SteveF » Sat Apr 01, 2017 9:43 pm

ctr wrote:The code tests that lda(&ff),y loads the base address from &ff and &00. beebem currently fails this test. I expect a real 6502 to pass it, but I don't have a beeb to confirm it.

Nice work! FWIW I've tried this on jsbeeb and it passes there.

b-em (both my old-ish local build of 2.2 and the master branch at https://github.com/stardot/b-em) fail this almost immediately. I'll post something about this in the b-em thread...

Cheers.

Steve

chrisn
Posts: 311
Joined: Sat Apr 19, 2014 11:31 am
Location: UK

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby chrisn » Sat Apr 01, 2017 9:47 pm

ctr wrote:I've added tests for wrapping at the top of the address space and wrapping at lda(&ff),y. There is a new SSD here.

The code tests that lda(&ff),y loads the base address from &ff and &00. beebem currently fails this test. I expect a real 6502 to pass it, but I don't have a beeb to confirm it.

Excellent, thanks! =D>

Here's the output from BeebEm 4.14:
6502test-beebem414.png

And from my real BBC B:
6502test-real.jpg

I'll fix and update the pull request. It looks like we have a separate issue with BCD in BeebEm though... #-o

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sat Apr 01, 2017 11:20 pm

Brilliant, thanks for testing it on a real beeb.

chrisn wrote:It looks like we have a separate issue with BCD in BeebEm though... #-o


It's worth noting that this behaviour isn't documented and differs between the 6502 and 65C02, so software tends not to rely on it. Anyway, it would be near the bottom of my list for fixing!

The 65C02 test was failing on the emulated Master but that was because the Master actually has a 65SC02, which doesn't have BBR, BBS, etc. I've removed those tests. And it's still failing. I think the problem is that the 65C02 doesn't have undocumented instructions - every unused opcode is defined as a NOP (of 1 to 3 bytes) but the emulator doesn't handle this. However, there's no point looking at it until the test has run successfully on a real Master.

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sat Apr 01, 2017 11:26 pm

SteveF wrote:b-em (both my old-ish local build of 2.2 and the master branch at https://github.com/stardot/b-em) fail this almost immediately. I'll post something about this in the b-em thread...


You can get the error address from PCL and PCH in the error output. I've added the assembler listing files to github for the 6502 and 65C02 tests. Look up the address in the listing to see what's failing.

tom_seddon
Posts: 84
Joined: Mon Aug 29, 2005 11:42 pm
Contact:

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby tom_seddon » Sat Apr 01, 2017 11:35 pm

64doc has a good description of exactly what the NMOS 6502s do in BCD mode: https://github.com/ahefner/tenes/blob/m ... /64doc.txt

The CMOS parts work differently for BCD, but a lot of sources are a bit vague about the details, so I thought I'd paste the following from my (new, upcoming...) BBC emulator. Hopefully it should be obvious what's going on and easy to modify for use elsewhere.

I've checked this against results from my Master 128, and it passes the Klaus Dormann CMOS tests, so it ought to be correct! (Results from my cheese wedge 2nd processor and ReCo6502Mini were the same.)

Code: Select all

static void ADC_CMOS(M6502 *s) {
    if(s->p.bits.d) {
        unsigned tmp=(s->a&0xfu)+(s->data&0xfu)+s->p.bits.c;
        if(tmp>9) {
            tmp+=6;
        }

        if(tmp<=0xf) {
            tmp=(tmp&0xf)+(s->a&0xf0)+(s->data&0xf0);
        } else {
            tmp=(tmp&0xf)+(s->a&0xf0)+(s->data&0xf0)+0x10;
        }

        s->p.bits.v=((s->a^tmp)&(~s->a^s->data)&0x80)!=0;

        s->p.bits.c=0;
        if((tmp&0x1f0)>0x90) {
            tmp+=0x60;
            s->p.bits.c=1;
        }

        s->a=(uint8_t)tmp;
        SetNZ(s,s->a);
    } else {
        M6502Word result;

        result.w=s->a+s->data+s->p.bits.c;

        SetNZ(s,result.b.l);
        s->p.bits.c=result.b.h>0;
        s->p.bits.v=(~(s->a^s->data)&(s->a^result.b.l)&0x80)!=0;

        s->a=result.b.l;
    }
}

static void SBC(M6502 *s) {
    M6502Word result;
    result.w=s->a+(uint8_t)~s->data+s->p.bits.c;

    if(s->p.bits.d) {
        unsigned tmp=(s->a&0xfu)-(s->data&0xfu)-(!s->p.bits.c);

        if(tmp&0x10) {
            tmp=((tmp-6u)&0xfu)|((s->a&0xf0u)-(s->data&0xf0u)-0x10u);
        } else {
            tmp=(tmp&0xfu)|((s->a&0xf0u)-(s->data&0xf0u));
        }

        if(tmp&0x100) {
            tmp-=0x60;
        }

        SetNZ(s,result.b.l);

        s->p.bits.c=result.b.h>0;
        s->p.bits.v=(((s->a^result.b.l)&0x80)&&((s->a^s->data)&0x80))!=0;
        s->a=(uint8_t)tmp;
    } else {
        SetNZ(s,result.b.l);
        s->p.bits.c=result.b.h>0;
        s->p.bits.v=((s->a^s->data)&(s->a^result.b.l)&0x80)!=0;
        s->a=result.b.l;
    }
}

I've got a strong feeling that I ended up copying this from somewhere, but I can't remember where :( - my recollection being that I started with the 64doc code and the results from my Master, and that it was mostly obvious what was going on, but there were still a few cases that I couldn't seem to figure out on my own.

I also note (when I checked just now) that it's a bit uglier than the code in jsbeeb, or Hoglet's post, etc., so maybe I need to think about copying from them instead ;)

tom_seddon
Posts: 84
Joined: Mon Aug 29, 2005 11:42 pm
Contact:

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby tom_seddon » Sat Apr 01, 2017 11:53 pm

I tried 6502test.ssd on my Master 128 and in my emulator (both in B and M128 modes) and it passed in all 3 cases.

My real B is currently dead so no results from that I'm afraid :(

I also tried it with a cheese wedge 6502 2nd processor, and ReCo6502Mini, and it failed in both cases in the 65C02 opcode test:

Code: Select all

regs Y  X  A  PS PCLPCH
01FA 42 01 FF 7D 10 2D
000A 00 00 00 00 00 00 00
1900 00 00 06 00 00 00 00 00 00 00

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sun Apr 02, 2017 12:14 am

tom_seddon wrote:I tried 6502test.ssd on my Master 128 and in my emulator (both in B and M128 modes) and it passed in all 3 cases.

My real B is currently dead so no results from that I'm afraid :(

I also tried it with a cheese wedge 6502 2nd processor, and ReCo6502Mini, and it failed in both cases in the 65C02 opcode test:

Code: Select all

regs Y  X  A  PS PCLPCH
01FA 42 01 FF 7D 10 2D
000A 00 00 00 00 00 00 00
1900 00 00 06 00 00 00 00 00 00 00


It's failing on opcode 7, which is a NOP on the 65SC02 and RMB0 on the 65C02. 6502test.ssd uses the same test for the master and the second processor and it targets the Master's 65SC02. But I guess that's not right for the second processor.

Can you try this older one on the cheese wedge? It targets the 65C02. If it works I'll update the ssd to include different tests for the master and second processor.

tom_seddon
Posts: 84
Joined: Mon Aug 29, 2005 11:42 pm
Contact:

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby tom_seddon » Sun Apr 02, 2017 12:40 am

ctr wrote:Can you try this older one on the cheese wedge? It targets the 65C02. If it works I'll update the ssd to include different tests for the master and second processor.


Sure - passes on both ReCo6502Mini and cheese wedge.

Your mention of RMB reminded me of something, so I looked back through my notebook and found some notes on this from when I was trying to get the Klaus Dormann test suite working: (I didn't try to get the full set of tests working on the real BBC - I just did some quick tests with a few key opcodes, going by the equs in the source code, to see whether they were NOPs or something else)

- M128 (G65SC12?): no Rockwell instructions, no WDC instructions
- cheese wedge (R65C02?): Rockwell instructions, no WDC instructions
- ReCo6502Mini (W65C02?): Rockwell instructions, WDC instructions (I didn't do any particular tests on the WDC instructions, but they didn't seem to be simple NOPs)

The proper Master Turbo had a R65C102, so I assume it's the same as the cheese wedge.

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sun Apr 02, 2017 12:49 am

tom_seddon wrote:
ctr wrote:Can you try this older one on the cheese wedge? It targets the 65C02. If it works I'll update the ssd to include different tests for the master and second processor.


Sure - passes on both ReCo6502Mini and cheese wedge.

Your mention of RMB reminded me of something, so I looked back through my notebook and found some notes on this from when I was trying to get the Klaus Dormann test suite working: (I didn't try to get the full set of tests working on the real BBC - I just did some quick tests with a few key opcodes, going by the equs in the source code, to see whether they were NOPs or something else)

- M128 (G65SC12?): no Rockwell instructions, no WDC instructions
- cheese wedge (R65C02?): Rockwell instructions, no WDC instructions
- ReCo6502Mini (W65C02?): Rockwell instructions, WDC instructions (I didn't do any particular tests on the WDC instructions, but they didn't seem to be simple NOPs)

The proper Master Turbo had a R65C102, so I assume it's the same as the cheese wedge.


Thank you, that's really helpful. There's room on the disk for tests for both the cheese wedge and the ReCo6502Mini so I might as well add them both. But maybe not tonight.

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sun Apr 02, 2017 1:44 pm

I've done a new version with separate tests for the Master (65SC02) and the co-processor (65C02). I was going to do an additional test for the ReCo6502Mini but the additional instructions (STP - stop and WAI - wait for interrupt) aren't testable. Not from the inside anyway.

User avatar
hoglet
Posts: 6626
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby hoglet » Sun Apr 02, 2017 4:56 pm

Ctr,

Thanks for the updated DORMANN tests - B-Em is afflicted with this bug as well.

One other thing I'm finding is that when testing a real cheese wedge with a G65SC02 there is no way from the menu to force the 65SC02 test suite to run. So it's failing due to the lack of the Rockwell/WDC extensions:

Code: Select all

x7 - RMB/SMB zp
xF - BBR/BBS zp, rel

It's probably worth having this be selectable.

FYI, My cheese wedge is like this one:
http://chrisacorns.computinghistory.org ... rocFL.html

Dave

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sun Apr 02, 2017 5:40 pm

hoglet wrote:Ctr,

Thanks for the updated DORMANN tests - B-Em is afflicted with this bug as well.

One other thing I'm finding is that when testing a real cheese wedge with a G65SC02 there is no way from the menu to force the 65SC02 test suite to run. So it's failing due to the lack of the Rockwell/WDC extensions:

Code: Select all

x7 - RMB/SMB zp
xF - BBR/BBS zp, rel

It's probably worth having this be selectable.

FYI, My cheese wedge is like this one:
http://chrisacorns.computinghistory.org ... rocFL.html

Dave


Blame this on my UI. If a second-processor is present then the test runs there. It tests the CPU you pick in the menu.

So if a second-processor is connected and you select the Master (press "2") then it will run the 65SC02 test on the second-processor.

If I remove the computer names from the menu and just have the processor names - maybe with some explanatory text at the bottom - this will probably be clearer. Additionally, it would probably be better if the menu actually tested the CPU to initialise itself. I hadn't realised what a variety of second processors there are, so at the moment the menu asks the OS if it's a master and/or has a second-processor, and takes a guess at the CPU.

User avatar
hoglet
Posts: 6626
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby hoglet » Sun Apr 02, 2017 6:05 pm

ctr wrote:So if a second-processor is connected and you select the Master (press "2") then it will run the 65SC02 test on the second-processor.

I tried this, but it doesn't seen to have the desired effect. It always runs the 65C02 test. Can you try this as well?

Dave

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Sun Apr 02, 2017 6:35 pm

hoglet wrote:
ctr wrote:So if a second-processor is connected and you select the Master (press "2") then it will run the 65SC02 test on the second-processor.

I tried this, but it doesn't seen to have the desired effect. It always runs the 65C02 test. Can you try this as well?

Dave


Sorry, you're right, I broke the menu in my last update. I've pushed a new version to github. Without the menu rewording yet.

tom_seddon
Posts: 84
Joined: Mon Aug 29, 2005 11:42 pm
Contact:

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby tom_seddon » Mon Apr 03, 2017 1:18 am

hoglet wrote:FYI, My cheese wedge is like this one:
http://chrisacorns.computinghistory.org ... rocFL.html

Oops, didn't realise they used different chips! - presumably they just bought whatever they could get hold of. I had a quick skim through the manual and indeed, it doesn't even mention that you might have a CMOS one in the first place ;)

I opened mine to check and it's got a R65C02P3 in it like this one: http://www.beebmaster.co.uk/2P/6502Second5.html (mine is the same issue and revision)

Coeus
Posts: 468
Joined: Mon Jul 25, 2016 11:05 am

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby Coeus » Mon Apr 03, 2017 8:34 am

And one has an EPROM and the other a masked ROM?

Over in the B-Em thread we were debating whether to make support of the Rockwell a selectable feature based initially on whether the machine is a master.

So this means a cheese wedge may or may not support the Rockwell instructions depending on revision.
Might the same be true of the master internal co-processor or was that always Rockwell?

I am not sure how useful putting the option on a menu within the emulator would be. How would someone know which one to emulate?

User avatar
ctr
Posts: 94
Joined: Wed Jul 16, 2014 2:53 pm

Re: BeebEm failing to wrap (zp),Y loads at top of address space?

Postby ctr » Tue Apr 04, 2017 3:34 pm

I've posted a new version of the test ssd. The actual tests are unchanged.

The menu detects the CPU rather than guessing. The detection uses the 6502's indirect JMP bug and the absence of SMB on the 65SC02. I haven't tried it on real hardware though.

The menu indicates if it thinks it is running on a second-processor. This is based on what the OS tells it. It doesn't affect the tests.

The menu is slightly reworded to make it clearer that you are picking a processor model, not a computer model.


Return to “emulators”

Who is online

Users browsing this forum: No registered users and 3 guests