Jump to content
Savetz

K-DOS cart (help)

Recommended Posts

I am borrowing a K-Byte K-DOS cart. This DOS wasn't released on cart AFAIK. (I borrowed it from a guy who worked at K-Byte.) It doesn't boot on my 800XL, and the dumped version doesn't boot in my emulator.

 

Who wants to be a hero and figure out if this cart works? I'm out of my element here.

 

I'm assuming standard 8K left cart. But could be wrong.

 

kdos.bin

 

—Kevin

post-803-0-94530200-1462497060_thumb.jpg

Edited by Savetz
  • Like 1

Share this post


Link to post
Share on other sites

I dumped it twice more. Once as a left cart and once as in case it's a right cart. Neither works. Both are different from the first dump I did. I don't understand why.

kdosleft.bin

kdosright.bin

Share this post


Link to post
Share on other sites

The data is so different between the dumps that it looks like there's some bank-switching going on. The 2nd set of dumps actually looks like a DOS, but the first one is just repeating byte patterns. If you dump it a few more times we might end up with all the pieces. :) Can the cart be opened?

Share this post


Link to post
Share on other sites

I am unable to dump it again, at least not today (the battery in Paul's windows laptop died.)

 

I doubt it's bank-switched. I think it's a very early cart, before bank-switching was a thing.

Share this post


Link to post
Share on other sites

Well, here's what's strange:

 

kdos.bin contains nothing that looks useful, but it ends with $B524 over and over like it's some kind of vector.

 

kdosleft.bin looks like code and has ASCII text related to DOS. Ends with the vector $B1E3.

kdosright.bin look as though it contains data for making some disk images.

 

It looks like there might be more than 16K worth of stuff here, or the first file is just garbage.

Share this post


Link to post
Share on other sites
B1C0   A2 00      LDX #$00
B1C2   BD 00 80   LDA $8000,X
B1C5   9D 00 00   STA $0000,X
B1C8   E8         INX
B1C9   D0 F7      BNE $B1C2
B1CB   EE 04 40   INC $4004
B1CE   EE 07 40   INC $4007
B1D1   AD 07 40   LDA $4007
B1D4   C9 32      CMP #$32
B1D6   D0 EA      BNE $B1C2
B1D8   A9 00      LDA #$00
B1DA   8D 00 D5   STA $D500
B1DD   4C 74 E4   JMP $E474
B1E0   A2 7F      LDX #$7F
B1E2   BD C3 B1   LDA $B1C3,X
B1E5   9D 00 40   STA $4000,X
B1E8   CA         DEX
B1E9   10 F7      BPL $B1E2
B1EB   60         RTS

Here's the routine for copying itself into RAM. (kdosleft)

 

Looks like it jumps to the warmstart routine, so it probably requires the 800 OS to work. Also, it writes to $D500 (CCTL), so the cartridge has some special function. It either bank switches, or disables itself to free up RAM. I don't see any other references to $D500 except this one. If I had to guess, I'd say this cart provided a quick and dirty way of instantly getting into a DOS environment, possibly with a utility disk image already in memory.

 

I stitched the two halves of the image together and it ran this code and then reset in an endless loop in Altirra in 800 mode.

Share this post


Link to post
Share on other sites

The banking scheme would need to be worked out. If you can open the cart possibly photos of each side could be used to deduce it if it's using a standard logic IC.

If it's just using a pair of standard Eproms maybe it could be copied by just swapping them into a nonbanked 16K cart board.

 

Strange how that code starts writing from location 0 though - if that's the case, bad programming practice and limits it to a specific OS.

Though it could probably be altered fairly easily to work on other machines.

Share this post


Link to post
Share on other sites

Yeah, it looks like it's just a brute force way to put the computer in a 'saved state.' It might be possible to make a bootable DOS from it, though.

Share this post


Link to post
Share on other sites

My suspicion is that it's probably just something that's already out there. Comparing mightn't be straightforward, likely there's embedded work areas and buffers that would change during use.

Share this post


Link to post
Share on other sites

Looking at the left and right dumps you will see that at offset $0700 of kdosright.bin is the first sector (Boot) of K-DOS.atr...

kdosleft.biin is the continuation. What you end up with is 81 sectors of DOS.SYS, but the rest is unknown...

Share this post


Link to post
Share on other sites

I'm in...

 

I halted the system during boot, loaded the image into RAM at $8000 like a cartridge, then allowed it to relocate into RAM (at $4000 for copy loop, and $0000 for the image), then jumped to WARMST.

post-3606-0-39179800-1462564292_thumb.jpg

kdos_state.zip

  • Like 2

Share this post


Link to post
Share on other sites

So is that it

 

Here's the K-DOS Cart ROM for those who haven't combined the two images yet.

attachicon.gifK-DOS Cart.rom

 

So — is that it? We got it all?

 

Also: is there a modern guide to options for cart dumping? I am willing to buy a thing, but I am not willing to use Windows. I have Macs and Ataris. Paul Westphal told me that he Lotherek SIO2PC can be used to dump carts (but I can't find info on that.) and I have that new SpartaDOS X remake, with that tempting slot for a stacked cart on it. . . I wonder if that can be used for dumping carts.

 

thanks

-Kevin

  • Like 1

Share this post


Link to post
Share on other sites

Yep, it appears to be a quick way to get to K-DOS without needing to boot it from floppy. Probably a pretty handy thing when you're coding, testing, and crashing the machine hundreds of times a day.

Share this post


Link to post
Share on other sites

Yep, it appears to be a quick way to get to K-DOS without needing to boot it from floppy. Probably a pretty handy thing when you're coding, testing, and crashing the machine hundreds of times a day.

 

 

Hm, how do I get it to work? I haven't found the combination of settings to make it work under Atari800MacX.

 

Also: thank you!

 

Kevin

Edited by Savetz
  • Like 1

Share this post


Link to post
Share on other sites

This rom cart image won't work in emulator as it get stuck in an endless copy/warm start loop due to cart not being able to be turned off. ie no such cart profile in emulators.

I have made an .XEX file that does work in emulator (atari800win). OS rev A or B required. Is same as disk based version.

 

kdos whole.xex

 

James

Edited by sup8pdct
  • Like 1

Share this post


Link to post
Share on other sites

Great. OK, if we're convinced we got it all, I will send the cart back to its owner. yayyy nerds.

  • Like 3

Share this post


Link to post
Share on other sites

The problem is that there's additional hardware in the cartridge- probably to disable it and free up RAM from $8000-BFFF. So, the system crashes if you just load it as a standard cart. It may be possible to format it as an OSS cart or something else that can disable itself.

 

EDIT: Looks like James has got it covered. :)

 

Has anyone checked whether it matches known versions of K-DOS?

Share this post


Link to post
Share on other sites

I just loaded it in Altirra using the Blizzard 16k mode along with your kdos.state and it booted okay. But it would be nice to see the innards if possible :)

Share this post


Link to post
Share on other sites

The problem is that there's additional hardware in the cartridge- probably to disable it and free up RAM from $8000-BFFF. So, the system crashes if you just load it as a standard cart. It may be possible to format it as an OSS cart or something else that can disable itself.

 

EDIT: Looks like James has got it covered. :)

 

Has anyone checked whether it matches known versions of K-DOS?

It is the same as disk version. The cart needs to be tested to see if can be turned back on again. Else power cycle is required.

 

James

Share this post


Link to post
Share on other sites

There's another chip tucked away on the back. :) I'm guessing any access to D5xx will disable it.

  • Like 1

Share this post


Link to post
Share on other sites

Here is the disk version of K-Dos from 1981. Also includes all the files mentioned on page 2 of the K-Dos user manual. Archive contains both ATA and ATX version of the disks.

K-DOS (1981)(K-Byte)(US).zip

Edited by scotty
  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...