PDA

View Full Version : Northstar Advantage – Writing floppy disks with NST by Dave Dunfield



jonhales
April 3rd, 2015, 02:13 AM
Writing disks with NST is what I would like to do.

My primary aim is to obtain the hard disk setup programs which are available in collections of *.NSI disk images. My Advantage has a 360k DS/DD floppy drive, so it needs the double-density version of NST. Can anyone help?

1. If you have the Northstar-end NST ‘stub’ program to receive data packets and write the disks, could I send you a blank disk and return postage?

2. If you have the assembly code for NST , including the I/O routines for the Advantage, could you email a copy?

3. If you have the HEX file for the complete Advantage NST ‘stub’ program, could you email me a copy?

The first step in any of these cases would be a message via the forum.

An alternative route might be simpler:

4. The Advantage Graphics CP/M Preface, page 3-1 refers to “ADVANTAGE Hard Disk Supplement Disk”. If you have this, could I send you a blank disk for a copy? This manual refers to the ‘ADVANTAGE HARD DISK SUPPLEMENT GUIDE” which I have been unable to locate.

5. If you have the pair of disks (‘HDOS 2.2.0 H System Disk’ and ‘HDOS 2.2.1 H Initial Recovery’) in Advantage version, could you make me copies if I send blank disks and pay for return postage? (Note: On Bitsavers.org, I think these are D04B01 and D07B01, respectively. They appear under the Northstar Horizon directory and may not work on the Advantage).

If you are familiar with the Advantage hard disk setup and can clarify which NSI disk images are the correct ones for setting up the Advantage, please reply.

My preference is to get NST working on my Advantage, since this would allow me to make disks with a range of software. For example, one of my Advantage hard disks (5Mb) was originally running TurboDOS, and I know there are install disks for TurboDOS in NSI image format on various archive collections. Is anyone else running TurboDOS on an Advantage?

Background for anyone reading this who is not familiar with the Northstar Advantage:

The Northstar Advantage uses 10-hard sector 360k DS/DD disks (which can be a barrier to copying disk images). Dave Dunfield’s NST (Northstar Transfer) program allows transfer of a disk image from a DOS PC into the Advantage via the serial port. The ‘stub’ program on the Advantage writes the incoming data to the floppy disk. Dave Dunfield provided the ASM file for the main program, together with sample I/O code for customisation to the particular system. While I have tried to understand the assembly code with reference to the Advantage Technical Manual, I have not managed to work out the required coding.

Jon

new_castle_j
April 3rd, 2015, 09:34 AM
My preference is to get NST working on my Advantage, since this would allow me to make disks with a range of software. For example, one of my Advantage hard disks (5Mb) was originally running TurboDOS, and I know there are install disks for TurboDOS in NSI image format on various archive collections. Is anyone else running TurboDOS on an Advantage?

About a year ago I was working with another guy trying to get TurboDOS installed on his N*. We had good success, but never got it up 100%, the downfall was that default Console I/O for TurboDOS on the N* went through one of the slave boards, and his system didn't have a UP8 slave card. The boot floppies for TurboDOS have scripts (.DO files) that assist with the installation. You can read through our adventures here: https://groups.google.com/forum/#!searchin/comp.os.cpm/turboDOS%7Csort:relevance/comp.os.cpm/Q3mesEw7c74/J4-XapnRSvYJ

Nice to see TurboDOS mentioned again!

shirsch
June 7th, 2015, 09:52 AM
I'm struggling to fix my Advantage at the moment. It was working fine, but suddenly stopped being able to read floppy disks. Interestingly, it will bootstrap CP/M without problems but fails with "sync byte not found" when trying to log the directory track. Spent some time poking around the disk controller circuit with a logic analyzer, but am not able to make sense of what I'm seeing. Is anyone familiar with the hardware on this system and willing to give me some basic pointers on servicing it?

new_castle_j
June 8th, 2015, 06:19 AM
1. If you have the Northstar-end NST ‘stub’ program to receive data packets and write the disks, could I send you a blank disk and return postage?

2. If you have the assembly code for NST , including the I/O routines for the Advantage, could you email a copy?



I believe you can download the NST stub program and source code from Dunfield's site. Try the file horizon.zip here: http://www.classiccmp.org/dunfield/dos/

shirsch
June 8th, 2015, 07:14 AM
I have the Advantage Hard Disk Supplement diskette and some of the documentation that's available from Bitsavers has information on how to configure a hard disk. I have a number of versions of HDOS for the Horizon, but have never been able to locate 'GDOS' which is the enhanced version for use with the Advantage. No version of HDOS will boot on the Advantage. Do you have one that will?

It would be great to get NST working on an Advantage. I'm not intimidated by the code hacking, but it will require getting my hands on a copy of N* Basic that boots on it.

My Advantage remains dead, but I think I have a line on another one.

jonhales
June 26th, 2015, 09:55 PM
Hi, shirsch.

Many thanks for responding. When you have a working Advantage, I hope we can exchange disks - I can offer GDOS with NorthStar Basic. Since the original posting I found a file with ASM code that includes serial transfer, so I may have another go at NST when I find some time.

A new query: does anyone know about software to move files between CP/M and GDOS formatted Advantage disks? I found a couple of hints that something like this was available in the 1980s, but nothing tangible.

shirsch
June 28th, 2015, 08:35 AM
I have (2) working Advantages now :-). The first unit had filter caps on the 12V supply that weren't, combined with a marginal floppy drive. My theory is that it read track 0 fine, since it started on that position after an earlier recal. But, when it stepped to track 1 the supply sagged causing it to either not quite make it to the correct position or create issues on the drive electronics.

I am also extremely interested in getting NST working on the Advantage. Currently I'm able to read DS/DD N* diskettes on my FC5025, but have no means to write DS NST images back to media. If I had a working copy of N* DOS for the Advantage (my Horizon diskettes do not boot on it) it might be straightforward. Unfortunately the pared down version of GDOS that's on the Advantage startup diskette does not support the monitor.

jonhales
June 30th, 2015, 05:03 AM
Hi. This sounds promising. I need to look more closely at what I have related to GDOS, as it may add nothing to what you have. I was only interested in CP/M, so I don't know a lot about GDOS. More soon. Then perhaps we can talk about exchanging disks.

Later ...

I have come across one of the NorthStar DOS to CP/M conversion programs, called interdos.com, written in 1981. It's on SIG/M volume 111. There's no indication that it knows anything about the Advantage, which is no surprise given the date.

jonhales
July 12th, 2015, 02:28 PM
“Not there yet with Dave Dunfield’s NST (North Star Transfer)”
The aspiration behind this message is to have the ability to write North Star disks from disk images. The North Star system I am using is an Advantage with twin 360k floppy drives and a serial interface board in slot 1. I have boot disks for GDOS 1.0.0 and for CP/M 2.1. Please note: the owner of a North Star Horizon may have the capability I am aiming to achieve with the Advantage.
Dave Dunfield’s NST was written to enable disk images held on an MS-DOS system to be transferred via a serial cable to a North Star system running North Star HDOS/GDOS (that is, not North Star CP/M). NST.COM is an MS-DOS program that controls the transfer to or from the target system. It requires a ‘stub’ program to be running on the North Star system to write the incoming data to disk (or, to control the reading from disk if an image file is being created from an actual North Star disk). The code for the stub program is provided based on the requirements for use with a North Star Horizon. The serial I/O part of the program is required to be customised for the system on which the ‘stub’ is to run. A sample version of this is provided. Dave Dunfield distributed NST as part of his Horizon emulator package.
To jump to the main query, it appeared I was successful in getting the ‘stub’ program compiled and copied across to the North Star Advantage. But it is not working as expected. Instead, I receive a message on the DOS system which states ‘Target not responding’. The query is to ask whether anyone who is familiar with the operation of NST (not necessarily on an Advantage) can explain what I should expect to see on the target system. You may also be able to point out where I have made an error. It may be something very simple that I have overlooked or misunderstood.
The next part of this posting is an account of what I learned when I decided to study the code in some detail. Please bear in mind that my experience with assembly tools is limited, and I may have misinterpreted part of the documentation provided with NST.ASM.
I was able to identify (and make some sense of) the relevant documentation in the North Star Advantage Technical Manual. To begin, Table 3-26 on page 3-65 provides ‘sample Asynchronous I/O routines for the SIO board’, and the three sections of this code correspond to the three parts of the ‘sample I/O code provided by Dave Dunfield for NST.ASM. These are ‘read a byte’, ‘write a byte’ and ‘initialise the serial board’. The similarity of the two codes goes further, but I think the Manual is written in 8080 assembler and the Dunfield Sample is written in Z80 code. The Dunfield assembler ASMZ80.COM reports unrecognised codes when asked to compile the code in the Manual.
There follows a copy of the serial I/O sample code from the North Star Advantage technical manual – but note that this is rarely explicit about whether the specifications it provides are applicable under CP/M 2.2 or GDOS 1.0.0 or GDOS 2.1.0. (I have never found documentation of the differences between the two versions of GDOS).
I have amended the code from the manual to incorporate details I thought would the correct for the Advantage I have, and to refer for clarity to exact Page/Table references to the documentation.


0000 ;Code copied from Advantage Tech manual Table 3-26 on page 3-65
0000 ;With changes to use board in slot 1 (default)
0000 ;Table 3-22 on page 3-55 shows first digit of I/O address
0000 ; Board slot 1 First digit of I/O = 5
0000 ;
0000 ;Serial I/O addresses documented in Table 3-24 on page 3-57
0000 ;I/O Address Operation Description
0000 ; X0 Input/Output USART data
0000 ; X1 Input/Output USART Status/Command
0000 ; X8 Output Baud rate register
0000 ; XA Output Interrupt Mask
0000 ;The first digit is determined by the board slot where SIO fitted
0000 ;
0000 ;Baud rate/16 values in Table 3-25 on page 3-64
0000 ;May reduce from 9600 to 4800 for more reliable transfer from DOS PC
0000 ; Decimal Hex
0000 ;
0000 ;19200 127 7F
0000 ; 9600 126 7E
0000 ; 4800 124 7C
0000 ; 2400 120 78
0000 ; 1200 112 70
0000 ;
0030 PORTA EQU 50H ;Set for SIO boardlet in slot 1
0038 BAUD EQU PORTA+8 ;Set Baud rate for channel
0030 DATA EQU PORTA ;USART data address
0031 CTRL EQU PORTA+1 ;USART control/status.
007F BDRT EQU 126 ;Set Baud rate to 9600 (or 124 for 4800 Baud)
0000 ;
0000 ; Input and output routines
0000 ;
0000 DB31 CINA IN CTRL ;Check USART status
0002 E602 ANI 2 ;Get RxReady bit
0004 28FA JRZ CINA ;Wait till character ready
0006 DB30 IN DATA ;Read character (Presumably DB30 should be DB50)
0008 E67F ANI 7FH ;Mask off top bit
000A C9 RET
000B ;
000B DB31 COUTA IN CTRL ;Check USART status (Ditto, DB31 should be DB51)
000D E601 ANI 1 ;Get TxReady bit
OOOF 28FA JRZ COUTA ;Wait till ready
0011 78 MTV A,B ;Output char is in B reg
0012 D330 OUT DATA ;Output character
0014 C9 RET
0015 ;
0015 ; SIO Boardlet initialization routine
0015 ;
0015 3E7F INIT MVI A,BDRT
0017 D338 OUT BAUD ;Set baud rate
0019 ;
0019 ; Interrupt masks are cleared at power up
0019 ;
0019 3E03 MVI A,3 ;Give USART conmands
001B D331 OUT CTRL ;to reset.
00ID D331 OUT CTRL
001F 3E40 MVI A,40H ;Page H-12 explain this resets USART
0021 D331 OUT CTRL
0023 3ECE MVI A,0CEH ;Give mode command 0CEH = %11001110
0025 D331 OUT CTRL ;2 STOP BITS, 8-Bit, 16*CLK page H-14
0027 3E27 MVI A,27H ;Give command 027H = %00010111 page H-17
0029 D331 OUT CTRL ;CMD: RTS,ER,RXF,DTR,TXEN
002B CD2E00 CALL INJNK ;Read junk twice
002E DB30 INJNK IN DATA
0030 C9 RET
0031 ;
0031 END

