UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 22nd Oct 2019, 8:24 pm   #1
NealCrook
Tetrode
 
Join Date: May 2019
Location: Reading, Berkshire, UK.
Posts: 51
Default Creating new NASCOM PolyDos magnetic media

cosmocat wrote:

I was mulling the possibility of writing a program on the Nascom to read the disk image (in sections) over the serial port (from a PC) then using low level NASDOS routines to write the disk tracks so that when the PolyDos boot rom was installed the files would appear correctly. I was unsure if this approach would work though.
I think I may instead look at your SDcard adaptor as you suggest.

This is definitely do-able. Here are some suggestions. First, NAS-DOS uses 16 sectors per track while PolyDos uses 18. So, you don't really want to use a NAS-DOS formatted disk (you could get it to work.. the geometry is abstracted in the ROM. BUT then you would have to use NAS-DOS for all your formatting, rather than the PolyDos format program),

Step 1, create a PolyDos3 format disk.

grab https://github.com/nealcrook/nascom/...iles/FORMAT.GO and transfer it (somehow!!) to your NASCOM. You can store it on a NAS-DOS disk. Load it to memory at $1000 but before executing it patch location $1104 from 18 07 to DF 5B. This will return to NAS-SYS after doing the formatting step. Usually the program would create a directory entry and verify the disk, but that will only work on a booted PolyDos system, whereas the formatting part does not have that requirement.

Execute the patched program at $1000 and it should guide you through the formatting of a disk.

Step 2. Use NAS-DOS to copy the PolyDos3 image to the newly-formatted disk

polydos_vfs reports that the PolyDos3 disk image only has $de sectors assigned used.
Each track of the disk image is 18 * 256 = 4608 bytes (4,5k) and $de sectors is just less than 13 tracks-worth. Break the image into chunks of 4608 bytes (eg, use "split" from unix)

write an assembler program for the nascom that takes 2 arguments and executes this algorithm:

writetrack(addr, track)
for sector = 0 to 15
call nas_dos_sector_write(sector, track, addr)
addr = addr + 256
next sector


now, transfer the first 13 chunks of the PolyDos3 disk to a NAS-DOS disk and then write protect it!! Load them into memory one by one, swap disks to the PolyDos disk and run the program with the correct arguments to write a tracks-worth of data

Note1: you could used bigger chunks than 4.5K but this keeps the program simple
Note2: use the NAS-DOS write-sector call; don't be tempted to try to use the write-track call because that will not work at all (it will overwrite the formatting).
Note3: NAS-DOS doesn't care that you're trying to write to a sector number that is not "legal" for a NAS-DOS disk

Step 3: make a ram-resident "boot rom"

Assemble the PolyDos3 boot ROM with a start address of $B800 (PolyDos uses workspace at $C000). Put the executable onto a NAS-DOS disk

Step 4: ready to go!

Load the PolyDos $B800 image into RAM and execute at $B800. It should prompt for a boot disk, Insert your carefully prepared disk and away you go.

I'll be really excited to hear if this works!

