IDE - Dos2 - Manipulating files ?

Page 1/3
| 2 | 3

By Whizzy

Master (213)

Whizzy's picture

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

Login or register to post comments

By ro

Scribe (5059)

ro's picture

05-11-2009, 11:10

Clustersize Wink

By Leo

Paragon (1236)

Leo's picture

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.

By Leo

Paragon (1236)

Leo's picture

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....

By Whizzy

Master (213)

Whizzy's picture

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

By Whizzy

Master (213)

Whizzy's picture

05-11-2009, 11:36

i can show screenshots Cool wait..

By Whizzy

Master (213)

Whizzy's picture

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

By Bastiaan

Champion (333)

Bastiaan's picture

05-11-2009, 12:33

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

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

By Whizzy

Master (213)

Whizzy's picture

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

By Whizzy

Master (213)

Whizzy's picture

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

By SaebaMSX

Hero (533)

SaebaMSX's picture

05-11-2009, 19:49

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

Page 1/3
| 2 | 3