Subject: Difference between a display and internal file formats..

From: "Marc H" <[email-masked]>
Date: Tue, 30 Nov 2010 02:58:26 -0000

Someone want to point out what is different between these two formats.  AFAIK a byte is a byte is a byte ???

---

From: ti99_forever <[email-masked]>
Date: Mon, 29 Nov 2010 19:12:37 -0800 (PST)

Simple answer - Internal means "user defined". Display means text.
Long answer:
BASIC Internal format - Each field of a record is preceded by a length byte. Numbers stored in floating-point format. BASIC will have issues reading INTERNAL format files created by other apps that don't use this format.
Display - text, fields are delimited by commas, unless embedded in double-quotes.
This is the application level description of these two. If you read a sector directly, you will find "out of band" info unavailable to you in Basic or your application (such as variable length records having a length byte at the beginning, before the record).

--- On Mon, 11/29/10, Marc H <[email-masked]> wrote:

From: Marc H <[email-masked]>
Subject: [TI994A] Difference between a display and internal file formats..
To: [email-masked]
Date: Monday, November 29, 2010, 9:58 PM

------------------------------------

Yahoo! Groups Links

---

From: Owen Brand <[email-masked]>
Date: Mon, 29 Nov 2010 23:12:44 -0500

Internal looks like the following picture
http://s830.photobucket.com/albums/zz222/Opry99er/?action=view&current=scrnbin.jpg

If you use DISPLAY, the values themselves show up.  Below is the code for
how to create the file

Here's the program to create this file:  Keep in mind I changed a couple
lines to make it work with just 1 map... it may need to be altered a little
bit, but this should work fine.

***If you want to, change line 100 to say DISPLAY instead of INTERNAL then
view the newly created file in TI99Dir.  =)  Doesn't look anything like the
above picture.

Program to load the MAP DATA to diskette
REM SET UP NAME OF MAP TO BE SAVED TO DSK

95 LAB$="DSK1.1"
REM CREATE FILES ON DISK
100 OPEN #1:LAB$,OUTPUT,INTERNAL
REM SCREEN PARAMETERS
110 FOR R=1 TO 24 :: C$="" :: FOR C=1 TO 32
REM READ DATA TO DSK
120 READ CHA :: C$=C$&CHR$(CHA) :: NEXT C
130 PRINT #1:C$ :: NEXT R :: CLOSE #1
REM MAP DATA
REM MAP #4
10690 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
10700 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
10710 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
10720 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
10730 DATA 98,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96
10740 DATA 96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,100
10750 DATA 97,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
10760 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97
10770 DATA 97,32,102,102,102,102,102,102,102,102,102,102,102,102,102,102
10780 DATA 102,102,102,102,102,102,137,137,137,112,112,112,112,112,32,97
10790 DATA 97,32,102,102,102,102,102,102,102,102,102,102,102,102,102,102
10800 DATA 102,102,102,102,102,137,137,137,137,112,112,112,112,112,32,97
10810 DATA 97,32,102,102,102,102,102,102,102,102,102,137,137,102,102,102
10820 DATA 102,102,102,137,137,137,137,137,112,112,112,112,112,137,32,97
10830 DATA 97,32,102,102,102,102,102,102,102,102,137,137,137,102,102,102
10840 DATA 102,137,137,137,137,137,137,112,112,112,112,112,137,112,32,97
10850 DATA 97,32,102,137,102,102,102,102,102,137,137,137,137,102,102,137
10860 DATA 137,137,137,137,137,137,112,112,112,112,112,112,137,137,32,97
10870 DATA 97,32,137,137,137,137,137,137,137,137,137,137,137,137,137,137
10880 DATA 136,136,137,136,136,136,112,112,112,112,112,137,137,112,32,97
10890 DATA 97,32,103,103,103,103,103,103,137,137,137,137,137,136,136,136
10900 DATA 136,136,136,136,136,112,112,112,112,112,112,137,137,137,32,97
10910 DATA 97,32,137,137,137,137,137,103,137,137,137,137,136,136,136,136
10920 DATA 136,136,136,136,136,136,112,112,112,112,112,112,112,137,32,97
10930 DATA 97,32,137,137,137,137,137,103,103,103,103,103,103,103,103,136
10940 DATA 136,136,136,136,136,136,136,112,112,112,112,112,137,137,32,97
10950 DATA 97,32,137,137,137,137,137,136,136,136,136,136,136,136,103,136
10960 DATA 136,136,136,136,112,136,112,112,112,112,112,112,137,137,32,97
10970 DATA 97,32,137,137,137,136,136,136,136,136,136,136,136,136,103,103
10980 DATA 103,103,103,136,136,136,136,112,112,112,112,112,112,137,32,97
10990 DATA 97,32,137,137,136,136,136,136,136,136,136,136,136,136,136,136
11000 DATA 136,136,103,136,136,112,136,136,112,112,112,112,112,137,32,97
11010 DATA 97,32,137,136,136,136,136,136,136,136,136,136,136,137,137,137
11020 DATA 136,136,103,103,103,103,103,103,152,112,112,112,112,112,32,97
11030 DATA 97,32,136,136,136,136,136,136,136,136,136,136,136,137,102,136
11040 DATA 137,137,136,136,136,136,136,136,112,112,112,112,137,137,32,97
11050 DATA 97,32,136,136,136,136,137,136,136,136,136,137,137,102,102,102
11060 DATA 102,137,137,136,136,136,136,136,112,112,112,112,112,137,32,97
11070 DATA 97,32,136,136,136,137,137,137,136,136,137,137,137,137,102,102
11080 DATA 102,102,137,137,137,137,136,112,112,112,112,112,112,137,32,97
11090 DATA 97,32,136,136,136,137,137,137,137,137,137,137,102,102,102,102
11100 DATA 102,102,102,137,137,137,137,137,112,112,112,112,112,112,32,97
11110 DATA 97,32,136,136,136,136,137,137,137,137,137,137,102,102,102,102
11120 DATA 102,102,137,137,137,137,137,112,112,112,112,112,112,112,32,97
11130 DATA 97,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
11140 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97
11150 DATA 99,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96
11160 DATA 96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,101

