Announcement

Collapse

Forum etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.


Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.


Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.



Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.


"PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.


Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.


Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.


New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.


Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

My floppy remapper project, version 2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    My floppy remapper project, version 2

    Hi,

    While in lockdown, I've been working on an improved version of my floppy drive switch. I'm happy to report that it is working...

    TL;DR: I can boot from an external floppy on my model 4P GA, with the boot drive switchable via s/w.

    Sorry for the long post, skip to the bottom if you want to see some pictures.

    For my previous attempts, see my thread here.

    The purpose of this switch is to allow me to boot from (and use) my external floppy drives as though they were placed internally. This is a convenient way to use a floppy drive emulator or a real floppy (interchangeably) without having to retrofit the case or swap cables each time.

    My previous board, while it worked okay, had a few issues that I wanted to address:

    1) On a Model 4 GA (or a Model 4P non-GA), my board requires some minor external modifications to the motherboard. I wanted to minimize these changes.
    2) The floppy map was limited to one (switchable) hard wired remapping. I want to be able to select different mappings via software on the TRS-80 (perhaps via a key sequence at boot). Credit to Gonk23 for this suggestion!
    3) If I fixed #2, then I wouldn't actually need a physical switch anymore (although I've kept the switch as a backup option).
    4) The Model 4P only supports 2 internal floppy drives. I want to add external drives, just like my Model 4 and 3. Although there is a mod for this in the January 1986 80 Micro magazine, I wanted to reduce the number of hacking and external wires needed to implement it (while adding my floppy switch at the same time).

    Additionally, I had a few extra design goals in mind:

    1) I wanted to move components to the underside of the board (in case I needed it to fit in a low profile space). I was worried (perhaps unnecessarily) that my board might run into the graphics card or case on my model 4P.
    2) I needed to switch to surface mount components (due to #1).
    3) I needed to have the board assembled for me (due to #2).
    4) I added a proper h/w debounce for the enable switch.
    5) I needed to add colorful blinking leds. Okay, I really didn't need this, but they are cool.

    This is also an excuse for me to do more hardware hacking.

    Note that this board is only useful for TRS-80s with built in floppy drives and which share a common floppy controller design. So far this includes the M3, M4, M4 GA, M4P and M4P GA. I haven't tested a M4 or M4P (non-GA) yet.

    The common element for all of these floppy disk controllers (whether on an external controller or integrated onto the motherboard) is a 6-bit flip flop (using a 74LS174) that is used to latch the four drive select lines (and two additional control lines). My board replaces the flip flop with programmable logic. Minimally, this requires removing the chip and installing a socket.

    As it is "illegal" (and not very useful) to select more than one drive at a time, I thought I could exploit this. Since I am using a MCU, I can monitor the drive select lines for this illegal condition, effectively using this as a code to get the MCU to change the mapping.

    Additionally, the MCU I selected has the ability to emulate logic functions without the aid of software. This allows me to nearly match the speed of the original flip-flop, making the MCU act like a GAL/SPLD, but much more flexible.

    So, my idea is to use drive selects 0 & 1 (simultaneously enabled) as a "flag" to tell the MCU that it should change mapping modes. This left me 4 remaining bits to play with.

    In theory, the floppy drives could be re-ordered in 24 different drive combinations (requiring 5 bits). IMO, many of these combinations aren't useful, so I narrowed the list down to the 8 that I put into a table in the MCU. With 8 mappings, I only needed 3-bits. This left me with 1 free bit left. I use this bit (if set) to tell the MCU to save the current mapping in EEPROM (to be restored when the MCU first powers up). This allowed me to set the mapping either temporarily or permanently. Setting the mapping temporarily works even if the TRS-80 is reset (but not power cycled).

    The way to switch the mapping (or save it permanently), is with a single out command (e.g. from BASIC).

    While there are 8-bits that can be set in the out command, only bits 0, 1, 2, 3, 4 and 7 actually go to the flip-flop my board replaces. In particular, bits 0 and 1 represent drive select 0 and 1. I use bit 7 as the flag to save the mapping to EEPROM. This left bits 2, 3 and 4 for the mapping.

    So, putting this all together, I can change or reset the mapping via a single command:

    out 244, 3 + 4*map

    or, to save the mapping permanently, I add 128:

    out 244, 3 + 4*map + 128

    The table of mappings I programmed is:

    map 0: 0 1 2 3 (no change)
    map 1: 1 0 2 3 (i.e. swap drives 0 and 1 only, drive 1 becomes the boot drive).
    map 2: 2 0 1 3
    map 3: 3 0 1 2
    map 4: 0 2 1 3
    map 5: 1 2 0 3
    map 6: 2 3 0 1
    map 7: 3 2 0 1

    Since the MIII and M4's all have built in BASIC roms, this means I can change the drive mapping at any time. I figured I could still get myself into trouble on a M4P (since it has no basic rom) if I accidentally selected an un-bootable configuration. Because of this, and because I like switches, I've kept the enable switch.

    Note: being able to s/w select the boot drive means that I can also do this via the keyboard at boot if I want. All that is required is a boot rom change (to issue the out instructions desired based on key presses). Maybe I'll try to implement this later.

    So, what happens to the drives when multiple drives are selected? This is supposed to be an illegal condition! Good question. Since I would only do this when there is no i/o active, nothing should happen. As a precaution, I also have the MCU clear the drive select lines nearly immediately (< 1 microsecond), just in case. The motor does run briefly, but I don't see any drive lights come on.

    Yes, all of this is a total hack. In my defense, I'm just having fun and wanted to see if I could do it. So far, it seems to work... If this breaks something, I can always reprogram the MCU.

    Ok, now let me get back to the problem of those extra (4) bodge wires needed for my M4 GA (see my other thread). To solve this problem, I added an additional output on the MCU to create an "external bus" select line. This means that I only have to jumper one wire from my remapper board to the M4 GA. This can be done with a clip, just like the one used on the graphics card. Unfortunately, I still need to cut one trace. As far as I know, this is no way to avoid this.

    And finally there is my M4P GA. Like the M4 GA, there are several wires and mods needed if you want to add support for drives 2 and 3 (see the 80 micro article). I moved some of this logic into the MCU. The result is that my M4P GA shouldn't need any bodge wires to remap the floppy drives *and* add support for the extra external drives. I did need to create a new floppy drive cable however (but this is fairly easy).

    The M4P non-GA is slightly more complicated as it has a different floppy disk controller chip. Similar to the M4 GA, I think I'll need to cut one trace and run a jumper in it's place. As I don't have a M4P non-GA, this is only based on my analysis of the schematics... I am also not sure about the physical placement of the remapper board on the non-GA (or variants if there are different revisions). Again, I don't have one so I can't test this.

    Finally, no project is complete without colorful blinking lights.

    There is a green "enable" LED which lights up when the enable line is not grounded.

    There is a green "default" LED which lights up whenever the current mapping matches what is saved as default in the EEPROM.

    There are four row (and one bank) red LEDs showing which mapping is currently active.

    There are also two modes, selected by an input pin. Non-M4P mode is the default. M4P mode is enabled by grounding the input pin.

    While in M4P mode, the MCU changes how it how it "drives" drive 2 and 3, as well as the behavior of the external bus output. These eliminates some of the bodge wires which would otherwise be needed.

    To visually distinguish which mode is enabled, I change the flashing behavior of the row led.

    In non-M4P mode, the row LED will flash slowly. In M4P mode, the row LED will do a fast double flash. Flashing the leds also tells me the MCU is alive.

    BTW: I had a really good experience with PCBWay. They built my design with very little hassle (especially considering Covid-19). At $80 for 5 boards fully built (including sourcing the parts), I can't complain at all!

    There are still a few things that I'd like to fix:

    1) I messed up on the silkscreen. In particular, I added the "M4P" mode after I sent the files for manufacturing. The comments next to the pins don't match the behavior I described above.
    2) I should have added through hole jumpers for Drive selects #2 and #3. This would make it simpler to use clips that would go to the floppy drive header on my M4P GA. My workaround was to add two wires directly on my M4P GA instead.
    3) While PCBWay was excellent, I didn't expect that they would hand solder my boards(!). This resulted in some of the LEDs being flaky. In the future, I'll either use larger component packages or insist on machine soldering.

    Here is a picture of the new board:

    IMG_20200504_170158.jpg IMG_20200504_170146.jpg

    I program it with a PicKit4 (so it can be powered and it run self-tests). The programming header is also used for i/o pins for selecting the mode, the enable switch, external bus select, and as a run jumper.

    IMG_20200504_190904.jpg

    Here it is installed in my M4 GA:

    IMG_20200505_183604.jpg

    And in my M4P GA:

    IMG_20200509_193711.jpg IMG_20200517_154606.jpg

    And the back of the M4P GA (with the dangling external cable and enable switch):

    IMG_20200523_191707.jpg

    Here is the cable I had to make for the M4P GA:

    IMG_20200523_170907.jpg IMG_20200523_183400.jpg

    Using the out command to change the boot drive to boot from drive #2 on my M4P GA (using a HXC USB floppy simulator as the boot drive):

    IMG_20200517_155622.jpg IMG_20200523_192910.jpg

    George
    Last edited by mrthreeplates; June 6, 2020, 12:04 AM.

    #2
    Love the project, sounds like another one for The Custom TRS-80 & Other mysteries, Vol 2!

    Comment


      #3
      Very nice project indeed!

      Comment


        #4
        Update: I tweaked my M4P drive external floppy drive cable a bit:

        Note: On the model 3 and 4, the external drives are mapped as #2 and #3 (although they are in fact addressed on the bus internally as drives #0 and #1).

        With a straight through cable (like I created), I could accidentally interfere with the internal drives if I jumpered my external drives incorrectly.

        It turns out that this is easy to do. My HxC USB floppy emulator can emulate drives 0, 1, and 2 (not 3 for some odd reason). Even more annoying on the HxC, drive 0 is the power on default (which I can't change!).

        So, I thought I'd fix this "problem" by rewiring drives 2 and 3 at the external connector.

        IMG_20200523_170907.jpgIMG_20200523_191707.jpg

        It was a little tricky disassembling the external connector and carving up the cable, but some tape helped keep everything in place.

        IMG_20200620_112215.jpgIMG_20200620_112805.jpgIMG_20200620_112809.jpg

        Now the cable out the back of my M4P acts just like the card edge connector M3 and M4. "Problem" solved!

        Comment


          #5
          KiCad is so much fun...

          I went ahead and fixed the issues I had with version 2.

          First, I adding headers at the top for the external signals (needed for M4P or M4 GA) and the optional disable switch. This will make installation much cleaner / simpler.

          noname_jumpers.jpg

          Next, I cleaned up the silk screening for the programming / jumper header on the bottom. By swapping two input lines I can get away with using 1 or 2 simple jumpers.

          noname_prog.jpg

          While I was at it, I toned down the brightness of the LEDs and increased the minimum package size to 0402 (from 0201). I hope the larger size improves the reliability problem I had with some of my previous boards (due to hand soldering):

          noname3_front.jpgnoname3_back.jpg

          Note: ignore the rendering of the header at U2, it isn't correct.

          Now I just have to impatiently wait for the boards to be finished...

          Comment


            #6
            If I read your post correctly, the modifications to the Model 4P mobo to enable external drives are not needed for your system to work. But would it work if the mods have already been done? Or would the system need to be returned to original configuration?

            Comment


              #7
              Originally posted by lafos View Post
              If I read your post correctly, the modifications to the Model 4P mobo to enable external drives are not needed for your system to work. But would it work if the mods have already been done? Or would the system need to be returned to original configuration?
              Hi Lafos,

              Yes, for a model 4p ga, no mods to the mobo are needed (other than installing a socket for the 74ls174). A m4p non-ga will require one trace cut and jumper clip. However, this is far less invasive (and easily reversible) when compared to the original method for adding external floppy support to the m4p.

              If you happen to have already done the external floppy mod on a m4p mobo (of either type) and wanted to just use my board to do the floppy remapping, this should work too. In this case the m4p jumper would be removed.

              George

              Comment


                #8
                Boards are back, programmed, and seem to work. This is version 3.

                Here is the front and back:

                MVIMG_20200814_212224.jpgMVIMG_20200814_212203.jpg

                The dupont headers on the front are for the (optional) disable switch and output signals.

                The output signals are needed for M4P and M4 GA installations (see previous lengthy post).

                Here is my M4 GA:

                MVIMG_20200816_093112.jpgMVIMG_20200816_094450.jpgMVIMG_20200816_093000.jpg

                In the first image, you can see I've installed a disable switch, and one jumper connected to pin #1 of U95. This is the EXTBUS line. If you look closely, you can see I cut the trace just above U95. This allows my board to supply the EXTBUS signal instead of the gate array. Non-GA M4s or M3s won't need this minor (but necessary) modification.

                Here is the board installed in my M4P GA:

                MVIMG_20200816_193628.jpg

                I also have the disable switch installed. The M4P (either non-GA or GA) requires that I hook up the drive select lines to support external drives. To make things simple, I made up a special floppy cable:

                MVIMG_20200816_193237.jpgMVIMG_20200816_193212.jpg

                Notice that I separated drive select 0 and 1 from the external connector and connected it to a two pin dupont header (and to my board). My board outputs drive selects for drives 2 and 3. So, an externally configured drive 0 or 1 will appear as drive 2 or 3, just like on the M3 and M4.

                Using this approach, no bodge wires are needed on my M4P GA and I get external drives with the ability to remap them as I like. This is a cleaner/simpler install than my previous version.

                Note that a M4P non-GA would still require one (unavoidable) trace cut and jumper, just like my M4 GA above.

                I welcome any comments, suggestions or questions.

                If there is any interest in these boards, I'll figure out a way to share them.

                Comment


                  #9
                  George, thank you for following through with this solution. It solves the same nagging problem for me when using a floppy emulator so I would definitely be interested in obtaining a few of these.
                  Pete
                  http://pski.net

                  Comment


                    #10
                    Can someone provide some more detail on the 4P non GA bodge wire details? I read the other thread and I understand the GA handles some of the drive mapping inside, which is why this is needed, but I'm not as familiar with the drive logic on these units, so the explanation got lost for me.

                    I gather that the 74ls174 latch exists on the 4p non GA, and this device thus can still latch the values.
                    But, the bus mux logic is not familiar to me.

                    Jim

                    Comment


                      #11
                      Hi Jim,

                      Thanks for the interest.

                      I'm working on a better documentation for my project (including answers to your very good question). This thread (and my original thread), are very hard to follow as my experiments and hacking have evolved. Sorry about that.

                      Towards that end, I've started dumping all of my design files on Github:

                      https://github.com/mrthreeplates/TRS-80_floppy_remapper

                      Here you will find my schematic, gerbers, BOM, source code, etc. This is still WIP, so give me some time to clean it up.

                      With regards to your question, I don't have a 4P non-GA, so take what I say here as unverified.

                      The 4P non-GA's floppy controller chip needs a signal (HLT/RDY) which is active whenever any of the floppy drives are active. Since the 4P has only two drives, they used a simple OR gate driven from drives 0 and 1. Actually it is a NOR fed into an inverter, but effectively it is an OR. This two input gate is U75 on my schematic. In order to add two more drives, you'd need to supply the same HLT/RDY signal, but would need to change this to a 4-input gate (fed by all four drive signals).

                      I solve this problem on my v3 board by generating the HLT/RDY signal directly and route it to the external pin on the front of the board. You then need to connect this output to HLT/RDY. This requires you to cut one trace from the OR gate on the motherboard and jumper in the signal from my board. This is still much simpler than the major modifications you need if you followed the original article from 80 micro (January 1986).

                      On my 4P GA, due to the different design, even this minor mod isn't required.

                      Interestingly, the 74LS174 (hex flip-flop) is common to all of the Model 3, 4, and 4P computers (including GA / non-GA variants). This flip flop latches the 4 drive select lines driving the floppy drives. The other two bits are for the side select and density. The whole secret to my board is that it can swap these bits around, effectively remapping the drives in any way desired. Adding support for external drives on the model 4P is a bonus.

                      HTH,

                      Regards,

                      George

                      Comment


                        #12
                        FYI: I have several test boards available, which have accumulated due to my experiments:

                        One v3 board (this is the latest version described at the end of this thread) - See the GitHub files for v3 information.
                        Four v2 boards (these are functionally the same as V3, but don't have the convenient headers on the front).
                        One v1 board (this one is the dumb non-programmable simple switch). This works best in a M3 or M4.
                        Four unpopulated v1 PCBs (I may have the parts for some too). Consider this a kit without instructions.

                        Some of the v2 boards have minor defects (due to the leds), which are likely repairable. They all are functional.

                        I am happy to send these to people who would like to play with them.

                        Preference goes to those who have computers I don't have (e.g. a M4 non-GA and M4P non-GA), those who are comfortable hacking on hardware, programming PIC controllers, and aren't afraid of damaging their vintage computers...

                        Bonus points awarded to anyone who wants to contribute to the GitHub design files, source code, PCB, etc.

                        Double bonus points for creative ways for me to avoid having to ship out multiple packages.

                        PM me if interested.

                        Thanks,

                        George

                        Comment


                          #13
                          Thanks for the better explanation. I'll have to check if I have a 4P GA or just 4P non GA.

                          JIm

                          Comment


                            #14
                            I finally got around to installing the floppy remapper today in my Model 4D. It works great! It solves a common problem in a simple yet elegant fashion. I'm quite impressed and give it a solid recommendation. Now, it's not for the complete noob as there is some chip removal involved, which if you are not experienced could quickly devolve into a nightmare. The 4D motherboard has fairly small traces so you need to be careful when desoldering. Take your time.

                            I want to thank George for developing this accessory. I've been watching this thread and then on his Github site as he constantly iterated and evolved this project. I know from experience that it takes a lot of effort to keep going on a project like this that only a handful of people may ever use. It is a labor of love for these magical old computers.

                            Thanks, George!

                            IMG_2851 2.jpgIMG_2852 2.JPGIMG_2853.jpgIMG_2855.JPG
                            Pete
                            http://pski.net

                            Comment


                              #15
                              Originally posted by pski View Post
                              I finally got around to installing the floppy remapper today in my Model 4D. It works great! It solves a common problem in a simple yet elegant fashion. I'm quite impressed and give it a solid recommendation. Now, it's not for the complete noob as there is some chip removal involved, which if you are not experienced could quickly devolve into a nightmare. The 4D motherboard has fairly small traces so you need to be careful when desoldering. Take your time.

                              I want to thank George for developing this accessory. I've been watching this thread and then on his Github site as he constantly iterated and evolved this project. I know from experience that it takes a lot of effort to keep going on a project like this that only a handful of people may ever use. It is a labor of love for these magical old computers.

                              Thanks, George!

                              [ATTACH=CONFIG]63268[/ATTACH][ATTACH=CONFIG]63269[/ATTACH][ATTACH=CONFIG]63270[/ATTACH][ATTACH=CONFIG]63271[/ATTACH]
                              Hi Pete,

                              That is so great to hear that it works for you! Thank you for taking the time to test it out and the kind words. Your additional socketing of U95 is a much cleaner solution and avoids the trace cut! I really wish I had done this.

                              For anyone else who is interested, I'd really like to find out if this board will work on a M4P (non-gate array) or even a M4 (non-gate array). I'm particularly concerned about the M4P non-gate array with a graphics board. I'll send my remapper boards (from what I have) to people who'd like to try this out. My earlier board versions (of which I have several) will work best on non-M4P computers.

                              I've cleaned up the instructions quite a bit, you can see them at: https://github.com/mrthreeplates/TRS-80_floppy_remapper.

                              As Pete rightly points out, careful soldering is involved (installation of 1 or 2 sockets), but is otherwise a reversible modification. The M4P install (which adds external floppy drive support), requires that you make a special floppy cable.

                              Depending upon interest (and confirmation that there aren't any problems with the design), I'd like to find a way to get these boards made for those who'd like them.

                              Thanks!

                              George

                              Comment

                              Working...
                              X