-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADC/SBC buggy? #5
Comments
Hi,
Thanks for your email! Youre correct that the bcd_total is left-over code which is not used. I will clean it up...
Yes, I definitely ran Klause's tests and they all passed.. even the BCD as far as I know... I think I also ran another BCD test too...
I will check again though.. maybe I passed Klaus's test with the BCD tests optioned out... Ill take a look.
Were you able to get my code to pass the BCD test? If so, what was the mistake in my code? 🙂
Thanks again,
-Ted
…________________________________
From: John Kennedy ***@***.***>
Sent: Tuesday, March 23, 2021 11:45 PM
To: MicroCoreLabs/Projects ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [MicroCoreLabs/Projects] ADC/SBC buggy? (#5)
Hi -
I am wondering if you have checked your (beautifully neat) 6502 implementation against a respected test such as Klaus2m5<https://github.com/Klaus2m5/6502_65C02_functional_tests/blob/master/6502_functional_test.a65>?
I ask because I have been testing my own emulation, and I have trouble with the notorious ADC/SBC opcodes. When I tried your implementations it also failed.
I see in your code the line:
if ((0x00FF&bcd_total) > 0x09) { bcd_total=bcd_total+0x010; bcd_total=bcd_total-0x0A; }
which contains a reference bcd_total before it has been assigned a value, thus the condition is never true. Maybe you missed something?
thanks!
-John
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#5>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AM4AVELRSFRYDVEWOYRMWQ3TFGDCNANCNFSM4ZWUIMOA>.
|
I am still trying to get ANY BCD code to pass the tests, mine or yours. If yours is good, the issue is elsewhere in my code and I apologize for suggesting otherwise :-) I know that the first time I ran Klause's test my code passed and I was delighted - and then I remembered BCD testing was off, and turned it on, and was less delighted ;-) |
Im confident that you'll get it. 🙂 Thanks for catching the stale code in my BCD algorithm!
Best of luck!
…-Ted
________________________________
From: John Kennedy ***@***.***>
Sent: Wednesday, March 24, 2021 4:25 PM
To: MicroCoreLabs/Projects ***@***.***>
Cc: MicroCore Labs ***@***.***>; Comment ***@***.***>
Subject: Re: [MicroCoreLabs/Projects] ADC/SBC buggy? (#5)
I am still trying to get ANY BCD code to pass the tests, mine or yours. If yours is good, the issue is elsewhere in my code and I apologize for suggesting otherwise :-)
I know that the first time I ran Klause's test my code passed and I was delighted - and then I remembered BCD testing was off, and turned it on, and was less delighted ;-)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#5 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AM4AVEJDNTDQSK27EVHJYDTTFJYIPANCNFSM4ZWUIMOA>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi -
I am wondering if you have checked your (beautifully neat) 6502 implementation against a respected test such as Klaus2m5?
I ask because I have been testing my own emulation, and I have trouble with the notorious ADC/SBC opcodes. When I tried your implementations it also failed.
I see in your code the line:
if ((0x00FF&bcd_total) > 0x09) { bcd_total=bcd_total+0x010; bcd_total=bcd_total-0x0A; }
which contains a reference bcd_total before it has been assigned a value, thus the condition is never true. Maybe you missed something?
thanks!
-John
The text was updated successfully, but these errors were encountered: