BK 0011M - SMK-512 setup?

User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

BK 0011M - SMK-512 setup?

Unread post by JamesH »

Hello fellow MISTer enthusiasts!

While BK-0011M may not be the most popular core here, I am wondering if someone can help me with its setup. My question is simple:

How do I use the SMK-512 hard drive controller emulation? Has anyone managed to boot MK-DOS from VHD?

I am not sure whether the core is not quite stable when working with disk images or I am doing something wrong. I seem to be able to boot MK-DOS 3.18B from a floppy image once and even access (some) disks from a VHD. But I can never boot anything from VHD directly and the most annoying part: after “user reset” nothing works, even the 3.18B boot image. Quite often there is "disk error #6" or something like this (apologies, it's in Russian and barely readable, I am trying to hook up a capture card to record it frame by frame).

I’d appreciate it if someone could share either a working VHD file or step by step guide for setting up my own VHD.

Regards.
User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

Re: BK 0011M - SMK-512 setup?

Unread post by JamesH »

Update: I cannot boot MK-DOS from vhd, it always yields "I/O error #6". ANDOS and CSIDOS seems to work sometimes, tried so many combinations but did not write down the working ones (just doing it for fun anyway). Also, whatever configuration is working after the first setup, it becomes broken after core reboot/reset with the same "I/O error #6". However, if I extract the boot disk from the VHD and attach it separately as A, everything works.

So the only way to use MK-DOS and VHD that works reliably (once only, before reset) is to boot from MK-DOS disk attached as A. That workaround allows me to access other files on VHD (there are some glitches there, though).

Did I find a bug in MISTer binary/core or is there a "right" way to configure BK0011M core with a VHD?

P.S. Oh, yes, it all started as an attempt to run the Prince of Persia game. If someone has clear instructions for configuring the core to use that game, please share.
User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

Re: BK 0011M - SMK-512 setup?

Unread post by JamesH »

For posterity's sake: if I repack a VHD with MKDOS318B.IMG (from the "official site", according to Wikipedia) as the first disk, I can get it working more or less reliably. The "MicroCommander" does not always load (why?), but most of the glitches are gone and I can run most of the applications from different VHD "partitions".

That did not bring me any closer to running Prince of Persia or modern Good Apple demo. Appreciate any help with those.

Update: I connected a capturing card and to my surprise it still fails with "I/O Error #6" while trying to boot from disk A (why? it's on disk C)
MK-DOS boot screen
MK-DOS boot screen
img0138.png (25.07 KiB) Viewed 3508 times
Looks like that version from mkdos.pdp-11.ru, it just stays in a more consistent way after such crash and is still letting me start the MicroCommander manually (earlier versions are going in some sort of a boot loop). Another fun fact: AltPro test v37 counts the RAM only up to 256K, because it only supports up to 256K. Test "ALT_V47F" finds all 512K.

Anyway, booting from the that MKDOS318B.IMG allows me to play with all hard disk images I found so far. Hope it helps someone else. Let me know if you have problems building bkhdd2 and bkhdutil, happy to share what I found exploring those.
User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

Re: BK 0011M - SMK-512 setup?

Unread post by JamesH »

Being able (using that MKDOS318B.IMG) to access most of the disk images I found in various places, I discovered tests for SMK-512, specifically the one called ALT_V47F (see attached ALT_V47F-log.png). That seem to be a very old version with some known errors, found the latest v4.75f which shows fewer errros. It (still, as of 4.75f) detects some errors, for now I assume these are preventing me from running Good Apple and Prince of Persia.

There are some "HDD register availability" errors (says "unavailable for reading, unavailable for writing" in Russian):
smk-error-registers.png
smk-error-registers.png (14.19 KiB) Viewed 3371 times
Something is not quite right with "bit 2" for older test, (says "ERROR: registers 177138, 177132 must be blocked"). Test 4.75 finds no issues with "bit 2".

And "Modes test" yields something (unexpected codes for segements 0020, 0100, and 000):
smk-error-modes.png
smk-error-modes.png (40.65 KiB) Viewed 3371 times
To be honest I do not understand what any of those mean (hopefully yet). If someone can point me to a decent doc (Russian will do, Google translate is working well these days) I would really appreciate it. If I cannot find much, I guess I'll file a bug for Sorgelig to review. Any other suggestions?
Attachments
Full "ALT_V4.75F" test output (sans full RAM test and ROM checksum test)
Full "ALT_V4.75F" test output (sans full RAM test and ROM checksum test)
alt_test_v4.75f.png (85.57 KiB) Viewed 3371 times
akeley
Top Contributor
Posts: 1314
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 424 times
Been thanked: 413 times

Re: BK 0011M - SMK-512 setup?

Unread post by akeley »

Thanks for digging into this rather obscure machine. I haven't got to it on my rounds yet but would certainly like to one day, so somebody paving the way is quite helpful. Filling the issue on the core's git is probably the best way to get a response, seeing as it's been quite some time since your OP.
User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

Re: BK 0011M - SMK-512 setup?

Unread post by JamesH »

Thanks for looking at this. I think I can create a small self-contained test case for Sorgelig to review, and that is what I'll do when I have few hours to spare.
User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

Re: BK 0011M - SMK-512 setup?

Unread post by JamesH »

One more update, just to record my progress. I found HHDInfo tool, compiled it and it seems to be failing with the same "MKDOS - I/O error # 6", which means "disk not present".
Attachments
Pressing I or P yields this
Pressing I or P yields this
hddtest-error6.png (10.48 KiB) Viewed 3263 times
HHDInfo main screen
HHDInfo main screen
hddtest-0.png (32.33 KiB) Viewed 3263 times
HHDInfo briefly shows this before crashing with I/O error #6
HHDInfo briefly shows this before crashing with I/O error #6
hddtest-error.png (34.47 KiB) Viewed 3263 times
xolod79
Core Developer
Posts: 38
Joined: Wed May 27, 2020 8:13 pm
Has thanked: 6 times
Been thanked: 35 times

Re: BK 0011M - SMK-512 setup?

Unread post by xolod79 »

Dear JamesH. As far as I know core BK0011M supports HDD drives on SMK-512 in a very limited way.
There, the interception of the call to ROM procedures for working with HDD is implemented. And the hardware of the SMK-512 controller itself has not been implemented.
Because of this, programs that work with the disk directly bypassing the ROM do not work.
User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

Re: BK 0011M - SMK-512 setup?

Unread post by JamesH »

Thanks for chiming in, it's nice to have input from one of the core's authors!

We have confirmed that direct access to IDE controller registers (177740 - 177756) is not supposed to work, but the "BIOS" calls like 160004 or 160006 should work. I am still struggling with writing a working code using those "BIOS" calls, but I am slowly learning. Prince and Good Apple aren't supposed to work, that is confirmed.

However, I still believe that there are some issues with the declared VHD support. Or, maybe, missing bits in the docs, if what I see are undocumented implementation features. I have created a GitHub issue to track those. Basically, two things that do not seem to be working as expected are: 1) I cannot create a bootable VHD using a surely-working-fine floppy image; 2) a successfully booted configuration becomes unusable after reset.

Thanks!
Post Reply