I'm trying to read records from a TI Artist pattern file, which is essentially the pattern descriptor table for the VDP, from XB. (image file attached).
It's trivial to do from assembly, but I've been stumped trying to figure it out in XB. My goal is to read each individual byte to send to a device. I've tried something like this and I get an IO error 02 on line 20, meaning that the file attributes are incorrect. Does anyone know what the correct attributes are? I've tried several combinations to no avail...
I checked the file in TI99 DIR and it's fine.
10 CALL CLEAR
20 OPEN #1:"DSK1.AEN_P",INPUT,INTERNAL, FIXED 80
30 IF EOF(1) THEN 60
40 INPUT #1:A
50 PRINT A
Hmm RXB 2015 has CALL SECTOR so you could read the sectors into XB and look at the values in Decimal or Hex using CALL HEX that converts them.
SECTOR subprogram PAGE S3
Format CALL SECTOR(pathname,read/write-flag,#sectors,sector-string,[,...])
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...
This means you can read up to 32 Sectors at a time and if you use the SAMS an entire 720 Sector disk.