MagicEngine
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Japanese English 

[2010-06-06] optimized hybrid cpu core

 
Post new topic   Reply to topic    MagicEngine Forum Index -> Development blog
View previous topic :: View next topic  
Author Message
dmichel
Admin
Admin


Joined: 04 Apr 2002
Posts: 1166
Location: France

PostPosted: Sun Jun 06, 2010 1:16 pm    Post subject: [2010-06-06] optimized hybrid cpu core Reply with quote

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%. Dancing

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. Smile
_________________
David Michel
Back to top
View user's profile Send private message
Kaminari
Elder
Elder


Joined: 19 Apr 2002
Posts: 1432
Location: Paris, France

PostPosted: Sat Jun 12, 2010 1:21 pm    Post subject: Reply with quote

Thanks Dave for keeping us informed of your technical progress, much appreciated :)
_________________
Kaminarimon HES Music Archive | Tokugawa Corporation | YouTube Channel
Back to top
View user's profile Send private message Visit poster's website
bernielindell
Regular
Regular


Joined: 04 Mar 2008
Posts: 149

PostPosted: Sat Jun 12, 2010 5:38 pm    Post subject: Reply with quote

Yes. Thanks! Smile
Back to top
View user's profile Send private message Send e-mail
AamirM
Visitor
Visitor


Joined: 28 Nov 2008
Posts: 19

PostPosted: Sun Jun 13, 2010 9:32 am    Post subject: Reply with quote

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
View user's profile Send private message
dmichel
Admin
Admin


Joined: 04 Apr 2002
Posts: 1166
Location: France

PostPosted: Mon Jun 14, 2010 9:53 am    Post subject: Reply with quote

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
View user's profile Send private message
AamirM
Visitor
Visitor


Joined: 28 Nov 2008
Posts: 19

PostPosted: Tue Jun 15, 2010 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
dmichel
Admin
Admin


Joined: 04 Apr 2002
Posts: 1166
Location: France

PostPosted: Wed Jun 23, 2010 9:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MagicEngine Forum Index -> Development blog All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group