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 20th Apr 2020, 5:29 pm   #1
qazxsw123
Triode
 
Join Date: Nov 2016
Location: Frinton on Sea, Essex, UK.
Posts: 45
Default Gemini /80 bus CPM boot sector

I'm having trouble reading the disk image files into my gemini system via a gotek unit. the system consists of the following cards:-

gm829,gm849a,SVC card, rom is rpu v2.3

the system will boot and run from a floppy disk but not from a gotek unit, the go tek is set for 10 sectors two heads 512 byte sectors and layout is interleaved.

getting down to the code stored in the first sector of first track there seems to be a problem in that its not written for double sided disks. has anyone managed to boot from a gotek using these files?


Boot sector and disassemble below

HEX CODE
21 00 DD 01 E4 01 11 10 88 3E 0C D3 BC 3E 01 D3 E4 78 D3 E2 7A D3 E0 18 02 77 23 ED 78 28 FC DB E3 FA 1B 00 DB E0 E6 FC 28 07 3E 03 D3 BC C3 00 F0 04 78 D6 0A 20 03 47 CB CA 1D 20 D0 C3 00 F3 00






; Disassembly of the file "C:\111dsk\bootcode.bin"
;
; removed first two bytes "47 47"
;
ld hl,0dd00h ;ram address to save data
ld bc,01e4h ;"B" contains first sector to get, "C" contains external status port
ld de,8810h ;"D" contains command for sector read side 0, "C" contains sector count
ld a,0ch ;
out (0bch),a ;switch out rom switch in ram
l000d: ld a,01h ;select drive 1
out (0e4h),a ; write it to external status port
ld a,b ;move sector start to "A"
out (0e2h),a ;write to sector register
ld a,d ;get command for read sector "88"= read sector,side compare side 1
out (0e0h),a ; write to command register
jr l001b ; (+02h)
ld (hl),a ;save data to ram address
inc hl ; inc ram address
l001b: in a,(c) ; read external status port
jr z,l001b ;keep reading if all flags clear
in a,(0e3h) ;read dataport
jp m,l001b ;jump back
in a,(0e0h) ;read status port
and 0fch ;mask off bits 0 and 1
jr z,l0031 ; no errors so jump ; (+07h)
ld a,03h ;
out (0bch),a ;switch back rom and ram
jp lf000 ;jump back to rpu/simon as boot loading failed
l0031: inc b ;increment sector
ld a,b ; move it to "A"
sub 0ah ;subtract 10= max sectors
jr nz,l003a ; ; (+03h)
ld b,a ;move it to "A"
set 1,d ; change the command from "88" to "89" read sector,side compare 1
; read sector,side compare side 1 side compare side 1
l003a: dec e ;reduce the number of sectors to get by 1
jr nz,l000d ;go and get another sector
jp lf300 ;jump to rom area and report all sectors loaded

HL now contains "EF00", 9 sectors loaded from first track, remaining sectors on side 2 not loaded as code does write to bit 3 of port "E4" to select side second side on the goteck. The initial value for "hl" was "dd00H"

that does not allow room the load the full data for cpm in the image. the image code is "2510H" add that to the load address(ddoo) and you get 10210H overflowing the 64k boundary. all the image files have the same boot sector.
I suspect the same boot sector has been pasted into the image files. looking at the MFB images the boot sectors are very different by not defining HL and allowing use of the stack pointer.
qazxsw123 is offline  
Old 21st Apr 2020, 9:42 am   #2
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
Default Re: Gemini /80 bus CPM boot sector

the set 1,d instruction changes d from 88 to 8a. This selects side 2 on the floppy disk controller for some of the 179x series. However on the GM849 the side is controlled via a different register. The conclusion is that you have the wrong boot disk. Do the gotec images correspond to your floppy images.

PS John Newman has booting images for a gotek and gm849 system - see www.glasstty.com
JohnBHanson is offline  
Old 21st Apr 2020, 10:39 am   #3
qazxsw123
Triode
 
Join Date: Nov 2016
Location: Frinton on Sea, Essex, UK.
Posts: 45
Default Re: Gemini /80 bus CPM boot sector

yes the code sets up the 2793 to read the side 2 and the 2795 fdc has an output for side select, but has an inverted data bus. I have rewritten the boot code to output the side select via port E4H when the set 1,D is executed but then the memory overflow problem occurs

Not impossible to fit the 2795 but would need mods to the PCB and does not fix the memory over flow problem.

