Page 1 of 1

PCjr floppy bug?

Posted: Fri 12 Aug, 2016 4:58 pm
by omarsis81
Hello guys! I started playing with the PCjr.
I configured the floppy A to 360 KB and booted with MSDOS 3.3.
It boots fine, but once in the prompt, I change the floppy image, and when I type DIR it keeps displaying the contents of the DOS image. It looks the floppy contents is kept in memory and doesn't refresh.

I also tried with IBM PC DOS 2.1 and the same result. Disk contents doesn't refresh when I change the image.

Can anyone else please test this? Am I doing something wrong?

Re: PCjr floppy bug?

Posted: Sat 13 Aug, 2016 3:03 pm
by mal.sh
I suppose 160/320 KB floppy images (for example - IBM PC DOS 1.10) aren't handled properly in PCEm v11.

I had problems with ones in IBM PC(5150) and IBM PC XT(5160) with 2 floppies configuration (5.25" 360 KB),
when I tried to use format 160 KB floppy image in Drive B via standard IBM PC DOS 1.10 FORMAT command.

Re: PCjr floppy bug?

Posted: Sat 13 Aug, 2016 3:15 pm
by SA1988
160KB and 320KB are handlled in PCem v11, it's probably the PCjr itself that can't handle the formats, but I don't know.

Re: PCjr floppy bug?

Posted: Sat 13 Aug, 2016 6:01 pm
by mal.sh
SA1988 wrote:160KB and 320KB are handlled in PCem v11, it's probably the PCjr itself that can't handle the formats, but I don't know.
I've rechecked again with IBM PC and IBM PC XT with two floppies 5.25" 360 KB.

PC DOS v1.10 160KB image -> floppy A,
empty 160 KB image -> floppy B.

DISKCOPY and FORMAT commands aren't handled properly and system hung. And it continued work properly (I mean PC DOS 1.10 loading procedure) only after restarting PCem.

Re: PCjr floppy bug?

Posted: Sat 13 Aug, 2016 10:03 pm
by omarsis81
SA1988 wrote:160KB and 320KB are handlled in PCem v11, it's probably the PCjr itself that can't handle the formats, but I don't know.
160 and 320 KB are NOT supported in PCem. At least, they are not listed in the Configure Menu

Re: PCjr floppy bug?

Posted: Sat 13 Aug, 2016 10:22 pm
by mal.sh
omarsis81 wrote:
SA1988 wrote:160KB and 320KB are handlled in PCem v11, it's probably the PCjr itself that can't handle the formats, but I don't know.
160 and 320 KB are NOT supported in PCem. At least, they are not listed in the Configure Menu
5.25" 360 KB floppy is listed in the Configure Menu. As I know, one must support 160/320 KB images too, but it doesn't work properly.

Re: PCjr floppy bug?

Posted: Sat 13 Aug, 2016 10:46 pm
by SA1988
Well, they work for me.

Re: PCjr floppy bug?

Posted: Sun 14 Aug, 2016 7:27 am
by mal.sh
SA1988 wrote:Well, they work for me.
1) What was your configuration?
2) Did you try DISKCOPY, FORMAT or DEL (it didn't work too)?

Re: PCjr floppy bug?

Posted: Sun 14 Aug, 2016 11:31 am
by SA1988
format works too in the IBM PC and IBM XT with 360KB floppy set in the Settings.

Re: PCjr floppy bug?

Posted: Sun 14 Aug, 2016 3:52 pm
by mal.sh
SA1988 wrote:format works too in the IBM PC and IBM XT with 360KB floppy set in the Settings.
Can you share your configuration(pcem.cfg) and PC-DOS 1.10 image file?

Re: PCjr floppy bug?

Posted: Sun 14 Aug, 2016 4:04 pm
by Battler
Format works, but the floppy needs to be of the same size you're formatting it to, otherwise the emulation will return sector not found. This is done because PCem right now stores only one track at a time in memory and then writes back rather than storing the whole floppy image in memory and then saving on emulator closure.

Re: PCjr floppy bug?

Posted: Sun 14 Aug, 2016 8:18 pm
by SarahWalker
More a limitation imposed by the .IMG format, as it's not possible to represent any of the interim states of the disc while it's being formatted (eg while some tracks are in the new format and some still in the old). Plus there's always the possibility that the user could be formatting a disc with a deliberate mix of formats. PCem simply dodges this minefield by not allowing you to format disc images to a different format.

Re: PCjr floppy bug?

Posted: Mon 15 Aug, 2016 12:53 pm
by AnnaWu
SA1988 wrote:160KB and 320KB are handlled in PCem v11, it's probably the PCjr itself that can't handle the formats, but I don't know.
Both formats work on PCem/PCjr

Re: PCjr floppy bug?

Posted: Tue 16 Aug, 2016 4:20 pm
by omarsis81
Ok, here we go again. I will try to be more precisce this time.

1) I select the DTK XT clone, with only one drive A as 360k
2) load the image "dos33.img" and it boots fine
3) once in A> I switch the image to "sabot2.img"
4) I run "DIR" and it shows the file SABOT.EXE
everything went OK

now, I do the exact same with the PCjr, but in the step 4, it keeps displaying the COMMAND.COM, which is on the previous disk image.

(Moderator edit : please do not link to copyrighted material)

Please help!