Long-term tho you might prefer my solid-state solution (especially as I'm working on making it work with NAS-DOS as well). If you do like magnetic disks, you still might like my solid-state solution as a mechanism for creating new disks: I wrote a program that I called "scrape" to copy all the sectors from a floppy onto a SDcard file, and it would be simple to do the reverse: a program that takes a disk image on SDcard and writes it to a floppy.

If you're comfortable with a bit of soldering and you'd like a PCB for the sdcard, PM me your address.

Neal.
NealCrook is offline  
Old 23rd Oct 2019, 7:37 pm   #2
cosmocat
Triode
 
cosmocat's Avatar
 
Join Date: May 2011
Location: Bristol, UK.
Posts: 34
Default Re: Creating new NASCOM PolyDos magnetic media

Hi Neal
Thanks for the info, most helpful.
Quote:
NAS-DOS uses 16 sectors per track while PolyDos uses 18. So, you don't really want to use a NAS-DOS formatted disk
that is the kind of gottcha I was afraid of, thanks for the tip.
I think I will give it a try as you suggest. It may take a little while to get through the steps but I will let you know how I get on.

When using double sided drives, I read somewhere that PolyDos treats it as 1 track with twice the number of sectors, writing sectors 1to 18 on side A and 19to 36 on side B thus getting maximum disk capacity with minimal head movement. Do you know how PolyDos knows when to do this or not, and is it something I need to consider now, or a refinement for later?

Thanks again for your valuable insight.
Andrew.
cosmocat is offline  
Old 23rd Oct 2019, 8:16 pm   #3
NealCrook
Tetrode
 
Join Date: May 2019
Location: Reading, Berkshire, UK.
Posts: 51
Default Re: Creating new NASCOM PolyDos magnetic media

That is true for PolyDos2 - it supports 35-track double-sided disks that can be either single density or double density.

However, PolyDos 3 only supports single-sided 80-track double-density drives, so the situation does not arise.

So, I think you'll be OK (breaths sigh of relief.. for a moment I thought you had found a fatal flaw in my scheme)

If your hardware is actually 80-track double-sided double-density then you can bootstrap with single-sided and then consider whether you want to create PolyDos 3A... Adding support for double-sided drives means mods to the format program (which I already disassembled) and mods to the ROM (for which source code is available). A fun project..
NealCrook is offline  
Old 23rd Oct 2019, 10:00 pm   #4
cosmocat
Triode
 
cosmocat's Avatar
 
Join Date: May 2011
Location: Bristol, UK.
Posts: 34
Default Re: Creating new NASCOM PolyDos magnetic media

Wow Step one worked a treat...

I will keep you posted.
Attached Thumbnails
Click image for larger version

Name:	IMG_20191023_214558.jpg
Views:	169
Size:	76.5 KB
ID:	192351   Click image for larger version

Name:	IMG_20191023_214654.jpg
Views:	161
Size:	54.4 KB
ID:	192352  
cosmocat is offline  
Old 23rd Oct 2019, 10:12 pm   #5
NealCrook
Tetrode
 
Join Date: May 2019
Location: Reading, Berkshire, UK.
Posts: 51
Default Re: Creating new NASCOM PolyDos magnetic media

Very cool - and nice wood-work
NealCrook is offline  
Old 26th Oct 2019, 3:25 pm   #6
cosmocat
Triode
 
cosmocat's Avatar
 
Join Date: May 2011
Location: Bristol, UK.
Posts: 34
Default Re: Creating new NASCOM PolyDos magnetic media

Hi Neal ... We have success.

I automated the transfer and write to disk, using BASIC to get the track sized chunks (I have added a hardware handshake feature to my serial port) into a RAM buffer then wrote to disk as you suggested with a machine code subroutine.

After a couple of false starts, (a bad floppy disk and a program bug) transfer to disk completed.

I skipped step 3 and instead swapped the NAS-DOS roms for the POLYDOS3 boot rom I had blown earlier and booted up.

The "Boot which drive" prompt appeared,I pressed 0 and off it went.


If you would like a copy of the disk I'd be happy to pop one in the post for you.

Cheers
Andrew.
Attached Thumbnails
Click image for larger version

Name:	IMG_20191026_142737.jpg
Views:	117
Size:	80.9 KB
ID:	192470  
cosmocat is offline  
Old 27th Oct 2019, 12:25 pm   #7
NealCrook
Tetrode
 
Join Date: May 2019
Location: Reading, Berkshire, UK.
Posts: 51
Default Re: Creating new NASCOM PolyDos magnetic media

Hi Andrew,

I'm pleased to see that my recipe was sound. Congratulations on your success. I hope you enjoy exploring PolyDos. If you have lots of NAS-DOS disks the next programing challenge will be a utility that runs from PolyDos, reading files from NAS-DOS disks and writing them to PolyDos disks.. or (more simply) loading them to RAM to be saved manually..

Thanks for the offer of a disk, but my hardware uses old Pertec 35-track FD250 drives (well, it did; now I just use my solid-state board)

Neal.
NealCrook is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 12:46 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.