Jump to content
IGNORED

Lynx I vs Lynx II


vince

Recommended Posts

I'm searching a way to recognize in a program if it is executed on a Lynx I or Lynx II system.

 

It could be a difference between register initialisation, or something like that... (this test would probably the first thing in the program)

 

 

Any idea ?

Link to comment
Share on other sites

  • 1 month later...

Here is my test sample :

 

#include <lynx.h>

#include <lynxlib.h>

 

char SCREEN[8160] at (MEMTOP-16320);

char RENDER[8160] at (MEMTOP-8160);

 

char MSTEREO at 0xFD50;

 

char pal[]={

0x00,0x0F,0x00,0x0F,0x0F,0x00,0x0C,0x08,0x08,0x0F,0x08,0x08,0x08,0x08,0x04,0x0F,

0x00,0xFF,0x0F,0x0F,0x00,0xF0,0xCC,0x8C,0x88,0x8F,0xFF,0x4F,0x48,0xF0,0x08,0xFF

};

 

void Vsync()

{

#asm

vretrace:

lda $fd0a

bne vretrace

#endasm

}

 

main() {

unsigned char val;

 

InitIRQ();

CLI;

 

SetBuffers(SCREEN,RENDER,0);

 

SetRGB(pal);

 

MSTEREO=0x10;

 

DrawFBox(0,0,160,102,0);

 

val=MSTEREO;

 

if (val==0x10) {

DrawFBox(20,20,20,62,0x0F);

DrawFBox(60,20,20,62,0x0F);

} else {

DrawFBox(20,20,20,62,0x0F);

}

 

SwapBuffers();

 

Vsync();

 

for( ; ; ){

}

}

 

 

 

source : http://devlynx.ti-fr.../?pag=9&cat=111 (with comments, in french)

Edited by vince
Link to comment
Share on other sites

Concerning the link, it was an error of DNS this morning. It must be updated now.

 

I use the NEWCC65 environment. It does not includes reference to 0xFD50, wich is the adress of the MSTEREO register (http://devlynx.ti-fr.com/?pag=17&act=dtl&adr=0xFD50) so I added it in my code defining MSTEREO variable.

 

It would probably be better if I specify "unsigned char" instead of "char"...

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.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...