Schrijver
| bsave , s header
|
MysteryMan msx friend Berichten: 13 | Geplaatst: 28 Juni 2005, 14:52   |
Hi,
Currently i'm writing a little windows tool to view msx screen files with are save with bsave"name",startadres,endadres,s
i noticed that the header is 6 bytes, i asume start& and load adres , but that leaves me with 2 other bytes.
so i asume its an header (2 bytes) then 2 bytes for startload and then 2 bytes for endload adres.
Does somebody know if this is correct ?
tnx
|
|
NYYRIKKI msx master Berichten: 1509 | Geplaatst: 28 Juni 2005, 14:57   |
DB #FE ; ID byte
DW #xxxx ; BEGIN address
DW #xxxx ; END eddress
DW #0000 ; START address (unused)
= total of 7 bytes.
|
|
ro msx guru Berichten: 2329 | Geplaatst: 28 Juni 2005, 14:59   |
the #FE ID byte is to identify a BINAIRY file. 7 bytes header indeed. the rest is GFX and palette data (if included)
|
|
ARTRAG msx master Berichten: 1685 | Geplaatst: 28 Juni 2005, 15:06   |
MysteryMan pay attention to your windows program,
sometimes the first byte of the file is interptreted by
your I/O widows routines... Unlesss you are using C,
or some low level language, check the I/O of your program..
|
|
MysteryMan msx friend Berichten: 13 | Geplaatst: 28 Juni 2005, 15:34   |
Tnx guys!
and i didnt see it in 1600x1280 , but its indeed 7 bytes, the way i convert it to an .NET bitmap just move's the bitmap from left to right if i usume to less header bytes.
I'm making this little project in VB.NET and with an binairy reader object the first byte in the file isnt used.
And sc8 files are loaded perfectly, no up to screen 10/11 and 12 modes ;-)
|
|
MysteryMan msx friend Berichten: 13 | Geplaatst: 02 Juli 2005, 01:02   |
So, the conversiontool is getting more 'shape' ! and right now i'm adding an batch conversion option that can operate in several ways,
so not only convert 1 directory, but it can convert an whole dir-tree to, and keeps track of the original dir. structure in the destination dir. too.
--this works with an selection meganism that put the files in an list box first after you selected the 'search and import mode' wich actually works verry simpel.
But i want to make an option of creating an simple basic file too with the purpose to show these files instandly when you run that program on youre msx (or emu) --to day cd-rom and hd is quit common on msx so ...--.
But is there an special basic-file header too ?
I have a list of all token numbers, so this shouldnt be a problem, if i remember it wel the basic is loaded as here ...
Line numer -- 2 bytes lo/hi format
Next line adres -- 2 bytes lo/hi
the actual tokens+basictext
line number ...
nextline adres ...
PLZ correct me if i'm wrong!!!
What i don't know is what code stops the listing, (maybe 0?)
If you got an nice idea , plz let me know , it should be as complete as possible !
|
|
NYYRIKKI msx master Berichten: 1509 | Geplaatst: 02 Juli 2005, 10:36   |
The header byte is #FF
Each tokenized line should be ended with 0
when program ends the next linenumber is 0 as well so last three bytes are all 0
TIP: Save your BASIC program as text file. It takes few more bytes, but MSX can load it just fine.
|
|
MysteryMan msx friend Berichten: 13 | Geplaatst: 02 Juli 2005, 11:29   |
tnx nyyrikki!,
this is one of the things i forgot --save"name",a--
Just tested it with NotePad , and voilla, so now its even simpler ;-) this way i can simply use the stringbuilder class.
by the way, screen 8 and 12 modes are working great now, zo now its time for the other 16color and 4 color bitmapped mode (screen 5,6 and 7).
After that i have a look at screen 2, but sinds these are chunky modes its going to be a bit more difficult with the color conversion.
So i'm thinking of two methods, one that handles simple pictures for full 16c , ad one for digitized pictures using a kind of gray scale (black,gray,yellow,white for example but should be user defineble).
|
|
|
|
|