MSX memory questions (Development Foros MSX)MSX Resource Center            
                       
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 47 invitados y 3 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - MSX memory questions

Autor

MSX memory questions

DemonSeed
msx master
Mensajes: 1062
Publicado: Marzo 09 2008, 13:26   
Ofcourse, I tried to find this out on the web first before deciding to bother you lot with it.

(1) Exactly how much extra (MSX 2) RAM is preserved when booting with [CTRL] pressed?

(2) In BASIC, what's a reasonable begin/start address to CLEAR? How to tell what's the amount of bytes needed for your strings, arrays and program itself?

(3) How to tell if allocated memory ain't gonna overlap used memory or clash with running TSR's etc.?
Or is it refused or 'cut down' automatically when you CLEAR too much?
[D-Tail]

msx guru
Mensajes: 3027
Publicado: Marzo 09 2008, 14:12   
(1) I believe this depends on the MSX model. Not sure about this though. In any case, with CTRL you will get some extra BASIC memory, which is what it's all about I think

(2) This is a matter of bookkeeping - check your listing to see how much memory your variables and strings take up, then use that to CLEAR. The address to CLEAR from is then the BASIC top address minus the amount of bytes you calculated in the first place.

(3) I haven't got the slightest clue. I don't work with TSRs [MemMan?] and stuff, but I guess that if you use a proper memory manager like MemMan, your CLEAR will be automatically cut down [out of memory<beep!>].
nikodr
msx addict
Mensajes: 491
Publicado: Marzo 09 2008, 14:25   
There is this command on msx basic
Print fre(0)
on bluemsx on a msx2 profile without ctrl it gives 23432 bytes with control pressed it is 24990.

You can just do this and it will instantly tell you of the basic free memory.
legacy
msx professional
Mensajes: 519
Publicado: Marzo 09 2008, 14:48   
Boot with the CTRL key pressed, you disable the diskrom, this is about 16k, IIRC
OR is it 1.6k?

msd
msx professional
Mensajes: 625
Publicado: Marzo 09 2008, 14:51   
SHIFT, CTRL only disables the 'second' drive
[D-Tail]

msx guru
Mensajes: 3027
Publicado: Marzo 09 2008, 15:26   
legacy: it's 1.6k . As msd said, SHIFT will increase the BASIC memory to 28815 bytes if I'm correct. At the expense of disabled drives, that is
DemonSeed
msx master
Mensajes: 1062
Publicado: Marzo 10 2008, 23:30   
Is it possible to use 128KB instead of 64KB RAM for a BASIC program + XBASIC + music player + sfx player ?
ARTRAG
msx master
Mensajes: 1802
Publicado: Marzo 10 2008, 23:40   
In basic (or xbasic) you cannot use more than 26-28Kbytes,
only ASM programs can use more ram.
Maybe you could use the extra ram as ramdisk, but the max size
of ram usable for programs stay 26-28Kbyte.

[D-Tail]

msx guru
Mensajes: 3027
Publicado: Marzo 11 2008, 09:16   
It is even possible to use, like, 4Megs in BASIC. Therefore your BASIC program should start on $C000, such that page 3 can be swapped with anything else [like a memory mapper!]. Disadvantages are huge: you'd have to do your own memory management in BASIC, DOS2 can not be supported at all and foremost: the size of your BASIC program ends up being 8-10kB.
konamiman
msx freak
Mensajes: 142
Publicado: Marzo 11 2008, 09:25   
According to MSX2 Technical Handbook, chapter 2:

Quote:

When developping a program on MSX2, we recommend you create it at addresses
8000H to DE3FH as if to install a 2DD-2 drive whose highest address of the
user's area is the lowest. The work area of the disk can grow even larger,
therefore, HIMEM of the application program should be checked to prevent
disasters even in the worst situation.



This is true for DOS1, DOS2 will never take so much amount of system memory. Anyway, always check HIMEM (FC4AH) to know where the BASIC area ends.

As for (properly programmed) TSRs, these will cause the system to decrease available memory automatically, so you don't have to worry about them.

And if you want to use mapped RAM from BASIC, one option is to use NestorBASIC.
[D-Tail]

msx guru
Mensajes: 3027
Publicado: Marzo 11 2008, 11:26   
That was the ultimate alternative that I forgot to mention, thanks konamiman
DemonSeed
msx master
Mensajes: 1062
Publicado: Marzo 11 2008, 14:13   
Oh guys, great!!!

You are seriously saving over 9 months of work from going down the drain!

NestorBASIC sounds good.

One big disadvantage of helping me is:
I will be back with stupid questions shortly.

F.I., I have to clue about letting BASIC programs start on different addresses or swapping pages.
[D-Tail]

msx guru
Mensajes: 3027
Publicado: Marzo 11 2008, 19:46   
DemonSeed: rest easy, with NestorBASIC, you don't need to know that kind of stuff. I'll answer your e-mail on short notice though, so stay tuned
 
 







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