Re: PCjr floppy bug?

Posted: Tue 16 Aug, 2016 5:27 pm
by SarahWalker
Should be fixed in rev 539.

Re: PCjr floppy bug?

Posted: Tue 16 Aug, 2016 5:31 pm
by omarsis81
SarahWalker wrote:Should be fixed in rev 539.
Thank you and sorry for the copyrighted material

Re: PCjr floppy bug?

Posted: Wed 17 Aug, 2016 12:41 pm
by Battler
SarahWalker wrote:More a limitation imposed by the .IMG format, as it's not possible to represent any of the interim states of the disc while it's being formatted (eg while some tracks are in the new format and some still in the old). Plus there's always the possibility that the user could be formatting a disc with a deliberate mix of formats. PCem simply dodges this minefield by not allowing you to format disc images to a different format.
It's even more a limitation of the current PCem code. It stores only one track at a time rather and regularly writes back rather than storing the entire disk at a time. Storing the entire disk at the same time and then saving on close or hard reset would get rid of this limitation. The internal state could then store mixed tracks (and even parameters such as gap sizes, etc. for each track), making it save a mess only if mixed tracks persist until save time. And an "Eject without saving" option could be implemented for each drive to allow the user to eject the image without saving the data, therefore preventing a bad state from carrying over to the image. Also, the save code could then be designed to also not save if it detects that not all tracks have the same layout. And the modifications to the current code structure would be minimal - all that would need to be added would be a save function which would do the work for IMG but be a mere stub with just a "return;" for FDI. The rest would be structurally identical.

Re: PCjr floppy bug?

Posted: Thu 10 Aug, 2017 5:05 pm
by omarsis81
Still the second floppy drive doesn't work.
I manage to boot with drive A, but when I insert a floppy in drive B, I switch in DOS to B: and the prompt changes, but when I type DIR, I still get the contents of drive A.
Maybe I need to configure the PCjr internally to recognize the second drive? Or a better guess is that it uses 180kb floppies but PCem only allows 360kb.
Odd, as drive A works fine with the 360kb...
Could you take a look at it when you have some spare time?

PS: also, PCjr came by default with 64kb RAM and only 128kb with an expansion cartridge, currently 128kb is the only option

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 10:23 am
by Battler
But 180k floppies are compatible with 360k drives - they only differ in the number of sides - 180k has 1 side, 360k has 2 sides. Everything else is identical.

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 12:19 pm
by omarsis81
I thought so Battler, it was just a guess. But the PCjr is the only emulated PC where the drive B doesn't work :(

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 2:43 pm
by Battler
Are you sure the BIOS we use even supports more than one drive?

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 3:19 pm
by omarsis81
Battler wrote:Are you sure the BIOS we use even supports more than one drive?
Not sure, but DOS allows to switch to B by typing B:
Also, I bet (not sure either) a second driver was always a possibilty in the PCjr, so I guess the BIOS is OK, but I will investigate

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 3:23 pm
by omarsis81
Battler wrote:Are you sure the BIOS we use even supports more than one drive?
Do you know how to check what BIOS version am I running? Probably by typing some kind of peek/poke in the onboard BASIC?
All I can tell is the the SHA-1 and MD5 for the BIOS I have
SHA-1: 1f5f7013f18c08ff50d7942e76c4fbd782412414
MD5 : c66b49cd7082d1b81442fb2704542401

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 3:41 pm
by omarsis81
Well, for what I've read there were only two models of the PCjr

4860-004 with 64 KB RAM and 180 floppy and
4860-067 with 128 KB RAM and 360 floppy

according to http://www.brutman.com/PCjr/pcjr_history.html
the Diskette drive as an option was offered by Feb, 1984, so I'm almost positive the later model/BIOS at least supported the second drive

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 3:49 pm
by Battler
The BIOS I'm using says 06/01/83 in the end of the ROM.

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 4:05 pm
by omarsis81
pcjr_bios.jpg
pcjr_bios.jpg (40.85 KiB) Viewed 13527 times
Same

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 4:21 pm
by omarsis81
Well, I guess the problem lies in that the floppy controller of the PCjr is slight different:
http://www.brutman.com/PCjr/pcjr_hardware.html (please see "The Diskette Drive" section)

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 6:06 pm
by SarahWalker
Yep, the PCJr floppy controller only supports a single drive. Hence B: will never work no matter what BIOS you use.

Re: PCjr floppy bug?

Posted: Fri 11 Aug, 2017 6:50 pm
by omarsis81
SarahWalker wrote:Yep, the PCJr floppy controller only supports a single drive. Hence B: will never work no matter what BIOS you use.
Well, yes, drive B could be used with an additional accessory that was placed between the case and the monitor.
See pics here:
https://upload.wikimedia.org/wikipedia/ ... ropped.jpg
http://vintagecomputer.net/vcfmw-ECCC_2 ... ystems.jpg


What I don't know how was it connected or if it was official or not
Emulating that accessory is not high priority though... I can live without it haha

Re: PCjr floppy bug?

Posted: Wed 16 Aug, 2017 4:17 pm
by omarsis81
SarahWalker wrote:Yep, the PCJr floppy controller only supports a single drive. Hence B: will never work no matter what BIOS you use.
I would disable the second drive for the PCjr to avoid confusion. At least until the expansion disk drive emulation is made, if ever