BigEd wrote:
Welcome! I don't know anything about the Saturn's SH2 CPU or the quality of the C compiler, so I can't say much about what performance you might hope for.
i dream of 20-25% more speed
Quote:
I'll take a look at the m6502 you're using - that's a new one for me. I'll add it to the reference section too.
(Do you have an upstream link for the source?)
only this one on github
Quote:
However, I'd suggest you take a look at Ian Piumarta's lib6502, as that has always looked good to me. There's a slightly enhanced fork here:
https://github.com/ZornsLemma/lib6502-sfand the original is here:
https://www.piumarta.com/software/lib6502/Not yet, i'll check it ! thanks !
Druzyek wrote:
This looks really cool!
I see you use static inline in some places. Have you looked at the assembly output to make sure it's actually inlined? Sometimes the compiler ignores it.
i didn't check asm, i can just say the code is bigger and faster, i tried with and without. so i would say it's inlined.
Quote:
Probably not affecting your speed much but why does BRA take a condition code?
it's reused in multiple opcodes (bra,bcc,beq,etc)
Quote:
If you have the extra space, you could try making a copy of your dispatch loop on line 201 at the end of every op code function. That way you have one jump per instruction instead of two and (hopefully) only get one pipeline stall instead of two.
yes i have extra space, it try this !