TOS patch for 1.44MB floppy support ?

General Discussion, STOS.

Moderator: troed

User avatar
exxos
Site Admin
Site Admin
Posts: 23496
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

TOS patch for 1.44MB floppy support ?

Post by exxos »

In the TOS sources there is stuff like this, but seems to be for ST BOOKs.

Code: Select all

#if STBOOK
hdselect:   tst.w     d0                        /* if != 0 then select HD */
            bne.s     hdselec2
            clr.b     d0                        /* SD mode */
            bra.s     hdselec3
hdselec2:   move.b    #$80,d0                   /* HD mode is bit 7 in PORT A on the sound chip */
hdselec3:   move      sr,d2                     /* save status register */
            move.b    #14,ABSW(psgsel)          /* select port on GI chip */
            move.b    ABSW(psgrd),d1            /* get current bits */
            bclr      #7,d1                     /* clear HD bit */
            or.b      d0,d1                     /* or-in our new bit */
            move.b    #14,ABSW(psgsel)          /* select port on GI chip */
            move.b    d1,ABSW(psgwr)            /* and write 'em back out there */
            move      d2,sr                     /* restore status register */
            rts
#endif
But are there any patches to TOS to add this without having to recompile TOS with that feature enabled ?
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
troed
Moderator
Moderator
Posts: 908
Joined: Mon Aug 21, 2017 10:27 pm

Re: TOS patch for 1.44MB floppy support ?

Post by troed »

Well TOS 2.06 can do 1.44MB - as shown by the Mega STE. I think what trips everybody up is how Atari made it "backwards". Instead of the drive telling TOS what the disk is, TOS simply tries one mode and if it receives gibberish it changes the frequency and tries again.

In any case, it works, and is pretty easily emulated (the PAL, to get the register for frequency changes).
User avatar
exxos
Site Admin
Site Admin
Posts: 23496
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: TOS patch for 1.44MB floppy support ?

Post by exxos »

That's a point. But now I'm confused as the sources only have the option for ST BOOK. though there is some other stuff in there for 206.. I guess I'll just measure the pin and see if it toggles while accessing the floppy..
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23496
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: TOS patch for 1.44MB floppy support ?

Post by exxos »

Well bit 7 on port A is high on boot then after the logo goes low and stays low regardless of floppy in or not. :shrug: It makes sense by the sources but doesn't make sense as to why / how the MSTE could use HD modes this way :shrug: I assume it uses a wire on the drive to select clocks to the 1772?

EDIT:

Looks to use feedback from the drive on pin 2 of the floppy cable. That GAL feeds the 1772 clock.

Capture.PNG
Capture.PNG (70.35 KiB) Viewed 1900 times

Port A7, no idea where that's going.

2.PNG
2.PNG (54.17 KiB) Viewed 1898 times

I assume TOS208 might work. Though some links are broken http://www.avtandil.narod.ru/tose.html
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
troed
Moderator
Moderator
Posts: 908
Joined: Mon Aug 21, 2017 10:27 pm

Re: TOS patch for 1.44MB floppy support ?

Post by troed »

Pin 2 is an output, not an input (seen from the computer). TOS 2.06 enables HD support if dip switch X (7?) is on, and then it simply tries 8 and 16MHz (through the register decoded by the PAL) and sees which returns valid data from the drive.

https://www.atari-forum.com/viewtopic.p ... 19#p113215

So, emulating the PAL and giving TOS the corresponding dip switch signal is all that's needed to get HD floppy support.
User avatar
exxos
Site Admin
Site Admin
Posts: 23496
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: TOS patch for 1.44MB floppy support ?

Post by exxos »

troed wrote: Tue May 24, 2022 10:39 pm TOS 2.06 enables HD support if dip switch X (7?) is on,
I thought that was just to get HD option on the desktop ? Seems not.

I'm building a new TOS to enable this stuff.. I did have it switching but 4 bombs on desktop :roll:
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
atari030
Posts: 315
Joined: Mon Feb 12, 2018 12:43 pm

Re: TOS patch for 1.44MB floppy support ?

Post by atari030 »

Troed is right (Atari forum post), it does work for an external drive. I have two, one is an Atari external with an HD mech and the other a cumana type with HD mech. Both work without any modification on the MegaSTE and TT externally as HD. Pop the drive in the housing and go.
User avatar
exxos
Site Admin
Site Admin
Posts: 23496
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: TOS patch for 1.44MB floppy support ?

Post by exxos »

So I need to figure out how to enable the HD stuff in TOS somehow.. though I can only see it with ST BOOK stuff. So no idea how it's getting enabled.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23496
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: TOS patch for 1.44MB floppy support ?

Post by exxos »

Wonder if this is a input not a output as it's enabled but doesn't do anything

Code: Select all

/*
 * TP_41: HD_BIT: HD-Floppy controlling
 *
 * 0: don't change
 * 6: use sound-chip bit 6
 * 7: use sound-chip bit 7
 *
 * TP_42: HD_INVERT: Invert level
 *
 * Control HD-floppy selection via sound-chip bit 6 or 7.
 * If the HD controller expects low-level, also set TP_42 (HD_INVERT) to 1,
 * otherwise high-level will be used.
 * Note: ST-Book uses a low-level on bit 7.
 */
#ifndef TP_41
#define TP_41 7
#endif
#ifndef TP_42
#define TP_42 0
#endif
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
User avatar
exxos
Site Admin
Site Admin
Posts: 23496
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: TOS patch for 1.44MB floppy support ?

Post by exxos »

Does anyone know what register the dip switches are at ?


EDIT:

Code: Select all

cooSTE:     
#if (TOSVERSION >= 0x400)
            moveq     #31,d1                    /* bit 0: PSG, bit 1: 8-bit DMA, 2: CODEC, 3: DSP, 4: Multiplex */
#else
            moveq     #3,d1                     /* bit 0: PSG, bit 1: 8-bit DMA */
#endif
            move.l    #$5F534E44,(a0)+          /* setup SND cookie: Sound hardware */
            btst      #7,d0                     /* DIP switch 7 on? */
            bne.s     cooSND                    /* (punt) */
            bclr      #1,d1                     /* no 8-bit DMA sound */
cooSND:     move.l    d1,(a0)+
            btst      #6,d0                     /* DIP switch 6 on? */
            bne.s     cooFDC                    /* (punt - no HD floppy) */
            move.b    #8,dsb                    /* select HD density for drive A */
            move.l    #'_FDC',(a0)+             /* setup FDC cookie: Floppy disk controller */
            move.l    #$01415443,(a0)+          /* 'ATC' | (1 << 24) */
cooFDC:     move.l    #$5F465055,(a0)+          /* Setup FPU cookie: Type of the FPU */
            moveq     #0,d7                     /* 0 = no FPU */
            suba.w    #$24,sp
            move.l    (_lineftrap).w,(sp)
            move.l    (_coprovio).w,4(sp)
            move.l    #cooFPU,(_lineftrap).w
            move.l    #cooFPU,(_coprovio).w
            lea       8(sp),a1
            movea.w   #_cpunordered,a2
            move.l    #cooFPU2,d0
            move.l    (a2),(a1)+
            move.l    d0,(a2)+
            move.l    (a2),(a1)+
            move.l    d0,(a2)+
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
Post Reply

Return to “SOFTWARE”