Jump to content
  • 0

Detect proto#1 vs proto#2 from code


pzembrod
 Share

Question

Hi all,

is there any pragmatic way how a program could easily tell whether it is running on proto#1 or proto#2, i.e. where the bank switching ports live, whether at 0000/0001 or 9f60/9f61?

This could be handy for the transition period. I'm thinking whether I can avoid providing two different versions of VolksForth and cc64. Even just setting up two different build targets just for an interim period could turn into a major hassle, hence my question.

Cheers

/Philip

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
1 minute ago, pzembrod said:

is there any pragmatic way how a program could easily tell whether it is running on proto#1 or proto#2, i.e. where the bank switching ports live, whether at 0000/0001 or 9f60/9f61?

I had the same question here:

I settled into detecting which ROM version is present, here are the details:

 

  • Like 1
Link to comment
Share on other sites

  • 0

Here's my C code snippet:

void getVersion()
{
   version = PEEK(VERSION_ADDR);
   if (version > 127)
   {
      release = "proto";
      modVersion = 0x100 - version;
   }
   else
   {
      release = "release";
      modVersion = version;
   }
}
	
Edited by rje
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use