SYMBOL TABLE
BAUD 0058 00
BDRT 007C 00
CINA 0000 01
COUTA 000B 01
CTRL 0051 00
DATA 0050 00


Two of the EQUs have values that may vary from system to system:
PORTA is explained in Table 3-22 (Tech manual Page 3-55). My system uses Slot 1, which requires the I/O address to begin with the digit 5, or 50H to write it in full. The Code F7H in that address identifies the board as a SIO.
BDRT. The Advantage SIO defaults to 9600, which seems a good place to start. Table 3-25 shows the value to be 126 (decimal) or 7E (Hexadecimal) to get 9600 baud.

For comparison, here is the sample I/O code (written for a NS Horizon with NS DOS) provided with NST:


;-------------------------------------------------------------
; Host I/O functions
;-------------------------------------------------------------
;
; NorthStar DOS I/O function do not provide a guaranteed method
; of reading 8-bit raw binary data with the ability to time-out,
; so NST uses it's own I/O functions.
;
; These functions are set up for the standard NorthStar Horizon
; console port ... if you are using different hardware, then you
; will need to modify the HINIT, PUTC and TESTC functions to
; work with the console I/O hardware of your system.
;
; Write character in ACC to host - no registers may be modified
;
PUTC PUSH AF ;Save ACC
putc1 IN A,(3) ;Read status
AND %00000001 ;TX ready?
JP Z,putc1 ;No, wait for it
POP AF ;Restore ACC
OUT (2),A ;Write to data port
RET
;
; Test for character available from HOST
; If character is ready, return with C-flag clear and character in ACC
; If no character is ready, return with C-flag SET and ACC undefined
; No other registers may be modified.
;
TESTC IN A,(3) ;Read status
AND %00000010 ;RX ready?
JP Z,testc1 ;No data
IN A,(2) ;Read data
RET
testc1 SCF ;Indicate no data
RET
;
; Host initialization function
; Perform any initialization required to set the host port
; to 8-bit raw binary data mode - you may also wish to increase
; the baud rate for faster transfers.
; Called only once at NST startup - all registers may be modified.
HINIT LD A,3 ; Insure not setup mode
OUT (3),A ; Write once
OUT (3),A ; Write again (now in operate mode)
LD A,%01110111 ; Return to setup mode
OUT (3),A ; write it
LD A,%01001110 ; 8 data, 1 stop, x16
OUT (3),A ; Write it
LD A,%00110111 ; RTS,DTR,Enable RX,TX
OUT (3),A ; Write it
IN A,(2) ; Clear pending
IN A,(2) ; Clear pending
RET



One difference between the two listings is that the Manual explicitly sets the baud rate, while the Dunfield code does not. Another difference is that the manual uses Hex, while Dunfield uses Decimal. Decimal values are more readily compared with the details in Appendix H of the 8251 USART. The two key points in this are on pages H-14 and H-17.
H-14 shows the values of the bits in the first control byte in the Dunfield code as follows:
The line of code is LD A,%01001110 ; this sets 1 stop bit, no parity, 8 data bits and baud rate factor /16.
25279

Similarly, Page H-17 (above) shows the values of the second control byte in the Dunfield code. The line:
LD, A %00110111 sets up (no hunt, no reset); RTS; ERR reset; No break; RX, DTR and TX.

25280

However, the line above (LD, A,%01110111 ; Return to setup mode) is not one I have been able to locate in the USART documentation. It appears to instruct the USART to initialise in preparation for the following control instructions.
On this point, the Tech manual page H-12 states: “[…] three successive 00 Hex or two successive 80 Hex command instructions (C/D = 1) followed by a software reset command (40 Hex) can be used to initialise the uPD8251 […]”. I can see that 40H appears in the Tech manual code, but it doesn’t seem obvious to me where the Dunfield code initialises the USART.

