How do you make an autobooting TRD disk?
Вид для печати
How do you make an autobooting TRD disk?
Либо, писать стандартными средствами на диск файл-оболочку с именем boot.B.
Либо, специальными средствами формировать на диске нестандартной длины 9 сектор 0 дорожки.
http://zxpress.ru/book_articles.php?id=459
some versions of trdos start the boot file at once
It is actually a buffer overflow exploit.
1) As the first step in accessing disk by any command or on startup, TR-DOS reads track 0, sector 9 (1-based) into a buffer.
2) The reading routine does not check the length of the sector.
3) If you use a custom format of Track 0 such that the sector 9 is longer than 256 bytes, the buffer will overflow.
4) Past the sector buffer, the BASIC channel/streams table is located which typically gets overwritten.
5) The TR-DOS does not crash on buffer overflow per se. Instead, it checks a certain location in the buffer to be equal to 0x10 - the TR-DOS file system marker. If the value does not match, TR-DOS will print a message "Disc error" on the lower screen area where BASIC errors also get printed, via RST 16 print-char routine. This is Channel 0 in the channel table.
6) Because the channel table is overwritten, an attempt to print the "Disc error" message via RST 16 can be routed to any user-specified address. For sensible results, the Sector 9 data is constructed such that the overwritten Channel 0 print-character routine would point somewhere into the sector buffer where your boot code was just loaded.
7) Upon gaining control, the boot code performs further actions (boots an OS or loads an application). Unless the boot-sector contents are crafted exquisitely carefully, the BASIC program area gets corrupted along with the channel table, so applications that use the "boot sector" approach typically don't rely on BASIC or even the TR-DOS itself (they often use custom disk access routines and IM 2 interrupts).
8) It is common to have the boot-sector be 1024 bytes long for maximum flexibility of the boot code, but a 512-byte boot sector should also work.
А в скорпиёне 2 вида ТЫРдоса (48к и 128к), причем оба с автозапуском