View previous topic :: View next topic |
Author |
Message |
dmichel Admin
Joined: 04 Apr 2002 Posts: 1166 Location: France
|
Posted: Sun Jun 06, 2010 1:16 pm Post subject: [2010-06-06] optimized hybrid cpu core |
|
|
I'm starting to see the first result of the hybrid CPU core in action, it looks great! It's 3 to 4 times faster than the new core, and it's even faster than the old core by about 25%.
I rewrote it in ASM too, which explain a bit the speed boost. This was a refreshing experience, it was too long since the last time I touched some ASM, the x86 instruction set feels so outdated though, I really wish we had something better.
OK, now it's the turn of the new VDC core, if I can get similar results the new version should fly again. _________________ David Michel |
|
Back to top |
|
|
Kaminari Elder
Joined: 19 Apr 2002 Posts: 1432 Location: Paris, France
|
|
Back to top |
|
|
bernielindell Regular
Joined: 04 Mar 2008 Posts: 149
|
Posted: Sat Jun 12, 2010 5:38 pm Post subject: |
|
|
Yes. Thanks! |
|
Back to top |
|
|
AamirM Visitor
Joined: 28 Nov 2008 Posts: 19
|
Posted: Sun Jun 13, 2010 9:32 am Post subject: |
|
|
Good to hear. This is some interesting stuff.
What do you exactly mean by "hybrid" CPU core? Does this mean that you are checking for VDC feedback inside instructions? |
|
Back to top |
|
|
dmichel Admin
Joined: 04 Apr 2002 Posts: 1166 Location: France
|
Posted: Mon Jun 14, 2010 9:53 am Post subject: |
|
|
Not anymore, that was what I was doing in the new core, something like that :
cpu_cycle();
vdc_cycle();
cpu_cycle();
vdc_cycle();
...
The hybrid core is a classic core with the CPU instructions emulated one at once, in one call, and the VDC scanline by scanline, but while trying to maintain the same timing accuracy as a cycle by cycle emulation. Actually it's like if there was a VDC feedback but it's pre/post-calculated now instead of being done in real time. _________________ David Michel |
|
Back to top |
|
|
AamirM Visitor
Joined: 28 Nov 2008 Posts: 19
|
Posted: Tue Jun 15, 2010 12:51 pm Post subject: |
|
|
Ah..so you are pre-calculating the IRQs firing times. I think thats pretty safe. But how would you pre-calculate sprite 0 collision IRQ? (although seldom used but still) |
|
Back to top |
|
|
dmichel Admin
Joined: 04 Apr 2002 Posts: 1166 Location: France
|
Posted: Wed Jun 23, 2010 9:35 pm Post subject: |
|
|
It's easy too, at the beginning of each scanline you know what sprites will be displayed and where, check if they collide, calculate at what pixel and you got the interrupt time. _________________ David Michel |
|
Back to top |
|
|
|