UK Vintage Radio Repair and Restoration Discussion Forum

UK Vintage Radio Repair and Restoration Discussion Forum (
-   Vintage Computers (
-   -   Gemini 80-Bus System (

JohnBHanson 17th May 2019 6:37 pm

Re: Gemini 80-Bus System
Once you have 32k CP/M running from disk the rest is easy

create a directory on you system ~/beaver/network - this will hold "network files"

run xbeaver with the 64k cpm file. within the emulator type

A>t-net n
A>pip n:=a:*.*

This will copy all files on a: to the network drive (eg the linux directory ~/beaver/network)

Copy from there to rp/m using your existing technique via rpm
boot your 32k copy of cp/m disk on the real hardware (this will not destroy the program area)
use the save command to save the file to disk

check the access permissions on /dev/ttyS0 allow access - change if necessary
then on linux run
xbeaver fileserver

on the real gemini system run the command
a>t-net n

Then any files in directory ~/beaver/network will appear in drive n: of your gemini machine
these can of course be copied.

To create a copy of the 64k system in real sectors do the following

a)extract from xbeaver.dsk do the following
A0:0>copy n:

Translate the .DMP file to a .dsk file

in the gemini.cfg file change the floppy command to be use the line (or similar)

board 0xe0 gm829_floppy -geometry D35. ~/beaver/gm512/GM512_64.DMP C35. ~/beaver/network/cpm_64.dsk

now run xbeaver gemini.cfg

copy the program into a: using
A>t-net n
Source Drive>A
Destination Drive>B

This should copy the disk to the disk file
exit the simulator

On the real hardware the file n:cpm_64.dsk contains an image of the disk

use the following to create this onto drive b:
Disked>Db (Echos as Disk B)
Disked>Fs (Echos as File set) n:cpm_64.dsk)
Disked>t0 (Echos as track 0)
Disked>s1 (Echos as sector 1)
Disked>Fr (Echos as File Read)
Disked>Q (To quit disked)

(Disked ? gives help)

This will copy the file cpm_64.dsk from the linux machine to disk b:

And you will have (hopefully) a CPM 64 k disk in drive B:

DIsked will be a useful tool for you. If you do Buffer read/write disked holds its buffer at 2000h and can be pre-loaded as required before running disked (including via rpm).

JohnBHanson 17th May 2019 8:57 pm

Re: Gemini 80-Bus System
Just to let you know that I enjoy your 6502 viewdata

A while ago there was a viewdata/prestel card for sale on ebay that was 80bus
so I had to give into temptation and implement it in xbeaver.

The config line to get the screen is

board 0x47 wt625 0xfc800 Viewdata options kahsv

also make sure you have the shell server in your config:-
board 0x48 shellserv /bin/bash

And to run it within VPM/M the following commands
are useful. To start a virtual machine on the terminal type the

device ins a:vv
device vdu vv0

and then run program viewdata to get a linux shell, from there telnet 6502
or as you want.

Another test program

john_newcombe 17th May 2019 10:39 pm

Re: Gemini 80-Bus System
I am glad you like Telstar, it has been very popular with BBC and Sinclair owners. Thanks for all your help and information I am working through it all. Will let you know how I get on with it all.

john_newcombe 19th May 2019 7:48 am

Re: Gemini 80-Bus System
Just looking at patching CP/M for serial and just wanted to check with you on the 'status' patch.

I am performing the patch within the script performing the conversion from .DMP to .IMG so that I can produce both patched and non patched automatically and the byte I see at F6EF (64K) doesn't match with the one you mentioned so my maths is probably wrong.

Given that I have a interleaved .IMG in memory as a byte array I can see that the first patch is at byte 6125 i.e. 12th (512 byte) sector, offset 31h. This ties up with the value at the end of the list of C3s. So I am happy with this patch.

The second patch 'status' I am not getting right. Based on bytes 3 & 4 in sector 0, I am using CP/M with the load address of 5D00, the 64K image you sent shows a load address of dd00. My maths suggests that a patch at F6EF on a 64K system relates to byte 1Bef within the byte array...


Patch Address - Load Address + Length of Sector 0
F6EF - DD00 + 0200 = 1BEF

...but this byte is 02 on each disk image not 20h as you suggested, can you see what I am doing wrong?


JohnBHanson 19th May 2019 8:36 am

Re: Gemini 80-Bus System
You need to take the address of the patch 6ef, add the base of the bios f300 to get f9ef and then
work out
f9ef - dd00 + 0200 = 1eef

This should be 20h and you need to change it to 01h

Try that.

john_newcombe 19th May 2019 9:36 am

Re: Gemini 80-Bus System
Thats it, many thanks.

john_newcombe 19th May 2019 8:09 pm

Re: Gemini 80-Bus System
Some progress to report...

I have now booted the system (sort of) from a Gotek, using a track interleaved disk image with output arriving at the serial port. I still have a few issues to investigate as I do not yet see the A: prompt. I will look into this next week. Both the 32k and 64k images behave the same. It looks for all the world like the serial parameters have been changed by CP/M loading.


57344 bytes -  RP/M for Gemini V2.1
Executing boot

Gemini Multiboard Auto Density System (1.4)

        64k CP/M vers 2.2

I also have discovered that the previously mentioned IVC failure is due to a dodgy output transistor. If that is all that is wrong, that is an easy fix. I will try and sort this this week and boot the machine using the IVC for display.

If I get all of this working I will publish the details on

JohnBHanson 19th May 2019 10:47 pm

Re: Gemini 80-Bus System
Try 2400 baud.... Divisor is at address offset 3a (address) f33a in the 64k version.

(Should be 0dh for 9600 baud which is the highest in common with a pc).

I think you are getting close. Don't forget most of the 64k image and all of the 32k image should be preserved across reset. So with the 32k image you can take the disk out hit reset and then look at what is in memory. You have always got my emulator for comparison :-).

john_newcombe 20th May 2019 8:37 am

Re: Gemini 80-Bus System
Thats it. Booted to CP/M (32k and 64k) all files visible etc. and able to run programs as expected. I can't quite believe it really!

John: Thank you so much for you help, it has been invaluable.

I need to get my head around a couple of things now. The disk images are 35 track images (gemddds) and it would make sense for these to be 80 track (gemqdds). Naturally I could extend the disk image file with 'e5' blocks but I suspect there is more to it than that.

The second thing I would like to understand better is the issues you had in creating the 64k version of CP/M. I will re-read your posts on the matter.

In terms of hardware, I will try and fix the IVC today, boot to CP/M and add my real floppy disk as a second drive.

I will write up the Gotek settings today/tomorrow and post them here and on glasstty.

Once again, many thanks.

JohnBHanson 21st May 2019 3:55 am

Re: Gemini 80-Bus System
Be careful when changing the DPB to include larger disks. The screen dumps of DISKDEF I gave earlier use the definition of even tracks being on side 0 and odd tracks being on side 1. (Scheme a)

The gemini bios uses the definition of tracks being cylinders eg each track starts on side 0 and continues on side 1. (Scheme b)

Both techniques are acceptable for CP/M and which is used depends on how the bios determines the side number.

The first definition - the bios divides the track number by two to give the cylinder number - the remainder being the side number

The second definition the sector number is compared to the number of sectors per track and this is used to determine the side number.

This means that there are a difference between some items within the Disk Parameter Block.

This affects the values of SPT and OFF defined in the Disk Parameter Block.

Scheme a
SPT: 40
OFF: 2

Scheme b

(NBSPT refer to 128 byte sectors which is what CP/M BDOS sees).

This is because scheme a tracks are actually tracks, whereas scheme b tracks are really cylinders - I hope that makes sense.

Some systems work one way and some another - CP/M does not directly have a concept of sides only tracks and sectors. So when double sided disks happened either the number of tracks or the number of sectors were doubled giving the two alternative layouts.

To change to 80 tracks you will need to change the DPB - the disk size is given by the DSM field. This is measured in blocks. If you keep the block size
the same then you will need to change the size of the allocation vector - this is one bit per block. If you don't have enough room in the bios for the larger allocation vector size you can change the block size. This will involve changing BSH/BLM/AL0/AL1. See the alteration guide for details, or look at the diskdef screen dumps earlier which have the values calculated. Note diskdef uses scheme a and not scheme b so you will have to double SPT and half the OFF values before using them in your bios.

Do make sure the memory allocted in the bios for he Check and allocation vectors are large enough.

john_newcombe 21st May 2019 8:49 am

Re: Gemini 80-Bus System
I now have a real 40/80 track floppy connected as drive B: and have been able to copy files across using PIP etc. SYSGEN was less successful.

In terms of using higher capacity drives I was just thinking of trying to create QDDS disk images for use with CP/M. I wondered if these would be supported automatically without any bios changes. I know that CP/M could be purchased in either format, GM512 (DDDS) and GM532 (QDDS), but it may be that each version is specifically tailored to the different drives in terms of DPBs and utilities such as FORMAT.COM.

I am not sure I am capable of making some of the changes you highlighted in the last post, so may end up grabbing a 35/40 track drive in place of my 80 track and turning my attention to adding a hard drive.

JohnBHanson 21st May 2019 10:55 am

Re: Gemini 80-Bus System
I think sysgen or movcpm is/are broken wrt writing to disk.

For updating the bios, you need to assemble multi.mac at the correct origin for you cp/m size
and then write the output file to the bios sectors on track 0

To assemble you need to look at the aseg/org/phase directives eg for 64k cpm use

org 0100h
.phase 0f300

then build with the commands
m80 =multi
l80 multi,multi/n/e

Then use disked to located the start of the bios on the boot tracks
then use the file set and file read commands to copy to the boot sectors where the bios is

Hope that helps somewhat

john_newcombe 22nd May 2019 9:16 pm

Re: Gemini 80-Bus System
Thanks, that makes sense.

The Gotek settings etc. have all been added to the blog now, let me know if I have missed anything.

As an aside, I have just started investigating the IVC issue(s). The Z80 CPU had failed and has now been swapped, however, the CS for the CRTC is permanently low and as a result the DISPLAY ENABLE is preventing a video output. There is supposed to be a strobe loading data in but that is missing too. I will do a little more digging this week and see where that takes me.

JohnBHanson 22nd May 2019 9:24 pm

Re: Gemini 80-Bus System
I know you have probably already done this, but check the clock at the pin of the Z80. Remember the clock comes from the backplane.

john_newcombe 23rd May 2019 10:21 am

Re: Gemini 80-Bus System
Yes, the clock is good and does come from the master clock. What I am missing is the output from the Z80s IORQ which is used to strobe the CS of the CRTC. I am starting to think this is a software issue, i.e. I have a dodgy ROM.

julie_m 23rd May 2019 3:39 pm

Re: Gemini 80-Bus System
To test this, could you program up a custom ROM with an infinite loop of just IN instructions, which will assert IORQ?

If you want to be fancy, you could even use the loop to update the BC registers so as to give you a counter on the address bus .....

john_newcombe 23rd May 2019 10:50 pm

Re: Gemini 80-Bus System
Many thanks, all ideas very welcome.

Anyone got an image or dump of the ivc rooms?

john_newcombe 4th Jun 2019 10:05 pm

Re: Gemini 80-Bus System
I now have a copy of the IVC Mon 2.0 but am missing the UK version of the IVC Gen 1.0 ROM.

JohnBHanson 4th Jun 2019 10:15 pm

Re: Gemini 80-Bus System
1 Attachment(s)
If that is the character generator for the IVC card - I have extracted the character set for the SVC - the first 2k of an attached file blown into the correct eeprom should be correct.

john_newcombe 5th Jun 2019 7:52 am

Re: Gemini 80-Bus System
Yes the IVC, many thanks.

All times are GMT +1. The time now is 7:19 am.

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