Image Map Image Map
Results 1 to 7 of 7

Thread: IO address 14H in Kayplus ROM 4-83

  1. #1

    Default IO address 14H in Kayplus ROM 4-83

    Hi,

    Just fiddling with a homebrew emulator on the Teensy 4.0 and trying to get a Kayplus ROM (kplus83.rom) working so I can add an emulated harddisk function (the emulator already works with the stock 81-232 ROM and some binary images of the boot floppies on SD card).

    In the emulator I found that the ROM sends some value to port 14H but the Kaypro 4-83 does not have anything on that port. On the other Kaypro models the system bits IO port is at 14H but on the 4-83 it is at 1CH. What could be the function of that IO address in the Kayplus ROM ?


    cpm22_teensy.jpg (Teensy 4.0 with 480x320 SPI LCD screen)

    The image is from a standard ROM boot, still have to find out why the KayPlus ROM does not boot, it initializes the screen, shows the Kayplus message and then hangs on the first 'restore' command of the floppydrive (that generates a NMI interrupt and jumps to 0066H in RAM but there is no code yet to be found).

  2. #2
    Join Date
    Mar 2013
    Location
    Chaffee, MO
    Posts
    1,337

    Default

    Not Sure, but Roger Hanscom has this URL:
    that has several dis-assemblies of some Kaypro BIOS's. They may give you a clue.

    Thanks.

    Larry

  3. #3

    Default

    My guess would be that the ROM is trying to function on both old (Z80-PIO at 1ch) and new (latch at 14h) mainboards.
    - Doug

  4. #4

    Default

    Sorry for the slow reply, rather had a sad family matter here.
    But as far as I can tell it only writes once to port 14H and multiple times to 1CH so it is not linked together for 'downwards' compatibility.

    Need to dig a bit deeper into the disassembled source of the Kayplus(83) rom to see what is going on and why my emulator switches the ROM out when it should not.

    The Kayplus rom starts up in the real Kaypro here but I do not have a suitable bootflop yet, so it is displaying the intro screen and then just sits waiting for a floppy disk.
    However I can bail out to the inbuilt monitor which I can not in the emulator.

    For the real Kaypro to boot I need to have two working floppy drives to create a 'new' format boot floppy, at the moment I have only one drive connected and the space for the other floppy drive is occupied by a Seagate 10 MB full height MFM drive which I have been experimenting with (connected to an ISA 8 bit MFM controller).
    2020-01-16 20.25.21_klein.jpg
    I'm hoping to gain some more information on the Kayplus rom to modify it for the ISA harddisk controller on the real Kaypro but experimenting with the code is easier on the emulator...
    Last edited by gertk; January 16th, 2020 at 11:36 AM.

  5. #5

    Default

    Quote Originally Posted by gertk View Post
    ...
    But as far as I can tell it only writes once to port 14H and multiple times to 1CH so it is not linked together for 'downwards' compatibility.
    ...
    Since port 1ch is the Z80-PIO, it makes sense that there would be more access to it. Also, the code could fairly-reliably "test" whether the Z80-PIO is present, and thus detect which kind of Kaypro it is running on. This is all theoretical, as I have not looked at the ROM code, but it was common practice back in the day. They could also just blindly go through the Z80-PIO initialization regardless of whether it is there or not, and then update both 1cH and 14h whenever they change the "system port" bits.
    - Doug

  6. #6

    Default

    Took a closer look at the kplus83 rom code. That code is intended to run only on the "Kaypro 83" models (Kaypro II, 4 a.k.a. 4/83). The code to access port 14H is a "fail safe" in case the ROM accidentally gets installed on "Kaypro 84" hardware (Kaypro 2X and beyond). This code ensures the floppy drives are deselected and thus there can be no access to them (boot, etc).
    - Doug

  7. #7

    Default

    Quote Originally Posted by durgadas311 View Post
    This code ensures the floppy drives are deselected and thus there can be no access to them (boot, etc).
    Aha, that explains a lot. Thanks for finding this out! I can ignore this in my emulator.
    Will keep you posted on the progress.

    Gert

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •