Jump to content
IGNORED

AdamEm emulation issue


else

Recommended Posts

When working on my SD Drive, I noticed that in both Disk Manager and CP/M they send over an address of 0xface (that's right, "face") when you ask them to do a format -- for their very first block operation. Since I initially was working only with the Disk Manager, I assumed this was some kind of quirk of the Disk Manager and ignored this address -- and everything was working fine. However, when I tried to do a format with CP/M it failed the verify operation on the very first block. I then turned to AdamEm and tried the same thing and it also fails the verify operation on the very first block.

 

At this point, I was really baffled. So I then did a format in CP/M to a real disk, copied the disk to an SD Card (using my SD Card Drive), and examined the file on my PC. I found that the file was filled with 0xe5's. I then went and changed my SD Card Drive firmware to fill the file with 0xe5's when it sees an address of 0xface from the Adam, and CP/M's verify operation now works. By the way, the reason this doesn't affect the Disk Manager's verify operation is that after sending over an address of 0xface, it then proceeds to write the whole disk with 0x00's -- something CP/M doesn't do.

 

So here's what I believe is happening. The address 0xface is not a real address, but is instead a special command to the Disk Drive which tells it to do it's soft-sectoring routine. And as part of this routine, it also fills the disk with 0xe5's (I'm not sure if 0xface was chosen as a kind of joke by the Coleco engineers, or maybe it was chosen because it sounds like the word "surface" -- as in to "surface" the disk?). CP/M's verify operation checks to make sure the disk really got filled with 0xe5's. I looked through the source code for AdamEm, and I can see that it simply ignores any accesses with the MSB of the address set. But as I have found out, this is not the correct behavior that AdamEm should be doing, and it is the reason the verify operation fails in CP/M in AdamEm....

Edited by else
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...