Author
| Why not?
|
PingPong msx master Posts: 1025 | Posted: August 18 2008, 17:08   |
Just wondering, why those m$ guys does not allowed load of screen shot from cassette like
bload"cas:",s
from disk it's possible.
I cannot see any tech limit...
|
|
Yukio msx professional Posts: 824 | Posted: August 18 2008, 17:25   |
The tape recorder is a sequential file system. The disk system is a random access system (any part of the files could be retrieved at any given time). But I also do not know why their imposed this limitation.
Anyway, it is possible to copy the contend of the VRAM to the RAM and later save the contend using a normal BSAVE command. There are programs to load the informations from cassette or disk. The use of cassette has more FREE memory since the Disk-Drive need to use some memory for "Buffers" and drivers.
If someone write a program using the BIOS it is possible to use a BLOAD"CAS:",R for the graphics, but this will use the main RAM before coping the screen to the Video RAM.
|
|
Yukio msx professional Posts: 824 | Posted: August 18 2008, 17:31   |
A BUFFER is the memory that the computer system use to store the read or write information from the Input/Output console. The Disk drivers already reserve some memory for this purpose. Because of this there is less memory for the USER.
If someone need to use this with other programs, the MSX would need to use routines to read the bytes one by one. Usually, the MSX could lack this sort of dedicated routine to read and write binary bytes. There are examples that use files in character mode (ASCII letters and numbers) to store graphics, but this is a slower and memory consuming task.
|
|
PingPong msx master Posts: 1025 | Posted: August 18 2008, 17:37   |
Quote:
|
If someone write a program using the BIOS it is possible to use a BLOAD"CAS:",R for the graphics, but this will use the main RAM before coping the screen to the Video RAM.
|
May be not. This is the first aswer i told myself about this, but thinking a little more i figured there is no need to copy to from RAM.
Basically a bsave or bload routine could do like this (BSAVE):
DI
1) Set VDP VRAMPTR to whatever need
2) IN A,(0x98)
3) cALL BIOS TO WRITE A BYTE
4) GOTO2 until all bytes are written..
EI
and BLOAD...
1) Same as bsave
2) READ BYTE from cassette via bios
3) OUT(0x98),A
4) same as bsave
So no need to use RAM...
The only reason maybe the different timing required to do read or write in VRAM, i know the BIOS routine do the correct wave form period using z80....
|
|
mohai msx freak Posts: 129 | Posted: August 18 2008, 17:53   |
I think it is easy to make such a program. Just some INs (from tape) and only one OUT (to screen). No buffer at all. Keep in mind that, working in BASIC there are only a few KBs accesible, and a SCREEN2 screen takes 12 KB. Keeping 12 Kbs ram free and a BASIC program could be really difficult...
I remember some loaders (Bugbyte, Mr Micro) had this feature. I know of Spectravideo (not MSX ones) are able to do it (BSAVE "name",s // BLOAD "name",s)
|
|
Yukio msx professional Posts: 824 | Posted: August 18 2008, 18:00   |
Thinking about it, the Microsoft MSX-BASIC do not have the WRITE implemented either. WRITE is the opposite of READ, using the WRITE it is very easy to create binary or graphic files because their work with strings, ASCII text or bytes.
The OPEN"GRP:" is slower.
|
|
PingPong msx master Posts: 1025 | Posted: August 18 2008, 18:30   |
A little OT: Somewhere in the past i've read that msx arch. made easy to create new devices. (like CAS: GRP: ...). But what is unclear is where it's specified that, for example a device is read only or can work only with .BAS files or similar things. For example you cannot BLOAD "MEM:",S .... Where is "said" that mem could not work for saving pictures?
|
|
Yukio msx professional Posts: 824 | Posted: August 18 2008, 18:42   |
You can not use the MEM (BASIC RAM-DISK drive) to save pictures, but i believe that if you use a megaram or a external DOS2 cartridge it is possible to use the MSX-DOS2 RAMDISK to hold the data .
If you created the RAMDISK with MSX-DOS2 it would act like a real Disk-Drive with a real letter.
I am unsure if it is specified into some place why the BASIC commands can't use the screen commands when the DOS versions can ...
IF I correctly recall this is not the first time that those questions were asked over here, this is a recurrently topic.
|
|
|
|
|