Detecting MSX2+ chips with MSX-basic ? (Development MSX Fora)MSX Resource Center            
            
English Nederlands Espa�ol Portugu�s Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 50 gasten en 2 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - Detecting MSX2+ chips with MSX-basic ?

Ga naar pagina ( Vorige pagina 1 | 2 )
Schrijver

Detecting MSX2+ chips with MSX-basic ?

NYYRIKKI
msx master
Berichten: 1525
Geplaatst: 04 Januari 2004, 14:11   
Quote:


But about that V9948, is it possible to include that in the test ?
Or is it included ?


It is included...
Quote:

Could someone also explain to me line by line what this code example actually does and how it does it



First we need to know, that MSX type is stored on memory location &H2D (45 as decimal number) This memory location has following meaning:
0=MSX1
1=MSX2
2=MSX2+
3=MSX tR

10 IF PEEK(&H2D)>0 then A=(VDP(-1)AND62)/2+1

Here we test that this is not MSX1. This is because MSX1 can not read VDP status register 1 (= negative VDP numbers in BASIC) This is because MSX1 VDP has only one status register (status register 0) and that can be read trough VDP(8) in BASIC.

If we have MSX2 or better, we read the status register to get VDP type. VDP types are:
0=V9938
1=V9948
2=V9958

This information is located in bit's 1-5. As we don't need bit 0, bit 6 and bit 7. We simply mask them away (&B00111110 = 62) Now the result is one bit left, so we move that one bit right by dividing the result by 2. Now we have the VDP type as defined earlyer. As the A variable is still 0 if this command is not executed, we add 1 to the result to give a range of numbers to 1-3 if the command is executed and 0 if it is not.

To make it a bit more clear, we could have written the line like this as well:
10 IF PEEK(45)>0 then A=(VDP(-1)AND &B00111110 )/2+1

20 FOR I=0 TO 3:READ B$(I),V$(I):NEXT I
Load MSX types (0-3) to B$ array and VDP types (0-3) to V$ array.

30 PRINTB$(PEEK(&H2D));" BIOS installed with ";V$(A);" VDP"
Display the information.

40 DATA MSX1,at least TMS9918/TMS9929,MSX2,V9938,MSX2+,V9948,MSX tR,V9958
The strings for B$ and V$ arrays separated with ","

More information can be found from comprehensive school math books, (MSX2) BASIC programming manuals and VDP data sheet's.

~NYYRIKKI

msd
msx professional
Berichten: 615
Geplaatst: 04 Januari 2004, 18:33   
v9948? there is no v9948. 2+ and turbo r both have a v9958
GuyveR800
msx guru
Berichten: 3048
Geplaatst: 04 Januari 2004, 18:36   
Quote:

v9948? there is no v9948. 2+ and turbo r both have a v9958


Hey msd, maybe you should read the thread before making stupid statements
Have you been living in a cave the last 10 years?
Grauw
msx professional
Berichten: 1006
Geplaatst: 04 Januari 2004, 18:19   
Heh . Check the last Q in this MSX Assembly Page article...


~Grauw
msd
msx professional
Berichten: 615
Geplaatst: 04 Januari 2004, 18:35   
Quote:

>>v9948? there is no v9948. 2+ and turbo r both have a v9958<<
Hey msd, maybe you should read the thread before making stupid statements
Have you been living in a cave the last 10 years?



Cave.. almost looks like one.

Never heard of the v9948.
Argon
msx professional
Berichten: 842
Geplaatst: 05 Januari 2004, 10:07   
First of all: THANK YOU VERY MUCH FOR EXPLAINING THE CODE TO ME, NYYRIKKI !

I needed the 9948 check because I own some Korean material that I wanted to check
I've got interesting results from the tests (Thanks again NYYRIKKI ).
I'm currently updating my website, it should be up by next week I think.

Greetings.
K.
 
Ga naar pagina ( Vorige pagina 1 | 2 )
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.