marc.hull Posted May 27, 2010 Share Posted May 27, 2010 I am at a point in a certain project in which I need to be able to catalog a device whether it be DSK,SCSI,HDS or IDE. I have a good idea on how to set up the PAB and have generated my file descriptor(This was the easy part.) At this point I am unsure on a couple of points.... 1) Are sub directories handled as if they were devices IE would a FDR of SCS1.SUB. be enough to open the directory of SUB on device SCS1 or is there more to it ? 2) In E/A does opening and listing a catalog work as it does in XB IE same file type and EOF structure ? 3) Since I do not have an IDE card and have never seen one..... Does it have a file structure similar to HDSK or SCSI? I really need someone to break this down for me. Although code examples are good I find myself usually bamboozled by others programming so perhaps a scripted example would be better. I am not creating another manager here so only I need the ability to search a device/path. I am only interested in displaying sub directories or files with a certain prefix. Later these special files will be loaded but that is for a different day. Thanks in advance... Marc Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 27, 2010 Share Posted May 27, 2010 I can't give MUCH help here, I've never worked with the SCSI or MFM controllers. The IDE device using Thierry's DSRs just mounts floppy disk images, so everything on it works like floppies do. Fred's DSR is a port of one of the others so I imagine works the same as it, though I can't say what it is. Most assembly language programs that read the floppy disk directory do so with sector access to sectors 2 and up, rather than opening the disk and reading it as a file. (Probably because sector access is easier to understand in assembly). I didn't need to add support to Classic99 for the file access mode of directories for a really long time. Of course that's completely non-portable coding, it only works with floppy disks and compatible devices. I hope someone can talk more on the hard drive, I'm curious myself. Quote Link to comment Share on other sites More sharing options...
marc.hull Posted May 27, 2010 Author Share Posted May 27, 2010 I hope someone can talk more on the hard drive, I'm curious myself. Me too.... Tim are you lurking ?? Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted May 27, 2010 Share Posted May 27, 2010 I hope someone can talk more on the hard drive, I'm curious myself. Me too.... Tim are you lurking ?? Me? Lurk? Short answer: yes to all four questions File types are extended and floating point numbers returned via the DSR have to be considered, since up to 248MB is possible per hard device. This means 16-bit floats in RADIX 100 format need to be extended to 20 bits. Give me a little time to gather some thoughts and maybe a code snippet or two for you.. Quote Link to comment Share on other sites More sharing options...
marc.hull Posted May 28, 2010 Author Share Posted May 28, 2010 I hope someone can talk more on the hard drive, I'm curious myself. Me too.... Tim are you lurking ?? Me? Lurk? Give me a little time to gather some thoughts and maybe a code snippet or two for you.. Sure Tim what 20=30 minutes ? Thanks for chiming in ! Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted May 28, 2010 Share Posted May 28, 2010 Sure Tim what 20=30 minutes ? Thanks for chiming in ! That reminds me of something I periodically tell my peers at work... that I age in "company years" but am still working on figuring out the ratio Kinda like dog years to human years. I put a little time into it last night and will look at it when I get home tonight. I was looking for a level 3 DSR access tutorial I had written long ago but so far haven't found it.... Quote Link to comment Share on other sites More sharing options...
marc.hull Posted May 29, 2010 Author Share Posted May 29, 2010 Sure Tim what 20=30 minutes ? Thanks for chiming in ! That reminds me of something I periodically tell my peers at work... that I age in "company years" but am still working on figuring out the ratio Kinda like dog years to human years. I put a little time into it last night and will look at it when I get home tonight. I was looking for a level 3 DSR access tutorial I had written long ago but so far haven't found it.... I tend to age as a function of accumulative problems. As problems occur the age counter increments. when the exact problem repeats again the age counter shifts left. I try to not let problems repeat but.......... Here's to hoping we at least don't age out ! Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted May 29, 2010 Share Posted May 29, 2010 (edited) As Tursi mentioned earlier, there are generally two methods used to catalog disk devices: 1. Direct sector access 2. Catalog "file" DIRECT SECTOR ACCESS: Quite a few programs catalog floppy devices using direct sector IO (also referred to as level 1 access). Instead of a file PAB, one uses a subroutine pab, sector IO routine 0x10 and calls DSRLNK via the subroutine entry 10 (instead of 8 ) : BLWP @DSRLNK DATA 10 To catalog the disk, you first read sector 0 (Volume Info Block/VIB) to determine the volume name, the proper sector-to-allocation unit ratio, and the bitmap. Sector/AU is important when a disk exceeds 1600 sectors, since the bitmap then allocates sectors by factors of 2. You now know the disk characteristics and can read sector 1, which contains the File Descriptor Index Record (FDIR), containing 16-bit pointers to the File Descriptor Records (FDR) of each file. The FDR pointers are sorted alphabetically - not only to keep order but to allow a binary search, reducing IO time when locating a file. To catalog the files, you would loop through the list of FDR pointers and read the respective FDR. Each FDR contains the filename and other critical info needed to identify and access the file content. Of importance for most catalog routines are the file status flags, records per sector, and total sectors. File clusters can be reviewed to determine fragmentation, if desired. The Myarc FDC and Myarc HFDC (and the Geneve) allow for three subdirectories on a floppy. Pointers to the three additional FDIRs are stored in sector 0. (most programs ignore this functionality) 2. CATALOG FILE Most people are familiar with the BASIC/XB file catalog routine. It is printed in the disk controller manuals and is the common way for someone programming in BASIC/XB to check out a disk. But what happens behind the scenes? The DSR EPROM is programmed to catalog the disk device using sector IO. It then presents the catalog data as if it were a file. In this manner the DSR can pass, on a per-record basis, file information to your program. Reading a file catalog via assembly requires the programmer to set up a standard PAB. The catalog file is opened as INPUT, INTERNAL, FIXED and usually SEQUENTIAL. IO operations are no different than reading a regular file. A catalog file will return the program name, file size, file type (signed to note protected/unprotected), and record length/program bytes. The record is 38 bytes though some DSRs extend the record length to include extra info such as date/time stamps. Programmers should be aware that unless they force a 38 byte rec size, their input buffer may overflow. <len><filename><len><float1><len><float2><len><float3> 1 10 1 8 1 8 1 8 Each record is composed of a space-padded filename and three 8 byte floating point values in RADIX100 format. The values must be converted and interpreted. FILE TYPES: File types 1-5 [DV,DF,IV,IF,PRG] are common to all devices. Hard drive devices may extend the file types during a catalog operation: 6 - subdirectory 7 - emulation file Additionally, files copied from Myarc devices (and possibly other hard disk devices) may have the archive bit set. This can be masked with a bit-wise function in XB or assembly. ADDITIONAL HARD DISK CONSIDERATIONS A program written to accommodate both floppy and hard devices should at minimum: 1. Reserve space for 127 files and 114 subdirectories during the catalog phase 2. Account for the extended file types 3. Account for space used/free values greater than 65,535. A hard disk may be catalogged using the direct sector IO method; however, one must account for a 31-sector bitmap and up to 114 subdirectories. The process is similar to that of a floppy with a few considerations: 1. SCSI and Myarc HFDC use the same sector IO subroutine, 0x20. Unfortunately, level 2 IO is based on device number not device name. Therefore.. 2. To distinguish between the two devices, the programmer must ensure his/her DSRLNK and calls select the proper card. This can be done at program initialization by searching the DSR for card-specific information, and storing the CRU address for each device type. 3. The IDE card uses sector IO subroutine 0x80, requiring further intervention. WHICH ONE SHOULD I USE? Both options are valid and workable. It is my opinion that the catalog file is the better option, simply due to its standard support across most devices and integrated support within each cards' respective DSR. I'll try to get a few code examples this week... that's all for now. -Tim Edited May 29, 2010 by InsaneMultitasker 1 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted August 3, 2010 Share Posted August 3, 2010 Are there any good examples on how to do sector and file access in assembler ? Does a PAB always need to reside in VDP memory or can it be in RAM as well ? Quote Link to comment Share on other sites More sharing options...
Tursi Posted August 4, 2010 Share Posted August 4, 2010 I don't have any GOOD example code. But for the standard TI devices, yes, the PAB must always be in VDP RAM. Anything that's compatible with them will expect that as well, and also the OS itself expects this when it does the DSR search, which needs the PAB. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted August 7, 2010 Share Posted August 7, 2010 I don't have any GOOD example code. But for the standard TI devices, yes, the PAB must always be in VDP RAM. Anything that's compatible with them will expect that as well, and also the OS itself expects this when it does the DSR search, which needs the PAB. With a modified DSRLNK, both PAB and buffers may reside in either CPU or VDP RAM. Of course, this depends on the device; the HFDC and possibly Myarc FDC are capable of CPU transfers, the IDE card will also be compatible when Fred releases the next DSR revision. The SCSI card may allow buffers to reside in CPU but IIRC, the PAB is restricted to VDP. For compatibility with standard TI devices, VDP is the way to go. But if you want to eek out some speed with newer devices, it can be done. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted August 7, 2010 Share Posted August 7, 2010 For compatibility with standard TI devices, VDP is the way to go. But if you want to eek out some speed with newer devices, it can be done. I was specifically thinking about the CF7 compact flash device. Guess it won't work there as it emulates normal disk drives ? Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted August 8, 2010 Share Posted August 8, 2010 For compatibility with standard TI devices, VDP is the way to go. But if you want to eek out some speed with newer devices, it can be done. I was specifically thinking about the CF7 compact flash device. Guess it won't work there as it emulates normal disk drives ? Yep, VDP PAB/buffer is required with the CF7 device. It is essentially the TI floppy controller DSR modified for use with the IDE device. The parallel port DSR is, like the IDE portion, a modified TI-RS232 DSR. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted August 13, 2010 Share Posted August 13, 2010 I ran across one of my old program source code files and thought it might be a good example of Level 1 sector reads/writes. This works on floppy devices only, so anyone wishing to use sector IO on a hard drive will need to use the proper extensions to the DSR subprogram. I may post some further examples as I come across them. There are some oddities, like using LIMI 0/2 in the VDP routines, for which I have no clue .. I would not have written the DSRLNK and the VDP routines are questionably mine. Back then folks shared many of the common utilities. I left the comments header as-is for posterity. PS - The Myarc HFDC manual is not always clear whether a numeric value is ASCII or base 0. ******************************************************************************** * PROGRAM: Backup-Bit Remover v1.0 * * ------- * * (C)1993 by Tim Tesch of S&T Software * * 3804 North 75th Street * * Milwaukee, WI 53216 * * BBS: (414)-464-1978, 24hrs, 3-2400baud, 8N1 * * GEnie: T.TESCH1; Delphi: TIMTESCH; TIECHO: TIM TESCH * * * * PURPOSE: This program removes the backup bit placed in byte 12d of the * * ------- File Descriptor Record (FDR) by the Myarc HFDCC. This bit causes * * problems for certain programs, especially those used with Horizon * * RAMdisks. * * * * This program *AND* source code is released to the public domain. * * Please pass this around - it may spark some interest, somewhere! * * * * I hope you can follow my chaos <grin> * ******************************************************************************** DEF START SECTOR EQU >1000 BUFFER IN VDP FOR SECTOR VDPWA EQU >8C02 VDP Write Address VDPWD EQU >8C00 VDP Write Data VDPRD EQU >8800 VDP Read Data SECBUF EQU >E000 BUFFER TO READ 'FDR' INTO BITMAP EQU >E100 256 BYTE BUFFER FOR THE BITMAP (SECTOR 1) MYWS EQU >E200 32 BYTE WORKSPACE LOCATION GPLWS EQU >83E0 EVEN RORG LEV1RD DATA >0110 Level-1 Sector Access Opcode SAVR11 DATA 0 R11 saver SEC# DATA 0 Current Sector being read/written ACCESS BYTE 0 flag for read/write sector DRIVE BYTE >02 current drive number EVEN MSG0 DATA 0*32+4 TEXT 'BACKUP-BIT REMOVER v1.0^' MSG00 DATA 2*32+6 TEXT '(c)1993 by Tim Tesch^' MSG#01 DATA 4*32+1 TEXT 'This program will remove the^' MSG#02 DATA 5*32+1 TEXT 'back-up bit placed in byte 12^' MSG#03 DATA 6*32+1 TEXT 'of the FDR by the Myarc HFDC,^' MSG#04 DATA 7*32+1 TEXT 'which causes problems accessing^' MSG#05 DATA 8*32+1 TEXT 'files on Horizon RAMdisks^' MSG#06 DATA 9*32+1 TEXT 'and other storage devices.^' MSG1 DATA 16*32+1 TEXT 'One moment, fixing files...^' *27 MSGNAM DATA 18*32+1 TEXT 'Current file:^' MSG2 DATA 12*32+1 TEXT 'F9=exit, Drive 1-9,A-Z:^' FIN1 DATA 20*32+1 TEXT 'Files have been "fixed"^' *------------------------------------------------------------------------------- START BLWP @START0 calls the program, when done, can do a simple RT return. No need to worry about calling WS. *------------------------------------------------------------------------------- START0 DATA MYWS,$+2 our own little WS START2 BL @CLEAR clear screen BL @MULMSG let's display the intro screen DATA MSG0,MSG00,MSG#01 DATA MSG#02,MSG#03,MSG#04,MSG#05 DATA MSG#06,MSG2,0 CLR @>8374 setup KSCAN for normal mode GETKEY BLWP @KSCAN get a keypress MOVB @>8375,R2 get the key (if present) ANDI R2,>FF00 get rid of LSB CI R2,>0F00 is it a 'BACK' (F9) JNE GET#01 no B @DONE#1 yes, let's exit program! GET#01 CI R2,'1'*256 is it less than a '1'? JL GETKEY yes, get another keypress CI R2,'9'*256 less or equal to '9'? JLE GOTNUM yes, so proceed as it must be a drive number. CI R2,'Z'*256 no, so is it a 'Z' or less? JLE NOTHIN yes, go check some more AI R2,->2000 no, make this possible lower case key upper! NOTHIN CI R2,'A'*256 if lower than 'A' or higher than 'Z', exit! JL GETKEY CI R2,'Z'*256 JH GETKEY GOTNUM AI R2,->3000 subtract 48 (>30) from ASCII value to get dr# MOVB R2,@DRIVE put into drive LI R0,409 now, let's display the drive press at location MOVB @DRIVE,R1 409. Put drive into MSB of R1, and add 48 (>30) AI R1,>3000 to get the ASCII number value back BLWP @VSBW display the drive number/letter START9 BL @MULMSG tell user we're starting DATA MSG1,MSGNAM,0 CLR @>8350 make sure no false errors happen CLR @SEC# INC @SEC# set to read sector 1 SETO R5 >ffff is flag to read MOVB R5,@ACCESS BL @LEV1 go get the sector MOVB @>8350,@>8350 JNE ERROR0 LI R0,SECTOR put the bitmap into our buffer LI R1,BITMAP from VDP LI R2,256 BLWP @VMBR read the bitmap from VDP at SECTOR to CPU at BITMAP CLR R10 ANOTHR CI R10,256 is R10=256? (meaning we did max # of files - 127) JEQ DONE#0 yes, go end this fiasco MOV @BITMAP(R10),@SEC# no, get the next FDR sector from the bitmap JEQ DONE#0 is it a >0000 (no more files)? yes, exit SETO R5 no, set flag to READ a sector MOVB R5,@ACCESS BL @LEV1 do it! MOVB @>8350,@>8350 error? if >8350 <>0, we had an error JNE ERROR0 yes, report it! INCT R10 no, point to next file for next pass LI R0,SECTOR \ LI R1,SECBUF \ read the current FDR into our buffer LI R2,256 / at SECBUF so we can manipulate it. BLWP @VMBR / LI R0,18*32+15 display the current file being worked on LI R2,10 LI R1,SECBUF BLWP @VMBW LI R2,256 make sure R2=256 LI R0,SECTOR MOVB @SECBUF+12,R3 PUT old value of byte 12 into R3 ANDI R3,>EF00 Get rid of BACKUP FLAG MOVB R3,@SECBUF+12 put it back into our buffer BLWP @VMBW and write it back to VDP to prepare for disk write CLR R5 set ACCESS to >00 (flag for WRITE to disk) MOVB R5,@ACCESS BL @LEV1 do it! MOVB @>8350,@>8350 error? JNE ERROR0 yes, exit. JMP ANOTHR no, DO ANOTHER SECTOR DONE#0 BL @MULMSG Tell user we're all done DATA FIN1,ERR2,0 CLR @>8374 GOOD1 BLWP @KSCAN CB @>837C,@KEY1 any key pressed? JNE GOOD1 no, keep checking B @START2 yes, so restart program DONE#1 BL @CLEAR clear screen adn BLWP @>0000 do a RESTART of computer / branch to title screen KEY1 BYTE >20 ERR1 DATA 20*32+1 TEXT 'ERROR encountered...^' ERR2 DATA 22*32+1 TEXT '-Press Any key to continue-^' ERROR0 BL @MULMSG DATA ERR1,ERR2,0 tell user we had a problem! CLR @>8374 ERROR1 BLWP @KSCAN CB @>837C,@KEY1 any key pressed? JNE ERROR1 no, keep checking B @START2 yes, restart ******************************* CLEAR CLR R0 routine to clear the 32x24 screen LI R1,' '*256 CLEAR1 BLWP @VSBW INC R0 CI R0,768 JNE CLEAR1 RT ****************************************************************************** * Multiple Message Display * * BL @MULMSG * DATA Msg1,Msg2,0 * ENDTXT BYTE '^' carat, end-of-line marker MULMSG MOV *R11+,R2 JEQ MULL2 MOV *R2+,R0 MULL1 MOVB *R2+,R1 CB R1,@ENDTXT JEQ MULMSG BLWP @VSBW INC R0 JMP MULL1 MULL2 RT *---------------------------------------------- LEV1 MOV @SEC#,@>8350 LEVEL 1 READ/WRITE routine MOVB @ACCESS,@>834D flag for read/write (0=write, <>0 = read) MOVB @DRIVE,@>834C drive number LI R0,>0FF0 2 byte PAB in VDP, start @ >0ff0 LI R1,LEV1RD opcode for level 1 rd/write LI R2,2 2 bytes long BLWP @VMBW write to VDP MOV R0,@>8356 put VDP pab location into >8356 LI R0,SECTOR R0 has location of 256 byte buffer to read the MOV R0,@>834E sector into, put that value into >834E for DSRL BLWP @DSRLNK DATA >A do it RT *----------------------------------------------- * VDP UTILITIES * WRTMSK DATA >4000 VDPWS1 BSS >20 REGMSK BYTE >80 EVEN VSBW DATA VDPWS1,$+2 LIMI 0 BL @VDP# Setup VDP write address MOVB @2(R13),@VDPWD Write the character LIMI 2 RTWP VDP# MOV *R13,R0 SOC @WRTMSK,R0 VDP#2 SWPB R0 MOVB R0,@VDPWA Send LOW BYTE SWPB R0 MOVB R0,@VDPWA Send HIGH BYTE NOP RT VMBW DATA VDPWS1,$+2 LIMI 0 BL @VDP# MOV @2(R13),R1 Bring in CPU String Address MOV @4(R13),R2 Bring in # of Bytes to write LI R3,VDPWD VMBW20 MOVB *R1+,*R3 Write character NOP DEC R2 Finished? JNE VMBW20 No LIMI 2 RTWP VSBR DATA VDPWS1,$+2 LIMI 0 BL @VDP#3 Go setup VDP Address MOVB @VDPRD,@2(R13) Put character in R1 MSBYTE LIMI 2 RTWP of calling workspace (WS#1) VMBR DATA VDPWS1,$+2 VMBRFW LIMI 0 BL @VDP#3 Go setup VDP Address MOV @2(R13),R1 Get CPU Buffer address MOV @4(R13),R2 Get # of Bytes to read LI R3,VDPRD VMBR20 MOVB *R3,*R1+ Move first byte NOP DEC R2 Finished? JNE VMBR20 No LIMI 2 RTWP VDP#3 MOV *R13,R0 Get VDP Address for read ANDI R0,>3FFF Reset BITS 0 & 1 JMP VDP#2 Go finish up write address VWTR DATA VDPWS1,$+2 LIMI 0 MOV *R13,R0 Get reg & data to write ANDI R0,>3FFF MASK out HIGH NIBBLE OR MSBYTE SOCB @REGMSK,R0 BL @VDP#2 Go do it LIMI 2 RTWP ************************* * * * ALL-PURPOSE 'DSRLNK' * * * ************************* EVEN DREGS BSS >20 DSRLNK DATA DREGS,DSR1 SAVE1 DATA >0000 SAVE2 DATA >0000 SAVE3 DATA >0000 SAVE4 DATA >0000 SAVE5 DATA >0000 NAMBUF BSS 6 'SINCE WE KNOW WERE USING "DSKn." * HEX20 DATA >2020 HEXAA DATA >AAAA PERIOD BYTE '.','.' H2000 DATA >2000 CYC1 DATA 0 H1300 DATA >1300 DSR1 MOV *R14+,R5 SZCB @HEX20,R15 MOV @>8356,R0 MOV R0,R9 AI R9,>FFF8 SWPB R0 MOVB R0,@VDPWA SWPB R0 MOVB R0,@VDPWA NOP MOVB @VDPRD,R1 MOVB R1,R3 SRL R3,>8 SETO R4 LI R2,NAMBUF DLOOP1 INC R0 INC R4 C R4,R3 JEQ DJUMP1 SWPB R0 MOVB R0,@VDPWA SWPB R0 MOVB R0,@VDPWA NOP MOVB @VDPRD,R1 MOVB R1,*R2+ CB R1,@PERIOD JNE DLOOP1 DJUMP1 MOV R4,R4 JEQ DJUMP6 CI R4,>0007 JGT DJUMP6 CLR @>83D0 MOV R4,@>8354 MOV R4,@SAVE3 INC R4 A R4,@>8356 MOV @>8356,@SAVE4 SROM LWPI >83E0 CLR R1 MOV @H2000,@CYC1 LI R12,>1100 JMP DLOOP2 SROM1 LI R12,>0F00 MOV @H1300,@CYC1 DLOOP2 MOV R12,R12 JEQ DJUMP2 SBZ >00 DJUMP2 AI R12,>0100 CLR @>83D0 CI R12,>2000 JEQ SROM1 C R12,@CYC1 JEQ DJUMP5 MOV R12,@>83D0 SBO >00 LI R2,>4000 CB *R2,@HEXAA JNE DLOOP2 A @5*2+DREGS,R2 JMP DJUMP3 DLOOP3 MOV @>83D2,R2 SBO >00 DJUMP3 MOV *R2,R2 JEQ DLOOP2 MOV R2,@>83D2 INCT R2 MOV *R2+,R9 MOVB @>8355,R5 JEQ DJUMP4 CB R5,*R2+ JNE DLOOP3 SRL R5,>8 LI R6,NAMBUF DLOOP4 CB *R6+,*R2+ JNE DLOOP3 DEC R5 JNE DLOOP4 DJUMP4 INC R1 MOV R1,@SAVE5 MOV R9,@SAVE2 MOV R12,@SAVE1 BL *R9 JMP DLOOP3 SBZ >00 LWPI DREGS MOV R9,R0 SWPB R0 MOVB R0,@VDPWA SWPB R0 MOVB R0,@VDPWA NOP MOVB @VDPRD,R1 SRL R1,>D JNE DJUMP7 RTWP DJUMP5 LWPI DREGS DJUMP6 CLR R1 DJUMP7 SWPB R1 MOVB R1,*R13 SOCB @HEX20,R15 RTWP *------------------------------------------------------------------- * KSCAN routine - will work properly on Geneve AND TI without funky * duplicate keypresses. * KEY DATA 0 BTBTBT DATA >2000 MYUTWS BSS >20 KSCAN DATA MYUTWS,$+2 *BLWP ENTRY POINT FOR KEYSCAN LIMI 0 LI R1,>00FF >04FF MOV R1,@>8374 LWPI GPLWS LIMI 1 LIMI 0 BL @>000E LIMI 2 LWPI MYUTWS MOVB @>837C,R1 CHECK STATUS COC @BTBTBT,R1 ANY KEY PRESSED? JNE KLPNOK NO MOVB @>8375,@KEY YES, PUT IN key JMP KLPRET KLPNOK SETO @KEY no key, set to >FFFF KLPRET RTWP *************************************************************** END Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted August 13, 2010 Share Posted August 13, 2010 Thanks for sharing Tim! This is good stuff Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted August 21, 2010 Share Posted August 21, 2010 This might be a stupid question, but must interrupts be enabled for file access to work ? Looking at TI Intern I found a section of code in the interrupt routine that checks DSR roms. So I suppose interrupts must be enabled ? Right ? Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted August 21, 2010 Share Posted August 21, 2010 This might be a stupid question, but must interrupts be enabled for file access to work ? Looking at TI Intern I found a section of code in the interrupt routine that checks DSR roms. So I suppose interrupts must be enabled ? Right ? Not stupid at all.... There are times you may wish to enable interrupts to allow a peripheral card to be serviced by the ISR, such as the RS232 input ring buffer. I believe this is what you are seeing and referring to in the interrupt routine. But for file and most other DSR control, no, interrupts need not be enabled. The DSR routines usually do not enable interrupts either, to avoid conflict conditions between cards and problems with setting the VDP addresses. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted August 22, 2010 Share Posted August 22, 2010 This might be a stupid question, but must interrupts be enabled for file access to work ? Looking at TI Intern I found a section of code in the interrupt routine that checks DSR roms. So I suppose interrupts must be enabled ? Right ? Not stupid at all.... There are times you may wish to enable interrupts to allow a peripheral card to be serviced by the ISR, such as the RS232 input ring buffer. I believe this is what you are seeing and referring to in the interrupt routine. But for file and most other DSR control, no, interrupts need not be enabled. The DSR routines usually do not enable interrupts either, to avoid conflict conditions between cards and problems with setting the VDP addresses. Thanks for pointing that out. That is good news Quote Link to comment Share on other sites More sharing options...
Tursi Posted August 22, 2010 Share Posted August 22, 2010 I may have to revisit the directory stuff in a few weeks, Tim, particularly how the hard drive works. I have an upcoming project of my own that I'd like to be as generic as possible. 1 Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted January 28, 2014 Share Posted January 28, 2014 I may have to revisit the directory stuff in a few weeks, Tim, particularly how the hard drive works. I have an upcoming project of my own that I'd like to be as generic as possible. I hope you don't mind me asking.... Is this a TI related HD project? If it is, even though you said, ".. project of my own...", please document EVERYTHING, because I'm sure if you think it's useful and worthy, others will think so too. If it's "generic" enough, and probably affordable, other's might be able to obtain parts. Quote Link to comment Share on other sites More sharing options...
RXB Posted January 29, 2014 Share Posted January 29, 2014 I am at a point in a certain project in which I need to be able to catalog a device whether it be DSK,SCSI,HDS or IDE. I have a good idea on how to set up the PAB and have generated my file descriptor(This was the easy part.) At this point I am unsure on a couple of points.... 1) Are sub directories handled as if they were devices IE would a FDR of SCS1.SUB. be enough to open the directory of SUB on device SCS1 or is there more to it ? 2) In E/A does opening and listing a catalog work as it does in XB IE same file type and EOF structure ? 3) Since I do not have an IDE card and have never seen one..... Does it have a file structure similar to HDSK or SCSI? I really need someone to break this down for me. Although code examples are good I find myself usually bamboozled by others programming so perhaps a scripted example would be better. I am not creating another manager here so only I need the ability to search a device/path. I am only interested in displaying sub directories or files with a certain prefix. Later these special files will be loaded but that is for a different day. Thanks in advance... Marc RXB has full Hard Drive support built in. The REA (Rich Editor Assembler) has the same built in cataloger that works with any Hard Drive. A bonus is RXB / REA both will work with CS1 or CS2 or oddball devices like RAMDISK or GRAM based devices. RXB also has a SECTOR program for Hard Drives and you can copy sector by sector an entire Hard Drive to another of the same size. (This has been tested on SCSI and RAMDISKs) RXB also allows you to from just XB to edit sectors on the hard drive and modify them, then write them back. A document page from RXB on SECTOR access subprogram. SECTOR subprogram PAGE S2 ------------------------------------------------------------- Format CALL SECTOR(pathname,read/write-flag,#sectors, sector-string,[,...]) CALL SECTOR(number,number,number,string [,...]) CALL SECTOR(string-variable,numeric-variable, numeric-variable,string-variable[,....]) Description The SECTOR subprogram reads or writes sectors on disk or hard drives. The pathname determines the device used and the pathname can be up to 255 characters in length. The Myarc HFDC can only support 29 characters pathnames plus the filename of 10, so that would add up to 39 characters total. The pathname must end with a period and the directory may only be 10 characters in length. The read/write-flag may be any number to read sectors and 0 will write sectors. The #sectors ranges from 1 to 32 sectors being read/written at one time. The sector-string is a Hexadecimal string of the sector to read or write. Sector-string may be a "0" or up to "FFFFFFFF" or in other words in decimal form ranges from 0 to 4294967295 sectors. (2 Terabyte Hard Drive) NOTE: The lower 8K for assembly support is used as a buffer for SECTOR so anything in the lower 8K will be corrupted. That means two things. 1. AMS support can store the sectors for duplication. 2. SECTOR is totally compatible with CORCOMP, MYARC, PARCOM, RAMDISKS, and SCSI drive controllers. Programs This line writes 1 sector 0 to| >CALL SECTOR("DSK1.",0,1,"0") drive 1 from lower 8K. . | | This line reads sector 0 and | >100 CALL SECTOR(2,1,2,"0") 1 from drive 2 to lower 8K. | This line puts the 2 sectors | >110 CALL MOVE("RV",512,8192, onto the screen from the lower| 0) 8K. (See MOVES for info) | | This line reads sector 1048575| >100 CALL SECTOR("SCS1.",9, putting 32 sectors into lower | 32,"FFFFF") 8K (32*256=8192) | Options Only works when 32K available and destroys lower 8K data. Give it a try and see what you think. Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted January 29, 2014 Share Posted January 29, 2014 Does RXB support the personality card hard disk DSR/FAT etc? Most "hard disk supporting" tools will read the root directory but no sub dirs.. Greg RXB has full Hard Drive support built in. The REA (Rich Editor Assembler) has the same built in cataloger that works with any Hard Drive. A bonus is RXB / REA both will work with CS1 or CS2 or oddball devices like RAMDISK or GRAM based devices. RXB also has a SECTOR program for Hard Drives and you can copy sector by sector an entire Hard Drive to another of the same size. (This has been tested on SCSI and RAMDISKs) RXB also allows you to from just XB to edit sectors on the hard drive and modify them, then write them back. A document page from RXB on SECTOR access subprogram. SECTOR subprogram PAGE S2 ------------------------------------------------------------- Format CALL SECTOR(pathname,read/write-flag,#sectors, sector-string,[,...]) CALL SECTOR(number,number,number,string [,...]) CALL SECTOR(string-variable,numeric-variable, numeric-variable,string-variable[,....]) Description The SECTOR subprogram reads or writes sectors on disk or hard drives. The pathname determines the device used and the pathname can be up to 255 characters in length. The Myarc HFDC can only support 29 characters pathnames plus the filename of 10, so that would add up to 39 characters total. The pathname must end with a period and the directory may only be 10 characters in length. The read/write-flag may be any number to read sectors and 0 will write sectors. The #sectors ranges from 1 to 32 sectors being read/written at one time. The sector-string is a Hexadecimal string of the sector to read or write. Sector-string may be a "0" or up to "FFFFFFFF" or in other words in decimal form ranges from 0 to 4294967295 sectors. (2 Terabyte Hard Drive) NOTE: The lower 8K for assembly support is used as a buffer for SECTOR so anything in the lower 8K will be corrupted. That means two things. 1. AMS support can store the sectors for duplication. 2. SECTOR is totally compatible with CORCOMP, MYARC, PARCOM, RAMDISKS, and SCSI drive controllers. Programs This line writes 1 sector 0 to| >CALL SECTOR("DSK1.",0,1,"0") drive 1 from lower 8K. . | | This line reads sector 0 and | >100 CALL SECTOR(2,1,2,"0") 1 from drive 2 to lower 8K. | This line puts the 2 sectors | >110 CALL MOVE("RV",512,8192, onto the screen from the lower| 0) 8K. (See MOVES for info) | | This line reads sector 1048575| >100 CALL SECTOR("SCS1.",9, putting 32 sectors into lower | 32,"FFFFF") 8K (32*256=8192) | Options Only works when 32K available and destroys lower 8K data. Give it a try and see what you think. Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 29, 2014 Share Posted January 29, 2014 Does RXB support the personality card hard disk DSR/FAT etc? Most "hard disk supporting" tools will read the root directory but no sub dirs.. Greg How DO you read the subdirectory index.. is it the same way as reading the root, ie: open "HD1.SUBDIR." and read that? Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted January 30, 2014 Share Posted January 30, 2014 I think that's how it works on the modern (hfdc/scsi/ide) controllers Greg Quote Link to comment Share on other sites More sharing options...
RXB Posted January 30, 2014 Share Posted January 30, 2014 I think that's how it works on the modern (hfdc/scsi/ide) controllers Greg Yea to use RXB command DIR or CAT just type: CALL CAT("SCS1.VOLNAME.SUBVOLNAME.FILENAME") or CALL CAT("HRD1.VOLNAME.SUBVOLNAME.FILENAME") or from REA (Rich Editor Assembler) select DIRECTORY then the DEVICE (example: SCS1.) then the Volume name (expample: XBGAMES) then the Subvolume name (example: GAMES92) then the sub subvolume name (exampe: NEWGAMES) The DIRECTORY would look like this: SCS1.XBGAMES.GAMES92.NEWGAMES The Redo key will put the last directory into the buffer on screen so you can review the directory a second time in case you did not hit the space bar to pause the listing. RXB / REA can handle pathnames up to 255 characters long. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.