Steps taken so far:
I have modified the ‘sample I/O’ section of NST.ASM. At a DOS prompt, the following command runs two passes with no errors:
>NSTZ80 NST.ASM -F –I (-F= full listing; -I = Intel HEX format : may well be default in ASMZ80.COM).
To transfer the HEX file to the North Star Advantage ‘as target’, I used the command line (in a DOS screen):
>NST UH NST c=1:81N9600 (c= COM port specification: COM1, 8-Bit, 1-stop, No-parity, 9600 baud)
This opens a blue window, instructing the user to press F1 (on the PC) to start the transfer
On the Advantage:
#GO M0000 <CR>
Monitor 5.2
#DS 2D00 <CR>
>2D00 =
On the PC: when the second of the two blocks of code (392 bytes) has finished transferring, press F10 to return to DOS prompt.
On the Advantage:
>OS <CR> (to return to GDOS)
#CR NST 2 (Create file with length of 2 blocks on disk, empty at this moment)
#TY NST 1 2D00 (Set type of file to Executable, and provide address 2D00)
#SF NST 2D00 (Save the file on disk 1 from the start address 2D00)
#GO NST
Some points where some advice / help / documentation would be useful.
1. At the point reached with #GO NST, the next thing that happens is that the system gives the DOS Prompt #. This seems unexpected, as it would appear the Advantage should be waiting to receive input on COM1.
2. On the PC, when the attempt is made to WD filename.nsi d=2 (Write double density disk, filename, on drive 2), the DOS window does not change to a blue background, and it seems clear that the NST program is waiting for a response, and when it fails to appear, it exits with the error ‘Target not responding’.
If you are familiar with NST (e.g. on a Horizon) is the behaviour described above at the two ends what I should expect to see?
3. The documentation for the Dunfield ASMZ80 (and other assemblers) shows the Intel hex format as:



Data Record: ':nnaaaattdddddddddddddddddddddddddddddd...cc'
Where: : = Indicates start of data record
n = Count of number of bytes in record. (in ASCII/HEX)
a = Load address of data record. (in ASCII/HEX)
t = Record type (00=Data, 01=End of file)
d = Actual data bytes in record (in ASCII/HEX)
c = Checksum of count, address, and data. (in ASCII/HEX)

Note1: Checksum is computed as two's complement of eight
bit sum of all values from 'nn' to end of data.

Note2: End of file record contains count of 00.



My question is whether this HEX file format is what the Advantage monitor would be able to interpret. NOTE: Dave Dunfield’s own documentation of NST does not indicate a need to specify Intel format for the HEX file. The only switch he shows is –T (output messages to terminal, for example to report errors).
4. However, I have no certainty that the Monitor on the Advantage has actually received any data from the PC. On completion of the transfer (which is apparent at the PC end), it should be possible to activate the stub program (while still in the Monitor on the Advantage) by the command JP 2D00. But nothing happens, apart from the monitor prompt > on the next line.
5. The data received should be in memory starting at 2D00 (even if one has exited the Monitor and re-entered it). However, the command DS 2D00 displays only ‘2D= ’ (2D, an equals sign with a blank – ignore the quote marks). Pressing the spacebar should reveal the contents of the next addresses, but in every case the response is the same ‘XX= ‘. The file NST.HEX is 392 bytes in length.
6. The GDOS 1.0.0 disk I have appears to lack an editor/debugger, so I’m not able to inspect the contents of the NST.COM file that results from the three steps of reserving disk space, setting the type and finally saving the data block.
I welcome any suggestions for further steps to take, including alternative coding of the three parts of the I/O code. For example, it seems to be desirable to include in the ‘stub’ program the baud rate (as in the Tech Manual code), so that different versions of the stub could be saved. In the absence of this, the only alternative way I know to reduce the baud rate would be to boot into CP/M, then run Kermit and set the baud rate. The reset button on the Advantage appears not to affect the contents of memory or system settings.
Also …
I have inspected the code provided by Dave Dunfield in the file NSTXD.ASM, which includes the whole of North Star DOS. This is to enable someone with a working system but no HDOS (Horizon) or GDOS (Advantage) disk to load the OS code in the same way via the Monitor on the system. This makes intriguing references to CP/M, for example to DDT. However, that begs the question about compatibility between North Star DOS and North Star CP/M. I have found several utilities that claim to allow interchange of files between these systems, but they appear to have been a way to cope with recovery of North Star DOS BASIC (text files) which the user wished to use in future under a CP/M BASIC. I am not aware of a method of transferring executable files. If you know more about these topics, I would be grateful for any information.

