[Coco] Sdc question

Barry Nelson barry.nelson at amobiledevice.com
Tue May 26 19:39:36 EDT 2015


The issue is with the multipack slot select code. The program prompts for a number from 1 to 4, but although the slots are numbered 1 to 4 on the switch, the hardware uses numbers 0-3 internally. The program listing on the web page is correct, but the disk image copy is missing line 25
25 SL=SL-1
I additionally enhanced my copy by changing line 10 to input SL$ instead of SL, and then if SL$ is empty ("") I set SL equal to (OS AND 3) so that the program defaults to the currently active slot, other wise I set SL=VAL(SL$).

I tested it under regular Disk BASIC and HDBDOS and it worked under both.

This is the list from the web page, which includes the missing line 25.

10 OS=PEEK(&HFF7F):INPUT "MPI SLOT#";SL
20 IF SL<1 OR SL>4 THEN 10
25 SL=SL-1
30 INPUT "SDC DRIVE#";DR
40 IF DR<>0 AND DR<>1 THEN 30
50 LINE INPUT "COMMAND? ";C$
60 IF LEN(C$)<2 OR MID$(C$,2,1)<>":" THEN 50
70 C$=C$+CHR$(0):P=VARPTR(C$)
80 P=PEEK(P+2)*256+PEEK(P+3)
90 POKE &HFF7F,OS AND 240 OR SL
100 POKE &HFF40,67:POKE &HFF49,0
110 POKE &HFF4A,0:POKE &HFF48,DR+224
120 A=&HFF4A:B=&HFF4B
130 FOR I=P TO P+254 STEP2:POKE A,PEEK(I):POKE B,PEEK(I+1):NEXT
140 ST=PEEK(&HFF48):IF ST AND 1 THEN 140
150 POKE &HFF40,0:POKE &HFF7F,OS
160 IF ST AND 128 THEN PRINT "ERROR";ST
The L: command to list a directory does not work with this program but the rest of the command below should all work…
"M:filename"  - mount an image
"N:filename"  - create an image
"D:dirname"   - change directory
"K:dirname"   - make a directory
"X:name"      - delete a file or directory


On May 26, 2015, at 9:32 AM, "K. Pruitt" <pruittk at roadrunner.com> wrote:

> It's Allen Huffman's blog:
> 
> http://subethasoftware.com/2015/01/06/cocosdc-for-trs-80-color-computer-part-6/
> 
> 
> 
> ----- Original Message ----- From: "Barry Nelson"
> Sent: Tuesday, May 26, 2015 6:24 AM
> Subject: Re: [Coco] Sdc question
> 
> 
>> K. Pruitt
>> Tue May 26 04:39:09 EDT 2015
>> 
>> Thanks Barry. That is the answer I know I was hoping for, and that also
>> answers Sean's original question too. We can delete images from the SDC via
>> software.
>> 
>> I've been playing with the cmds.bas program from Darren via Allen's blog and
>> it just hangs in an infinite loop on line 140 when I run it. I've tried it
>> under HDB-DOS and RS-DOS, entering the various commands verbatim, but it
>> never gets past that check loop. Clearly I'm doing something incorrectly.
>> The SDC operates flawlessly on my system in all other respects.
>> 
>> I think I'll follow your suggestion of installing YA-DOS in the SDC. In
>> addition to the SDC support, the partitioning features sound interesting.
>> Though think I better do some backing up before I start experimenting.
>> 
>> Thanks for all the great info.  It is very much appreciated.
> 
> What is the link to the blog with cmds.bas? I would like to look at it.
> 
> Can anyone help with the issue I have opening the device? Will I have to talk to the hardware directly? 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5282 bytes
Desc: not available
URL: <https://pairlist5.pair.net/pipermail/coco/attachments/20150526/eaef439e/attachment-0001.bin>


More information about the Coco mailing list