EASy68K  
It is currently Sun May 31, 2020 1:52 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Nov 19, 2019 10:57 pm 
Offline

Joined: Wed Oct 23, 2019 5:34 pm
Posts: 1
Is there a way to programmatically determine whether code is running on Easy68k or on real hardware? The real hardware in this case has a 68681, which has write only registers whereas Easy68k is fully read/write for the entire memory map, so I'm thinking that one method would be to write to the 68681 and then see if you can read the byte that you just wrote. If you can, then it's Easy68k, if not then it's real. Is there a better/more elegant way to do this?


Top
 Profile  
 
PostPosted: Sat Nov 23, 2019 12:58 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1122
That method sounds simple and simple is usually the best. Another option would be to test for a response from one of Sim68K trap #15 tasks. (e.g. Trap #15 with D0=32 and D1.B = 04 will return the version number of Sim68K in register D1.L) It would require setting up a Trap #15 handler in the real hardware as well. Like I said, simple is usually the best.

_________________
Prof. Kelly


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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:  
Powered by phpBB® Forum Software © phpBB Group