---

From: Marc Hull <[email-masked]>
Date: Tue, 30 Nov 2010 06:03:17 -0800 (PST)

Ok how about this question.  Background..... I am wanting to cat a disk in assembly and am wondering what to expect in the directory records.  I am assuming...

10 bytes-file name end padded with zero's
1 byte- type of file
1 byte- record length
2 bytes- number of records

Is this any where near close  ?? 

--- On Mon, 11/29/10, ti99_forever <[email-masked]> wrote:

From: ti99_forever <[email-masked]>
Subject: Re: [TI994A] Difference between a display and internal file formats..
To: [email-masked]
Date: Monday, November 29, 2010, 9:12 PM

  

Yahoo! Groups Links

   (Yahoo! ID required)

---

From: ti99_forever <[email-masked]>
Date: Tue, 30 Nov 2010 08:31:49 -0800 (PST)

Because directory files don't really exist, they are pseudo-files...
The filename will have a length byte followed by the characters.Each number will be in floating point, meaning it will be prefaced by a length byte of 8.There will be padding at the end of the record.
If you have a copy of the Wycove Forth manual, you can check out the Directory code in section B-9, the file-handling code.
Warning - it is some of the ugliest code I've seen...

--- On Tue, 11/30/10, Marc Hull <[email-masked]> wrote:

From: Marc Hull <[email-masked]>
Subject: Re: [TI994A] Difference between a display and internal file formats..
To: [email-masked]
Date: Tuesday, November 30, 2010, 9:03 AM

 

 

--- On Mon, 11/29/10, Marc H <[email-masked]>
 wrote:

Yahoo! Groups Links

   (Yahoo! ID required)

---

From: "fredkaal" <[email-masked]>
Date: Tue, 30 Nov 2010 18:10:50 -0000

No,

Take a look at the catalog example program in TI-basic in the diskcontroller manual:

1 byte: name length
x bytes: name
1 byte: 8
8 bytes: float number
1 byte: 8
8 bytes: float number
1 byte: 8
8 bytes: float number

name=volume name, filename or directoryname

first float number = file type
if negative: file is protected
0=Volume label
1=Dis / Fix
2=Dis / Var
3=Int / Fix
4=Int / Var
5=Program
6=Sub directory
7=Emulation file

second float number = Disk size or File size
third float number = Disk free or record length

Fred;-) 

--- In [email-masked], Marc Hull <marc.hull@...> wrote:
> --- On Mon, 11/29/10, ti99_forever <ti99_forever@...> wrote:
> 
> From: ti99_forever <ti99_forever@...>
> --- On Mon, 11/29/10, Marc H <marc.hull@...> wrote:
> 
> From: Marc H <marc.hull@...>

---

From: "Tursi" <[email-masked]>
Date: Tue, 30 Nov 2010 12:46:52 -0800

>Ok how about this question.  Background..... I am wanting to cat a disk in 
>assembly and am wondering what to expect in the
>directory records.  I am assuming...

A good reference is Thierry Nouspikel's disassembly of the TI Disk DSR. Have 
a look at this:

http://nouspikel.group.shef.ac.uk/ti99/dc6.txt

Down around A5928 you'll find the code that creates one record for a disk 
directory read.

And the rest is here: 
http://nouspikel.group.shef.ac.uk//ti99/download.htm#disass

---

From: "Michael Zapf" <[email-masked]>
Date: Wed, 01 Dec 2010 19:45:03 -0000

Display and Internal essentially have meaning for TI BASIC or Extended Basic. 

Here's a test that shows the difference.

OPEN #1:"DSK1.DISFILE", DISPLAY,VARIABLE 40
PRINT #1:"STRING1";"STRING2";100;101;"EOL"
PRINT #1:"END";10
CLOSE #1

OPEN #1:"DSK1.INTFILE", INTERNAL,VARIABLE 40
PRINT #1:"STRING1";"STRING2";100;101;"EOL"
PRINT #1:"END";10
CLOSE #1

-------

Contents of DISFILE

000000: 53 54 52 49 4e 47 31 53 54 52 49 4e 47 32 20 31
000010: 30 30 20 20 31 30 31 20 45 4f 4c 0a 45 4e 44 20
000020: 31 30 20 0a

"STRING1STRING2 100  101 EOL<LF>END 10 <LF>"

--------

Contents of INTFILE

000000: 07 53 54 52 49 4e 47 31 07 53 54 52 49 4e 47 32     
000010: 08 41 01 00 00 00 00 00 00 08 41 01 01 00 00 00     
000020: 00 00 03 45 4f 4c 0a 03 45 4e 44 08 40 0a 00 00     
000030: 00 00 00 00 0a  

"<07>STRING1<07>STRING2<08><radix100(100)><08><radix100(101)><03>EOL<LF><03>END<08><radix100(10)><LF>"

---------

You can easily imagine what this means when you do a INPUT #1:A$ for each file.

Michael