It looks like you're calculating A - operand - carry instead of A - operand - (not carry). SBC with an operand of 0 and carry set should not change A, whether it's in decimal mode or not.
Oh indeed!
Thanks
Just a quick note Flok, when I reached this point I thought I was done for a while, and ...
Search found 15 matches
- Mon Mar 07, 2022 10:04 am
- Forum: Emulation and Simulation
- Topic: not understanding Klaus' test
- Replies: 5
- Views: 4062
- Thu Feb 10, 2022 8:50 am
- Forum: Emulation and Simulation
- Topic: How long should Klaus functional test take?
- Replies: 19
- Views: 21255
Re: How long should Klaus functional test take?
I run the functional test on 0.3s on my i3-8100 (3.5Ghz) computer and I counted 96,241,364 cycles (on my code).
My initial runs were taking around 52s because I was printing the intermediate results to stdout. Once I got the test working, removing the printf improved performance to under 1s, so ...
My initial runs were taking around 52s because I was printing the intermediate results to stdout. Once I got the test working, removing the printf improved performance to under 1s, so ...
- Thu Nov 11, 2021 10:43 pm
- Forum: General Discussions
- Topic: Undocumented instructions
- Replies: 20
- Views: 18099
Re: Re:
[I'm] just wondering if there is anything updated and more streamlined by now.
See that section of my links page by going to http://wilsonminesco.com/links.html#soft and then down to the ten links after the blank line, starting with "How 6502 illegal op codes really work". Another blank line ...
See that section of my links page by going to http://wilsonminesco.com/links.html#soft and then down to the ten links after the blank line, starting with "How 6502 illegal op codes really work". Another blank line ...
- Thu Nov 11, 2021 9:46 pm
- Forum: General Discussions
- Topic: Undocumented instructions
- Replies: 20
- Views: 18099
Re:
kc5tja suggested the C64's 6510 because internally it's the same processor and searching the C64 material would likely get you what you're looking for. I understand that Berkeley Softworks used the undocumented op codes when they wrote GEOS for the C64.
Memblers also understood what you wanted ...
Memblers also understood what you wanted ...
- Thu Jun 17, 2021 8:47 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Hi Everyone,
So, after going through a painful debugging process, I found out why Where in the World is Carmen Sandiego was freezing on my Apple II+ Emulator. It turns out it was doing an indirect jmp to $8989 which itself contained $FF (and $898A contained $7C). This should result on a jump to ...
So, after going through a painful debugging process, I found out why Where in the World is Carmen Sandiego was freezing on my Apple II+ Emulator. It turns out it was doing an indirect jmp to $8989 which itself contained $FF (and $898A contained $7C). This should result on a jump to ...
- Tue May 25, 2021 5:13 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Hi,
So I reverted my code to the previous buggy implementation, and went into the functional test source code to check if I could change it to trap the error. I have been bold and changed the assembly code on the following section to include a new test using a negative operand C0:
;partial ...
So I reverted my code to the previous buggy implementation, and went into the functional test source code to check if I could change it to trap the error. I have been bold and changed the assembly code on the following section to include a new test using a negative operand C0:
;partial ...
- Thu May 20, 2021 2:59 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Now let's assume that you have in .A the value +8 and the operand has a signed value -7 ($F9). Doing (cpu.a<operand) consists in asking if $08 is less than $F9. Of course it is, and by your statement the negative flag is going to be set.
But CMP performs a subtraction, and in a two's complement 8 ...
But CMP performs a subtraction, and in a two's complement 8 ...
- Tue May 18, 2021 11:15 am
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Hello Klaus and fellow forum readers.
As I work on my Apple II+ emulator, I have found a bug on my 6502 emulation library (probably one of too many). Nothing unexpected, but the reason I post it here is that this bug was not detected by Klaus suite (assuming of course I didn't do anything wrong on ...
As I work on my Apple II+ emulator, I have found a bug on my 6502 emulation library (probably one of too many). Nothing unexpected, but the reason I post it here is that this bug was not detected by Klaus suite (assuming of course I didn't do anything wrong on ...
- Wed Apr 28, 2021 1:40 pm
- Forum: General Discussions
- Topic: Andrew Jacobs (BitWise) has passed away
- Replies: 28
- Views: 12485
Re: Andrew Jacobs (BitWise) has passed away
Wow!
I have to confess, I am mostly a lurkerer here in the forum, and my real life job prevents me from really getting more involved on my retro/6502 passion, but Andrew has been an indirect mentor for me, without I (or him) even knowing it. I have used his 6502 reference page to build my own 6502 ...
I have to confess, I am mostly a lurkerer here in the forum, and my real life job prevents me from really getting more involved on my retro/6502 passion, but Andrew has been an indirect mentor for me, without I (or him) even knowing it. I have used his 6502 reference page to build my own 6502 ...
- Tue Dec 15, 2020 10:41 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Weird, on my emulator I only counted 30646176 opcodes on the test. :?
Well, actually if your bug applies to all zero page addressing, it is possible that the test can't figure out the issue, right ? When it reads from $88 it will get the value of $FF88, and not notice the issue.
I had a similar ...
Well, actually if your bug applies to all zero page addressing, it is possible that the test can't figure out the issue, right ? When it reads from $88 it will get the value of $FF88, and not notice the issue.
I had a similar ...
- Fri Dec 04, 2020 9:20 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Thanks Klaus, and thanks so much again.
So, now that I measured the time it took for me to run the test, I have been working on optimizing my emulation code and I have switched on optimization with -O2 flag. Furthermore, I have inlined the opcode functions as well as my get_address function (which ...
So, now that I measured the time it took for me to run the test, I have been working on optimizing my emulation code and I have switched on optimization with -O2 flag. Furthermore, I have inlined the opcode functions as well as my get_address function (which ...
- Tue Dec 01, 2020 9:35 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Actually, just wanted to add that now that I know "F0" is successful completion, I added a check on my test program so it will exit once it sees 0xF0 in memory address 0x200 and I removed the printf command that displayed which test was being run, which reduced execution time on my emulator to 1s ...
- Tue Dec 01, 2020 7:45 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
A test code of $F0 indicates that all the tests ran to completion successfully. The test suite is designed to run on bare hardware with no OS or monitor or I/O, so the only thing it can do is go into an infinite
I see.
Thanks so much for your answer, this is good news then. I guess I was confused ...
I see.
Thanks so much for your answer, this is good news then. I guess I was confused ...
- Mon Nov 30, 2020 9:31 pm
- Forum: Programming
- Topic: Functional Test for the NMOS 6502 - request for verification
- Replies: 202
- Views: 130212
Re: Functional Test for the NMOS 6502 - request for verifica
Hello all,
I have written my own 6502 emulator from scratch in C (Linux gcc), with the sole objective of teaching me about 6502 working and also improve my programming skills. But let me warn you that my code is not clean, nor fast, nor efficient. I hope to improve as I learn more, and have spare ...
I have written my own 6502 emulator from scratch in C (Linux gcc), with the sole objective of teaching me about 6502 working and also improve my programming skills. But let me warn you that my code is not clean, nor fast, nor efficient. I hope to improve as I learn more, and have spare ...
- Tue Apr 19, 2005 7:39 pm
- Forum: SBC- Series Projects
- Topic: SBC-1 1.1 Questions
- Replies: 4
- Views: 7994