Detecting MSX2+ chips with MSX-basic ? (Development Foros MSX)MSX Resource Center PassionMSX MSX2 contest           
                       
English Nederlands Español Português Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 102 invitados y 2 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - Detecting MSX2+ chips with MSX-basic ?

Ir a la página ( Página anterior 1 | 2 )
Autor

Detecting MSX2+ chips with MSX-basic ?

NYYRIKKI
msx master
Mensajes: 1503
Publicado: Enero 04 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
Mensajes: 608
Publicado: Enero 04 2004, 18:33   
v9948? there is no v9948. 2+ and turbo r both have a v9958
GuyveR800
msx guru
Mensajes: 3048
Publicado: Enero 04 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
Mensajes: 1002
Publicado: Enero 04 2004, 18:19   
Heh . Check the last Q in this MSX Assembly Page article...


~Grauw
msd
msx professional
Mensajes: 608
Publicado: Enero 04 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
Mensajes: 842
Publicado: Enero 05 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.
 
Ir a la página ( Página anterior 1 | 2 )
 







(c) 1994 - 2008 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation