Skip to content
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

Check instruction timings with Robert Peip's timingtest.ws #30

Open
asiekierka opened this issue Dec 1, 2022 · 2 comments
Open

Check instruction timings with Robert Peip's timingtest.ws #30

asiekierka opened this issue Dec 1, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@asiekierka
Copy link

asiekierka commented Dec 1, 2022

https://github.com/MiSTer-devel/WonderSwan_MiSTer/tree/main/testroms/timingtest

NitroSwan is decently close; for context, Ares passes all, while Mednafen and StoicGoose pass none.

@asiekierka asiekierka changed the title Pass Robert Peip's timingtest.ws Check instruction timings with Robert Peip's timingtest.ws Dec 1, 2022
@FluBBaOfWard
Copy link
Owner

Yeah, I can't figure out the timing of the base loop unless "in al, dx" takes 6 cycles as the documentation says...
The code is

test_jumponly:
mov cx,1000
align 2
repeat_jumponly:
nop
nop
nop
in al, dx
dec cx
jnz repeat_jumponly
ret

nop *3 = 3
in al, dx = 6
dec cx = 1
jnz = 4
total 14

I know that adding another nop adds 1 cycle, adding another "in al, dx" adds 5 cycles, dec takes 1 cycle. I even added my own jnz test and it shows that it takes 4 cycles... Not sure how to proceed.

@FluBBaOfWard FluBBaOfWard added the enhancement New feature or request label Dec 7, 2022
@FluBBaOfWard
Copy link
Owner

Here is a link to my version of the timing test.
https://github.com/FluBBaOfWard/WSTimingTest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants