Jump to content

Photo

ATR-8000 (and other) CP/M System disks here

atr-8000 cp/m system disk atr-8000 cp/m system disks

211 replies to this topic

#51 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Fri May 9, 2014 12:24 PM

1 REM CORRECTED ATARIMON.BAS I THINK RICK CORTESE
100 REM <<ATRMON.BAS>>
110 REM <<D=DUMP MEM>>
120 REM <<M=EXAMINE MEM>>
130 REM <<G=EXECUTE AT ADD>>
140 DIM X$(16)
150 X$="0123456789ABCDEF"
160 DIM C$(1)
170 DIM BUF$(256)
180 DIM H$(5)
190 REM SET UP USR Z
200 Z=ADR("    ")
210 DATA 104,76,89,228
220 FOR I=0 TO 3
230 READ X
240 POKE Z+I,X
250 NEXT I
260 REM PRESET DCB BUFFER
270 DCB=768
280 CMD=770:REM "R","W","G","S"
290 AX1=778:REM BYTE COUNT OR LOW ADD
300 AX2=779:REM HIGH ADD
310 DIR=771:REM SIO CONTROL
315 NUM=776:REM BYTE COUNT FOR SIO
320 IN=64:REM INPUT TO BUFFER
330 OUTB=128:REM OUTPUT WITH BUFPER
340 OUT=0:REM OUTPUT WITHOUT BUFFER
350 DATA 90,1,0,0,0,0,1,0,0,0,0,0
360 REM "Z"=90,DEVICE ID.
370 FOR I=0 TO 11
380 READ X
390 POKE DCB+I,X
400 NEXT I
410 REM SET UP BUFFER ADDRESS
420 A=ADR(BUF$)
430 X=INT(A/256)
440 POKE DCB+5,X
450 POKE DCB+4,A-X*256
460 INPUT H$
462 C$=H$(1,1)
465 H$=H$(2,LEN(H$))
470 IF ASC(C$)=ASC("D") THEN 600
480 IF ASC(C$)=ASC("M") THEN 1000
490 IF ASC(C$)=ASC("G") THEN 1500
500 GOTO 460
600 REM DUMP MEMORY
610 GOSUB 2000
620 GOSUB 5000
680 POKE CMD,ASC("R")
690 POKE DIR,IN
700 POKE AX1,128
705 POKE NUM,128
710 GOSUB 9000
720 N=0
725 M=D
730 FOR I=0 TO 127
740 IF N>0 THEN 760
745 D=M+I
747 GOSUB 4000
748 PRINT H$;
749 PRINT " ";
750 N=8
760 D=PEEK(A+I)
770 GOSUB 4000
780 PRINT H$(3,4);
790 PRINT " ";
800 N=N-1
801 IF N>0 THEN 820
802 FOR F=7 TO 0 STEP -1
803 G=PEEK((A+I)-F)
804 IF G<32 THEN 808
805 IF G>121 THEN 808
806 PRINT CHR$(G);
807 GOTO 809
808 PRINT ".";
809 NEXT F
815 PRINT 
820 NEXT I
830 GOTO 460
1000 PRINT H$;
1010 PRINT " ";
1020 GOSUB 2000
1030 GOSUB 5000
1035 M=D
1040 POKE CMD,ASC("R")
1050 POKE DIR,IN
1060 POKE AX1,1
1065 POKE NUM,1
1070 GOSUB 9000
1080 D=PEEK(A)
1090 GOSUB 4000
1100 PRINT H$(3,4);
1110 INPUT H$
1120 IF ASC(H$)=ASC(".") THEN 460
1130 IF LEN(H$)=0 THEN 1190
1140 GOSUB 2000
1150 POKE A,D
1160 POKE CMD,ASC("W")
1170 POKE DIR,OUTB
1180 GOSUB 9000
1190 M=M+1
1200 D=M
1210 GOSUB 5000
1220 GOSUB 4000
1230 PRINT H$;
1240 PRINT " ";
1250 GOTO 1040
1500 PRINT H$
1510 GOSUB 2000
1520 GOSUB 5000
1530 POKE CMD,ASC("G")
1540 POKE DIR,OUT
1550 GOSUB 9000
1560 GOTO 460
2000 IF LEN(H$)<1 OR LEN(H$)>4 THEN 2099
2010 D=0
2020 FOR J=1 TO LEN(H$)
2030 K=ASC(H$(J,J))-ASC("0")
2040 IF K<0 THEN 2099
2050 IF K<10 THEN 2090
2060 K=K-7
2070 IF K<10 THEN 2099
2080 IF K>15 THEN 2099
2090 D=(D*16)+K
2095 NEXT J
2096 RETURN 
2099 PRINT "INVALID HEX DATA"
2100 RETURN 
4000 FOR J=4 TO 1 STEP -1
4010 K=D
4020 D=INT(D/16)
4030 H$(J,J)=X$(K-(D*16)+1)
4040 NEXT J
4050 RETURN 
5000 Y=INT(D/256)
5010 POKE AX2,Y
5020 POKE AX1,D-Y*256
5030 POKE CMD,ASC("S")
5040 POKE DIR,OUT
5050 GOSUB 9000
5060 RETURN 
9000 X=USR(Z)
9010 RETURN 


#52 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Fri May 9, 2014 1:02 PM

I probably spent 100 hours and found 50 ways it can't be done! :)

 

I have been teledisking my little heart out, learning a bit about CP/M, and getting parts together. More speculation on why the teledisk images don't work. As I said in a previous post, you can't format any less then a full track with the controller in the ATR8000 so all the teledisk images are busted in that respect. An insight into how teledisk may work: It may sample the PC's disk control faster then the data rate/bit density on the disk. Same probably holds true for writing which is how it confuses itself. That is, lif there is a bit pattern of 0 1, the program samples FDC maybe 10 times to and comes up with sense head state of [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] and figures out all the GAP 3 size, markers, et cetera. Almost like it is playing a record and ignoring disk structure.

 

So when teledisk reconstructs the bad image, it actually lays down a 128 byte sector. There's a couple of .TD0 images that have either 512 or 1024 byte per sector tracks. The writes of that first raw 128 byte sector screws up the markers for the rest of the track so, I'm not sure if it is intentional or just bugged, Anadisk reports the disk as having ~110 to 120 sectors on track 0. Mucking around in the data, it looks like sector 1 is blank and sector 110 has sector 1 boot plus some from sector 5. Very broken anyway. Anadisk and Teledisk both used some of the same techniques me thinks.

 

And I got my ATR8000 up and running, finally. I did some boots of non munged teledisk images and it even boots Atari DOS 3!

 

Odd behavior of DEBUG: Soon as you write out track 0 sector 1, it changes the 'I am a MS DOS disk' markers so you are screwed for any other modifications on that disk. Kind of a one shot deal; you get your best guess CP/M boot sectors into memory and write them out to disk. Once having written, the moving finger moves on to attempt an ATR8000 boot and has to be reformatted before another attempt can be made. Same holds true for using 22NICE to create an ATR8000 formatted floppy, DEBUG won't touch it.

 

So I managed to get a couple of boots that at least didn't crash the built in ATR8000 monitor. Mostly just odd errors like "error 04" or "error 10" with occasional character output like 'G' before it returns to the monitor.

 

So I got ATARIMON.BAS working. Fixed yet another junk laptop, SIO2PC cable, booting DR DOS 6.0 with SIO2PC 4.19 to talk to the Atari and move stuff around. Used Altirra to move that CSAV69.COM file to an .ATR image. I think my next line of attack will be to install the CSAV69.COM on the ATR8000 by modifying the ATARIMON.BAS program. Should only take 18,000 GET/PUT iterations in Atari BASIC to get it installed. No time left this morning, have to go to my boat/marina and pay slip fees, car registration, boat registration, water garden, pay insurance. Funny how stuff builds up when you spend a couple of hundred hours in hobbyist mode.



#53 sup8pdct OFFLINE  

sup8pdct

    Dragonstomper

  • 853 posts
  • Location:australia

Posted Fri May 9, 2014 3:25 PM

just a bit of info. DDSYSGEN formats the 1st 2 tracks regardless of what was formatted before. The 1st sector of the 1st track is 128 bytes. It has to be due to bios to boot strap cpm has been setup to read a 128 byte sector. The next 9 sectors are 512 byte. The 2nd track has the same setup but the 128 byte sector is numbered 100 and the 512 byte sectors have the numbers reduced by 1 to reflect the change.

Here is the table used to create the track format line code. The program makes a few changes between the 1st and 2nd tracks and they are noted in the comments.

 

;format data. 1 128 byte sector and 9 512 byte sectors per track for 2 tracks
; 1st track has 128 byte as sector 1. 2nd track has 128 byte sector as sector $64.
; the 128 byte sector on 2nd track contains no data.
;128 byte sector x 1
        DEFB    10H                     ; 0E2A 10       num of table segments
    DEFB    20H,4Eh            ; 0E2B 204E    GAP 1
        DEFB    0CH,00                  ; 0E2D 0C00     data. post index gap
        DEFB    03,F5H                  ; 0E2F 03F5     GENERATE SYNC=A1 HEX
        DEFB    01,FEH                  ; 0E31 01FE     GENERATE ID ADDRESS MARK
    DEFB    01,00            ; 0E33 0100    TRACK#. Change to 1 2nd track
        DEFB    01,00                   ; 0E35 0100     side#
    DEFB    01,00            ; 0E37 0100    sector#.1 change to 64 for 2nd track
        DEFB    01,00                   ; 0E39 0100     length. 128 bytes
    DEFB    01,F7H            ; 0E3B 01F7    generate crc
        DEFB    16H,4EH                 ; 0E3D 164E     FIRST PART OF GAP 2
        DEFB    0CH,00                  ; 0E3F 0C00     SECOND PART OF GAP 2
        DEFB    03,F5H                  ; 0E42 03F5     GENERATE SYNC=A1 HEX
        DEFB    01,FBH                  ; 0E43 01FB     data Address mark
    DEFB    80H,E5H            ; 0E45 80E5    empty sector data fill
        DEFB    01,F7H                  ; 0E47 01F7     GENERATE CRC BYTES
        DEFB    32h,4Eh                 ; 0E49 324E       N
;512 byte sector x 9
        DEFB    10H                     ; 0E4B 10       num of table segments
        DEFB    0CH,00                  ; 0E4C 0C00       .
        DEFB    03,F5H                  ; 0E4E 03F5     3 x f5
        DEFB    01,FEH                  ; 0E50 01FE     GENERATE ID ADDRESS MARK
        DEFB    01,00                   ; 0E52 0100     track#---------change to 1 for 2nd track
        DEFB    01,00                   ; 0E54 0100     Side#
        DEFB    01,00                   ; 0E56 0100     sect#. 2 or change to 1 for 2nd track.
        DEFB    01,02                   ; 0E58 0102     length of sector
        DEFB    01,F7H                  ; 0E5A 01F7     generate crc
        DEFB    16H,4EH                 ; 0E5C 164E     FIRST PART OF GAP 2
        DEFB    0Ch,00                  ; 0E5E 0C00     SECOND PART OF GAP 2
        DEFB    03,F5H                  ; 0E60 03F5     GENERATE SYNC=A1 HEX
        DEFB    01,FBH                  ; 0E62 01FB     data Address mark
        DEFB    00,E5H                  ; 0E64 00E5     256 x E5. sector fill data 1st half
        DEFB    00,E5H                  ; 0E66 00E5     256 x E5. sector fill data 2nd half
        DEFB    01,F7H                  ; 0E68 01F7     GENERATE CRC BYTES
        DEFB    32H,4EH                 ; 0E6A 324E     N
        DEFB    47H,20H                 ; 0E6C 4720     G
        DEFB    FAH,C9H                 ; 0E6E FAC9     end gap. continue till IP?

 

I had an image that booted, re previous post. I have tried to teledisk that image to a new disk but have found that teledisk screws up the 128 byte sectors and only half fills that sector. Anadisk also cannot handle the 128 byte sector and does the same thing. It is either the programs or the controller cannot handle it properly.. I have found teledisk can read the disk ok as converting it to a FDI shows it to be ok.

End result is teledisk won't be able to create a bootable atr8000 cpm disk. It can come close but the 128 byte sector will need to be written by the ATR it self. Almost any disk edit software should be able to do this.

 

James



#54 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Sat May 10, 2014 8:05 AM

I think we are going to have to disagree on this for the time being, not that it would make a difference. I believe the 128 byte thing is the deblocking <ibid> done by CP/M and the actual size on disk is 512 bytes. Reasons for this are disks formatted under 22DISKS do not have the short sector and many references in the Atari CP/M bios are set for 512 bytes. Unfortunately the disk definitions I have for 22disk only include one ATR definition and it is for 1024 byte sectors. I have seen other defs, can't recall where or what program they were attached to. Could have been something like UNIFORMPC<?> or a different version of 22disks. It could be both 22DISKS and me are wrong.

 

COLDCB: DEFB GETSEC ;disk i/o control block for loader
DEFB 0
DEFB 0
DEFB 2
DEFW CCP
DEFW 512
DEFB 0
 
and
 
; ... one sector loader for cp/m cold boot ...
;
;
ORG TPA
.PHASE 0080H
;
ONESECT:
LD SP,ONESECT ;put stack just below here
LD IX,COLDCB ;point to iocb for cold boot
LD B,14
ONESC2: PUSH BC
CALL DISKDVR ;read 512 byte sector from track zero
POP BC
LD A,(COLDCB+DSKSTS)
OR A
JR NZ,BERROR ;exit boot loop if disk error
LD A,(COLDCB+DSKSEC)
INC A
CP 11 ;check for sector# > 10
JR C,ONESC3
LD A,1
LD (COLDCB+DSKTRK),A
ONESC3: LD (COLDCB+DSKSEC),A
LD HL,COLDCB+DSKPTR+1
INC (HL)
INC (HL)
DJNZ ONESC2 ;read tk0/sec2..9 and tk1/sec1..6
 
It can be a 128 byte sector of course, but it would be only if the other sectors on tracks 0-1 were too. The bios blurbs I took from the April 84 updated bios so that leads me to think it was a 512 byte/sector distribution for that version.
 
Home stretch, I hope all this should be academic. Busy weekend again, hope I can find some time tonight to work on it. I have source of CP/M 2.2 compiling in TASM, haven't converted the BIOS from MS macro assembler to TASM yet. The rest of the pieces are in my hands. I have the MS macro assembler manual, just have to learn it so I don't blow the conversion. My EPROM burner is up and running so I can get a fresh dump of my ATR8000 ROM. Various emulators and utilities are working just fine.
 
Optimistic still: If nothing else, can do a 100% ATR memory map load from an Atari now of a full CP/M system and let it decide how to lay down the first sector. Ultimately it doesn't matter, as long as it works.
 
There's some old C code I wrote years ago for doing raw reads on 512 byte sectors. I think a copy of it is still up at umich archive with a broken .exe, off by one byte from the one that works. Turns out Turbo C is available for free so I may rewrite it to just pick off the second track which I think is good. The ATR8000 source code, DEBUG, my own C code, all pushing me to fool with 512 byte sectors. Well, got to work on my water system and water my plants before the sun gets too high. Keep me honest. :)


#55 Caterpiggle OFFLINE  

Caterpiggle

    Dragonstomper

  • 697 posts

Posted Sat May 10, 2014 1:50 PM

Good evening to everyone,

I am newbies to my own ATR8000 machine. I recently hooked up to my Atari 800XL NTSC. Nothing happening on my Atari screen "READY". What I need to know which IBM type or clone 5.25 disk drive to attacting at the back of ATR8000.

Yes, I see my ATR8000 has the sticker of "64" , so I assume it has built-in 64 K. It had been add-on "Reset" switch at the front.

I just wonder if I hooking up my SIO2SD device on ATR8000 and loading up any CP/M disk images from SIO2SD. So will it works to loading the CP/M software ? or MUST loading from the real floppy disk on clone or 3rd party disk drive that support to read MS-DOS and CP/M ?

I am more interesting to loading CP/M FROM SIO2SD device itself rather than physical 5.25 drive.

#56 sup8pdct OFFLINE  

sup8pdct

    Dragonstomper

  • 853 posts
  • Location:australia

Posted Sat May 10, 2014 6:26 PM

The system tracks for the atr8000 are the first 2 tracks. the data area starts on the 3rd track where the directory starts. This data area can have sector sizes from 128 to 1024 byte sectors. Just look in the DDINIT program.

I point you to this bit of code in the ATR bios on rom

 

;
;    -- DISK BOOT LOADER --
;
BOOT:
    LD    IX,BOOTCB
    CALL    DISKDVR        ;ATTEMPT TO READ BOOT SECTOR
    LD    A,(IX+DSKSTS)
    OR    A
    CALL    Z,0080H        ;EXECUTE BOOT IF NO ERRORS
    PUSH    AF
    CALL    PNEXT
    DEFB    ' ERR ',NULL
    POP    AF
    JR    PUT2HX
;
;
BOOTCB:    DEFB    GETSEC        ;opcode
                    DEFB    0        ;side drive number
                    DEFB    0        ;track
                    DEFB    1        ;sector
                    DEFW    0080H        ;buffer
                    DEFW    128        ;num of bytes to get
                    DEFB    0        ;status

 

This is invoked by the Boot command from the atarimon.bas program or the special 80 column monitor program loaded on the atari for atr8000 cpm.

Please note the num of bytes to get. If the rom disk routine reads more then 128 bytes ie a 512 byte sector, it will error out. I have tried it my self. I have even tried to have 10 512 byte sectors on the 1st track to see if it would work. It didn't. The only way is to have 1 sector at 128 bytes, 9 at 512 bytes on the 1st track.

 

I have been successful in creating a bootable cpm and running memtest program on my ATR for an hour or more from those teledisk images. Unfortunately, there is a problem somewhere with my atr. Any disk format fails and it stops sending characters back to the atari when sitting idle after a short while. To get one to work required a lot of work with anadisk, winhex teledisk to fdi converter and a disk editor on the 800XL. Any attempt to teledisk a copy of one of my working one fails as is screws up the 128 byte sector.

  Programs like 22nice etc ONLY read/write to the data area. Not the system area. The data area on the teledisk images of atr cpm are mostly 1024 byte sectors.

 

The bit of code you showed me is what is contained on the 128 byte boot sector. The rom bios hands over to this only on a error free read of that sector.

 

Here is a bit more from ddsysgen program where it creates the data for the format of 1st  track.

 

;-------------------------------------------------------setup table for 1st track
        LD      ($E34),A                ; 0C12 32340E   track 0
        LD      ($E53),A                ; 0C15 32530E   track 0
        LD      A,$01                   ; 0C18 3E01     set 128 byte sector on 1st
        LD      ($E38),A                ; 0C1A 32380E   track to 1st sector. boot sector
        LD      A,$02                   ; 0C1D 3E02     set 512 byte sectors start from
        LD      ($E57),A                ; 0C1F 32570E   sector 2 to 10
        CALL    Lb273                   ; 0C22 CDF00D   go setup format line data
        LD      A,($D44)                ; 0C25 3A440D   :D.
        RES     7,A                     ; 0C28 CBBF     reset dden
        OUT     ($30),A                 ; 0C2A D330     floppy control lines
    CALL    Lb285            ; 0C2C CDC20D   go format 1st track
;
;read or write sectors
;
Lb270:  LD      HL,$1900           ; 0C2F 210019   buffer
        LD      B,$0A                   ; 0C32 060A     10 sect
        LD      C,$01                   ; 0C34 0E01     sect 1
Lb278:  LD      DE,$200                 ; 0C36 110002   512 byte len
        LD      A,C                     ; 0C39 79       y
        CP      $02                     ; 0C3A FE02     sector 2 or higher?
        JR      NC,Lb276                ; 0C3C 3003     0.
        LD      DE,$80                  ; 0C3E 118000   128 byte sector
Lb276:  LD      A,($D47)                ; 0C41 3A470D   1=read, 2=write
        CALL    Lb277                   ; 0C44 CD0F0D   go do disk operation

 

 

 

;
;setup track format data
;
Lb273:  LD      DE,$5000                ; 0DF0 110050   place to put it
        LD      HL,$E2A                 ; 0DF3 212A0E   format table start. single 128 byte sector
        LD      B,(HL)                  ; 0DF6 46       number of table segments
        INC     HL                      ; 0DF7 23       #
Lb296:  CALL    Lb295                   ; 0DF8 CD1F0E   ...
        DJNZ    Lb296                   ; 0DFB 10FB     dec B
        LD      C,$09                   ; 0DFD 0E09     num of 512 byte sectors
Lb298:  LD      HL,$E4B                 ; 0DFF 214B0E   2nd part for 512 byte sectors
        LD      B,(HL)                  ; 0E02 46       number of table segments
        INC     HL                      ; 0E03 23       #
Lb297:  CALL    Lb295                   ; 0E04 CD1F0E   ...
        DJNZ    Lb297                   ; 0E07 10FB     ..
        LD      HL,$E57                 ; 0E09 21570E   load sector number from table
        INC     (HL)                    ; 0E0C 34       inc by one
        DEC     C                       ; 0E0D 0D       all sectors?
        JR      NZ,Lb298                ; 0E0E 20EF      .
        LD      HL,$78B0                ; 0E10 21B078   !.x
        OR      A                       ; 0E13 B7       .
        SBC     HL,DE                   ; 0E14 ED52     .R
        LD      B,H                     ; 0E16 44       D
        LD      C,L                     ; 0E17 4D       M
        LD      H,D                     ; 0E18 62       b
        LD      L,E                     ; 0E19 6B       k
        INC     DE                      ; 0E1A 13       .
        LD      (HL),A                  ; 0E1B 77       w
        LDIR                            ; 0E1C EDB0     ..
        RET                             ; 0E1E C9       .

Lb295:  PUSH    BC                      ; 0E1F C5       .
        LD      B,(HL)                  ; 0E20 46       counter
        INC     HL                      ; 0E21 23       #
        LD      A,(HL)                  ; 0E22 7E       data
        INC     HL                      ; 0E23 23       #
Lb299:  LD      (DE),A                  ; 0E24 12       .
        INC     DE                      ; 0E25 13       .
        DJNZ    Lb299                   ; 0E26 10FC     ..
        POP     BC                      ; 0E28 C1       .
        RET                             ; 0E29 C9       .

 

 

Unfortunately, life has gotten in the way so i haven't been able to to do much to this for a while.

 

James



#57 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Sat May 10, 2014 6:42 PM

At least one old 5.25" 360k DSDD IBM or or similar style disk drive would be the best all around choice. There's a few that would cause problems IIRC, things like drives out of Tandy computers used the 34 pin cable to run power to the drive so they won't work w/o some modification. I think the drives out of an Epson Equity I did the same thing.

 

The 360k drives would give you the most compatibility with running Atari software and CP/M. Others that will work are 3.5" 720k, 5.25" 720k, 5.25" 1.2 meg run as an 8" 77 track drive, or an 8" drive with an adapter. Once again there are oddballs like a 3.5" Tandy 720k drive that may not work.

 

a8maestro has a page up with some info. http://atari.a8maest...info/floppy.htm

 

He also mentions ~ATR8000 does not always play nice with other stuff on the SIO buss. It may have only been SIO2PC and he did find a mod to get things working.

 

You could load stuff from the Atari with limits. The above programs lets you load stuff into the ATR8000 memory with a lot of restrictions. Main problem is it has to go in a byte at a time from the keyboard. It shouldn't be a huge problem to load images from an Atari and get them to run on a bare ATR8000. It would probably be less then an enjoyable experience, if there was anything CP/M enjoyable to be had. What was right about CP/M was blazing fast disk i/o compared to the Atari. Instead of programs loading at 25-30k bytes a second, you would be operating at ~2000b/sec tops. With the overhead for device i/o, it would be a lot like a cassette based CP/M system.



#58 sup8pdct OFFLINE  

sup8pdct

    Dragonstomper

  • 853 posts
  • Location:australia

Posted Sun May 11, 2014 4:07 AM

Good evening to everyone,

I am newbies to my own ATR8000 machine. I recently hooked up to my Atari 800XL NTSC. Nothing happening on my Atari screen "READY". What I need to know which IBM type or clone 5.25 disk drive to attacting at the back of ATR8000.

Yes, I see my ATR8000 has the sticker of "64" , so I assume it has built-in 64 K. It had been add-on "Reset" switch at the front.

I just wonder if I hooking up my SIO2SD device on ATR8000 and loading up any CP/M disk images from SIO2SD. So will it works to loading the CP/M software ? or MUST loading from the real floppy disk on clone or 3rd party disk drive that support to read MS-DOS and CP/M ?

I am more interesting to loading CP/M FROM SIO2SD device itself rather than physical 5.25 drive.

The only way is to have a real mech on the floppy port to load CP/M. One from a XF551 should work fine. There is a floppy emulator getting around that works like a real floppy but all data is on a sd card. The creator/seller says it can handle multi size sectors per track so should work with atr. Just need a real disk to start with to create a working image on it.

 

James



#59 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Sun May 11, 2014 10:02 AM

Thanks for the "keeping me honest" and the level of work you have put into this James.

 

I haven't waded through the ATR8000 OS ROM yet. I have used the ATARIMON.BAS program to examine memory and the boot loader is appearing on my ATR8000 at $80. Once again, there is no format a track with one 128 byte sectors and 8-10 512 byte sectors for the FDC1797 chip used in the ATR8000. The FDC's don't really care what you send them, they just do the reads and writes as best they can. Specifically just telling a a FDC to write 128 bytes to a different length sector does nothing to the format as it is laid down on the disk. It doesn't cause the FDC to suddenly reformat the inter record gaps, interleave, what have you, they remain the same. Understand that I have written Atari to PC transfer programs albeit 25 years ago so I do have some familiarity with different formats and direct hardware control. I still more inclined to believe the problem is one similar to short sector from the Truba Indus CP/M reconstruction.

 

But as I said, I really appreciate your work. I've got my EPROM burner running like a champ with some EPROMs on order and your observations suggest a fix option. I could just program an ATR8000 OS chip and remove that 128 byte sector read with one for 512 or 1024. It may not work as an Atari disk drive but all other options for booting CP/M from disks created on an PC would be much better. It's a bit of a side track from loading the ATR8000's memory from an Atari but kind of intriguing. I may do it first. I'll start consuming the ATR8000 OS ROM today.



#60 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Sun May 11, 2014 11:37 AM

Just another case of me sticking something on AA for safe keeping. ATR8000 4k OS ROM version 3.02 

 

I thought I found a version of the OS with the same ID on the interweb somewhere. Could have even been me that uploaded it. Anyway, all my old stuff from those days is dead and gone and I can't conveniently find the file. Safe<r> keeping this way. 

Attached Files



#61 Caterpiggle OFFLINE  

Caterpiggle

    Dragonstomper

  • 697 posts

Posted Sun May 11, 2014 11:47 AM

As for that ATR8000 ROM is useless to Altirra emulator. Altirra does not have emulating ATR8000's behavior. It is complete missing on Altirra's feature. So I can't possible to use this .rom VERSION.

#62 Caterpiggle OFFLINE  

Caterpiggle

    Dragonstomper

  • 697 posts

Posted Sun May 11, 2014 11:56 AM

sup8pdct,

