To directly load a file, you must know its location on the disk first, i.e. at which track and sector it starts, and its length in sectors. With ZX-Blockeditor, you can know that easily. Open the .TRD disk image file with it, then select Disk > Show disk image... A window like this one will appear:
This is the map of the disk image with the list of all files on disk on the left, and the track/sector (or "blocks" as the program calls them) disposition on the right. The numbers in the row indicate the local sectors, i.e. the sectors of the current track, those in the column the total sectors; to know the number of the corresponding track, you must divide that number for 16.
When you click with the left or right mouse button on one of the files on the left, its position on the disk will appear, with the indication of its length at the bottom. In this example, file "1" begins at track 224/16 = 14 and at sector 9, and is 124 sectors long.
With this information, you must then convert the track, sector and length to hexadecimal, and then follow this syntax:
Code: Select all
LD HL, ADDRESS ; address in memory where to load the file
LD DE, $XXYY ; track $XX, sector $YY
LD BC, $ZZ05 ; $ZZ sectors length, plus $05, the function number for loading data from disk (saving is $06)
CALL $3D13 ; TR-DOS internal routine
Code: Select all
LD HL, 30702 ; address in memory where to load the file
LD DE, $0E09 ; track 14, sector 09
LD BC, $7C05 ; 124 sectors length
CALL $3D13 ; TR-DOS internal routine
Notwithstanding this, the method worked as expected and then I had to adapt it to make it work with the Brazilian clones of the Beta Disk interfaces, which employ different routine calls and a "shadow" page. By reading the CBI-95 disk interface manual - as transcribed by Clóvis Friolani and Otto Frederico - and after several attempts, I understood how to do it. I'll follow the same example as above:
Code: Select all
CALL 15467 ; initialization
LD HL, 30702 ; address in memory where to load the file
LD DE, $0E09 ; track 14, sector 09
LD BC, $7C05 ; 124 sectors length
CALL 11990 ; modified TR-DOS internal routine
CALL 15484 ; de-pagination of "shadow" ROM
In fact, I assumed that Brazilian users would have been interested into playing the game straight into their own language, rather than having to go through the language selection screen, so in a certain sense they have been favored