mattgodbolt / jsbeeb

Javascript BBC micro emulator
GNU General Public License v3.0
351 stars 68 forks source link

Some instructions fail my timing test suite #371

Closed dp111 closed 2 years ago

dp111 commented 2 years ago

I've created a 6502/ 65C12 instruction timing test suite https://github.com/dp111/6502Timing thread discussing the test suite on stardot. Main errors appear to be in Master emulator with clock stretching ( 65C12timing1M.ssd). I did have a quick look at doing a pull request , but your code is too clever for me :)

dp111 commented 2 years ago

6502timing1M.ssd on a bbc B with jsbeeb gives the following instruction timing errors which all look like page cross errors during 1MHz clock stretching

image

dp111 commented 2 years ago

On a jsbeeb master with 65C12timing1M.ssd again all the errors look like they are to do with page crossing and 1MHz clock stretching

image image

mattgodbolt commented 2 years ago

oh amazing! I can make a test suite out of this (with your permission, if I can embed your SSD in the repository).

The code is a bit too clever for its own good, it tries to "compile" instructions. I bet it'll be a fairly easy fix once I remember how that stuff works too :D

mattgodbolt commented 2 years ago

Wow, I'm shocked there's any regular 6502 timing issues left though! wowser :) I figured all the Kevin Edwards protection system stuff would have flushed them out. Awesome!

mattgodbolt commented 2 years ago

Actually can probably submodule this in so that everything Just Works Nicely™

dp111 commented 2 years ago

version 0.22 at the end of the tests stores the number of failures at &FCD0 so emulators can trap this to detect pass or fail.

On Sun, 28 Aug 2022 at 20:46, Matt Godbolt @.***> wrote:

Actually can probably submodule this in so that everything Just Works Nicely™

— Reply to this email directly, view it on GitHub https://github.com/mattgodbolt/jsbeeb/issues/371#issuecomment-1229539876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVVFIVRDWHZHEDZYDTS7YTV3O6ZRANCNFSM57M4TUWQ . You are receiving this because you authored the thread.Message ID: @.***>

mattgodbolt commented 2 years ago

Actually in terms of convenience (not having to get a portable version of beebasm etc etc), would it be OK to build and ship disc images of your timing tests alongside jsbeeb?

dp111 commented 2 years ago

No problem.

On Tue, 30 Aug 2022 at 21:19, Matt Godbolt @.***> wrote:

Actually in terms of convenience (not having to get a portable version of beebasm etc etc), would it be OK to build and ship disc images of your timing tests alongside jsbeeb?

— Reply to this email directly, view it on GitHub https://github.com/mattgodbolt/jsbeeb/issues/371#issuecomment-1232124406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVVFIXSNURDALLL6GBCJJ3V3ZUFVANCNFSM57M4TUWQ . You are receiving this because you authored the thread.Message ID: @.***>

mattgodbolt commented 2 years ago

D'oh I should have checked...you already have the ssds in your repo. I'm sorry...nothing to see here please move along