IDE64_users_guide
IDE64_users_guide
user’s guide
April 3, 2016
for card versions V2.1, V3.1, V3.2, V3.4, V3.4+, V4.1 and V4.2
with IDEDOS 0.90 (20110305)!
Kajtár Zsolt
Szigliget
Hóvirág u.15.
8264
Hungary
mail: soci at c64.rulez.org
2
IDEDOS 0.90, April 3, 2016
Foreword
This is the official user’s guide for the IDE64 interface cartridge V2.1,
V3.1, V3.2, V3.4, V3.4+, V4.1 and V4.2 with IDEDOS 0.90. Incom-
plete but planned parts are marked this way.
This document always represents the actual state of development
and the facts stated here may or may not apply to future or old ver-
sions of IDEDOS or the IDE64 cartridge. Please make sure you have
the current version for your software and hardware!
It’s recommended that you read all sections of this manual. For
most of your questions the answers are somewhere in this text. ;-)
Disclaimer
All copyrights are held by their by their respective owners, unless
specifically noted otherwise. Use of a term in this document should
not be regarded as affecting the validity of any trademark or service
mark. Naming of particular products or brands should not be seen as
endorsements.
No liability for the contents of this document can be accepted.
Use the concepts, examples and information at your own risk. There
may be errors and inaccuracies that could be damaging to your sys-
tem, although any damage is highly unlikely. Proceed with caution;
the author(s) do not take any responsibility.
3
IDEDOS 0.90, April 3, 2016
4
IDEDOS 0.90, April 3, 2016 CONTENTS
Contents
1 About the cartridge 11
2 Hardware setup 15
2.1 Cabling, jumpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 CompactFlash connector . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4 Zip drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.5 LS-120, A-Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.6 Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.7 Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.8 Let’s start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.9 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5 Using partitions 43
5
CONTENTS IDEDOS 0.90, April 3, 2016
6 Using directories 45
6.1 Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2 Wildcards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.3 Raw directory access . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7 Using files 53
7.1 SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.2 LOAD, VERIFY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.3 OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
7.4 CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
7.5 INPUT#, GET# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
7.6 PRINT# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
7.7 CMD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
7.8 File operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8 Direct access 67
8.1 Block-read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.2 Block-write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.3 Buffer-pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.4 TOC-read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.5 Sub-channel-read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
6
IDEDOS 0.90, April 3, 2016 CONTENTS
7
CONTENTS IDEDOS 0.90, April 3, 2016
14 PCLink 161
14.1 PCLink over IEC bus . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
14.2 PCLink over PC64 cable . . . . . . . . . . . . . . . . . . . . . . . . . 162
14.3 PCLink over RS-232C . . . . . . . . . . . . . . . . . . . . . . . . . . 163
14.4 PCLink over ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
14.5 PCLink over USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
8
IDEDOS 0.90, April 3, 2016 CONTENTS
17 Compatibility 199
17.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
17.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
D Acronyms 239
9
CONTENTS IDEDOS 0.90, April 3, 2016
10
IDEDOS 0.90, April 3, 2016 ABOUT THE CARTRIDGE
1
1 About the cartridge
The IDE64 cartridge was created to provide the fastest I/O and biggest
storage capacity available for the Commodore 64 and 128 computers.
With this cartridge it’s possible to connect and use ATA(PI) drives
like hard disks, CD-ROM and DVD drives, CompactFlash cards, Zip
drive, LS-120 (A-Drive) or a networked host computer just like ordi-
nary disk drives.
The cartridge contains a 64 or 128 KiB PEROM, which holds the
IDEDOS disk operating system, a machine code monitor, file man-
ager and setup utility. 28 KiB of RAM is used for internal buffers,
and a battery powered real time clock chip is used for time keeping.
Two LEDs indicate the presence of cartridge and drive activity. A
port called ShortBUS is installed for peripherals like DUART Card,
ETH64. There’s also a RESET button for quick restarts.
The V4.1 cartridge adds a port to support clock-port peripherals
(like ETH64 II, RR-Net), an USB FIFO chip for PCLink file transfers
and two additional LEDs for secondary interface and fault indication.
The V4.2 cartridge increases the PEROM size to 512 KiB.
The IDE64 cartridge is compatible with a wide variety of hard-
ware including (but not limited to):
11
ABOUT THE CARTRIDGE IDEDOS 0.90, April 3, 2016
1
• Turbo232, (E)TFE, RR-Net
• +60K
• 2nd SID
12
IDEDOS 0.90, April 3, 2016 ABOUT THE CARTRIDGE
1
the implied warranty of MERCHANTABILITY or FIT-
NESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General
Public License along with this program; if not, write to
the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
You are welcome to review the code and send suggestions, im-
provements or bug fixes if you want.
Please do not work around possible IDEDOS bugs in your soft-
ware, better report them, so they can be fixed in future versions!
Thanks.
13
ABOUT THE CARTRIDGE IDEDOS 0.90, April 3, 2016
14
IDEDOS 0.90, April 3, 2016 HARDWARE SETUP
2 Hardware setup 2
15
HARDWARE SETUP IDEDOS 0.90, April 3, 2016
16
IDEDOS 0.90, April 3, 2016 HARDWARE SETUP
17
HARDWARE SETUP IDEDOS 0.90, April 3, 2016
2 marking emulate a hard disk and do not need any special treatment)
N OTE
Not every Zip drive, cable and cartridge combinations work. It
may be necessary to put the drive at the middle of the cable so
that the remaining unconnected part of the cable is at least 15 cm
long.
2.6 Peripherals
Peripherals (DUART card, ETH64, etc.) are connected to a 34 pin
port (called ShortBus) of the cartridge with a 34 wire cable similar to
the floppy cable in pcs, but without wire swapping. On the V4.1 and
V4.2 cartridge there’s a 22 pin clock-port for ETH64 II, RR-Net and
other clock-port peripherals. Peripherals do not require any external
power.
18
IDEDOS 0.90, April 3, 2016 HARDWARE SETUP
WARNING ! 2
Never connect or disconnect IDE64 peripherals while the com-
puter is powered on!
2.7 Battery
There’s a battery holder on the back of the cartridge. It’s strongly
recommended to put a battery into it (CR2032 3 V) otherwise the
setup settings can’t be permanently stored and the file timestamping
won’t work. If using accu or super cap instead of battery, then enable
recharging in the setup utility.
19
HARDWARE SETUP IDEDOS 0.90, April 3, 2016
2 of IDEDOS and the connected drives. Then the standard C64 reset
screen should appear in less than 30 s, depending on the connected
drives. Holding down CONTROL will hold the boot up screen, so it
can be read. The boot screen only appears on power on.
2.9 Troubleshooting
On every power on IDEDOS does a short selftest of the hardware.
There’s a bit longer built in self test of IDEDOS when you hold down
LEFTSHIFT while turning on the computer (or simply use SHIFT-
LOCK).
NO PROPER BOOT Black screen, the red "stack" screen or garbled text
colors on boot indicate a probably weak power supply. See
section “2.2 Power supply”.
CPU You are using the wrong version of IDEDOS, SuperCPU version
on C64, or C64 version on SuperCPU.
1 See section “18 Updating IDEDOS”.
20
IDEDOS 0.90, April 3, 2016 HARDWARE SETUP
DE32 You have an old V2.1 cartridge, and tried to use a firmware 2
compiled for a newer cartridge. Recompile IDEDOS for early
V2.1, and update the firmware. Also this will happen when
using the wrong firmware on the V4.1 or V4.2 cartridge.
ROM The IDEDOS ROM checksum does not match. Try to update
the firmware. Clean contact edges, remove other cartidges or
the whole port expander. Too long ShortBus cable might also
cause this. Also you might try to reseat or replace the PEROM
chip.
RAM The cartridge RAM buffer does not work reliable. Clean contact
edges, remove other cartidges or the whole port expander. Too
long ShortBus cable might also cause this. Also you might try
to reseat or replace the RAM chip.
21
HARDWARE SETUP IDEDOS 0.90, April 3, 2016
22
IDEDOS 0.90, April 3, 2016 THE SETUP UTILITY
Here’s possible to set the built in clock. This has affect on the DATE
command, the file timestamping and on TI$ (see “3.1.4 Set BASIC
clock”). The calendar is built in and works in range 1980–2079. (Y2K
compatible) The clock ticks while the computer is turned off. (but
requires battery)
23
THE SETUP UTILITY IDEDOS 0.90, April 3, 2016
The file called ‘1//:BOOT,PRG’ can be auto started from the system
drive at power up or always after reset. The file must be executable
with RUN. Hold C= if you want to skip auto boot, or hold STOP to
skip starting of program. The BASIC variable ST (at $90) contains 0
after power on, and 1 after reset.
Enables fastloader for the 1541, 1570, 1571 and 1581 floppy drives.
(and fast read and write in manager) The fastloader auto detects drive
type, and is not used for unsupported drives. Also if the drive is capa-
ble of JiffyDOS fast protocol then the fastloader is automatically not
24
IDEDOS 0.90, April 3, 2016 THE SETUP UTILITY
Sets the BASIC variable TI$ to the time in the built in clock, after
reset.
25
THE SETUP UTILITY IDEDOS 0.90, April 3, 2016
3 Select lower and uppercase chars or uppercase and graphics font after
reset or STOP + RESTORE.
If cartridge has cartconfig register (some V2.1, and any later version
of the cartridge), support is compiled in, and the computer is a C128
(without SuperCPU), it makes use of extra keys on keyboard. For list
of keys see Table 1!
Key Function
ESC CHR$(27)
TAB CHR$(9)
ALT Nothing
HELP Enter monitor
LINE FEED CHR$(10)
NO SCROLL Nothing
CURSOR KEYS and NUM PAD Their usual meaning
Table 1: C128 extra keys
26
IDEDOS 0.90, April 3, 2016 THE SETUP UTILITY
Enables or disables the use of ‘B = W’. Cleared on reset. You may have 3
to enable it when creating filesystem.
Enables function key support in direct mode. For list of default func-
tion key assignment see Table 14!
27
THE SETUP UTILITY IDEDOS 0.90, April 3, 2016
3 For compatibility with some BBS software the ‘BLOCKS USED.’ mes-
sage can be changed to ‘32767 BLOCKS FREE.’ at the end of direc-
tory listings. The problem can be noticed when a program refuses
to save stuff because it thinks the disk is full (‘0 BLOCKS USED.’),
while actually the directory is empty, and there’s plenty of space.
28
IDEDOS 0.90, April 3, 2016 THE SETUP UTILITY
This device number is used for loading the DOS wedge shell com-
mand2 , auto booting3 , manager configuration file4 , and as the default
work drive for the monitor5 . Also this device will be selected (at $BA)
after reset as the last used device for the DOS wedge commands6 .
29
THE SETUP UTILITY IDEDOS 0.90, April 3, 2016
3 Device number mapping for serial drives. Selecting 9 for serial drive
8, and 8 for serial drive 9 will effectively swap them. (of course only
if not using direct serial routines)
3.3.4 PCLink
Used for EPCLink, it allows to use several C64 and hosts to share the
same ethernet network. The network address setting must match on
the C64 and host side for a successful communication. For simple
setups leave it on 0.
30
IDEDOS 0.90, April 3, 2016 THE SETUP UTILITY
31
THE SETUP UTILITY IDEDOS 0.90, April 3, 2016
WARNING !
Do not enable ‘‘Read look-ahead’’ on the ancient LPS170A hard-
drive, it’s bugged firmware will mix up sectors sometimes, and
it’ll damage the filesystem. Modern drives should be OK.
32
IDEDOS 0.90, April 3, 2016 THE SETUP UTILITY
33
THE SETUP UTILITY IDEDOS 0.90, April 3, 2016
34
IDEDOS 0.90, April 3, 2016 PREPARING A BLANK DISK
First set the “Direct write” option7 in the setup utility to enabled,
then start the format utility. Follow the instructions. Don’t forget that
formatting a partition will erase all data on it permanently!
CD-ROM/DVD drives do not need any special treatment, just use
ISO9660 or Joliet format CDs to be able to read them. (Rock Ridge
Extensions are not supported, these CDs will have short filenames un-
less Joliet extension is also present) Multi-session and mixed format
discs are both supported. Everything after the last dot or after the
last comma will be used as file type. There’s a compile time option
for disabling the automatic extension to file type conversion, in case
you’d like to have everything as ‘PRG’.
7 See section “3.1.9 Direct write”.
35
PREPARING A BLANK DISK IDEDOS 0.90, April 3, 2016
36
IDEDOS 0.90, April 3, 2016 PREPARING A BLANK DISK
If you want to share the disk with other operating systems, use
the fdisk utility, and make a partition entry with type 0xCF.
4
Creating new disklabel.
Creating new partition table.
All is good so far, the whole disk will be used for IDEDOS. If you
only want to use some part of it instead, then read the notes at the end
of this chapter.
Command (m for help): m
Command action
a select boot partition o clear partition table
b change partition’s name p print the partition table
c clean boot sector r toggle writeable flag
d delete partition s save table to file
f toggle formatting flag t change partition’s type
g set global disklabel u load backup partition table
h toggle hidden flag q quit without saving changes
l load table from file w write changes to disk
m print this menu x expert geometry setup
n add new partition
37
PREPARING A BLANK DISK IDEDOS 0.90, April 3, 2016
to give the exact start and end position or the size of the partition in
sectors (e.g. +2342) for power users. For everyday use +1048576K
or +1024M or +1G creates an example partition with a size of 1 GiB.
(metrics are powers of 1024, not 1000!)
4
After adding some more partitions, here’s an example partition
list:
Command (m for help): p
That’s all for now, let’s start formatting (or you can use ‘Q’ to
abort):
Command (m for help): w
38
IDEDOS 0.90, April 3, 2016 PREPARING A BLANK DISK
39
PREPARING A BLANK DISK IDEDOS 0.90, April 3, 2016
Hiding a partition can be done the same way, by using the ‘H’
command.
40
IDEDOS 0.90, April 3, 2016 PREPARING A BLANK DISK
the known correct start and end addresses, and then switching off the
formatting flag for the partition before writing changes to disk.
Partition layout can be backed up and restored by using the com-
mands “load table from file” and “save table to file”. CFSfdisk checks
4
if the file is for this device or not, to avoid mistakes. Use the “toggle
formatting flag” to reformat partitions as needed. By default none of
the partitions will be formatted after loading a backup.
By starting with CFSfdisk version 10, the backup partition table
is created at the end of the disk, unless the location was already set
by ealier partitioning. The backup table is automatically syncronized
with the primary table on writing changes to disk, or when using CFS-
fsck. The “load backup partition table” can be used to load it, in case
of emergency. This function does not work well with disks partitioned
by earlier versions of CFSfdisk when the the boot sector was lost, as
then the guess for the location will be wrong.
41
PREPARING A BLANK DISK IDEDOS 0.90, April 3, 2016
other partitions.
Take care not to destroy the CFS signature in the boot sector when
installing other systems!
4
42
IDEDOS 0.90, April 3, 2016 USING PARTITIONS
5 Using partitions
When using a new disk at least one partition must be created. Parti-
tions provide the highest level of organizing data. Each partition has
it’s own filesystem, so possible disk or software errors can’t destroy
the whole data at once. 5
It’s not recommended to create only one huge 80 GiB partition for
all data (which won’t be more than a few GiB I guess), because the
filesystem checking of such a big partition will take a while. . . Also
it’s not necessary to partition all space on disk, as it’s possible to
create additional partitions later if needed.
One can select the default partition on boot, set the global disk
label, partition names and partition attributes (hidden and read only)
with the CFSfdisk utility. The read only attribute is useful to prevent
accidental changes to the partition.
Examples:
Listing available partitions. ‘∗’ indicates default partition, ‘<’ in-
dicates read only partition. Hidden partitions are not listed.
@$=P
255 "SOCI'S DISK " IDE64
1 "STUFF" CFS
2 "WORK" *CFS
3 "INCOMING" CFS
4 "BACKUP" CFS<
4 PARTITIONS.
READY.
²
43
USING PARTITIONS IDEDOS 0.90, April 3, 2016
5 Load a file from partition 2 from the directory ‘/GT’. More about
paths in section “6.1 Paths”.
LOAD"2//GT/:FILE"
SEARCHING FOR 2//GT/:FILE
LOADING $0801-$0932
READY.
²
44
IDEDOS 0.90, April 3, 2016 USING DIRECTORIES
6 Using directories
A directory is a list of files. To view the directory use LOAD "$" and
LIST , DIR , or @$ . Of course LOAD will overwrite the current program
in memory, while the last 2 methods will preserve the computer’s
memory content.
The number before the first line is the partition number, it’s fol-
lowed by the directory label, and finally the ID string IDE64. The 6
following lines provide information about the size of each file in 256
byte blocks (so 4 blocks are exactly 1 KiB), the name of the file en-
closed in quotation marks, and it’s file type at the right side. The last
line is the used block count in the directory. This can be set to be
always ‘32767 BLOCKS FREE.’ for compatibility with certain soft-
ware.
Example:
A simple directory list, using LOAD "$":
LIST
2 "TEST " IDE64
0 "PLUGINS" DIR
40 "BOOT" PRG
2 "MAN" USR
5 "TOD" ASM
23 "VIEWER" PRG<
70 BLOCKS USED.
READY.
²
It’s possible to get a bit more detailed directory list, which is sim-
ilar to the first one, but instead of the full filetype, only one letter is
present. Then the timestamp of the file is displayed as month, day,
hour, minute and the first letter of AM/PM.
Example:
45
USING DIRECTORIES IDEDOS 0.90, April 3, 2016
46
IDEDOS 0.90, April 3, 2016 USING DIRECTORIES
47
USING DIRECTORIES IDEDOS 0.90, April 3, 2016
@CD¬
@CD:..
@CR:DIRNAME
@RD:DIRNAME
@R:NEWNAME=OLDNAME
@R/NEWPATH/:NEWNAME=/OLDPATH/:OLDNAME
@R-H:NEWHEADER
@L:DIRNAME
Hiding a directory
@EH:DIRNAME
48
IDEDOS 0.90, April 3, 2016 USING DIRECTORIES
6.1 Paths
Each file in the tree structure can be reached with a “path”. The path
is composed from the name of the directories separated by a slash
character.
Here’s an example directory structure:
ROOT-DIR
°¦± 6
° ¦ ±
A B C
¦ ° ±
¦ ° ±
F E D
Let’s say the working directory is ‘C’ now. To load a file from
directory ‘E’ use the following: LOAD "/ E /: FILE ". This is a relative
path. It’s also possible to specify the location of a file from the root
directory, it’s called absolute path: LOAD "// C / E /: FILE ". As it seems the
path is enclosed between 2 slashes before a semicolon, after it is the
name of file. In the last example the real path was ‘/C/E’ where the
slash before ‘C’ indicates the it’s an absolute path.
Now let’s compose a relative path, but now our working directory
is ‘F’: LOAD "/../../ C / E /: FILE ". There’s no directory named ‘..’ in the
graph, as this is a special directory, and it means the parent directory.
That’s why ‘CD :..’ means change to parent directory in some previous
example. There’s another special directory called ‘.’ which means
the directory itself. These two special directories always exists.
To embed the partition number into the filename place it before
the path, e.g. ‘13/C/:E’, and don’t forget to include the colon!
10 OPEN 15 ,12 ,15
20 PRINT #15 , " CD // ": REM GOTO ROOT - DIR
30 PRINT #15 , " MD :A": REM CREATE A
49
USING DIRECTORIES IDEDOS 0.90, April 3, 2016
6.2 Wildcards
It’s possible to filter directory listings to show only a subset of files
in a directory by using wildcards. There are 2 different wildcards:
‘?’ matches exactly one character, while ‘∗’ matches any number of
characters. These wildcards can be used in path elements or filename
too, in this case the first filename will be matched. To filter direc-
tory listing by file type, append ‘=TYP’ to the pattern. The follow-
ing one character file type shortcuts are recognized: P→PRG, S→SEQ,
U→USR, R→REL, J→LNK, D→DEL, B→DIR.
Wildcard filtering does only work on formatted directory lists
(secondary address 0).
Examples:
List files starting with ‘A’.
LOAD"$A*"
SEARCHING FOR $A*
LOADING $0801-$08DF
READY.
LIST
1 "PICTURES " IDE64
132 "ALIEN BAR BY WEC" FUN
29 "ALIEN-LIFE BY MB" SHI
50
IDEDOS 0.90, April 3, 2016 USING DIRECTORIES
51
USING DIRECTORIES IDEDOS 0.90, April 3, 2016
52
IDEDOS 0.90, April 3, 2016 USING FILES
7 Using files
Files store programs and data in a filesystem. Traditionally files could
only be accessed sequentially like on tape, but later relative files ap-
peared with fixed record lengths on disk drives.
Using IDEDOS with the CFS filesystem it’s now possible to use
randomly accessible files up to 4 GiB without the fixed record length
limitation for both read and write at the same time.
Unlike other systems it’s possible to seek beyond the end of a file
7
when writing or modifying and create “holes”, which are filled with
nulls between the file’s last end and the newly written data. These
holes of course do not use any disk space. This concept also applies
to relative files for it’s unused records, but instead of nulls the empty
record pattern is used.
Relative files are available for compatibility reasons, they are lim-
ited to the usual 65535 records of 255 bytes, nearly ∼16 MiB.
There’s also a special purpose file called link, which can be used
to reference other files. It contains a path to a new location.
At maximum there can be 32 files open instead of the normal
10 supported by the KERNAL. (this includes all files, even on non-
IDE64 drives) IDEDOS has 10 buffers for it’s own files, these are
shared between the IDE64 drives.
Of course IDEDOS supports opening of multiple files on the same
or different partitions simultaneously for writing and modifying. But
keep in mind that each file locks a 2 MiB area of the partition it’s
located on, which means that on partitions smaller than 2 MiB (like on
a 1.44 MB disk) there can be only one file opened for write at the same
time, and the next file open for write, modify or create (including
directories) will fail with a disk full error. File scratches or directory
53
USING FILES IDEDOS 0.90, April 3, 2016
removes will work as these are handled specially in this case. You’ll
won’t ever notice this disk area locking on a big partition except when
it’s nearly full.
All open files are locked, so they cannot be moved across direc-
tories or removed until they are not closed. This applies to directo-
ries too, the current working directory cannot be removed even if it’s
empty. Opening the same file several times is not allowed as well.
When creating new files, the default attributes will be deletable,
7 readable, writable, loadable, and not hidden, except for relative files,
which will be non-loadable. The directory, partition and the disk must
be writable where the file is created, and the file must be deletable if
replaced.
Wildcards (‘?’ and ‘∗’) and special characters like ‘:’, ‘,’ and ‘=’
are not allowed in filename when creating a new file or directory. The
‘/’ is treated as a path separator for backwards compatibility, unless
it’s disabled in the setup, then it’s just a regular character. The file
type must be at least two characters long, with the same limitations
on usable characters, plus it can’t contain space, ‘>’ and ‘<’. The
following one character file type shortcuts are recognized: P→PRG,
S→SEQ, U→USR, L→REL, J→LNK, D→DEL.
IDEDOS properly closes it’s files when CLALL is called to reduce
the chance of creating non-closed files. (this happens when issuing a
RUN , CLR , NEW , or just entering a new BASIC line) Also non-closed
files do not automatically mean lost sectors, unless huge amounts of
data has been written to the file without closing it.
In the format descriptions everything between ‘[’ and ‘]’ is op-
tional, and ‘hnamei’ means a parameter.
54
IDEDOS 0.90, April 3, 2016 USING FILES
7.1 SAVE
The BASIC command SAVE (and the similar KERNAL call) has the
following format:
Format:
SAVE "[[@][hpartition # i][hpath i]:]hfnamei[,htypei]"[,hdevice # i[,hmode # i]]
Examples:
Simple save into current drive, current partition and into working
directory, the result is ‘A’ with file type ‘PRG’.
SAVE"A"
This will save file ‘B’ with file type ‘DAT’ on device 12 to partition
3 to directory ‘/A’. If it’s exists it will be first removed.
55
USING FILES IDEDOS 0.90, April 3, 2016
SAVE"@3//A/:B,DAT",12
The file must be loadable. (the executable flag must be set) For
directory list load the directory must be readable. If no filetype is
specified then ‘∗’ is used.
The device number identifies the drive. If no device number is
given, then the last one is used ($BA).
If mode=0 then load to BASIC program start, otherwise load to
original address. If no mode is given, it’s 0.
Examples:
Simple load from current drive, current partition and from work-
ing directory. As file type is not specified the first will be loaded. The
starting address will be ignored. (no mode specified means mode=0)
LOAD"A"
56
IDEDOS 0.90, April 3, 2016 USING FILES
This will load file ‘B’ with file type ‘PIC’ from device 13 from
partition 4 from directory ‘/A’. It will be loaded to the load address
included in file (first 2 bytes), because mode6=0.
LOAD"4//A/:B,PIC",13,1
This will load the directory listing containing only ‘PRG’ files as a
BASIC program.
LOAD"$*=P",12
7
7.3 OPEN
Things are getting complicated here. The usual syntax of OPEN is as
follows:
Format:
OPEN hfile # i[,hdevice # i[,hchannel # i[,"htexti"]]]
The file number identifies a file for IDEDOS, it must be in the
range 1–127. If it’s 128–255 then BASIC adds a CHR $(10) after each
line. (it’s an extra linefeed for certain printers)
The device number identifies the drive. If no device number is
given, then the last one is used ($BA).
The channel number identifies the communication channel for the
drive assigned to a certain file, so it must be choosen unique per drive.
The available channel numbers are described on page 131. Some
commands use this channel number to identify the file. (like the po-
sition command, or direct access commands) If no channel number is
given, then 0 is used for keyboard, tape, RS-232, and 255 for screen,
serial and IDE64 drives.
The open formats presented here can be easily converted to as-
sembly.
57
USING FILES IDEDOS 0.90, April 3, 2016
58
IDEDOS 0.90, April 3, 2016 USING FILES
Format:
OPEN hfile # i,hdevice # i,h2–14 i,"$"
Reading the last byte of the directory list will set the end of file
bit in ST.
One way is to use secondary address 0, which means read only se-
quential access. If read only random access is required, then sec- 7
ondary address 2–14 must be used.
If read only random access is required, then the secondary ad-
dress 2–14 must be used. The read operation is requested by the ‘, R’
after the filetype or file name, it’s usage is optional. If no filetype is
specified then ‘∗’ is used.
Format:
OPEN hfile # i,hdevice # i,0,"[[hpart # i][hpath i]:]hfnamei[,htypei]"
OPEN hfile # i,hdevice # i,h2–14 i,"[[hpart # i][hpath i]:]hfnamei[,htypei][, R]"
59
USING FILES IDEDOS 0.90, April 3, 2016
90 CLOSE 2: CLOSE 15
Listing 3: This small program prints the starting address of a file, and has
some nice error checking.
If only one output file with write only sequential access is required,
then the simplest is to use secondary address 1. In this case if the
7 filetype is not specified then ‘PRG’ is used.
If write only random access is required, then the secondary ad-
dress 2–14 must be used. The write operation is requested by the ‘, W’
after the filetype or file name. If the filetype is not specified then ‘SEQ’
is used.
Format:
OPEN hfile # i,hdev # i,1,"[[@][hpart # i][hpath i]:]hfnamei[,htypei]"
OPEN hfile # i,hdev # i,h2–14 i,"[[@][hpart # i][hpath i]:]hfnamei[,htypei], W "
The file name and type can’t contain any special characters. If no
filetype is specified then ‘SEQ’ is used. The specified file shouldn’t
exists, unless replace is used (@), in this case it’s possible to use
wildcards.
N OTE
Unlike other drives IDEDOS first removes the original file before
replacing it.
60
IDEDOS 0.90, April 3, 2016 USING FILES
Appending to a file means write only random access starting from the
end of the file. The append operation is requested by the ‘, A’ after the
filetype or file name. If no filetype is specified then ‘∗’ is used. 7
Format:
OPEN hfile # i,hdev # i,h2–14 i,"[[hpart # i][hpath i]:]hfnamei[,htypei], A "
The file must be read and writable, and must exists.
If a file have to be both read and writable with random access use
this opening mode. This operation is requested by the ‘, M’ after the
filetype or file name. If no filetype is specified then ‘∗’ is used.
Format:
OPEN hfile # i,hdev # i,h2–14 i,"[[hpart # i][hpath i]:]hfnamei[,htypei], M "
The file must be read and writable, and must exists.
61
USING FILES IDEDOS 0.90, April 3, 2016
opening relative files the filetype ‘L’ have to be used. When creat-
ing the file for the first time the record length must be added after the
filetype, as shown below.
Format:
OPEN hfile # i,hdev # i,h2–14 i,"[[hpart # i][hpath i]:]hfnamei, L ,"+
CHR $(hrecord length #i)
OPEN hfile # i,hdev # i,h2–14 i,"[[hpart # i][hpath i]:]hfnamei, L "
62
IDEDOS 0.90, April 3, 2016 USING FILES
63
USING FILES IDEDOS 0.90, April 3, 2016
For opening link files the filetype ‘J’ or ‘LNK’ have to be used, other-
7 wise the referenced file will be opened.
Format:
OPEN hfile # i,hdevice # i,0,"[[hpart # i][hpath i]:]hfnamei, J "
OPEN hfile # i,hdevice # i,0,"[[hpart # i][hpath i]:]hfnamei, LNK "
OPEN hfile # i,hdevice # i,h2–14 i,"[[hpart # i][hpath i]:]hfnamei, J [, R ]"
OPEN hfile # i,hdevice # i,h2–14 i,"[[hpart # i][hpath i]:]hfnamei, LNK [, R ]"
64
IDEDOS 0.90, April 3, 2016 USING FILES
7.4 CLOSE
An opened file must be closed after use. It’s especially true when
writing new data into a file, where data can be left in the buffer un-
written, so recent changes could be lost forever! For a newly created
file this can mean the entire file, for appended or modified ones the
part beyond the previous end of file, for relative files the recently writ-
ten records, unless they were flushed.
Close only requires a file number.
Format: 7
CLOSE hfile # i
Format:
INPUT #hfile # i,hvariablesi
GET #hfile # i,hvariablesi
7.6 PRINT#
This command is for writing to a file. For more read a BASIC manual,
in assembly the calls CHKOUT, CHROUT, WRITE and CLRCHN can be
used instead.
Format:
PRINT #hfile # i[,hvariables, stringsi]
65
USING FILES IDEDOS 0.90, April 3, 2016
7.7 CMD
This command is for redirecting output to a file. For more read a
BASIC manual, in assembly the CHKOUT call can be used instead.
Format:
CMD hfile # i[,hvariables, strings i]
66
IDEDOS 0.90, April 3, 2016 DIRECT ACCESS
8 Direct access
By using direct access commands you can read and write any sector of
disk. Common use of direct access commands is to access unknown
filesystems, manage the partition table and to create the filesystem.
It’s also important in disk editor applications.
To use direct access, you need to open 2 channels, one for com-
mands, and one for data. The command channel can be opened with
the usual OPEN hlfni,hdevicei,15. The data channel is opened simi-
lar to opening normal files, except that the file name must be a hash
sign. (OPEN hlfni,hdevicei,hchannel i,"#") The channel number must 8
be greater than 1. This “file” will be a circular data buffer holding
512 or 2048 bytes depending on the drive used. The end of buffer can
be found by checking the BASIC variable ST.
In the format descriptions everything between ‘[’ and ‘]’ is op-
tional, and ‘hnamei’ means a parameter.
8.1 Block-read
The block-read command reads the specified sector into the buffer
and sets the buffer pointer to the start of buffer. It can also be used to
get the ATA(PI) device identity information to find out the geometry,
model number, etc. as described in ATA(PI) standards.
67
DIRECT ACCESS IDEDOS 0.90, April 3, 2016
Logical Block Addressing can be used with almost all devices, except
old hard disks.
Format:
" B = R "+ CHR $(hchannel # i)+ CHR $(h64+LBA bits 24–27 # i)+
8 CHR $(hLBA bits 16–23 # i)+ CHR $(hLBA bits 8–15 # i)+
CHR $(hLBA bits 0–7 # i)
Format:
" B = R "+ CHR $(hchannel # i)+ CHR $(0)+ CHR $(0)+ CHR $(0)+ CHR $(0)
8.2 Block-write
The block-write command writes the buffer content to the specified
sector and sets the buffer pointer to the start of buffer.
Format:
" B = W "+ CHR $(hchannel # i)+ CHR $(hhead # i)+
CHR $(hcylinder bits 8–15 # i)+ CHR $(hcylinder bits 0–7 # i)+
CHR $(hsector # i)
68
IDEDOS 0.90, April 3, 2016 DIRECT ACCESS
Format:
" B = W "+ CHR $(hchannel # i)+ CHR $(h64+LBA bits 24–27 # i)+
CHR $(hLBA bits 16–23 # i)+ CHR $(hLBA bits 8–15 # i)+
CHR $(hLBA bits 0–7 # i)
8.3 Buffer-pointer
The buffer pointer selects individual bytes in the buffer. Reading and
writing will start on the buffer position and the buffer pointer will be 8
incremented by the number of bytes read and written.
Format:
" B = P "+ CHR $(hchannel # i)+ CHR $(hposition bits 0–7 # i)+
CHR $(hposition bits 8–15 # i)
" B - P :"; hchannel # i; hposition bits 0–7 # i; hposition bits 8–15 # i
10 LB =0: REM LB =64 FOR ATAPI OR LBA DEVICE !
20 OPEN 15 ,12 ,15: OPEN 4 ,12 ,4 , "#"
30 AD$ = CHR$ ( LB ) CHR$ (0) CHR$ (0) CHR$ (1)
40 PRINT #15 , "B=R" CHR$ (4) AD$
50 PRINT #15 , "B=P" CHR$ (4) CHR$ (8) CHR$ (0)
60 FOR A =0 TO 15: GET #4 , A$ : PRINTA$ ;: NEXT
70 CLOSE 4: CLOSE 15
Listing 8: This example reads in the boot sector and prints out the CFS
identification string from the first sector of disk.
69
DIRECT ACCESS IDEDOS 0.90, April 3, 2016
8.4 TOC-read
8
The Table Of Contents holds additional information about the disc.
The bits of the format parameter are described in Table 3.
The various formats of TOC are not described here, they can be
found in the SCSI-MMC standard.
Format:
" B = T "+ CHR $(hchannel # i)+ CHR $(hformat # i)+ CHR $(hstarting track # i)
8.5 Sub-channel-read
This command can be used to read the current state of audio playing,
the current position, media catalog number, and the ISRC. The bits of
the mode and format parameters are described in Table 4 and Table 5.
For more information read the SCSI-MMC standard.
Format:
" B = S "+ CHR $(hchannel # i)+ CHR $(hformat # i)+ CHR $(hstarting track # i)+
CHR $(hmode # i)
70
IDEDOS 0.90, April 3, 2016 DIRECT ACCESS
71
DIRECT ACCESS IDEDOS 0.90, April 3, 2016
Value Meaning
0 Reserved
1 CD current position
2 Media Catalog number (UPC/bar code)
3 International Standard Recording Code
4–255 Reserved
Table 5: Sub-channel read modes
Byte Meaning
0 Reserved
1 Audio status, see Table 7
2 Sub-channel data length high
3 Sub-channel data length low
Table 6: Sub-channel read data header
72
IDEDOS 0.90, April 3, 2016 DIRECT ACCESS
Value Meaning
$00 Audio status byte not supported or not valid
$11 Play operation in progress
$12 Play operation paused
$13 Play operation successfully completed
$14 Play operation stopped due to error
$15 No current audio status to return
8
Table 7: Sub-channel read audio status codes
Byte Meaning
0–3 Sub-channel data header, see Table 6
4 Sub-channel data format code ($01)
5 ADR and control, see Table 9
6 Track number
7 Index in current track
8–11 Absolute CD address in LBA or MSF
12–15 Track relative CD address in LBA or MSF
Table 8: Sub-channel CD current position data format
73
DIRECT ACCESS IDEDOS 0.90, April 3, 2016
74
IDEDOS 0.90, April 3, 2016 THE FILE MANAGER
75
THE FILE MANAGER IDEDOS 0.90, April 3, 2016
file where the selector currently is. File rename is done with the 6 key,
this can also change the filetype on IDE64 drives. Directory creation
is done with the key 7.
To send commands to ordinary disk drives (e.g. for formatting or
validating a disk) press 9.
To jump quickly on a file press it’s first letter. (alphabetic charac-
ters only)
There’s also a shortcut to eject the disc from a CD-ROM, DVD,
LS-120 or Zip drive by pressing the ↑ key. Reloading of the disc is
automatically done when reloading the directory. To exit to BASIC
press ←.
Entering directories and loading files are done with the RETURN
9 key. If a file is associated with a plugin then the plugin will be started
instead. Going into the parent directory is done by pressing RETURN
on the directory entry ‘..’. Or you can also use the ‘.’ key for entering
the parent directory and key ‘/’ to enter the root directory.
Partition selection is similar like entering the parent directory, but
you have to be in the root directory. (press key ‘/’ and then ‘.’ to
quickly reach it) The partition selection directory can be identified by
the partition number 255 displayed on the side. (and of course there’s
no ‘..’ entry)
The manager remembers the last used directories, partitions and
device numbers across invocations unless the computer is turned off.
If you do not like the default colors then it’s possible to change it
in the setup utility. If you do not like the lowercase character set (e.g.
want to look at a nice directory art), use the well known C= + SHIFT
combo.
Files are unsorted for 1541, 1570, 1571, 1581 while any other
drive will have it’s directory displayed alphabetically, and directories
76
IDEDOS 0.90, April 3, 2016 THE FILE MANAGER
will be sorted to the top. Do not put more than 510 files in a directory
or the rest will not be displayed.
In an input window (e.g. when renaming a file) you can use the
CRSR keys, HOME, CLR, INS and DEL keys. Aborting is done with
the STOP key, while finishing the input is done with RETURN.
For question windows with multiple selections (e.g. YES/NO/ALL)
press the first letter of your choice. Simple message windows will
accept any key. If you hold down the key long enough, you can see
the window below the message. (e.g. disk error while copying, but
which file had this error?)
The recursive copy operation is not the “ultimate backup tool”, as
it can’t copy relative files, preserve creation or modification date or
file attributes. 9
Fast copying with a serial bus drive is only possible if it’s sup-
ported by the built in floppy speeder (if enabled) or it’s capable of the
JiffyDOS or Dolphin DOS protocol. Copying between serial drives
will use the normal routines.
9.1 Plugins
External programs called by the file manager can extend it’s func-
tionality in a number of ways. Plugins can show text and various
graphic formats, play SID files and animations, extract archives and
disk images, fire up an assembler with the file, or just anything one
can imagine!
These external programs are started by pressing RETURN, 2, 3 or
4 on a file. The action taken when these keys are pressed is deter-
mined by the file called ‘1//:MAN,USR’. The manager looks for these
files on the system drive which can be set in the setup utility.
77
THE FILE MANAGER IDEDOS 0.90, April 3, 2016
9
Figure 6: The File Manager
$1000 When started here it should display some kind of prompt for
getting the filename. Not used by the manager.
$1003 The manager starts the plugins at $1003 with the accumula-
tor loaded with the length of filename, the X register with the
lower, the Y with the higher byte of the address to the filename.
$BA contains the current device number the file is on. The file-
name always includes the file type separated by a comma on
the end.
78
IDEDOS 0.90, April 3, 2016 THE FILE MANAGER
*= $1000
jmp printc
jmp start
79
THE FILE MANAGER IDEDOS 0.90, April 3, 2016
The plugin must not destroy $0002–$0333 badly and must not
modify $0800–$0FFF! Please leave the VIC II, SID, CIA, etc. after
exit of the plugin in a usable state. . .
80
IDEDOS 0.90, April 3, 2016 THE FILE MANAGER
60 PRINT #1 , " KLA " N$K$ " PIC ? *, PRG " N$ ;: REM KOALA
70 PRINT #1 , " DRL " N$ " *. DRL " N$ ;: REM DRAZLACE
80 PRINT #1 , " D64 " N$ "*, D64 " N$ ;: REM D64 WRITER
90 REM ********************
100 REM *** MORE PRUGINS ***
110 REM ********************
500 PRINT #1 , "=" N$ ;: REM KEY 2 SECTION BEGINS
510 REM ********************
520 REM *** MORE PRUGINS ***
530 REM ********************
590 PRINT #1 , " MENU " N$ "*" N$ ;: REM MENU
600 PRINT #1 , "=" N$ ;: REM KEY 3 SECTION BEGINS
610 PRINT #1 , " D64L " N$ "*, D64 " N$ ;: REM D64 LISTER
620 REM ********************
630 REM *** MORE PRUGINS ***
640 REM ********************
690 PRINT #1 , " VIEWER " N$ "*" N$ ;: REM VIEWER 9
700 PRINT #1 , "=" N$ ;: REM KEY 4 SECTION BEGINS
710 REM ********************
720 REM *** MORE PRUGINS ***
730 REM ********************
790 PRINT #1 , " VI65 " N$ "*" N$ ;: REM EDITOR
800 PRINT #1 , N$ ;: CLOSE 1: REM CLOSE FILE
Listing 11: MAN,USR generator source
The program first opens the configuration file, and removes the
old one if there was any. Also it writes the fake loading address. Line
30 defines ‘/PLUGINS/’ as the plugin directory on partition 1. Line
50 is an example of a filetype matching. All files with filetype ‘SID’
will be played by the ‘1//PLUGINS/:SID’ plugin, when RETURN is
pressed. Line 60 associates all ‘PRG’ type files beginning with ‘APIC’
and a letter between spaces to the Koala painter viewer plugin. Line
70 associates all files ending on ‘.DRL’ to the Drazlace viewer. Line
80 associates all files with filetype ‘D64’ to the d64 writer. Line 500
81
THE FILE MANAGER IDEDOS 0.90, April 3, 2016
starts definitions for key 2. Line 590 associates all files to the menu
program, when key 2 is pressed. Line 600 starts definitions for key 3.
Line 610 associates all files with filetype ‘D64’ to the d64 lister. Line
690 associates all files to the viewer program, when key 3 is pressed.
Line 700 starts definitions for key 4. Line 790 associates all files to
the editor program, when key 4 is pressed. In line 800 the end of
definitions marker is written, and then the file is closed.
The pattern matching is case sensitive, so it’s not a bad idea to add
both lowercase and uppercase variants to avoid problems with badly
written CDs.
Save the configuration creator program, in case you want to mod-
ify or add some more plugins to you manager configuration file some-
9 time later.
82
IDEDOS 0.90, April 3, 2016 THE FILE MANAGER
Key Function
← Exit
CONTROL Change panel
UP , DOWN Move cursor
F1 or LEFT Page Up
F7 or RIGHT Page Down
1 Refresh dir
2,3,4 Execute plugins
5 Copy file(s)
6 Rename file or directory
7 Create directory
8 Delete file(s) 9
9 Send DOS command
. Go into parent dir
/ Go into root dir
DEL Toggle selection of file
F2 or HOME Go on top of listing
F8 or CLR Go to end of listing
Enter directory or LOAD " FILE ", X and
RETURN
RUN or start viewer plugin
SHIFT + RETURN LOAD " FILE ", X ,1
↑ Eject medium
∗ Invert file selection (SHIFT to include dirs)
+ Select files (SHIFT to include dirs)
− Deselect files (SHIFT to include dirs)
C= + 0–9 Select drive
C= + SHIFT Select character set
A–Z Quick jump to filename
Table 10: Manager keys
83
THE FILE MANAGER IDEDOS 0.90, April 3, 2016
84
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
A few bytes from stack ($1F3–$1FF), the contents of both CIAs, the
memory configuration at $00, $01 and the processor registers (A, X,
Y, SR, SP) will be lost, otherwise the memory is not touched. (ADDR
will not have a valid restart address, instead it contains $FCE2)
85
USING THE MONITOR IDEDOS 0.90, April 3, 2016
86
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
Command: O, @#
Purpose: Selects working drive for disk operations.
Syntax: O hdrivei, @# hdrivei
Command: @
Purpose: Read error channel and send DOS commands.
Syntax: @hcommand i
Examples:
Print error channel:
87
USING THE MONITOR IDEDOS 0.90, April 3, 2016
@
00, OK,000,000,000,000
Send a DOS command:
@CD:SOURCE
00, OK,000,000,000,000
10.2.3 Directory
Command: @$
Purpose: Display directory of current working drive.
Syntax: @$[hpatterni]
Example:
Display directory:
10 @$T*
2 "TEST " IDE64
13105"TRANCEANDACID"
5 "TOD" ASM
13110 BLOCKS USED.
10.2.4 Save
Command: S and SB
Purpose: Save program to disk and save a memory area to disk.
Syntax: S " NAME " hstart addressi hend i [hstart2 i]
SB " NAME " hstart addressi hend i
Examples:
Save main file to disk, save sprites as 512 byte raw file without
start address, and save 1024 bytes of data from $3000 with start ad-
dress $2200.
Note that the first parameter is not the device number!
88
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
10.2.5 Load
Command: L and LB
Purpose: Load a program or memory area from disk.
Syntax: L " NAME " [hstart addressi]
LB " NAME " hstart addressi
Examples:
Load the main program from disk, and link in sprite data, which 10
is a 512 byte raw file without start address.
Note that the first parameter is not the device number!
L"GAME"
0801-21FF OK
LB"SPRITES" 2200
2200-23FF OK
10.2.6 Verify
Command: V and VB
Purpose: Verify a program or memory area from disk.
Syntax: V " NAME " [hstart addressi]
VB " NAME " hstart addressi
Examples:
89
USING THE MONITOR IDEDOS 0.90, April 3, 2016
Verify the main program from disk, and the sprite data, which is
a 512 byte raw file without start address.
Note that the first parameter is not the device number!
V"GAME"
0801-21FF OK
VB"SPRITES" 2200
2312 2313
2200-23FF OK
10.2.7 Freeze
Command: S
Purpose: Save current machine state to disk.
Syntax: S " NAME "
10 Freeze (saves 64 KiB RAM and I/O) memory to disk. The actual
bank must be 0–7.
Example:
Freeze memory from disk.
S"MYFREEZE"
OK
10.2.8 Defreeze
Command: K
Purpose: Restore machine state from disk.
Syntax: K " NAME "
Defreeze memory from disk (loads 64 KiB RAM and I/O). The
actual bank must be 0–7.
90
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
Example:
Defreeze memory from disk.
K"MYFREEZE"
0000-FFFF OK
Command: R
Purpose: Shows the processor registers.
Syntax: R
To modify the registers and flags, change the line beginning with
‘;’, and press RETURN. ADDR is the address where the program con- 10
tinues (see X!), AC XR YR SP are the Accumulator, X register, Y reg-
ister and Stack pointer, BK is the currently edited bank selector (see
B !), DR is the device number used in disk access commands (see O !),
NV-BDIZC are the processor flags.
Example:
Display registers.
R
ADDR AC XR YR SP BK DR NV-BDIZC
;E5D1 00 00 0A F3 07 0C 00100010
Command: IO
Purpose: Shows the I/O chip registers.
Syntax: IO
91
USING THE MONITOR IDEDOS 0.90, April 3, 2016
10.3.3 Assemble
10
Command: A
Purpose: Enter assembly code.
Syntax: A haddressi hmnemonici [hoperand i]
92
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
10.3.4 Disassemble
Command: D
Purpose: Disassemble machine code into assembly.
Syntax: D [haddress 1 i [haddress 2 i]]
Command: M
Purpose: Dump memory in hex and PETSCII.
Syntax: M [haddress 1 i [haddress 2 i]]
93
USING THE MONITOR IDEDOS 0.90, April 3, 2016
Command: I
Purpose: Display memory as PETSCII.
Syntax: I [haddress 1 i [haddress 2 i]]
Command: J
Purpose: Display memory as screen code.
Syntax: J [haddress 1 i [haddress 2 i]]
94
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
Example:
Display memory from $400.
J 400
.0400
.0420 **** COMMODORE 64 BA
.0440 SIC V2 ****
.0460 64K RAM
Command: EC
Purpose: Display memory as binary. 10
Syntax: EC [haddress 1 i [haddress 2 i]]
B 3
EC D008
[D008 ...##...
[D009 ..####..
[D00A .##..##.
[D00B .######.
[D00C .##..##.
[D00D .##..##.
[D00E .##..##.
[D00F ........
95
USING THE MONITOR IDEDOS 0.90, April 3, 2016
Command: ES
Purpose: Display memory as sprite.
Syntax: ES [haddress 1 i [haddress 2 i]]
10.3.10 Backtrace
Command: BT
Purpose: Display call trace.
Syntax: BT
96
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
Example:
Do a backtrace. $1237, $1233 and $1230 are the caller JSR ad-
dresses, $30 is some pushed data.
A1230 20 33 12 JSR $1233
A1233 20 36 12 JSR $1236
A1236 08 PHP
A1237 20 3A 12 JSR $123A
A123A 00 BRK
A123B
G 1230
BRK EXCEPTION
ADDR AC XR YR SP BK DR NV-BDIZC
;1230 10 00 0A C6 07 0D 00110000
BT
1237 30 1233 1230 7A E3 1009 050E 10
Command: G
Purpose: Execute a routine, and return to monitor.
Syntax: G haddressi
10.4.2 Exit
Command: X
97
USING THE MONITOR IDEDOS 0.90, April 3, 2016
10.4.3 Quit
10
Command: Q
Purpose: Return to BASIC prompt from monitor.
Syntax: Q
Example:
Try to exit to BASIC prompt. Useful after hitting a BRK.
BRK EXCEPTION
ADDR AC XR YR SP BK DR NV-BDIZC
;1230 10 00 0A C6 07 0D 00110000
Q
Command: T
98
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
10.5.2 Compare
Command: C
Purpose: Compare a memory area with another.
Syntax: C hstart addressi hend i hstart2 i
10
Example:
Compare memory from $2000–$3FFF with $E000–$FFFF.
C 2000 3FFF E000
3FC0 3FC1 3FC2
10.5.3 Fill
Command: F
Purpose: Fill a memory area with the specified byte.
Syntax: F hstart addressi hend i hfill bytei
Example:
Fill memory $2–$FFFF with $00.
B 4
F 2 FFFF 0
99
USING THE MONITOR IDEDOS 0.90, April 3, 2016
10.5.4 Hunt
Command: H
Purpose: Search memory for a specific pattern.
Syntax: H hstart addressi hend i hpatterni
10.6 Miscellaneous
10.6.1 Bank
Command: B
Purpose: Select memory configuration and area.
Syntax: B hbank i
100
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
Banks 0–7 have the same meaning like the first 3 bits of $01,
banks 8–1E selects the drive’s memory with that device number.
Example:
Select bank 4.
B 4
10.6.2 RAM/ROM
Command: ∗
Purpose: Change between banks 4 and 7.
Syntax: ∗
Example:
Quick switch between RAM and ROM (bank 4 and 7) 10
ADDR AC XR YR SP BK DR NV-BDIZC
;EAB4 03 03 15 EA 07 08 00100101
*
RAM
R
ADDR AC XR YR SP BK DR NV-BDIZC
;EAB4 03 03 15 EA 04 08 00100101
Command: N
Purpose: Calculate an expression and display the result.
Syntax: N hexpressioni
101
USING THE MONITOR IDEDOS 0.90, April 3, 2016
N $0E00+23*SIN(1)
3603 0E13 0000111000010011 SN SN
10.6.4 View
Command: W
Purpose: Look at screen.
Syntax: W
Example:
Useful for finding the video bank after LEFTSHIFT + RESET.
W
Command: IV
Purpose: Restore I/O vertors.
Syntax: IV
Example:
Restore vectors at $314–$333.
IV
OK
Command: ←
Purpose: Push addresses to the “address stack”.
Syntax: ← haddressesi
102
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
Search for something, then put a ‘←’ before the address list, press
RETURN (push), then list with ‘D↑’, or with something else (pop).
The address stack is 8 address deep only.
Example:
An example using the astack.
H E000 FFFF 20 BA FF
¬E1DD E1F0 E22B E23F E24E
D
,E24E 20 BA FF JSR $FFBA
,E251 20 06 E2 JSR $E206
,E254 20 0E E2 JSR $E20E
D
,E23F 20 BA FF JSR $FFBA
,E242 20 06 E2 JSR $E206
,E245 20 00 E2 JSR $E200
D
,E22B 20 BA FF JSR $FFBA
,E22E 20 06 E2 JSR $E206
,E231 20 00 E2 JSR $E200
D
,E1F0 20 BA FF JSR $FFBA
,E1F3 20 06 E2 JSR $E206 10
,E1F6 20 00 E2 JSR $E200
D
,E1DD 20 BA FF JSR $FFBA
,E1E0 20 06 E2 JSR $E206
,E1E3 20 57 E2 JSR $E257
10.6.7 Scrolling
103
USING THE MONITOR IDEDOS 0.90, April 3, 2016
There’s support for two freeze points and a zeropoint. Unlike other
monitor programs the freeze and zero point instructions are restored
even if they were relocated since, but only the triggered one. In the
C64 version it’s possible to call the monitor with freeze points even
from configurations like 5. (I/O area must be available)
In the next example a freeze point is set at $1000. The SF com-
10 mand will insert a JSR call to the current location. The original code
will be restored8 when control returns to monitor by the JSR freeze
point. The I/O area must be available to return.
D 1000
,1000 SF 20 D0 INC $D020
,1003 4C 00 10 JMP $1000
,1006 B3 30 LAX ($30),Y
104
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
Key Function
F1 Scroll half screen up
F2 Scroll continuously up
F3 Scroll up
F5 Scroll down
F7 Scroll half screen down 10
F8 Scroll continuously down
CRSR Cursor move
INS Insert space
DEL Delete before cursor
HOME Cursor to top left
CLR Clear screen
RVSON, RVSOFF Set or reset inverse mode
RETURN Execute line
SHIFT + RETURN Go to beginning of next line
STOP Stop operation
C= + SHIFT Select character set
Table 11: Monitor editor keys
105
USING THE MONITOR IDEDOS 0.90, April 3, 2016
Command Function
@ [hcommand i] Disk command, status
@$ [hpatterni] Directory list
@# hdecimal numberi Select work drive
A haddressi hmnemonici Assemble to machine code
B hbank i Select memory bank
∗ Select RAM/ROM bank
BT Backtrace
C hstarti hend i hstart2 i Compare memory
D [hstarti [hend i]] Disassemble
, hstarti hhexi . . . Enter hex and disassemble
EC [hstarti [hend i]] Dump as character
[ hstarti hbinaryi Enter character data
10 ES [hstarti [hend i]] Dump as sprite
] hstarti hbinaryi Enter sprite data
F hstarti hend i hfill bytei Fill with byte
G haddressi Execute at address
H hstarti hend i hpatterni Search hex/any/text
I [hstarti [hend i]] Dump in PETSCII
´ hstarti htexti Write PETSCII data
IO Dump I/O registers
− hstarti hhexi . . . Write hex to I/O area
IV Restore I/O vectors
J [haddress 1 i [haddress 2 i]] Dump in screen code
. hstarti htexti Enter screen code
K " NAME " Defreeze memory
L " NAME " [hstarti] Load program
LB " NAME " hstarti Load binary data
106
IDEDOS 0.90, April 3, 2016 USING THE MONITOR
107
USING THE MONITOR IDEDOS 0.90, April 3, 2016
10
108
IDEDOS 0.90, April 3, 2016 DOS WEDGE
11 DOS Wedge
These are one or two character long commands to speed up some
frequently typed command at the BASIC prompt. Enable or disable
this feature in the setup utility under “3.1.7 Use DOS wedge”.
109
DOS WEDGE IDEDOS 0.90, April 3, 2016
110
IDEDOS 0.90, April 3, 2016 DOS WEDGE
Example:
To load a program from directory listing:
LIST
1 "TEST " IDE64
0 "PLUGINS" DIR
132 "2 PLANETS BY" FUN
45 "DRAZPAINT 2.0" PRG
41 "DRAZLACE V1.0" PRG
%4 "TASM",8 PRG
33 "SHUDDER.DRL" PRG
315 BLOCKS USED.
READY.
SEARCHING FOR TASM
LOADING $9000-$CF00
READY.
²
111
DOS WEDGE IDEDOS 0.90, April 3, 2016
DRAZLACE*
SEARCHING FOR DRAZLACE*
LOADING $0801-$3023
READY.
R³:
¬MYFILE
SAVING MYFILE $0801-$0932
11 READY.
²
£TASM
SEARCHING FOR TASM
LOADING $9000-$CF00
112
IDEDOS 0.90, April 3, 2016 DOS WEDGE
Loads the machine language program called ‘1//: SH’ from the system
drive and executes it. The last used device number will be placed at
$FF. The pointer $7A points to the rest of the non-tokenized command
line.
The assembly program in Listing 12 defines ‘# T’ to start Turbo
Assembler from ‘1// UTIL /: TASM’ from the system drive.
*=$334
jsr $79
cmp #"t" ;#T?
bne not
ldx $ba ;boot device
113
DOS WEDGE IDEDOS 0.90, April 3, 2016
ldy #1 ;,1
jsr $ffba ;setlfs
lda #nameend-name
ldx #<name
ldy #>name
jsr $ffbd ;setnam
lda #0
jsr $ffd5 ;load it!
bcs not ;error?
lda $ff
sta $ba ;restore last used device
jmp $9000 ;start tasm
11
name .text "1//util/:tasm"
nameend
114
IDEDOS 0.90, April 3, 2016 BASIC EXTENSIONS
12 BASIC extensions
On the following few pages the new and changed BASIC commands
are described. In the format descriptions everything between ‘[’ and
‘]’ is optional, and ‘hnamei’ means a parameter.
As a bugfix the ?SYNTAX ERROR bug of LIST command was fixed,
listing of BASIC programs protected by ‘REM L’ is not a problem
anymore.
Binary, octal, decimal and hexadecimal numbers are supported in
expressions:
PRINT %11; &11; 11; $11
3 9 11 17
READY.
²
CD"GAMES"
READY.
²
115
BASIC EXTENSIONS IDEDOS 0.90, April 3, 2016
12
12.4 CHANGE – change device number
Sends change device number to the last used or specified device.
(Same as ‘@ S -8’ or ‘@ S - D’) The short form is ‘CH A’.
Format:
CHANGE [hdevice # i]
Example:
Change device 12 to be device 8:
CHANGE12
READY.
²
116
IDEDOS 0.90, April 3, 2016 BASIC EXTENSIONS
DATE
THUR 08/12/04 08:51:18 PM
READY.
²
12
12.6 DEF – redefine F-keys
If you do not like the default F1–F8 function key assignment, then this
command can change it. The best practice to make this permanent to
put it into the boot file, and select “Power on” or “Always” in the
setup for “3.1.2 Start boot file”. Of course the “3.1.12 Function keys”
setting must be enabled to make use of the function keys. All 8 string
parameters are mandatory, if the string contains a CHR $(13) character
then a RETURN key press is simulated.
Format:
9 For date format see “15.4.8 Reading time from RTC”.
117
BASIC EXTENSIONS IDEDOS 0.90, April 3, 2016
DEF "hF1 i","hF3 i","hF5 i","hF7 i","hF2 i","hF4 i","hF6 i","hF8 i"
10 F1$ =" %0:* ": F2$ =" /0:* ": F3$ =" @$ :* "+ CHR$ (13)
20 F4 ="": F5$ =" LIST "+ CHR$ (13): F6$ =" SYS ."+ CHR$ (13)
30 F7$ =" RUN :"+ CHR$ (13): F8 =" MAN "+ CHR$ (13)
40 DEF F1$ , F3$ , F5$ , F7$ , F2$ , F4$ , F6$ , F8$
50 PRINT CHR$ (145) " " CHR$ (145) CHR$ (145);
60 NEW
Listing 13: This boot file redefines the F-keys, and cleans up the screen
118
IDEDOS 0.90, April 3, 2016 BASIC EXTENSIONS
HDINIT
Example:
HDINIT
MASTER:
ST9385AG
READY.
²
Example:
119
BASIC EXTENSIONS IDEDOS 0.90, April 3, 2016
KILL
BYE!
READY.
²
Example:
KILLNEW
READY.
²
12
12.12 LL – long directory list
Pretty verbose directory list for power users. First line is the directory
label, same parameters as for command DIR. No short form.
Format:
LL ["[[hpart # i][hpath i]:]"[,hdevice # i]]
Examples:
Simple listing:
LL
D--RWX- 1980-01-01 00:00:00
"WORK " DIR 560/5/36
120
IDEDOS 0.90, April 3, 2016 BASIC EXTENSIONS
Part Meaning
. DEL entry
- Normal file
- R Relative file
D Directory
L Link
C C Closed
D D Deletable
R R Readable
W W Writable
X X Loadable
- H Hidden
363 Size of file in bytes (block for non-IDE64) 12
2004-08-12 Date
16:12:13 Time
"LIST" Filename
TXT File type
568/12/4 Disk address (CHS or LBA)
Record length (only for relative files)
Table 13: LL list format
121
BASIC EXTENSIONS IDEDOS 0.90, April 3, 2016
122
IDEDOS 0.90, April 3, 2016 BASIC EXTENSIONS
form is ‘L O’.
Format:
LOAD ["[[hpart # i][hpath i]:]hfilenamei"[,hdevice # i[,hmode # i]]]
Example:
LOAD
SEARCHING FOR *
LOADING $0801-$099E
READY.
²
MKDIR"PICS",12
READY.
²
123
BASIC EXTENSIONS IDEDOS 0.90, April 3, 2016
RM"OLDSTUFF",8
READY.
²
RMDIR"OLDDIR"
READY.
²
124
IDEDOS 0.90, April 3, 2016 BASIC EXTENSIONS
Format:
SAVE "[[@][hpart # i][hpath i]:]hfilenamei"[,hdevice # i[,hmode # i]]
Example:
SAVE"TEST"
SAVING TEST $0801-$1A43
READY.
²
125
BASIC EXTENSIONS IDEDOS 0.90, April 3, 2016
Format:
VERIFY ["[[hpart # i][hpath i]:]hfilenamei"[,hdevice # i[,hmode # i]]]
Example:
VERIFY"TEST"
SEARCHING FOR TEST
VERIFYING $0801-$1A43
OK
READY.
²
126
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
13 Programming in assembly
13.1 Standard KERNAL routines
These routines work with all types of drives, you should use them
in your programs for compatibility with IDE64, RamLink and other
non-serial bus drives.
127
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
Bit Meaning
7 Device not present
6 End of File
5 (Tape CRC error)
4 Verify/read error (Tape read error)
3 (Tape long block)
2 (Tape short block)
1 Timeout on receive
0 Timeout on send
Table 15: Device status ($90)
128
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
Bit Meaning
7 Full error messages (LOADING, etc.)
6 KERNAL error messages (I/O ERROR#x)
5–0 Undefined
Table 16: Messages ($9D)
129
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
130
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
Sets filename and name length for OPEN, LOAD, and SAVE rou- 13
tines.
N OTE
The filename must be located below $D000 in memory. Don’t
forget to set $01 if it’s under the BASIC ROM before calling
OPEN , LOAD or SAVE !
131
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
132
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
133
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
Set standard input to the logical file number. This means now you
can use CHRIN, GETIN and READ on the file.
...
jsr open ;open file
ldx #0
jsr chrin ;get bytes
13 sta $400,x
...
134
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
Set standard output to the logical file number. This means now
you can use CHROUT and WRITE on the file.
...
jsr open ;open file
ldx #0
lda $400,x
jsr chrout ;write out data 13
...
135
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
Get a character from standard input. If it’s the screen the cursor
will appear and you can type in characters until RETURN.
...
jsr chkin
ldy #0
jsr chrin
sta data,y
iny
...
13 Listing 21: Read in a byte from a file
136
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
Get a character from standard input. If it’s the screen the last
pressed keys from the keyboard buffer will be be returned. If there is
none, then $00 will be returned.
...
jsr chkin
ldy #0
jsr getin
sta data,y
iny
... 13
Listing 22: Read in a byte from a file
...
jsr clrchn ;keyboard/screen
...
wait jsr getin ;get key
beq wait ;nothing pressed?
137
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
lda #$00
jsr chrout ;write 0
...
13
138
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
Forget about all files and set standard input and output to keyboard
and screen.
N OTE
In it’s standard implementation this call wipes out the open files
table without closing the files for real. You should close files by
using the CLOSE call, as this call is only intended to be used at the
beginning of programs to make sure all files are closed. However
IDEDOS will close it’s own files to reduce the chance of creating
splat files.
13
jsr clall ;close files, default I/O
jmp run ;run program
Listing 25: Make sure all files are closed before starting
139
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
Listing 26: Set standard keyboard and screen for in and output
13
140
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
141
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
jsr load
bcc loadok
...
rts
13
142
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
databegin = $fb
lda #<$1000
sta databegin ;begin
lda #>$1000
sta databegin+1
143
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
lda #databegin
ldx #<$8000
ldy #>$8000 ;end
jsr save
...
name .text "filename"
Accu Meaning
0 Routine terminated by the STOP key
1 Too many open files
2 File already open
3 File not open
4 File not found
5 Device not present
6 File is not an input file
7 File is not an output file
13 8 File name is missing
9 Illegal device number
16 Out of memory (LOAD)
24 File data error (SAVE)
240 Top-of-memory change RS-232 buffer (de)allocation
Table 20: Error codes returned by IDEDOS and KERNAL
144
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
If you want that your application using READ or WRITE calls remain
still runnable on a not IDE64 equipped machine, check for IDE64
presence before calling these two calls, and use standard routines in-
stead. (Imagine what happens at JSR $DEF1 if there’s open I/O space
at $DE00–$DEFF. . . )
lda $de60 ;check IDE64
cmp #$49
bne old
lda $de61
cmp #$44
bne old
lda $de62
cmp #$45
bne old
lda #zp 13
jsr $def1
bcs old2 ;write not available?
rts
Listing 29: Detect IDE64 before write and workaround if not present
145
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
notaction
... ;IDE64 detection as above
146
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
ldx #channel
jsr chkout ;do select output
bcs end ;error happened
147
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
ldy #0
lda (pointer),y
jsr chrout
lda $90 ;status
bne end2 ;error during write
lda wnum
bne at2
dec wnum+1
at2 dec wnum
inc pointer
bne loop
inc pointer+1
jmp loop
148
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
rts
Load data block from a IDE64 drive. Much faster than a lot of
CHRIN or GETIN.
To avoid possible compatibility problems make sure that there’s
an IDE64 installed (13.2.1 IDE64 card detection), and consider in-
cluding the byte-by-byte replacement, as shown in “13.2.3 WRITE –
replacement”!
13
N OTE
This routine does not load under I/O. (e.g. reading to $D800 will
overwrite color RAM)
149
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
ldx #<inputname
ldy #>inputname
jsr setnam
jsr open ;open input file
lda #<startadd
sta $fb
lda #>startadd ;buffer start address
sta $fc
ldx #2
jsr chkout ;set output to dest. file
150
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
lda #$fb
jsr write ;write
plp ;status
bvc loop ;test end of file
lda #2
jsr close ;close output file
lda #1
jsr close ;close input file
jsr clall ;set default I/O device
rts
13
13.2.5 READ – replacement
151
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
sta pointer
lda $01,x
sta pointer+1 ;copy pointer
ldx #channel
jsr chkin ;do select output
bcs end ;error happened
jsr chrin
ldx $90 ;status
beq ok
cpx #$40
bne end2 ;error happened
ok ldy #0
sta (pointer),y
13 lda rnum
bne at2
dec rnum+1
at2 dec rnum
clc
txa
bne end ;end of file reached
inc pointer
bne loop
152
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
inc pointer+1
jmp loop
Many programs use serial bus specific KERNAL calls which won’t
work with IDE64 drives. Such code has to be rewritten to use standard
KERNAL calls. Here’s a list of problematic routines, and what to do
with them:
153
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
Serial bus file open and close. Can be replaced by OPEN and
CLOSE .
Read and write a byte from and to the serial bus, can be replaced
by CHRIN and CHROUT.
154
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
Sometimes it’s used to restore the IRQ and NMI vectors, and a
simple remove will break the program. See Listing 34 for vector table
restore.
restor ldy #$05
lp lda $fd30,y ;restore interrupt
sta $314,y ;vectors from kernal
dey
bpl lp
rts
155
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
156
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
157
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
lda #$00
sta $90
ldy #3 ldy #3
158
IDEDOS 0.90, April 3, 2016 PROGRAMMING IN ASSEMBLY
159
PROGRAMMING IN ASSEMBLY IDEDOS 0.90, April 3, 2016
Listing 38: A classic serial bus specific directory lister routine. The right
column shows the standard KERNAL version
13
160
IDEDOS 0.90, April 3, 2016 PCLINK
14 PCLink
IDEDOS also supports a special “PCLink” device, which is a network
virtual drive. It’s mostly implemented on the host computer using a
server software called “ideservd”.
PCLink is most widely used for file transfers between the C64
and the host computer’s filesystem, as the host’s files and directories
can be directly accessed. Beyond file transfers it also supports all
(except seeking and direct access) operations which are possible with
a normal drive.
161
PCLINK IDEDOS 0.90, April 3, 2016
This connection is made between the parallel port of the host com-
puter and the user port of a C64 using a cable similar to Laplink. The
layout is the same as for the PC64 cable. The maximal transfer speed
is around ∼9 kB/s.
N OTE
There are no optional wires here, so if you have an old PCLink
cable, then check if B and FLAG are connected!
162
IDEDOS 0.90, April 3, 2016 PCLINK
WARNING !
Incorrectly built cable can damage the printer and/or userport!
Same for plugging the cable while the computers are turned on. . .
163
PCLINK IDEDOS 0.90, April 3, 2016
164
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
15 Command channel
This section is about the DOS commands known by IDEDOS. Some
examples use the DOS wedge like ‘@ I’, of course the ‘@’ at the
beginning of line is not part of the command.
In the format descriptions everything between ‘[’ and ‘]’ is op-
tional, and ‘hnamei’ means a parameter.
15.1.1 Position
Seeking is supported in both relative and regular files. The format for
a relative file is:
Format:
" P "+ CHR $(hchannel # i)+ CHR $(hrecord bits 0–7 # i)+
CHR $(hrecord bits 8–15 # i)+ CHR $(hcharacter # i)
For compatibility with other systems two more forms are avail-
able. These can’t be used to position beyond the end of file.
165
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
N OTE
These two command interfaces ( F -P and F - P :) are not stable
(but works as expected), and the format may change in future.
(this does not depend on me of course) Avoid the use of these in
your programs for now.
Format:
" F -P"+ CHR $(hchannel # i)+ CHR $(hposition bits 0–7 # i)+
CHR $(hposition bits 8–15 # i)+ CHR $(hposition bits 16–23 # i)+
CHR $(hposition bits 24–31 # i)
" F - P :"; hchannel # i; hposition bits 0–7 # i; hposition bits 8–15 # i;
hposition bits 16–23 # i; hposition bits 24–31 # i
Whenever a new position command is issued, it will flush the file’s
write buffer to disk if it was dirty. It’s possible to seek beyond the end
of file and write new data there, in this case the file will be extended
and those bytes between the old file end and the current position will
all become CHR$(0). It’s called a “hole”, because this part of file does
not use any disk space until it’s overwritten with useful data.
10 OPEN 15 ,12 ,15: OPEN 4 ,12 ,4 , " FILE ,L"
20 P$ = CHR$ (44) CHR$ (1) CHR$ (10)
15 30 PRINT #15 , "P" CHR$ (4) P$
40 GET #4 , A$ : CLOSE 4: CLOSE 15
Listing 39: Seek in a relative file to the 300th record’s 10th byte and read it.
(counting begins at record 1 and byte 1)
166
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
@I
00, OK,000,000,000,000
15.2.2 Scratch
167
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
Format:
" S[hpartition # i]:hfile namei[=hfile typei][,hfile namei[=hfile typei]]"
" S[hpartition # i][/hpath i/]:hfile namei[=hfile typei]
[,[hpartition # i][/hpath i/]:hfile namei[=hfile typei]]"
Examples:
Delete all files in the current working directory:
@S:*
01, FILES SCRATCHED,028,000,000,000
Delete files called ‘FILE’ with any type:
@S:FILE
01, FILES SCRATCHED,003,000,000,000
Delete all files with type ‘BAK’:
@S:*=BAK
01, FILES SCRATCHED,009,000,000,000
Delete the file called ‘FILE,PRG’
@S:FILE=PRG
01, FILES SCRATCHED,001,000,000,000
Delete the file called ‘FILE,PRG’ in partition 3.
@S3:FILE=PRG
01, FILES SCRATCHED,001,000,000,000
Delete all files with file type ‘OLD’ and ‘BAK’ in directory called
15
‘STUFF’.
@S/STUFF/:*=OLD,*=BAK
01, FILES SCRATCHED,015,000,000,000
Delete all files with file type ‘OLD’ and ‘BAK’ in directory called
‘STUFF’, and everything from ‘STUFF/BAK’
@S/STUFF/:*=OLD,*=BAK,/STUFF/BAK/:*
01, FILES SCRATCHED,043,000,000,000
168
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
@R:NEW,SEQ=OLD,PRG
00, OK,000,000,000,000 15
@R/DEST/:NEW,SEQ=/SOURCE/:OLD,PRG
00, OK,000,000,000,000
169
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
15.2.4 Lock
15.2.5 Hide
Format:
170
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
171
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
172
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
If you want to temporary change the device number (until next reset)
send ‘" U 0>"+ CHR $(hnewi)’ to the device.
Format:
" U 0>"+ CHR $(hnew drive # i)
" S -8"
" S -9"
"S-D"
Example:
This drive will be device 8 from now on
OPEN 15,12,15,"U0>"+CHR$(8):CLOSE15
An easier typed variant is the ‘S -8’, ‘S -9’ and ‘S - D’. The last one
restores the default device number.
Examples:
This drive will be device 8 from now on
15
@S-8
00, OK,000,000,000,000
@S-D
00, OK,000,000,000,000
173
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
The ‘G - D’ command can be used to get the disk change status byte,
which is followed by CHR$(13). If it’s non-zero then the disk has
been changed or removed since the last operation. Only the next
filesystem access will clear the disk change status.
10 OPEN 15 ,13 ,15 , "G -D"
20 GET #15 , A$ , B$ : CLOSE 15: A= ASC ( A$ + CHR$ (0))
30 IF A < >0 THEN PRINT " DISK CHANGED "
Listing 43: Disk change detection example
174
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
Example:
@UJ
73, IDE DOS V0.90 IDE64,000,000,000,000
It’s possible to enter or exit power saving mode if the drive supports
it.
Format:
" U 0> P 0"
" U 0> P 1"
" U 0>P"
Examples:
Spin down drive
@U0>P0
00, OK,000,000,000,000
Spin up drive
@U0>P1
00, OK,000,000,000,000
175
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
More useful on CD-ROM, DVD, Zip drive and LS-120 than on hard
disk. Don’t forget to unlock the medium before eject! (See “15.4.7
Lock or unlock medium”!)
Format:
" U 0> E 0"
" U 0> E 1"
Examples:
Load medium (CD-ROM and DVD only)
@U0>E0
00, OK,000,000,000,000
Eject medium
@U0>E1
00, OK,000,000,000,000
176
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
Lock medium
@U0>L1
00, OK,000,000,000,000
Sending ‘T- RA’ will read the current time in PETSCII, ‘T- RB’ in BCD,
while ‘T- RD’ in decimal.
Format:
" T- RA "
" T- RB "
" T- RD "
Byte Meaning
0 Day 0–6: 0→Sunday, 1→Monday, . . .
1 Year 00–99: 0→2000, . . . , 79→2079, 80→1980, . . .
2 Month 1–12: 1→January, . . .
3 Date 1–31
4 Hour 1–12
5 Minute 0–59
6 Second 0–59
7 AM/PM: 0→AM, else PM
15
Table 27: T-RB and T-RD data format
Example:
Get the current time in human readable form (day of week, month,
date, year, hour, minutes, seconds, AM or PM).
@T-RA
SAT. 08/07/04 07:42:48 PM
177
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
Format:
" N =hformat codei"
Code Meaning
720K Double density disk with 720 kB capacity (LS-120)
1.2M High density disk with 1200 kB capacity (LS-120)
1.44M High density disk with 1440 kB capacity (LS-120)
120M SuperDisk with 120 MiB capacity (LS-120)
15
Table 28: Disk format codes
Example:
Format a 1.44 MB disk
@N=1.44M
00, OK,000,000,000,000
13 CFSfdisk is described in section “4 Preparing a blank disk”.
178
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
Software write protect switch for the entire drive. This is not perma-
nent, but a simple reset won’t disable it.
Format:
" W-0"
" W-1"
Example:
Enable write protection.
@W-1
00, OK,000,000,000,000
15.5.1 Identify
Format:
" B = R "+ CHR $(hchannel # i)+ CHR $(0)+ CHR $(0)+ CHR $(0)+ CHR $(0)
Format:
" B = R "+ CHR $(hchannel # i)+ CHR $(hhead # i)+
CHR $(hcylinder bits 8–15 # i)+ CHR $(hcylinder bits 0–7 # i)+
CHR $(hsector # i)
" B = R "+ CHR $(hchannel # i)+ CHR $(h64+LBA bits 24–27 # i)+
179
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
CHR $(hLBA bits 16–23 # i)+ CHR $(hLBA bits 8–15 # i)+
CHR $(hLBA bits 0–7 # i)
Format:
" B = P "+ CHR $(hchannel # i)+ CHR $(hposition bits 0–7 # i)+
CHR $(hposition bits 8–15 # i)
" B - P :"; hchannel # i; hposition bits 0–7 # i; hposition bits 8–15 # i
Format:
" B = W "+ CHR $(hchannel # i)+ CHR $(hhead # i)+
CHR $(hcylinder bits 8–15 # i)+ CHR $(hcylinder bits 0–7 # i)+
CHR $(hsector # i)
" B = W "+ CHR $(hchannel # i)+ CHR $(h64+LBA bits 24–27 # i)+
CHR $(hLBA bits 16–23 # i)+ CHR $(hLBA bits 8–15 # i)+
CHR $(hLBA bits 0–7 # i)
180
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
Format:
" CD[hpartition # i]:hpath i"
" CD←"
" CD /hpath i"
Example:
@CD:NEWDIR
00, OK,000,000,000,000
All directories of the path must be executable. Also the current work-
ing directory is changed to the new root. This command only works
on CFS formatted partitions. There’s no way to get back to the par-
tition’s real root directory, except the HDINIT BASIC command. A
simple reset won’t disable this.
Of course if you’ve changed the root directory of partition 1 on the
system drive, then the boot file, manager configuration file, plugins,
and the DOS wedge shell will be searched by IDEDOS according to
the new root directory.
Format:
" CR[hpartition # i]:hpath i"
15
" CR←"
" CR /hpath i"
Example:
@CR:BBSSANDBOX
00, OK,000,000,000,000
181
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
182
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
183
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
Format:
" U 0> CA "+ CHR $(hend frame # i)+ CHR $(hend second # i)+
CHR $(hend minute # i)+ CHR $(hstart frame # i)+
CHR $(hstart second # i)+ CHR $(hstart minute # i)
This command starts fast forward and reverse from the specified po-
sition until the end of disc. The direction and the position format is
specified by the mode byte, as described in Table 29.
MSF position It’s the elapsed time from the beginning of the
disc, first byte is the frame, then second and minute, while the
fourth is reserved (0).
15 Format:
" U 0> CF "+ CHR $(hpos1 # i)+ CHR $(hpos2 # i)+ CHR $(hpos3 # i)+
CHR $(hpos4 # i)+ CHR $(hmode # i)
Example:
Fast forward from track 2:
PRINT#15,"U0>CF"CHR$(2)CHR$(0)CHR$(0)CHR$(0)CHR$(128)
184
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
Format:
" U 0> CP 0"
" U 0> CP 1"
" U 0> CS "
Examples:
Pause playback
@U0>CP0
00, OK,000,000,000,000 15
Continue playback
@U0>CP1
00, OK,000,000,000,000
Stop playback
@U0>CS
00, OK,000,000,000,000
185
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
This command lets control the output volume of CD-ROM drive. Out-
put/channel 0 is the left side, while output/channel 1 is the right.
Format:
" U 0> CV "+ CHR $(h# i)+ CHR $(h# i)+ CHR $(h# i)+ CHR $(h# i)+
CHR $(h# i)+ CHR $(h# i)+ CHR $(h# i)+ CHR $(h# i)
Byte Meaning
0 Output port 0 channel selection (0–15)
1 Output port 0 volume (0–255)
2 Output port 1 channel selection (0–15)
3 Output port 1 volume (0–255)
4 Output port 2 channel selection (0–15)
5 Output port 2 volume (0–255)
6 Output port 3 channel selection (0–15)
7 Output port 3 volume (0–255)
Table 30: Volume control format
10 OPEN 15 ,12 ,15
20 V$ = CHR$ (2)+ CHR$ (128)+ CHR$ (1)+ CHR$ (128)
30 V$ = V$ + CHR$ (0)+ CHR$ (0)+ CHR$ (0)+ CHR$ (0)
15 40 PRINT #15 , "U0 > CV " V$
50 CLOSE 15
Listing 45: Reverse left and right speakers, and -6dB amplification
186
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
Value Meaning
0 Output port muted
1 Audio channel 0
2 Audio channel 1
3 Audio channel 0 and 1 mixed
4 Audio channel 2
8 Audio channel 3
15 All mixed
Table 31: Output channel selection
50 CLOSE 15
Listing 46: Mono output on left speaker only, full volume
This command returns the current settings from the CD-ROM drive
in a structure described in Table 30, plus a CHR$(13) at the end.
Format:
" U 0> C V"
0 print " drive ": input dr
10 open 15 , dr ,15 , "u0 > cV " 15
20 get #15 , a$
30 if a$ < chr$ (16) then 60
40 input #15 , b$ ,c$ ,d$ , e$ : rem error
50 print a$ ;b$ ,c$ ,d$ , e$ : goto 90
60 get #15 , b$ ,c$ ,d$ ,e$ ,f$ ,g$ ,h$ , i$
70 print " left channel :" asc ( b$ + chr$ (0))
80 print " right channel :" asc ( d$ + chr$ (0))
90 close 15
187
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
This command returns the CD-ROM media type in one byte, plus a
CHR$(13) at the end.
Format:
" U 0> CM "
0 PRINT " DRIVE ": INPUT DR
10 OPEN 15 , DR ,15 , "U0 > CM ": GET #15 , A$ , B$ : CLOSE 15
15 IF ST < >64 THEN PRINT " NOT SUPPORTED ": END
20 T= ASC ( A$ + CHR$ (0)): A=T AND 15: B= INT (T /16)
30 IF B =7 AND A =0 THEN PRINT " NO CD IN DRIVE ": END
40 IF B =7 AND A =1 THEN PRINT " TRAY OPEN ": END
50 IF B =7 AND A =2 THEN PRINT " FORMAT ERROR ": END
60 IF B =1 AND A <9 THEN PRINT "CD -R ";
70 IF B =2 AND A <9 THEN PRINT "CD -E ";
80 IF B =3 AND A =0 THEN PRINT " HD UNKNOWN ": END
90 IF B =3 AND A =1 THEN PRINT " HD 120 MM ": END
100 IF B =3 AND A =5 THEN PRINT " HD 80 MM ": END
110 IF B >2 OR A >8 THEN PRINT "?": END
120 IF A >0 AND A <5 THEN PRINT " 120 MM "
130 IF A >4 AND A <9 THEN PRINT " 80 MM "
15 140 IF A =0 THEN PRINT " UNKNOWN "
150 IF A =1 OR A =5 THEN PRINT " DATA "
160 IF A =2 OR A =6 THEN PRINT " AUDIO "
170 IF A =3 OR A =7 THEN PRINT " DATA AND AUDIO "
180 IF A =4 OR A =8 THEN PRINT " MULTISESSION "
Listing 48: This small program will display the medium type in CD-ROM
drive
188
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
189
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
280 IF C (3) AND 64 THEN PRINT " UPC CODE SUPPORT "
290 IF C (4) AND 1 THEN PRINT " MEDIA LOCKABLE "
300 PRINT " MEDIA CURRENTLY ";
302 IF (C (4) AND 2)=0 THEN PRINT " UN ";
305 PRINT " LOCKED "
310 PRINT " MEDIA LOCK JUMPER ";
312 IF (C (4) AND 4)=0 THEN PRINT " NOT ";
315 PRINT " SET "
320 IF C (4) AND 8 THEN PRINT " MEDIA EJECTABLE "
330 PRINT " LOADING MECHANISM : " ;: A= INT (C (4)/32)
340 IF A =0 THEN PRINT " CADDY "
350 IF A =1 THEN PRINT " TRAY "
360 IF A =2 THEN PRINT " POP - UP "
370 IF A =3 OR A >5 THEN PRINT " UNKNOWN "
380 IF A =4 THEN PRINT " CHANGER WITH DISCS "
390 IF A =5 THEN PRINT " CHANGER USING CARTRIDGE "
400 IF (C (5) AND 1)=0 THEN PRINT " NO ";
405 PRINT " SEPARATE VOLUME CONTROL "
410 IF (C (5) AND 2)=0 THEN PRINT " NO ";
420 PRINT " SEPARATE VOLUME MUTING "
430 IF C (5) AND 4 THEN PRINT " CAN REPORT SLOT "
440 IF C (5) AND 8 THEN PRINT " CAN SELECT SLOT "
450 SP = INT (( C (6)*256+ C (7)+88)/176)
460 PRINT " MAXIMUM SPEED :" SP "X"
470 PRINT " VOLUME LEVELS :"C (8)*256+ C (9)
480 PRINT " BUFFER SIZE :"C (10)*256+ C (11) " KB "
490 PRINT " CURRENT SPEED :";
500 PRINT INT (( C (12)*256+ C (13)+88)/176) "X"
15 Listing 49: This little longer program will display all information this com-
mand can return.
190
IDEDOS 0.90, April 3, 2016 COMMAND CHANNEL
It’s included for compatibility. It reads from a fake ROM filled with
the message ‘IDE64 CARTRIDGE ’ or depending on the ‘CMD em-
ulation’ setting14 in the setup utility it can also be the text ‘CMD HD
EMULATED IDE64 CARTRIDGE ’.
Format:
" M - R "+ CHR $(haddress bits 0–7 # i)+ CHR $(haddress bits 8–15 # i)+
CHR $(hnumber of bytes # i)
15.8.3 Validate
It’s included for compatibility, has no effect. Use the CFSfsck15 util- 15
ity to check filesystem integrity.
Format:
" V[hpartition # i]"
191
COMMAND CHANNEL IDEDOS 0.90, April 3, 2016
15
192
IDEDOS 0.90, April 3, 2016 IDEDOS ERROR MESSAGES
193
IDEDOS ERROR MESSAGES IDEDOS 0.90, April 3, 2016
194
IDEDOS 0.90, April 3, 2016 IDEDOS ERROR MESSAGES
195
IDEDOS ERROR MESSAGES IDEDOS 0.90, April 3, 2016
70: NO CHANNEL
Channel number incorrect for direct access commands, or for
the seek command. Tried to reopen an already open channel,
196
IDEDOS 0.90, April 3, 2016 IDEDOS ERROR MESSAGES
197
IDEDOS ERROR MESSAGES IDEDOS 0.90, April 3, 2016
16
198
IDEDOS 0.90, April 3, 2016 COMPATIBILITY
17 Compatibility
17.1 Hardware
17.1.1 Commodore serial drives, datassette
Of course they work. There’s also fastload support for 1541, 1570,
1571 and 1581. Datassette is supported, if KERNAL supports it.
These hardware use the same I/O space as the IDE64 cartridge, so
they won’t work.
Works fine when attached to the clock-port of the V4.1 or V4.2 ver-
sion of the cartridge. With V2.1 it works if Retro Replay is jumpered 17
to be flashed. (this way there’s no I/O space conflict) Versions V3.1,
V3.2, V3.4 and V3.4+ require a cartridge port expander, otherwise
it’s the same as for V2.1.
199
COMPATIBILITY IDEDOS 0.90, April 3, 2016
Probably does not work on C64, but needs more testing. RL-DOS
won’t work with IDEDOS if using SuperCPU.
As these are serial drives and they should work. They are supported
by the manager too.
With some versions of the 64HDD hard disk emulator program you
have to turn off the “3.1.3 Disk fastloader” option in the setup. (The
problem is that 64HDD simply can’t deal with the multiple channels
open at the same time on the drive case. . . )
200
IDEDOS 0.90, April 3, 2016 COMPATIBILITY
It’s detected and used. (tested with v6.01) The built-in DOS Wedge
has higher priority, if you want to use the JiffyDOS one then disable
it in the setup utility!
Loading, saving and file reading in manager is accelerated if the
drive has JiffyDOS, even if there’s no JiffyDOS ROM installed in
the computer (selectable at compile time). If you get sometimes a
‘?LOAD ERROR’ during the load of directory from a JiffyDOS drive,
then that’s not a bug in IDEDOS. The original JiffyDOS load routine
tries to workaround this by retrying IECIN, and this causes an endless
loop until STOP is pressed. I prefer getting an error over waiting
forever. . .
Works, not touched. RamDOS does not work, but if someone is in-
terested it’s possible to support it.
201
COMPATIBILITY IDEDOS 0.90, April 3, 2016
IEEE-488 does not work, because the IDE64 cartridge cannot manip-
ulate the EXROM line.
Works fine, may need an cartridge port expander. Supported for serial
PCLink by IDEDOS.
Use modern LBA capable hard disks and LBA formatted partitions if
possible. Then it’s much faster to scratch files, check filesystem, etc.
202
IDEDOS 0.90, April 3, 2016 COMPATIBILITY
17.2 Software
This version of IDEDOS does not support auto starting programs, so
use the KILL command before loading them from floppy.
Programs using serial bus specific routines, custom loaders (IRQ
or fast loaders), and direct disk access won’t work with IDEDOS de-
vices of course, as the IDE64 cartridge is neither attached to the serial
bus, nor is a floppy drive emulator.
17
203
COMPATIBILITY IDEDOS 0.90, April 3, 2016
17
204
IDEDOS 0.90, April 3, 2016 UPDATING IDEDOS
18 Updating IDEDOS
The IDE64 interface cartridge is equipped with
64, 128 or 512 KiB flash memory (AT29C512,
AT29C010, SST39SF040) for the firmware.
The content of flash memory is non-volatile
and can be updated, so you can always run the
latest firmware with the new features and bug
fixes.
Updating IDEDOS is very easy and does
not require any special skills. The cartridge
was designed so that it’s always possible to up-
date the firmware even if it was messed up, so
you can’t render your cartridge unusable by an
interrupted update or wrong firmware. Figure 8: 128 KiB
With a SuperCPU equipped machine it’s PEROM upgrade for
necessary to change between the two versions cartridges older than
of IDEDOS depending on the presence of Su- V3.4+
perCPU. Updating firmware every time you
want to use IDE64 with or without the SuperCPU can be frustrat-
ing. By using a 128 or 512 KiB flash memory it’s possible to change
the firmware fast and avoid time wasting updates. (starting from ver-
sion V3.4+ of the cartridge, upgrade of older cartridges is possible
but requires soldering and electronic skills!)
1. Get the latest Perom programmer and the new firmware and 18
copy both to a serial bus drive. (e.g. floppy drive, CMD HD,
205
UPDATING IDEDOS IDEDOS 0.90, April 3, 2016
etc.) If you’ve got a PCLink cable it’s also possible to use it for
update. (and it’s much faster)
2. Plug the cartridge into the expansion port first, while the com-
puter is switched off. Removing of SuperCPU is not necessary,
it can speed up the update (JiffyDOS and 20 MHz), however if
you are having trouble you may remove it. The IDE64 V4.1
and V4.2 cartridge can only be updated when the SuperCPU is
disabled.
3. There are two squares near the big Lattice chip and the 8 pin
DS1302 called PGM. By connecting these 2 squares on board
together you can enable flash update. (use screwdriver) Newer
version of the IDE64 cartridge have pins instead of squares,
and you have to use a jumper to connect them. (see picture)
The V4.1 and V4.2 cartridge has the programming jumper near
the IDE port.
18 4. If using a greater than 64 KiB flash memory, then select the
bank you want to program by the switch!
206
IDEDOS 0.90, April 3, 2016 UPDATING IDEDOS
WARNING !
Never change bank or set the programming pins while IDEDOS
is running! You will trash your disks seriously.
5. Now you can turn on your computer or press reset if it’s al-
ready on. The green led should blink now, except if you have
your SuperCPU enabled, then it’s off. If the led is steady on
it means the flash write protect is still enabled, this case retry
from the beginning. (it’s not easy to connect the 2 squares on
older cartridges for the first try. . . )
7. Load the Perom programmer and start it. It should start with
the screen shown in the picture. (if using v1.1) Now you may
backup your current IDEDOS if you want, and update to the
latest from PCLink or disk. At least version v1.5 is required for
the V4.1, version v1.9 for the V4.2 cartridge. Now select the
action with the CRSR keys and hit RETURN.
N OTE
Erasing of PEROM chip is not needed before programming, so
do not select it unless you have reasons to do so. It cleans out all
64 KiB banks!
18
207
UPDATING IDEDOS IDEDOS 0.90, April 3, 2016
8. After selecting one of the update menu items the program will
ask for device number and filename. Leaving the filename
blank cancels the update. If the program says it cannot find
the PEROM then make sure you removed the jumper! (also
it’s not recommended using pencil for connecting the squares
because the remaining carbon may permanently connect them
unless cleaned)
9. If the filename was correct and the PCLink server was run-
ning then the programming should start. A box filled with
characters will appear on screen each character representing a
128 byte sector of flash memory. During the rewrite this area
18 will be filled. If finished you get an “Update successful” mes-
sage. If hexadecimal numbers appear in the right corner of the
208
IDEDOS 0.90, April 3, 2016 UPDATING IDEDOS
screen and you get “Update failed” then better clean the con-
tacts of your cartridge and connect it directly without any port
expander. This can also mean that you’ve exceeded the typical
10000 rewrites for some sectors, which is very unlikely. (or the
flash memory is just failing for some other unknown reason)
Also disk errors may interrupt the update, this case get a new
disk and retry the update.
10. Now if ready (“Update successful”) you may leave the program
and press reset to start the new firmware. If using older versions
of the firmware (before 0.9x) then power cycle the computer!
18
209
UPDATING IDEDOS IDEDOS 0.90, April 3, 2016
18
210
IDEDOS 0.90, April 3, 2016 FILESYSTEM CHECKING
19 Filesystem checking
As you might already noticed there’s no built in “validate” command
in IDEDOS. This is not a mistake, checking and repairing the com-
plex structures of the CFS filesystem as fast as possible needs lots of
memory, and sometimes choices have to be made.
The filesystem integrity check tool for the CFS filesystem is called
“CFS 0.11 Filesystem check v0.05a”, or short “CFSfsck”.
The partition table integrity is checked by the CFSfdisk tool. Each
partition holds a separate CFS filesystems, this is what’s checked by
CFSfsck.
This tool can check one filesystem (partition) at a time by look-
ing into all directories and checking all metadata for problems. It
will automatically recover space not allocated to any file (not likely,
but non-closed files may sometimes cause this), and allocates non-
allocated file data if any (this shouldn’t happen). Also it’ll remove all
non-closed files. Everything else needs a confirmation.
211
FILESYSTEM CHECKING IDEDOS 0.90, April 3, 2016
Invalid root directory The root directory is not inside the partition,
or does not have a valid signature, or could not be read because
of a disk error.
Choices: none
Fix: Manually by disk editor, or reformatting of the partition.
212
IDEDOS 0.90, April 3, 2016 FILESYSTEM CHECKING
Filelength too short There’s additional data beyond the file’s end,
which cannot be accessed, because the file’s size in the direc-
tory entry is incorrect. Most likely the file was not closed after
an append, or relative file expansion.
Choices: Ignore: Do nothing, Fix: Increase the file’s length.
Note: If the current size is OK, then make a copy of this file
and delete the original. This may be the case with some old
beta IDEDOS 0.9x versions.
213
FILESYSTEM CHECKING IDEDOS 0.90, April 3, 2016
19
214
IDEDOS 0.90, April 3, 2016 FREQUENTLY ASKED QUESTIONS
20
215
FREQUENTLY ASKED QUESTIONS IDEDOS 0.90, April 3, 2016
20
216
IDEDOS 0.90, April 3, 2016 GNU FDL
<http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document,
but changing it is not allowed.
Preamble
This License applies to any manual or other work, in any medium, that contains a
notice placed by the copyright holder saying it can be distributed under the terms of this
License. Such a notice grants a world-wide, royalty-free license, unlimited in duration,
to use that work under the conditions stated herein. The “Document”, below, refers to
any such manual or work. Any member of the public is a licensee, and is addressed
217
21
GNU FDL IDEDOS 0.90, April 3, 2016
as “you”. You accept the license if you copy, modify or distribute the work in a way
requiring permission under copyright law.
A “Modified Version” of the Document means any work containing the Docu-
ment or a portion of it, either copied verbatim, or with modifications and/or translated
into another language.
A “Secondary Section” is a named appendix or a front-matter section of the Doc-
ument that deals exclusively with the relationship of the publishers or authors of the
Document to the Document’s overall subject (or to related matters) and contains noth-
ing that could fall directly within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any mathematics.) The
relationship could be a matter of historical connection with the subject or with related
matters, or of legal, commercial, philosophical, ethical or political position regarding
them.
The “Invariant Sections” are certain Secondary Sections whose titles are desig-
nated, as being those of Invariant Sections, in the notice that says that the Document is
released under this License. If a section does not fit the above definition of Secondary
then it is not allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant Sections then there
are none.
The “Cover Texts” are certain short passages of text that are listed, as Front-Cover
Texts or Back-Cover Texts, in the notice that says that the Document is released under
this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may
be at most 25 words.
A “Transparent” copy of the Document means a machine-readable copy, repre-
sented in a format whose specification is available to the general public, that is suitable
for revising the document straightforwardly with generic text editors or (for images
composed of pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or for automatic trans-
lation to a variety of formats suitable for input to text formatters. A copy made in an
otherwise Transparent file format whose markup, or absence of markup, has been ar-
ranged to thwart or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount of text. A copy
that is not “Transparent” is called “Opaque”.
Examples of suitable formats for Transparent copies include plain ASCII without
markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly
available DTD, and standard-conforming simple HTML, PostScript or PDF designed
218
21
IDEDOS 0.90, April 3, 2016 GNU FDL
for human modification. Examples of transparent image formats include PNG, XCF
and JPG. Opaque formats include proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or processing
tools are not generally available, and the machine-generated HTML, PostScript or PDF
produced by some word processors for output purposes only.
The “Title Page” means, for a printed book, the title page itself, plus such follow-
ing pages as are needed to hold, legibly, the material this License requires to appear in
the title page. For works in formats which do not have any title page as such, “Title
Page” means the text near the most prominent appearance of the work’s title, preceding
the beginning of the body of the text.
The “publisher” means any person or entity that distributes copies of the Docu-
ment to the public.
A section “Entitled XYZ” means a named subunit of the Document whose title
either is precisely XYZ or contains XYZ in parentheses following text that translates
XYZ in another language. (Here XYZ stands for a specific section name mentioned be-
low, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.)
To “Preserve the Title” of such a section when you modify the Document means that
it remains a section “Entitled XYZ” according to this definition.
The Document may include Warranty Disclaimers next to the notice which states
that this License applies to the Document. These Warranty Disclaimers are considered
to be included by reference in this License, but only as regards disclaiming warranties:
any other implication that these Warranty Disclaimers may have is void and has no
effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially
or noncommercially, provided that this License, the copyright notices, and the license
notice saying this License applies to the Document are reproduced in all copies, and
that you add no other conditions whatsoever to those of this License. You may not
use technical measures to obstruct or control the reading or further copying of the
copies you make or distribute. However, you may accept compensation in exchange
for copies. If you distribute a large enough number of copies you must also follow the
conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may
publicly display copies.
219
21
GNU FDL IDEDOS 0.90, April 3, 2016
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed
covers) of the Document, numbering more than 100, and the Document’s license notice
requires Cover Texts, you must enclose the copies in covers that carry, clearly and
legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover
Texts on the back cover. Both covers must also clearly and legibly identify you as the
publisher of these copies. The front cover must present the full title with all words of
the title equally prominent and visible. You may add other material on the covers in
addition. Copying with changes limited to the covers, as long as they preserve the title
of the Document and satisfy these conditions, can be treated as verbatim copying in
other respects.
If the required texts for either cover are too voluminous to fit legibly, you should
put the first ones listed (as many as fit reasonably) on the actual cover, and continue the
rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than
100, you must either include a machine-readable Transparent copy along with each
Opaque copy, or state in or with each Opaque copy a computer-network location from
which the general network-using public has access to download using public-standard
network protocols a complete Transparent copy of the Document, free of added ma-
terial. If you use the latter option, you must take reasonably prudent steps, when you
begin distribution of Opaque copies in quantity, to ensure that this Transparent copy
will remain thus accessible at the stated location until at least one year after the last
time you distribute an Opaque copy (directly or through your agents or retailers) of
that edition to the public.
It is requested, but not required, that you contact the authors of the Document well
before redistributing any large number of copies, to give them a chance to provide you
with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the con-
ditions of sections 2 and 3 above, provided that you release the Modified Version under
precisely this License, with the Modified Version filling the role of the Document, thus
licensing distribution and modification of the Modified Version to whoever possesses a
copy of it. In addition, you must do these things in the Modified Version:
220
21
IDEDOS 0.90, April 3, 2016 GNU FDL
A. Use in the Title Page (and on the covers, if any) a title distinct from that of
the Document, and from those of previous versions (which should, if there
were any, be listed in the History section of the Document). You may use the
same title as a previous version if the original publisher of that version gives
permission.
B. List on the Title Page, as authors, one or more persons or entities responsible
for authorship of the modifications in the Modified Version, together with at
least five of the principal authors of the Document (all of its principal authors,
if it has fewer than five), unless they release you from this requirement.
C. State on the Title page the name of the publisher of the Modified Version, as
the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent to the
other copyright notices.
F. Include, immediately after the copyright notices, a license notice giving the
public permission to use the Modified Version under the terms of this License,
in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and required
Cover Texts given in the Document’s license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled “History”, Preserve its Title, and add to it an item
stating at least the title, year, new authors, and publisher of the Modified Ver-
sion as given on the Title Page. If there is no section Entitled “History” in
the Document, create one stating the title, year, authors, and publisher of the
Document as given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for public access
to a Transparent copy of the Document, and likewise the network locations
given in the Document for previous versions it was based on. These may be
placed in the “History” section. You may omit a network location for a work
that was published at least four years before the Document itself, or if the orig-
inal publisher of the version it refers to gives permission.
221
21
GNU FDL IDEDOS 0.90, April 3, 2016
5. COMBINING DOCUMENTS
222
21
IDEDOS 0.90, April 3, 2016 GNU FDL
You may combine the Document with other documents released under this Li-
cense, under the terms defined in section 4 above for modified versions, provided that
you include in the combination all of the Invariant Sections of all of the original doc-
uments, unmodified, and list them all as Invariant Sections of your combined work in
its license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple
identical Invariant Sections may be replaced with a single copy. If there are multiple
Invariant Sections with the same name but different contents, make the title of each
such section unique by adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number. Make the same
adjustment to the section titles in the list of Invariant Sections in the license notice of
the combined work.
In the combination, you must combine any sections Entitled “History” in the vari-
ous original documents, forming one section Entitled “History”; likewise combine any
sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You
must delete all sections Entitled “Endorsements”.
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents re-
leased under this License, and replace the individual copies of this License in the var-
ious documents with a single copy that is included in the collection, provided that you
follow the rules of this License for verbatim copying of each of the documents in all
other respects.
You may extract a single document from such a collection, and distribute it individ-
ually under this License, provided you insert a copy of this License into the extracted
document, and follow this License in all other respects regarding verbatim copying of
that document.
A compilation of the Document or its derivatives with other separate and inde-
pendent documents or works, in or on a volume of a storage or distribution medium,
is called an “aggregate” if the copyright resulting from the compilation is not used
to limit the legal rights of the compilation’s users beyond what the individual works
permit. When the Document is included in an aggregate, this License does not apply
223
21
GNU FDL IDEDOS 0.90, April 3, 2016
to the other works in the aggregate which are not themselves derivative works of the
Document.
If the Cover Text requirement of section 3 is applicable to these copies of the
Document, then if the Document is less than one half of the entire aggregate, the Doc-
ument’s Cover Texts may be placed on covers that bracket the Document within the
aggregate, or the electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole aggregate.
8. TRANSLATION
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as ex-
pressly provided under this License. Any attempt otherwise to copy, modify, subli-
cense, or distribute it is void, and will automatically terminate your rights under this
License.
However, if you cease all violation of this License, then your license from a par-
ticular copyright holder is reinstated (a) provisionally, unless and until the copyright
holder explicitly and finally terminates your license, and (b) permanently, if the copy-
right holder fails to notify you of the violation by some reasonable means prior to 60
days after the cessation.
Moreover, your license from a particular copyright holder is reinstated perma-
nently if the copyright holder notifies you of the violation by some reasonable means,
224
21
IDEDOS 0.90, April 3, 2016 GNU FDL
this is the first time you have received notice of violation of this License (for any work)
from that copyright holder, and you cure the violation prior to 30 days after your receipt
of the notice.
Termination of your rights under this section does not terminate the licenses of
parties who have received copies or rights from you under this License. If your rights
have been terminated and not permanently reinstated, receipt of a copy of some or all
of the same material does not give you any rights to use it.
The Free Software Foundation may publish new, revised versions of the GNU Free
Documentation License from time to time. Such new versions will be similar in spirit
to the present version, but may differ in detail to address new problems or concerns.
See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Docu-
ment specifies that a particular numbered version of this License “or any later version”
applies to it, you have the option of following the terms and conditions either of that
specified version or of any later version that has been published (not as a draft) by
the Free Software Foundation. If the Document does not specify a version number of
this License, you may choose any version ever published (not as a draft) by the Free
Software Foundation. If the Document specifies that a proxy can decide which future
versions of this License can be used, that proxy’s public statement of acceptance of a
version permanently authorizes you to choose that version for the Document.
11. RELICENSING
“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World
Wide Web server that publishes copyrightable works and also provides prominent facil-
ities for anybody to edit those works. A public wiki that anybody can edit is an example
of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the
site means any set of copyrightable works thus published on the MMC site.
“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license
published by Creative Commons Corporation, a not-for-profit corporation with a prin-
cipal place of business in San Francisco, California, as well as future copyleft versions
of that license published by that same organization.
225
21
GNU FDL IDEDOS 0.90, April 3, 2016
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace
the “with . . . Texts.” line with this:
with the Invariant Sections being LIST THEIR TITLES, with the Front-
Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other combination of
the three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend
releasing these examples in parallel under your choice of free software license, such as
the GNU General Public License, to permit their use in free software.
226
21
IDEDOS 0.90, April 3, 2016 THE SHORTBUS
A The ShortBus
This section is about the ShortBus connector of the IDE64 cartridge.
It’s a 34 pin connector containing a selection of processor and some
extra decoded signals. It was designed for connecting extra hardware
to the IDE64 cartridge.
On IDE64 V4.1 the jumper JP2 located next to the ShortBus con-
nector can be used to swap the meaning of CSEL0 and CSEL1 sig-
nals when shorted. This swaps the address range $DE00–$DE0F with
$DE10–$DE1F.
On IDE64 V4.2 the CSEL2 and CSEL3 signals are not available
as they were reused for addressing.
WARNING !
Although it’s looking similar to a pc floppy connector but it is
not a floppy controller interface, so never connect a floppy drive
or other non-ShortBus hardware, or you’ll damage your C64 or
IDE64 card!
227
THE SHORTBUS IDEDOS 0.90, April 3, 2016
228
IDEDOS 0.90, April 3, 2016 THE SHORTBUS
229
THE SHORTBUS IDEDOS 0.90, April 3, 2016
If the address space is set to $DFxx, then JP8 selects the exact
memory location. The card works fine with Contiki and soft-
ware supporting the original TFE card.
For more information visit http://c64.rulez.org/etfe/
Chip datasheet can be found at http://www.cirrus.com/
230
IDEDOS 0.90, April 3, 2016 THE SHORTBUS
231
THE SHORTBUS IDEDOS 0.90, April 3, 2016
232
IDEDOS 0.90, April 3, 2016 THE CLOCK-PORT
B The clock-port
This section is about the clock-port connector of the IDE64 V4.1 and
V4.2 cartridge. It’s a 22 pin connector containing a selection of pro-
cessor and some extra decoded signals. It can be used to connect
extra hardware to IDE64. Unlike other cartridges all 16 registers are
accessible for a better compatibility with Amiga accessories.
The JP2 jumper located near to the ShortBus connector is for
swapping the address range $DE00–$DE0F with $DE10–$DE1F. This
jumper affects the ShortBus addresses too.
WARNING !
When using ShortBus cards and clock-port devices at the same
time, make sure that the ShortBus device is configured to not use
the CSEL0 signal, otherwise the address collision could damage
the cards, C64 or IDE64 card!
233
THE CLOCK-PORT IDEDOS 0.90, April 3, 2016
234
IDEDOS 0.90, April 3, 2016 THE CLOCK-PORT
235
THE CLOCK-PORT IDEDOS 0.90, April 3, 2016
236
IDEDOS 0.90, April 3, 2016 MORE INFORMATION
C More information
Online resources about the IDE64 cartridge and related material. It’s
just a short collection, so you may also use your searching skills to
get more. ;-)
C.2 Distributors
The IDE64 card is currently not available through distributors, please
ask Josef directly at soucek.josef@gmail.com for pricing and avail-
ability.
237
MORE INFORMATION IDEDOS 0.90, April 3, 2016
238
IDEDOS 0.90, April 3, 2016 ACRONYMS
D Acronyms
ACIA Asynchronous Communications Interface Adapter
ATA AT Attachment
ATAPI ATA Packet Interface
ATIP Absolute Time In Pre-groove
ATX Advanced Technology Extended
BCD Binary Coded Decimal
CBM Commodore Business Machines
CD Compact Disc
CD-ROM Compact Disc Read Only Memory
CF CompactFlash
CFS Commodore File System
CHS Cylinder Head Sector
CIA Complex Interface Adapter
CMD Creative Micro Designs
CRC Cyclic Redundancy Check
DOS Disk Operating System
DVD Digital Versatile Disc
DUART Dual Universal Asynchronous Receiver/Transmitter
EOF End Of File
FAT File Allocation Table
FIFO First In, First Out
239
ACRONYMS IDEDOS 0.90, April 3, 2016
240
IDEDOS 0.90, April 3, 2016 ACRONYMS
241
LIST OF TABLES IDEDOS 0.90, April 3, 2016
List of Tables
1 C128 extra keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2 Detailed directory filetypes . . . . . . . . . . . . . . . . . . . . . . . 46
3 Bits of TOC format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4 Bits of sub-channel read format . . . . . . . . . . . . . . . . . . . . 72
5 Sub-channel read modes . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6 Sub-channel read data header . . . . . . . . . . . . . . . . . . . . . 72
7 Sub-channel read audio status codes . . . . . . . . . . . . . . . . 73
8 Sub-channel CD current position data format . . . . . . . . 73
9 Sub-channel control field of CD current position . . . . . 74
10 Manager keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
11 Monitor editor keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
12 Monitor commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
13 LL list format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
14 Default BASIC function keys . . . . . . . . . . . . . . . . . . . . . 126
15 Device status ($90) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
16 Messages ($9D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
17 File numbers ($B8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
18 Device numbers ($BA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
19 Secondary addresses ($B9) . . . . . . . . . . . . . . . . . . . . . . . . 131
20 Error codes returned by IDEDOS and KERNAL . . . . . 144
21 Direct KERNAL call replacement table . . . . . . . . . . . . . 157
22 X1541 PCLink cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
23 Parallel PCLink cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
24 Serial PCLink cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
25 Ethernet crosslink PCLink cable . . . . . . . . . . . . . . . . . . . 164
26 G-P data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
27 T-RB and T-RD data format . . . . . . . . . . . . . . . . . . . . . . . 177
242
IDEDOS 0.90, April 3, 2016 LIST OF LISTINGS
List of Figures
1 IDE64 V3.4 cartridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Start screen of the setup utility . . . . . . . . . . . . . . . . . . . . . 24
3 Standard setup screen of the setup utility . . . . . . . . . . . . 25
4 Device number setup screen of the setup utility . . . . . . . 29
5 Advanced setup screen of the setup utility . . . . . . . . . . . 31
6 The File Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7 The IDE64 builtin monitor . . . . . . . . . . . . . . . . . . . . . . . . 86
8 128 KiB PEROM upgrade . . . . . . . . . . . . . . . . . . . . . . . . 205
9 Location of the PGM pin on different cards . . . . . . . . . . 206
10 The Perom programmer utility . . . . . . . . . . . . . . . . . . . . . 208
11 ShortBus female cable connector . . . . . . . . . . . . . . . . . . 227
List of Listings
1 Path handling example . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2 BASIC directory list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3 Reading load address from file . . . . . . . . . . . . . . . . . . . . 59
4 SEQ file writing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
243
LIST OF LISTINGS IDEDOS 0.90, April 3, 2016
244
IDEDOS 0.90, April 3, 2016 LIST OF LISTINGS
245
Index
accu, 19 CFSfsck, 211
charging, 27 CHANGE, 116
append, 61 CHKIN, 134
CHKOUT, 135
backtrace, 97 CHRIN, 136
battery, 19 CHROUT, 138
binary, 95 CLALL, 139
block clock
read, 67 read, 177
write, 68 set, 23
boot file, 24 clock-port, 233
bugs, 13 CLOSE, 65
KERNAL, 133
C128, 200 CLRCHN, 140
keyboard, 26, 85 CMD, 66
CD, 115 emulation, 27
DOS wedge, 113 colors, 28
CD-ROM copy, 75
audio, 183 create
commands, 183 directory, 123, 182
format, 35 partition, 37
slowdown, 32
volume, 186 DATE, 117
CDCLOSE, 116 set, 23
CDOPEN, 116 DE32, 21
CFSfdisk, 36 DEF, 117
246
IDEDOS 0.90, April 3, 2016 INDEX
247
INDEX IDEDOS 0.90, April 3, 2016
248
IDEDOS 0.90, April 3, 2016 INDEX
249
INDEX IDEDOS 0.90, April 3, 2016
wildcard
file, 50
monitor, 100
WRITE, 146
write protect
directory, 170
drive, 179
file, 170
partition, 39
X1541, 161
Zip drive, 17
250