Questions related to writing BIOS
ZXNet echo conference «real.speccy»
From Roman Petrov → To All 27 May 1998
Hello! Dear All!
A question has arisen that is directly related to writing the BIOS, and to be more precise, to writing the file system for the BIOS. The question is:
Is it possible to work with disks whose sectors exceed 256 bytes
using a buffer less than the size of this sector. If this is impossible,
then I will have to set aside a 1 kilobyte buffer in the BIOS for the sector.
Then the system variables will start with #5f00 and it is unknown where they
will reach (for now there are only 32 bytes). Somewhere in the ZX-Review someone suggested allocating such
buffers in the stack area, but I find this even less convenient than
leaving such a healthy buffer. By the way, nothing prevents you from using this buffer as a temporary storage of information (but any BIOS function has the right to change it). Yes, such a buffer is needed by the BIOS only for its own operations, such as reading a directory or searching for a file. All other operations with
files are performed with buffers specified in the file descriptor.
PS: Don't think I'm crazy: maybe you just don't have time to experiment yourself, and you have a good way to add to the list of people who
helped in creating the BIOS and then get a copy of the BIOS for free!
To these people already like Roman Milukov (the idea of the installer)
and Denis Dmitriev (very constructive criticism and catching one
big hole in the reset/exit function of the program)
CRespectfully, Roman aka Megus of BrainWave association.
[Team ZX-Spectrum] [Team Agatha Christie] [Team Metallica] [Team Iron Maiden]
From Andrey Isaev → To All 28 May 1998
Hello, Roman!
27 May 98 Roman Petrov was pinning away in the hope that All would read about Questions
related to writing a BIOS, I read this and decided to answer:
RP> Is it possible to work with disks whose sectors
RP> exceed 256 byte,
RP> I use a buffer less than the size of this sector.
No, no, the VGshka cannot read less than one sector.
RP> If this
RP> is impossible,
RP> then in the BIOS I will have to allocate a buffer of 1
RP> kilobyte for the sector.
Why exactly 1 kilobyte? imho it’s not worth making sectors larger than 512 bytes.
Sincerely, Andrey.
... The hedgehog is a proud bird: if you kick it, it won’t fly!
From Roman Petrov → To All 29 May 1998
AI> Why exactly 1 kilo? imho it’s not worth making sectors larger than 512 bytes.
I think so too, but some people want to use 800K iS-DOS disks. But
I am still inclined to think about abandoning their use, then the buffer
becomes 2 times shorter and the system variables will start from address
#5d00. And they will occupy 1 sector in the area, therefore, with #5E00 - complete
freedom for the programmer. Oh, by the way, a little more information about the BIOS:
The system variables of the drivers (except for those that are already present
in the base ones) will be located on the last page of memory. The memory area
occupied by them will grow from top to bottom.
From Andrey Isaev → To All 30 May 1998
AI> bytes are not worth it.
RP> I think so too, but some people want to use 800K
RP> iS-DOS disks.
Well, if the original disks are used so that they can be
copied from them to the native BIOS, then the buffer can be made in the copier.
From Kirill Frolov → To All 30 May 1998
┌┐
CM07p├0 B┴┴py┌ 05/27/98, B 08:59:16 ├┤ekT0
Roman Petrov ┌┐│/│Ca/\ k All ┌┐p0 Questions related to writing a BIOS:
├┤i Roman & All !
[...]
RP> A question has arisen directly related to writing the BIOS, and to be
RP> more precise, then with writing the file system for the BIOS. The question is:
RP> Is it possible to work with disks whose sectors exceed 256 bytes,
RP> using a buffer less than the size of this sector. If this is not possible,
It is possible. Half of the sector is loaded, the other is read only from ports
. Then if everything is ok, there will be no errors. With the second half
first skip, then load.
But!!!! This is a masday way. If you want to read a lot in a row, then it
will be SEVERAL disk revolutions per sector!!!!!
[...]
RP> operations such as reading a directory, searching for a file. All other operations on
RP> files are performed with the buffers specified in the file descriptor.
Forget it. It’s better to find 1 KB.
Wi7h be57 Wi5he5, FK0.
-+- SMM version 1.08
From Roman Milukov → To All 31 May 1998
AI> Well, if the original disks are used so that
AI> they can be copied to the native BIOS, then the
AI> buffer can be made in the copier itself.
Yes. I also think that there is no need to use direct ISO disks.
But having 800K on floppy disks would still be nice...
All the best.
With respect, Roman Milukov.
From Roman Petrov → To All 3 June 1998
RM> Yes. I also think that there is no need to use direct ISO disks.
RM> But having 800K on floppy disks would still be nice...
And what kind of disk format do you propose so that there is 800 kilos, and so that sectors longer than 512 bytes are not used?
From Andrey Isaev → To All 3 June 1998
Hello, Roman!
31 May 98 Roman Milukov chewed his fingers in the hope that Roman Petrov would read about
From Roman Petrov → To All 6 June 1998
AI> And who is stopping you from having 800k on the disk but with sectors of 512 bytes each.
Nu, nu... If you also teach the VGshka to understand disks that have 10 sectors
512 bytes per track ;-) They have already talked about this many times everywhere, that
such There is no way to read 800k on the Spectrum. 9 sectors are readable, but 10
do not want to.
From Roman Milukov → To All 6 June 1998
DD> but I can suggest one _perversion_, with the help of which
DD> you can
DD> try to read any number of bytes in any part of the
DD> sector. The only thing is: I don’t know how to check
DD> for correctness.... stop! came up with it ;)
...
Or maybe then we’ll make one large sector for the entire track? W
it will be cool! :)))
From Roman Milukov → To All 6 June 1998
RM> Yes. I also think that there is no need to use direct ISO disks
RM> There is no need.
RM> But it would still be nice to have 800K on floppy disks...
AI> And who is stopping you from having 800K on a disk but with 512 sectors
From Roman Milukov → To All 6 June 1998
RP> And what kind of disk format do you propose so that there is 800
RP> keel, and so that sectors longer than 512 bytes are not used?
I don’t know. I didn't offer anything, but simply said that it would be nice to have more space on the floppy disk.
But! I could be wrong, of course, because... I inattentively read letters in ZX.SPECTRUM about an emulator of some computer. Cope himself or something?
2ALL: Maybe someone remembers?
So, it seems there are 10 sectors of 512 bytes on the track!
I apologize in advance - maybe I’m wrong.
From Dmitry Lomov → To All 6 June 1998
RP> And what kind of disk format do you propose so that there is 800 kilos, and so that sectors longer than 512 bytes are not used?
10 seconds of 512 bytes per track = 800 kilos
This format has three huge advantages:
1) the period of sectors is equal to one frame, between sectors there are
an extra 10,000 clock cycles; hence - loaders with AY and mouse etc.
2) this format allows FAST-procedures to work quickly
on 3.5 flops (the sector is twice as long, the pause to calm
the head is doubled), while in tr-dos everything slows down on them
3) sectors on the IDE screw are the same length.
there is also an option 10*512+128 byte/track, it fits neatly,
but it’s too crooked... and they don’t make an extra 20k of weather.
All the best.
Dmitry aka -=LD=- / X-TRADE GROUP.
-+- SMM version 1.08
From Kirill Frolov → To All 6 June 1998
┌┐
CM07p├0 B┴┴py┌ 06-06-98, B 06:22:00 ├┤ekT0
Dmitry Lomov ┌┐│/│Ca/\ k Roman Petrov ┌┐p0 Questions related to writing
BIOS :
├┤i Dmitry & Roman !
[...]
DL> 10 seconds of 512 bytes per track = 800 kilos
DL> this format has three huge advantages:
And one minus.
[...]
DL> there is also an option 10*512+128 bytes/track, exactly fits,
DL> but it’s too crooked... and they don’t make an extra 20k of weather.
If there are 9 sectors and the disk has a SCRATCH, then by moving the sectors
on the track you can format it. If there are 10 sectors, one
will not be there. And it’s good if there is still the possibility of eliminating/replacing
bad blocks.
From Roman Petrov → To All 7 June 1998
RM> I don't know. I didn't suggest anything, but simply said that it would be nice
RM> to have more space on the floppy disk. But! I could be wrong, of course, because
RM> I inattentively read letters in ZX.SPECTRUM about an emulator of some computer. Himself
RM> Cope or what? 2ALL: Maybe someone remembers? So, there, it seems on the track
Well, for some reason All ;-) Actually, I wrote about Sam Coupe, I also threw in the emulsion, so why shouldn’t I know what format it is ;-)
RM> 10 sectors of 512 bytes each! I apologize in advance - maybe I'm wrong.
And now the most important information for you: Sam's disks on the Spectrum are not
copied ;-) However, if Sam is compatible with the Spectrum, this does not mean that it has a controller on a chip similar to VG. It
has its own controller.
From Roman Petrov → To All 7 June 1998
[ Someone was hungry... ]
DL> 3) sectors on the IDE screw are the same length.
This is clear, but the length is precisely the sector, not the track. We are talking
about the length of the track, since I am not going to give up 512b sectors.
From Roman Petrov → To All 7 June 1998
RM> So you can’t fit 10 seconds on a track!? True, I heard something about this
RM> in relation to some 8-bit computer (Cope himself or whatever
RM> is his name?). Maybe it is possible...
I reassure you - it fits, one of the standard PC formats looks exactly like this
and on Sam too. But our VG doesn’t want to read such things.
I’m almost sure that it is for this reason that in iS-DOS the sector layout
is exactly like this.
From Roman Petrov → To All 7 June 1998
Hello! Dear Roman!
At 15:28, Saturday June 06 1998 there was such a thing that
Roman Milukov wrote a letter to Denis Dmitriev:
RM> Or maybe then we’ll make one large sector for the entire track? In
RM> it will be cool! :)))
And then all that remains is to come up with a controller that, in addition to the standard
128,256,512 and 1024 byte sectors, will also have a ten-kilobyte sector ;-)
From Roman Petrov → To All 7 June 1998
Hello! Dear Denis!
At 11:40, Saturday May 30, 1998 there was such a thing that
Denis Dmitriev wrote a letter to Roman Petrov:
DD> In general, it’s impossible. Or rather, undesirable :)
That's exactly what is undesirable. I have already given up on this idea. Now
sectors have a maximum of 512 bytes. Although, regarding 800k - if anyone knows how to make the VGshka read disks that have 10,512 byte sectors, then be sure to let me know. Let's support this format!
DD> And now the worst thing is if you read kilobyte
DD> sectors like this (and one sector will then be read in four revolutions
That's the point, it's terribly slow to read :( And I don't want
my BIOS to recommend itself as terrible slowdown. Although it’s not the BIOS that will slow down, but the disk system driver, albeit due to the small amount of
memory allocated by the BIOS :-)
From Andrey Isaev → To All 7 June 1998
RP> Well, well... If you also teach VGshku to understand disks,
RP> which have 10 sectors each
RP> with 512 bytes per track ;-) This has already been said more than once
RP> everywhere that
RP> such 800k cannot be read on the Spectrum no way. 9 sectors
RP> are readable, but 10
RP> does not want to be read.
?! Who said that? I just specifically tried to format a regular 5.25 disk on MS-DOS 800k with 10 sectors on the road, the disk was formatted perfectly, readability was 100% I used PROFI with a normal but leaky VG :) TEAC5.25 flop drive disk: 'Mini-Disk' program: IBM FORMAT (ZX WORD2.1)
but
with the same success I could have used the software in CP/M. So I don’t know who
can’t read what, but for me....
From Andrey Isaev → To All 7 June 1998
RM> So you can’t fit 10 seconds on a track!? True, I
RM> heard something about this in relation to some 8-bit
RM> computer (Cope himself or whatever his name is?). Maybe it’s possible...
But IMHO it’s definitely possible, read on :)
From Roman Milukov → To All 8 June 1998
AI> And IMHO it’s definitely possible, read on :)
I read it. Why didn’t you write how quickly this all happens? If there is some kind of perversely slow method, then this is not suitable... :(
From Roman Milukov → To All 8 June 1998
RM> and I’m wrong.
RP> does not mean that it has a controller on a microcircuit,
RP> similar to VG. There
RP> generally has its own controller.
Ah...
From Andrey Isaev → To All 8 June 1998
DL>
DL> 1) the period of sectors is equal to one frame, between sectors
DL> there are
DL> an extra 10000 clock cycles; hence the loaders with AY and mouse
DL> etc.
DL> 2) this format allows FAST-procedures to work quickly
DL> on 3.5 flops (the sector is twice as long, the pause on
DL> the calm
DL> of the head is doubled), whereas in tr-dos everything on them
DL> slows down
From Roman Petrov → To All 9 June 1998
AI> ?! Who said that? current that AI specially tried to format a regular 5.25 disk on MS-DOS 800k with 10 sectors per
Well, who knows, but until recently I didn’t read it. We should try it one more time. If it works, then that’s great, then there’s no need at all for iS-DOS 800k disks (at the driver level)!
From Vitalic Svetashov → To All 9 June 1998
RM>> But having 800K on floppy disks would still be nice...
AI>> And who is stopping you from having 800K on a disk but with sectors of 512
AI>> bytes.
From Andrey Isaev → To All 9 June 1998
DD> In general, it’s impossible. Or rather, undesirable :)
RP> That's exactly what is undesirable. I have already abandoned this
RP> idea. Now
RP> sectors are maximum 512 bytes. Although, regarding 800k - if
RP> anyone
RP> knows how to force the VGshka to read disks that have 10
RP> 512-byte
RP> sectors, then be sure to let me know. Let's support
RP> this format!
There is a program called IBM FORMAT from the ZX Word package, so
with its help you can format the disk at 800k and after
this the disk is read without problems using all available methods.
I’m too lazy to write specific formatting procedures right now, but you know how to do it without me
I’ll say one thing: don’t make too many spaces.
From Roman Milukov → To All 10 June 1998
VS> ?? It fits in the offtopic!
So what, now I need to attach a multi-tool to Speck for this?
From Tim Kelly → To All 10 June 1998
I greet you from the bottom of my heart, Dmitry!
Sat Jun 06 1998, Dmitry Lomov squeezed the keyboard, hoping that the following words would reach Roman Petrov
DL> Dmitry aka -=LD=- / X-TRADE GROUP.
Nice to see X-Trade representatives in this echo!
Hasta la vista.
Tim Kelly
From Denis Dmitriev → To All 10 June 1998
AI> sectors on the road, the disk was formatted perfectly,
AI> readability 100% I used PROFI with
AI> normal but leaky VG :) floppy drive TEAC5.25 disk:
AI> 'Mini-Disk' program: IBM FORMAT (ZX WORD2.1) but with the same
AI> success I could have used the software in CP/M'e. So
AI> I don’t know who can’t read what, but for me....
If you format 800k on Spec with VG, then everything will
work fine (remember ASC Sound Master? - he uses discs for 800k
only his own system ;)
And if you format 800k on a PC, then it will obviously not be
readable - we have already discussed the discrepancy between the processing of the index
signal in the VG93 and the pisyuk. And they have already said that this can be easily accomplished by sealing the index hole, partially or completely.
So I don’t see any restrictions on the work of the subject with 800k
disks.
problem: and disks formatted on Speck at 800k cannot be read on the PC. Well, that’s not really necessary! ;)))
With the best, Denis.
From Dmitry Lomov → To All 10 June 1998
RP> Well, such a miracle is not readable on VG :( I tried it myself, more than once. They are not read
RP> like PC's 800k disks (which have exactly this format), nor Sam
Coupe's.
hmm. So, I tried it wrong...
maybe it's all in the car...
or maybe I completely misunderstood the essence dispute?
then so, if it’s not on topic, it’ll just be info...
1. On my Spectrum (Scorp) I read 800k disks.
2. in the SPECTRUM EXPERT magazine (made by me) the following
format is used: on a track there are 10 full sectors of 512 bytes plus
ten more “left” headers from sectors.
in total there are twenty headers and ten data fields
(actually sectors) on the track. When I did this, the accuracy of
inter-sector spaces should have been +- no more than 3 bytes.
if you remove the left headers and leave 10 sectors with headers,
there will be no problems at all until I have met a machine on which
this would not work.
now there are a few numbers that are very well confirmed. in practice.
there are 6250 bytes on a track (at normal
formatting speed; run ADS 2.0+, check). 12*#00 - space
10*#?? - header
22*#4е -space
12*#00 - space
518*#?? - sector
-----------------
total: 624*#?? - sector from and to.
624*10=6240<6250; there's even a backup :)
an index mark in the bath, it's not needed (on the Spectrum; on a PC, it seems like
nothing can be read without it).
The data was transferred from the smart book "Beta disk interface. Connecting
disk drives". St. Petersburg, 1993. The data has been repeatedly tested in practice.
I note that the size of spaces can be reduced
by half with extraordinary ease, there will still be a small margin left.
The formatter must be smart; Before formatting, you must measure
the actual number of bytes/track and make a correction so that the tail of the last
sector fits onto the track before the index.
All the best.
From Andrey Isaev → To All 11 June 1998
RM> I read it. Why didn’t you write how quickly this all
RM> happens? If there is some kind of perversely slow method,
RM> then this is not suitable... :(
The method of reading and writing such a disk is no different from the methods of reading and
writing ordinary hard drives, and therefore there will be no brakes!
From Andrey Isaev → To All 11 June 1998
RP> Well, who knows, but I haven’t read it until recently.
RP> I should try it again
RP> once again. If it works, then that's great, then
RP> there will be no need for iS-DOS 800k disks (at the driver level)!
If you format with your own procedure, then make sure that the size of
spaces is smaller!
From Denis Dmitriev → To All 11 June 1998
RM> It will be cool! :)))
Yeah! By the way, in a certain sense this can be done, but not
all flops will do this :(
With best wishes, Denis.
From Dmitry Lomov → To All 12 June 1998
Hi, Andrey !
AI> Well!? what did I say? I said you can have 800k with sectors of 512
bytes!
heh, but you need to say it differently: “you need to have 800k with a sector of 512” :)
From Roman Petrov → To All 13 June 1998
AI>> format a regular 5.25 disk on MS-DOS 800k with 10
AI>> sectors per
RP>> Well, who knows, but until recently I didn’t read them.
RP>> I should try again
RP>> once again. If it works, then that's great, then
RP>> there will be no need for iS-DOS 800k disks (at the driver level)!
From Roman Milukov → To All 15 June 1998
DD> Yeah! By the way, in a certain sense this can be done, only
DD> not all flops will do this :(
No, I was joking. If it slows down too much, it’s better to use a tape recorder
. :)