I've looked at all the image files loaded on the web and they all seem to have the same boot sector, only the MFB system files have a different boot sector
qazxsw123 is offline  
Old 21st Apr 2020, 1:36 pm   #4
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
Default Re: Gemini /80 bus CPM boot sector

On the Gemini the first sector is numbered 0 and not the more usual 1. Check you have configured the gotek for that configuration.

The boot sector you specify is for a 64k CP/M system on a GM829.
I suspect the remainder of the system on the disk is for a GM829 also.

When you boot from a *real* floppy what version does it announce?
JohnBHanson is offline  
Old 21st Apr 2020, 4:05 pm   #5
qazxsw123
Triode
 
Join Date: Nov 2016
Location: Frinton on Sea, Essex, UK.
Posts: 45
Default Re: Gemini /80 bus CPM boot sector

]On the Gemini the first sector is numbered 0 and not the more usual 1. Check you have configured the gotek for that configuration.

Gotek config is correct, it can load both sides, but there nothing in the boot code to switch sides on the floppy interface.

The boot sector you specify is for a 64k CP/M system on a GM829.
I suspect the remainder of the system on the disk is for a GM829 also
.

The boot sector code loads at DD00H the size of the cpm code would over flow the memory if it loaded. its also the same boot code in all the images

When you boot from a *real* floppy what version does it announce?

I have one working floppy disk and it reports 64k CPM version 4.5. I'm in the process of extracting the boot sector( its very different to that in all the images)

note it does output a side select to port e4H


Hex dump below

4747310001B720013C083E0FD3BCCD1E
0028073E03D3BCC300F008C300F02100
DA01E4011E13DBE50716823002168808
D3E40878D3E27AD3E018027723ED7828
FCDBE3FA3B00DBE0E6FCC00478D60A20
22473A7E00B7280ECB5A200408F60808
7AF60C57180D3E5BD3E03D20FDDBE0CB
4720FA1D20B9AFC90000000000001100


ASM file
; Disassembly of the file "C:\Documents and Settings\b\My Documents\Downloads\gemini\mfb boot"
;
; CPU Type: Z80
;
; Created with dZ80 2.0
;
; on Wednesday, 15 of April 2020 at 05:47 PM

lf000: EQU F000H
leb00: EQU EB00H


ORG 0;START OF boot PROGRAM AT 0000


ld l,l
ld b,a
ld sp,0100h
or a
jr nz,l0009 ; (+01h)
inc a
l0009: ex af,af'
ld a,0fh
out (0bch),a
call l001f
or a
jr z,l001b ; (+07h)
ld a,03h
out (0bch),a
jp lf000
l001b: ex af,af'
jp leb00
l001f: ld hl,0d500h
ld bc,01e4h
ld e,13h
in a,(0e5h)
rlca
ld d,82h
jr nc,l0030 ; (+02h)
ld d,88h
l0030: ex af,af'
out (0e4h),a
ex af,af'
ld a,b
out (0e2h),a
ld a,d
out (0e0h),a
jr l003e ; (+02h)
l003c: ld (hl),a
inc hl
l003e: in a,(c)
jr z,l003e ; (-04h)
in a,(0e3h)
jp m,l003c
in a,(0e0h)
and 0fch
ret nz

inc b
ld a,b
sub 0ah
jr nz,l0074 ; (+22h)
ld b,a
ld a,(007eh)
or a
jr z,l0067 ; (+0eh)
bit 3,d
jr nz,l0061 ; (+04h)
ex af,af'
or 08h
ex af,af'
l0061: ld a,d
or 0ch
ld d,a
jr l0074 ; (+0dh)
l0067: ld a,5bh
out (0e0h),a
l006b: dec a
jr nz,l006b ; (-03h)
l006e: in a,(0e0h)
bit 0,a
jr nz,l006e ; (-06h)
l0074: dec e
jr nz,l0030 ; (-47h)
xor a
ret
qazxsw123 is offline  
Old 22nd Apr 2020, 10:42 am   #6
john_newcombe
Hexode
 
Join Date: Apr 2019
Location: Skipton, North Yorkshire, UK.
Posts: 252
Default Re: Gemini /80 bus CPM boot sector

The boot images I have on glasstty.com have been successfully used on the GM829 not the GM849a.

I have two systems here, the first is the GM829 where the Gotek works well and when I transfer the system tracks to a real floppy, that boots also.

The second system is a GM849 (not 'a') which has been modified for the Multi-format bios (MFB), I cannot get the Gotek to work with this at all. However, I can get a real floppy drive to work with the original system disk that came with the machine. As things stand, I have not yet been able to make an image of that system disk due to a lack of working hardware and the regular failure of the system disk itself. Clearly I need to get on top of this before it is lost forever.
john_newcombe is offline  
Old 22nd Apr 2020, 2:40 pm   #7
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
Default Re: Gemini /80 bus CPM boot sector

In order to make sure not too much of the Gemini world is lost I have just built software kits for running Gemini systems under my xbeaver emulator.

These can be found at http://81.105.120.101/xbeaver/operating_systems.html

(The xbeaver emulator can be found at http://81.105.120.101/xbeaver/ )

I hope this helps preserve the bits....
JohnBHanson is offline  
Old 22nd Apr 2020, 4:07 pm   #8
john_newcombe
Hexode
 
Join Date: Apr 2019
Location: Skipton, North Yorkshire, UK.
Posts: 252
Default Re: Gemini /80 bus CPM boot sector

Quote:
Originally Posted by JohnBHanson View Post
In order to make sure not too much of the Gemini world is lost I have just built software kits for running Gemini systems under my xbeaver emulator.

These can be found at http://81.105.120.101/xbeaver/operating_systems.html

(The xbeaver emulator can be found at http://81.105.120.101/xbeaver/ )

I hope this helps preserve the bits....
Thanks John, don't forget that the GM916 was also MFB . Not as pretty as the GM925 though.
john_newcombe is offline  
Old 22nd Apr 2020, 8:08 pm   #9
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
Default Re: Gemini /80 bus CPM boot sector

Thanks John - I don't want to hijack this thread off topic - but do you know what the differences were between the gm916 and gm925?
JohnBHanson is offline  
Old 23rd Apr 2020, 11:07 pm   #10
qazxsw123
Triode
 
Join Date: Nov 2016
Location: Frinton on Sea, Essex, UK.
Posts: 45
Default Re: Gemini /80 bus CPM boot sector

Looking at the cct diagram for the gm849 and gm829 there is a major difference. despite the gm849 docs saying the boards are software compatable, they are not.

The gm829 uses a 1797 while the gm849 uses a 2793, the 1797 has an output for the side select so when the data register is set to use it the floppy drive is signaled to switch heads.

The gm849 uses a 2793, this chip does not have an output for the side switching and uses bit 3 of port e4.

So it looks like all the image files would work on a system using the gm829 FDC and won't work on a system using an gm 849 FDC.

I'm fitting a mod to one of my gm849's that will lach the side select bit when writing to port E0 and logically or it with the latch on port e4.

update to follow
qazxsw123 is offline  
Old 24th Apr 2020, 4:19 am   #11
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
Default Re: Gemini /80 bus CPM boot sector

Do be careful on doing this. Remember the WD floppy disk controller only updates the Side Select Output on a type 2 or type 3 command. It is not updated on a type 1 command. This has caused me some heart ache in the past when trying to seek on single sided disk in one drive after reading/writing the second side of a floppy in another drive.

You should remember that the bit position for side select in a type 2 or type 3 command is in the same place as the seek rate selection for a type 1 command.

Also remember that the selection of floppy drive is different between the 829 and 849. The 829 handles 4 drives, the 849 handles 8 drives.

The compatibility only extends to using the same boot rom to boot. The system booted has to be different between the 829 and 849. Software can distinguish between the 829 and 849 and do the appropriate thing so a latter bios could be used with either an 829 or an 849.
JohnBHanson is offline  
Old 24th Apr 2020, 10:06 am   #12
qazxsw123
Triode
 
Join Date: Nov 2016
Location: Frinton on Sea, Essex, UK.
Posts: 45
Default Re: Gemini /80 bus CPM boot sector

I will be using an EPROM to decode all the input bits needed to set/reset a latch and then logically or it with the existing latched output from port e4.

Databus bits 7/6/5/3 port e0 write as inputs and one of the databits for the output feeding a latch with the chip perm enabled.



Using an EPROM to decode the inputs is quick and dirty. changing the boot sector code to give an extra out to E4 when using the second side would not fix any legacy code in the image files written for the gm809/829 cards.

the drive select is not an issue as its either single bit select of binary select.
qazxsw123 is offline  
Old 26th Apr 2020, 1:39 pm   #13
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
Default Re: Gemini /80 bus CPM boot sector

From https://80bus.co.uk.mirror.jloh.de/p...o_News_1_3.pdf
reading page 10....
".... but because of the difference in side change on the WD2793 FDC chip BIOS 3.4 or greater must be used if a double sided drive and GM849(A) is used in the system.

It also gives the versions for SIMON and BIOS for different combinations.
JohnBHanson is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 10:39 am.


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.