new_castle_j
September 26th, 2015, 07:51 PM
jonhales, are you still out there? I was following your thread and am curious if you succeeded in getting NST working?

jonhales
October 6th, 2015, 08:46 AM
Hi. Thank you for prompting me to look again at NST. The short answer is no. I have been hoping that someone with better knowledge of Northstar systems would indicate where I was going wrong. Or at least suggest some approaches that might help me to move forward. I am already aware of the potential merit of reducing the transfer speed from 9600 to 4800 or lower – but I think the problem is probably in coding. (Under CP/M, I have been able to transfer reliably in both directions using Kermit, so I am confident the cable interface is OK).

Regarding the NST issue:
1. My particular aim was to be able to make a floppy of the hard disk setup for the Advantage. However, no archive I have found to date includes this item. I gather the Horizon disk I referred to my in my original post would be of no use.
2. So, I repeat my request to anyone with a copy of that disk to message me, in order for me to send a disk (or several) in the post.
3. I can offer some CP/M applications, the Advantage GDOS and the diagnostic disk. Let me know if any of these would be useful.

One project that has occupied some time in recent months may be of interest to some members of this forum. This has been an exercise to make disk images of floppies donated to a local computer museum. My focus has been on CP/M and early MS-DOS systems originating in the UK and other European countries up to the end of the 1980s. In the near future, I’ll post a request for any members with disks that fit this definition to let me have image files to add to the collection, with a view to making the image files available on the museum’s website.

deramp5113
October 6th, 2015, 10:10 AM
I can write ten sector floppies from any NSI image if you know of disk images that are the correct ones for your Advantage configuration. This assumes the North Star DD floppy controller is used in the Advantage, or the controller built into the Advantage is compatible with North Star's DD S-100 controller.

I don't have an Advantage computer, so I can't test the written floppy other than verifying that it duplicates the NSI image. Let me know if I can help.

Mike

jonhales
October 6th, 2015, 01:24 PM
Hi, Mike.

Thank you for the generous offer. I'll contact you via your website if any *.nsi images look indispensable.

For anyone not familiar with the Horizon emulator and NST, Dave Dunfield supplied a companion program, NSI.COM. This allows one to inspect and extract the individual files in a disk image. However, this suggests that some of the Advantage disk images he wrote had problems of corruption. I'm referring to disk images in the archive nsadvan.zip.

[... next day, after some reflection ...]
It seems possible that what appeared to be corrupted data may (perhaps) be the result of viewing a CP/M disk image with NSI.COM, which may have been designed to understand the directory of a North Star DOS disk image. I imagine that NST is able to handle both types of disk, by reading and writing based on track and sector without reference to the directory.

It also seems quite possible that the memory map of GDOS for the Advantage may not correspond to the memory map of DOS for the Horizon. I have been unable to locate the "North Star ADVANTAGE Graphics DOS Manual", which may contain relevant information. Does anyone know where a PDF copy can be found?

new_castle_j
October 12th, 2015, 03:18 PM
I found a PDF of the Graphics Dos manual here: https://archive.org/details/bitsavers_northstaravantageGraphicsCPMPreface1982p artial_4535300

jonhales
October 14th, 2015, 09:10 AM
Hi

Thank you. That's one of the manuals I do have already. That's the 'Graphics CP/M Preface'. What I was hoping someone might have is a manual for Graphics (N*) DOS for the Advantage. As a user of CP/M applications (in the early 1980s), I wasn't concerned at that time with the finer points of the operating system. However, I now have a hard disk Advantage, and the hard disk requires G(Hard Disk)DOS for the initial setup. CP/M on the Advantage hard disk system is (I believe) essentially seen by G(H)DOS as a file.

However, I'm pleased to report that I have been arranging to get hold of the hard disk setup diskette for the Advantage, which temporarily gets around the need to get NST running.

I have also received a PDF copy of the manual about the initial setup of a hard disk on the Advantage. If anyone else needs a copy of the manual, please reply.