IDE - Dos2 - Manipulating files ?

Pagina 1/3
| 2 | 3

Door Whizzy

Master (213)

afbeelding van Whizzy

05-11-2009, 10:25

Hiya all,

Last night i was doing some testing with some small files which i have in my code base.
Im using an IDE interface with DOS embedded to boot to dos2.2 and start my program.

Apparently it didn't work and after i had a look at it (Using the pc to compare the content of binary files) I noticed that as soon as the system booted with a DOS floppy it began manipulating .COM files who's size was smaller then 1Kb

I had .COM files with a size of 300 bytes.. after the system was started these files where exactly 1024 bytes.
As soon as i changed the filename to .DAT for example, the files where not touched ? Question

My question : WHY ? Question what did i miss ?

Thx,
Antal

Aangemeld of registreer om reacties te plaatsen

Van ro

Scribe (4962)

afbeelding van ro

05-11-2009, 11:10

Clustersize Wink

Van Leo

Paragon (1236)

afbeelding van Leo

05-11-2009, 11:26

i noticed the same with SD v2.2 interface , file size change and got rounded to next 128 byte value.
i use gen80 to compile an assembly file , the binary result has its size rounded to higher 128 byte.
But if execute the compile command inside a .BAT file and i copy the file in other directory in the same
.BAT file before exiting , then file size is correct .

My guess is that it is linked to somesector/cluster size , which can explain your HD/FD difference since
cluster are probably not same size , just a guess....

it is very annoying because i use concat to concatenate binary results to make a .rom file
for 128kb megarom, hopefully i have that file.bat work around.

Van Leo

Paragon (1236)

afbeelding van Leo

05-11-2009, 11:26

i noticed the same with SD v2.2 interface , file size change and got rounded to next 128 byte value.
i use gen80 to compile an assembly file , the binary result has its size rounded to higher 128 byte.
But if execute the compile command inside a .BAT file and i copy the file in other directory in the same
.BAT file before exiting , then file size is correct .

My guess is that it is linked to somesector/cluster size , which can explain your HD/FD difference since
cluster are probably not same size , just a guess....

Van Whizzy

Master (213)

afbeelding van Whizzy

05-11-2009, 11:34

Ok,

Clustersizes and such. but why on earth did the OS prepend my file with random data? And not append ?
This way my program fails to load because it load the first X bytes of data, and now i get some weird crap back.

And..,. why didn't it change .DAT files ? but .COM files ?

Questions.????QuestionQuestionoO

Van Whizzy

Master (213)

afbeelding van Whizzy

05-11-2009, 11:36

i can show screenshots Cool wait..

Van Whizzy

Master (213)

afbeelding van Whizzy

05-11-2009, 11:59

now with screens:

Before copying to a floppy disk:

i34.tinypic.com/2qcp4cz.jpg

After putting it on disk

http://i36.tinypic.com/1f6xkh.jpg

And then.. after a reboot:

http://i38.tinypic.com/2886oes.jpg

Notice how only level1.com is changed

Van Bastiaan

Champion (333)

afbeelding van Bastiaan

05-11-2009, 12:33

you might also want to double check that it is not a virus?

http://www.msx.org/forumtopic1392.html

Van Whizzy

Master (213)

afbeelding van Whizzy

05-11-2009, 13:21

WOW

Thats it.... omg.. but then this virus is in the sunrise firmware for the IDE interface?>?!

OMG Shocked!SadFace

Van Whizzy

Master (213)

afbeelding van Whizzy

05-11-2009, 13:22

Look... this is an part of the 'new' level1.com data:

>Z! å!ê í°Ã !    í°*Í zþ
{þ  ‹ Í :Äñ2l¡¢¡Í l¡Í · !Ͷ ·(¢¡Í l¡Í · Ͷ ·(åá# Ë%Ëú   í°Ã Did you know today's ZAPP's birthday ???

WTF.. never seen this before

Van SaebaMSX

Hero (533)

afbeelding van SaebaMSX

05-11-2009, 19:49

Just get UNZAPP.COM... ZAPP virus is older than sun! Tongue

Pagina 1/3
| 2 | 3