So would I able to plug SIO port onto "peripheral out" to XF551 (5.25) and is possible to read CP/M real disk (of course the format is complete different to Atari's standard format) on XF551 ??? Because XF551's its own ROM built-in only able to read Atari format. So how it is possible for XF551 read CP/M's own format style ?? That is problem. As for slot of "Floppy Disk" port looks complete different. How can I find IBM or clone with strips cable to attaching ?

#63 BillC OFFLINE  

BillC

    Stargunner

  • 1,711 posts
  • Location:BC Canada

Posted Sun May 11, 2014 2:23 PM

sup8pdct,

So would I able to plug SIO port onto "peripheral out" to XF551 (5.25) and is possible to read CP/M real disk (of course the format is complete different to Atari's standard format) on XF551 ??? Because XF551's its own ROM built-in only able to read Atari format. So how it is possible for XF551 read CP/M's own format style ?? That is problem. As for slot of "Floppy Disk" port looks complete different. How can I find IBM or clone with strips cable to attaching ?

While the XF551 drive may not be able the handle an ATR8000 disk the mechanism is a standard 360KB DSDD 5.25", if the proper 34-conductor cable is used to connect to the XF551 mechanism(it doesn't even need to be removed from the XF551 case) it will work as a native ATR8000 drive. The XF551 mechanism is set to DS0, you would need to configure the ATR8000 drive parameters accordingly.

 

I believe the ATR8000 floppy cable is simply a 34 conductor ribbon cable(straight, not twisted) with IDC connectors, the ATR8000/5.25"FDD using card-edge connectors, 3.5"FDD using socket connectors.

 

I found this post with the ATR8000 manual attached: http://atariage.com/...s/#entry1509390



#64 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Mon May 12, 2014 9:13 AM

Cater, right, the ROM is not usable by anything other then an ATR8000. I only put it up for archival purposes. I have probably the worst record of anyone I know for tragic hardware failures. House hit by lightning, static sparks smoking memory chips, girlfriends trying to break me of digital habits by throwing my computers outside in the rain, that kind of stuff. *IF* I don't get the stuff like the ROM out/archived, I would feel remiss. It is here for people to disassemble, check against their version, replace a failed chip in their ATR8000, that kind of stuff.

 

Just a suggestion that you are welcome to ignore. I'm not sure of your status beyond having the ATR8000 and maybe a few other things Atari. Before I would invest heavily in the ATR8000, buying drives and making cables, I would do a bit of testing first. Path I would choose is get a copy to the AUTOTERM boot disk and see if the ATR8000 responds to simple commands. You don't need anything other then the Atari computer with an Atari drive to run AUTOTERM. Once in terminal mode you can give simple commands like

M80

and the ATR8000 should respond with something like

? M80;

which is just for modifying memory. i.e. if you typed to the end of it

? M80;F8<and hit return>

the monitor will store $F8 in the ATR8000's memory location $80 and auto increment its counter to respond

? M81;

when you want to exit that mode, I think you just type a period '. It may have some additional information like what the existing byte was

? M81 00;

where the 00 would be the byte it found there and you are modifying.

Anyway, in that mode you can load Z80 programs. The manual Bill linked to will give a slightly more detailed description. I'll have to double check because the built in monitor is not as capable as the basic program above. There is no memory dump, just the M for modify and G for go.

 

Of course you could just type the ATARIMON.BAS program in and run that. Much easier to cut and paste to Altirra and save to an .atr disk then use SIO2PC or SIO2SD to get it to the Atari.



#65 sup8pdct OFFLINE  

sup8pdct

    Dragonstomper

  • 853 posts
  • Location:australia

Posted Tue May 13, 2014 4:30 AM

IMGP2555.jpg

 

Here is a pic of what I have managed to do with those Teledisk images + lots of work.
This is based on the ATR8000.TD0 image. This one as part of its boot up does a DIR. I had to be quick and type  MEMTEST  else my atr stops. Once Memtest was running, it was fine and would go for many hours. I shut it down after about 10 lines, each of which takes some time thus proving there is nothing wrong with my ATR memory and most of the Z80 processor. There may be a problem with interrupts on the Z80, or the CTC or the FDC or one of the many LS chips.
The *******111111111****** was something I added so I could see which sector was loaded. I at first had the sectors wrong on the disk and had to move some of them down by 1.

How did I do it?
Need a 360K 5 ¼ mech. Same one can be used on PC and ATR with changes required to the drive select jumper when changing from PC to ATR.
On PC:
Used teledisk to make disks of ATR8K484 and ATR8000. Label and store.
Use TD2FDI converter to extract the raw data of both.
Used winhex, examine both FDI files.
ATR8000.fdi has $FD1 bytes header. Removed those. From $3880 till end was removed. Any blocks of $E5 were removed. In ATR8000.FDI, there are incorrect bytes from $50 to $7F which are required for a working boot ie they are zero.
ATR8K484.fdi remove first $828 bytes.  Copied bytes $50 to $7F to ATR8000.fdi.  Note there is extra rubbish in 2 locations in ATR8K484.FDI  file in the system tracks, but I only required those bytes to make a proper boot sector in ATR8000.FDI. Close ATR8K484.FDI in winhex.

In ATR8000.fdi;
Change       $59 from $EA to $EC
Change       $72 from $E8 to $EA
Change       $78 from $D2 to $D4
Why? The atr8000 cpm starts at $D400 which is the default. ATR8K484 cpm starts at $D200. These changes are for jump and load locations.
This is what is on the system tracks. Now to get it on to a disk.

Using ANADISK, I formatted 1 disk. I used special format prams and created 1 sector @ 128 bytes and 9 sectors @512 bytes making sure the 128 byte sector is sector 1 and the 512 byte sectors are 2 to 10 on the 1st track. Single sided. Call this disk  S1.
Formatted the 2nd track with 512 byte sectors numbered 1 to 9 single sided. The rest of the disk can be formatted at 1024 byte sectors double sided if you wish. . Note you can use ATR8000 disk created with teledisk earlier if you wish. Just don’t format 3rd track and beyond.

Using MSDOS, I Formatted 2 disks @ 180K
Back in winhex, inserted  $180 bytes starting at $80 to pad this out to 512 bytes. Then wrote whole thing to disk formatted by Msdos  starting at sector 1. Call this D1.

Removed the first 512 bytes  in winhex then wrote whole thing out  to the 2nd Msdos disk starting at sector 1. Call this D2.

Back in ANADISK, I copied sectors 2 to 9, 1st track, from D1 to S1.
Then copied sector 9 1st track from D2 to sector 10 1st track on S1.
Then went to 2nd track and copied sectors 1 to 9 from D2 to S1.

Now time to boot your favorite dos on the 8bit and load up a sector editor. I used SDX and DiskRX.
Plugged in the ATR and had a 360K disk mech set to D0 (D1?)  On the floppy port. Removed all other devices.
Insert D1, read sector 1. Insert S1 and write same sector. Note that the data is inverted when compared to what was seen in winhex It may error on read but the data should be good.
This should have created a bootable CPM disk.

  Boot with this and then use disks created with teledisk for the files. Use Dinit to format some data disks. Use DDsysgen to create more system disks.

 

Took me ages and trying many things, dissembling etc to finally to get this working only to find my ATR not working properly :(

 

James
 



#66 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Tue May 13, 2014 6:55 PM

I need a silly bit of info. When you run AUTOTERM do you get all the commands? I get B(oot), G(o), and M(odify/display memory). I seem to be missing the D(ump) command or just don't know how to use it from the monitor. ATARIMON.BAS works fine.



#67 sup8pdct OFFLINE  

sup8pdct

    Dragonstomper

  • 853 posts
  • Location:australia

Posted Tue May 13, 2014 7:53 PM

Dump wont work. the code isn't in the rom despite what it says in the instructions.

 

James



#68 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Tue May 13, 2014 10:04 PM

A moment of comic relief. I spent about 4 hours today editing the disk data with all kind of spurious errors, then I figured about half the time I had my disk in upside down as I switched disks and computers. Man I am getting old.

 

I also made a faux pas with the code I was working on. I got CP/M and BDOS compiling fine at $D400, didn't do the hooks for BIOS so I went in and changed them all by hand. I did a DOS FC and all kinds of differences. Turns out I had done stupid stuff like changed "DIGITAL" to "Digital" and added spaces where zeros used to go, which makes it kind of tedious to double check values.



#69 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Wed May 14, 2014 9:30 AM

Got it. Decided to wade through the ROM source after you verified it just isn't there. From the minimon.mac file

;  **** This code section does not exist on production ROM ****
; .COMMENT %
; JR Z,VIEW ;DO MEMORY EXAMINE/CHANGE IF 'M'
; CP 'D'
; JR NZ,PROM2 ;FALL INTO MEMORY DUMP IF 'D'
et cetera
 
SWP just never changed their manual. I think it is there in the original ROM since they included minimon.mac.orig in the files and that code snippet wasn't commented out.
 
Not a lot of spare bytes to put it back in either. IMO wouldn't make sense to do something like delete 8" drive support to add it when someone may still hook up a 5.25" 1.2 meg floppy in 8" mode.


#70 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Wed May 14, 2014 7:24 PM

James, gave it the gold old college try and I can't get anywhere near to your results. Probably different utility version but TD2FDI bails out on everything but ATR8000.TD0. The other .TD0 get a message "error, wrong overlay code" among others.



#71 sup8pdct OFFLINE  

sup8pdct

    Dragonstomper

  • 853 posts
  • Location:australia

Posted Wed May 14, 2014 10:04 PM

James, gave it the gold old college try and I can't get anywhere near to your results. Probably different utility version but TD2FDI bails out on everything but ATR8000.TD0. The other .TD0 get a message "error, wrong overlay code" among others.

Interesting.

I never got that at all.

One thing i did find was one image, atr8k484 i think it is, is missing the 2nd side from track 3 on and it appears to have been double sided originally. so half is missing.

 

Have attached the version i used.

 

James

Attached Files



#72 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Wed May 14, 2014 10:21 PM

Interesting.

I never got that at all.

One thing i did find was one image, atr8k484 i think it is, is missing the 2nd side from track 3 on and it appears to have been double sided originally. so half is missing.

 

Have attached the version i used.

 

James

Beauty! I d/l'd the .td0 a bunch of times, tried d/l'n another copy of Image Disk software, nothing was  working. Your zip has the creation time a bit different, one file was ~10k longer, and it works! Thanks for getting me up to speed.



#73 fibrewire OFFLINE  

fibrewire

    Stargunner

  • 1,624 posts
  • Location:Southern California

Posted Wed May 14, 2014 10:23 PM

At least one old 5.25" 360k DSDD IBM or or similar style disk drive would be the best all around choice. There's a few that would cause problems IIRC, things like drives out of Tandy computers used the 34 pin cable to run power to the drive so they won't work w/o some modification. I think the drives out of an Epson Equity I did the same thing.

 

I made that mistake about 18 years ago. I had a really nice Tandy 1000 TL/3 and wanted a 1.4 meg floppy drive in it, so i did what any hobbyist would have done. I threw one in :) Next think i know i turn on the power and I watch as the traces on the drive light up and start to smoke. Damage had already been done, and only later did i learn that some drives come with configurable jumpers that allow power to come off the ribbon connector.


Edited by fibrewire, Wed May 14, 2014 10:24 PM.


#74 sup8pdct OFFLINE  

sup8pdct

    Dragonstomper

  • 853 posts
  • Location:australia

Posted Wed May 14, 2014 10:54 PM

Beauty! I d/l'd the .td0 a bunch of times, tried d/l'n another copy of Image Disk software, nothing was  working. Your zip has the creation time a bit different, one file was ~10k longer, and it works! Thanks for getting me up to speed.

Cannot remember where i got it from. Not from the link earlier in this thread tho.

 

James



#75 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 606 posts

Posted Fri May 16, 2014 8:08 PM

Still a little numb from one of those 'til 3AM sessions. In one of my left handed and cross eyed moments I decided to learn enough Macro 80 assembler to see about modifying the ROM. What I found was it seems that no matter what is on that first track, when you give the boot command to the ATR8k it loads sector 1, side one, track 0, into $80 to $FF.

 

What I was thinking was there would still be problems distributing/reproducing disks. Specifically the different size sectors on a track is nuts. It could be patched in RAM using the monitor and I will try that too. I would be happy if it just read and dumped the first sector where it is supposed to go, then continued with the boot process ignoring errors.

 

99% perspiration, 19% outside help, 2% luck, 120% effort. :) The men of comp.os.cpm were invaluable. So I have a 183k .PRN file for the output. The first part was under CP/M emulation.

  00A0    C3 F762               JP EMULATOR ;GO INITIALIZE FOR ATARI OR CP/M
 
I ran the relocatable code through the MicroSoft Linker L80. Honestly I still don't have a clue, could be lack of sleep. I just cycled through all the options and there was the binary. I looked at the file creation times, yes, must of been me. I looked at the name, yes name preserved but this thing changed from the relocatable file .REL to a .CPM file??? I'm hoping that is the default for the particular version of the linker I used. I'm pretty sure I didn't supply it.
 
So, I did a FC with the copy of the ATR8k ROM with the .CPM and no differences were found. I sent the ATR8000.ROM though DZ80, a MS DOS Z80 disassembler and compared the .PRN file to the disassembled ROM file and they look like an exact match save for some phasing errors. i.e. the ROM starts/boots at memory location zero, short code section copies itself to high ram where it transfers control to disable the ROM in low memory. Switches to the RAM underneath ROM just like we do.
 
I also tried to put the monitor D(ump) command back in, but no go. Just not enough room in ROM. I'm not sure if they got cheap with ROM, like they could have used an 8k ROM instead of a 4k and kept the monitor code in. Shouldn't be a real problem, I could always add the monitor code to the first 128 bytes of a floppy.
 
Down the road I will upload the .PRN file if anyone wants to wade through it. Not exactly required reading and I wouldn't be doing except for a shot at getting the ATR8K a little more conventional.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users