6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 14, 2024 12:26 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Instruction Caching
PostPosted: Tue Nov 19, 2013 2:21 pm 
Offline

Joined: Thu Mar 28, 2013 4:50 am
Posts: 13
Does anyone have any good article of information on getting a simulator to cache instructions between branching logic?

I have general idea about it, but I am not sure how to handle changing state, and interrupts.


Top
 Profile  
Reply with quote  
 Post subject: Re: Instruction Caching
PostPosted: Tue Nov 19, 2013 8:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
Sounds like you're thinking of dynamic recompilation, where you transform straight-line sections into some efficient representation, maybe even native code?

If you search with those terms, you should be able to find some good articles. Here are some I found:
http://www.altdevblogaday.com/2011/06/1 ... er-part-1/
http://fms.komkon.org/EMUL8/HOWTO.html#LABD

Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: Instruction Caching
PostPosted: Wed Nov 20, 2013 10:29 pm 
Offline

Joined: Sun Sep 15, 2002 10:42 pm
Posts: 214
Your question is too vague to be able to deduce what you're attempting much less offer an useful advice.

Toshi


Top
 Profile  
Reply with quote  
 Post subject: Re: Instruction Caching
PostPosted: Thu Nov 21, 2013 7:20 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
aaronmell wrote:
... I am not sure how to handle changing state, and interrupts.

If you've converted some straightline code to a faster implementation, and you want to handle an interrupt occurring part-way through that code, I think you'll need
- to account for the total clocks in the code
- notice that the interrupt fired during the code
- restore the machine state to what it was before the code
- emulate the code opcode-by-opcode until the cycle where the interrupt happens.
Or, if you don't need to be cycle-accurate, just handle the interrupt at the end of the straight-line section.
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: Instruction Caching
PostPosted: Mon Dec 16, 2013 4:11 am 
Offline

Joined: Thu Mar 28, 2013 4:50 am
Posts: 13
BigEd wrote:
Sounds like you're thinking of dynamic recompilation, where you transform straight-line sections into some efficient representation, maybe even native code?

If you search with those terms, you should be able to find some good articles. Here are some I found:
http://www.altdevblogaday.com/2011/06/1 ... er-part-1/
http://fms.komkon.org/EMUL8/HOWTO.html#LABD

Cheers
Ed


That first article had enough information in it to explain what I was missing. Thanks!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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 post attachments in this forum

Search for:
Jump to: