6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 4:41 pm

All times are UTC




Post new topic Reply to topic  [ 203 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 14  Next
Author Message
PostPosted: Mon Jul 30, 2012 12:56 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
It passes!
My mistake was not to have disabled the interrupts from the system VIA. Although I start with an SEI, the various PLP instructions will sometimes perform an implicit CLI.

Cheers
Ed

To get diagnostics in the absence of a monitor, I changed all the self-looping traps to macro calls. In my case I write out the (stacked) PC to the UART, but writing to screen RAM would be another approach.

Code:
fail        macro
            jsr printPCandStop
            endm

failbne     macro
            beq skip\?
            fail
skip\?
            endm

failbeq     macro
            bne skip\?
            fail
skip\?
            endm

and so on for the other branch types.


Last edited by BigEd on Mon Jul 30, 2012 2:17 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 1:54 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
BigEd wrote:
It passes!
My mistake was not to have disabled the interrupts from the system VIA. Although I start with an SEI, the various PLP instructions will sometimes perform an implicit CLI.

Cheers
Ed


Oh, good! I am currently working on a version that has an option for I-flag behavior. You can then choose to force interrupts disabled or enabled or even keep the current status of the I-flag. Of course SEI & CLI can only be tested with the old behavior as the preferred option.

And yes, the test tries to see, wether flags interfere with each other. So in the old behavior it turns all flags off (including I, enabling interrupts), runs some test instructions, turns all flags on, runs the same instructions again. The reason for this lies in the original target of this test. Emulators have to shuffle their own CPUs flags and some purely emulated flags to form the 6502 flags. A lot of things could go wrong with this...

Thanx for the good news!

cheers, Klaus

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 5:46 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 281
Location: Northern California
BigEd wrote:
I'd also like to test Mike's py65, and my own a6502. And it would be good to test Arlet's VHDL core as well!

I'd be very interested in the results on Py65. Through the work of Ed and a few others, Py65 is complete enough to run many programs like EhBASIC but it may still have some issues. Py65 mostly uses the same memory mapped I/O as the Kowalski simulator so one binary should be able to test both.

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 6:05 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Mike Naberezny wrote:
BigEd wrote:
I'd also like to test Mike's py65, and my own a6502. And it would be good to test Arlet's VHDL core as well!

I'd be very interested in the results on Py65. Through the work of Ed and a few others, Py65 is complete enough to run many programs like EhBASIC but it may still have some issues. Py65 mostly uses the same memory mapped I/O as the Kowalski simulator so one binary should be able to test both.

I just started it running, but I'm not sure how long it might take.
Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 6:14 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
oh - it's finished, and passed!
(I didn't set the ROM vector function, because py65 treats BRK as a stop, therefore BRK isn't tested.)


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 6:35 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
Hi all,

a new version of the source is available.

added a code switch to control, how the interrupt flag should be handled.
added a code switch to control, wether the code will be build as a single image or as separate records for zero page and data space.
Needless to say, that all options ran successfully on my little emulator.

cheers, Klaus


Attachments:
File comment: Version 30-jul-2012
6502_functional_test.zip [28.78 KiB]
Downloaded 200 times

_________________
6502 sources on GitHub: https://github.com/Klaus2m5
Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 6:54 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 281
Location: Northern California
BigEd wrote:
oh - it's finished, and passed!

Wow, that was unexpected. ;)

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 7:13 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
Mike Naberezny wrote:
BigEd wrote:
I'd also like to test Mike's py65, and my own a6502. And it would be good to test Arlet's VHDL core as well!

I'd be very interested in the results on Py65. Through the work of Ed and a few others, Py65 is complete enough to run many programs like EhBASIC but it may still have some issues. Py65 mostly uses the same memory mapped I/O as the Kowalski simulator so one binary should be able to test both.

Speaking of the Kowalski simulator, it's now up to version 1.2.12.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 8:08 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
Has anyone ported this to an assembler that doesn't run on Windows? My own assembler doesn't support the expressions (notably the logical operators), nor is it a macro assembler (but I used m4 for that). I tried another assembler, a java based one, and it just fails with an null pointer exception.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 30, 2012 8:36 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
I've been working exclusively on linux. I looked around for a suitable assembler, and then noticed that Klaus had given directions in the header of the file. It's not open source but it does have a binary for linux.
Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 31, 2012 3:35 am 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
Yea I saw that too, but being on a Mac, a Linux binary doesn't do me much good.

Thanks, though.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 31, 2012 5:20 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Ah! A virtual machine might be the answer - VirtualBox or Qemu perhaps. (Or Parallels if $80 isn't an obstacle)

But: apparently WINE works on Mac these days - that must be the first port of call. I use WINE (on linux) even for GUI applications (such as Kowalski) but it's particularly likely to work for command line ones - I just checked and it's fine for Kingswood's as65.exe

Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 31, 2012 5:33 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
BTW, I just ran Klaus' test on Kowalski, both version 1.2.6 from last year, and the latest version as of today, and both pass. Like py65, BRK is treated as a stop, so that's not tested.
Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 31, 2012 7:01 am 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
BigDumbDinosaur wrote:
Speaking of the Kowalski simulator, it's now up to version 1.2.12.

Tested the newest (above mentioned) version and it passed. However, in the simulator options 1st tab you can change the instruction which causes the simulator to stop to something else than BRK.

So I ran the full test and it failed in the BRK test while checking the flags pushed onto the stack by LDA from page $100, expected $30 - actual $10. It expects to see the unused bit on but it isn't.

For the test I will pick up Eds idea to implement all traps as macros, so one can change the way the test reacts to a bug or even successfull completion.

cheers, Klaus

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 31, 2012 5:22 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Ah, nicely found. My a6502 flags handling also needs attention, but to get to the bottom of it I need to improve the tracing control.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 203 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 14  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: