joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.68k stars 381 forks source link

PC-98: Ys II and Sorcerian only detect 1 floppy drive instead of 2 drives #913

Open yksoft1 opened 5 years ago

yksoft1 commented 5 years ago

Describe the bug On Neko Project II, both Ys II and Sorcerian can use 2 floppy drives. However on DOSBox-X, only one drive is detected running these games.

To Reproduce Steps to reproduce the behavior: for Ys II:

  1. boot Ys II to the main game screen.
  2. Press F1 to show the "ディスクロード" (Disk Load) screen.

for Sorcerian:

  1. boot the Program disk.
  2. Navigate the menu to "つづきをする [ロード]" (Continue game (Load)).
  3. Press Enter.

Expected behavior On Neko Project II, both games tell you to insert User Disk in Drive-2. ys2-np2 sor-np2

Screenshots On DOSBox-X, the games then tell you to switch to User Disk into Drive-1. ys2-dbx sor-dbx

Environment (please complete the following information):

joncampbell123 commented 5 years ago

How are you mounting the disk images in DOSBox-X?

Are you using imgmount and boot or using boot with multiple disk images?

yksoft1 commented 5 years ago

How are you mounting the disk images in DOSBox-X?

Are you using imgmount and boot or using boot with multiple disk images?

just like "imgmount 0 ys2p.d88 ys2a.d88 -fs none".

Ah. Ys 2 detected the Drive 2 if I imgmount the userdisk in slot 0.... But, Sorcerian still asks to put user disk in Drive 1 even I imgmounted that in slot 1.

joncampbell123 commented 5 years ago

I see Ys II call INT 1Bh sense for floppy drive A and B, but then read BDA location 0x55C to check for second drive. It writes 0x91 (second drive number) to a memory location.

However when it comes time to prompt it still insists on swapping the first drive.

yksoft1 commented 5 years ago

...I found that Ys 2 can't write to User Disk at all in DOSBox-X. The key of saving game is F4. werror

PC-98 INT 1Bh unknown FDC BIOS call AX=7D91 BX=0014 CX=0300 DX=01FF SI=3841 DI=3838 DS=0AD8 ES=0AD8 --END OF LOG--

joncampbell123 commented 5 years ago

AH=xD means it's trying to format a track on the second drive.

DOSBox-X doesn't emulate formatting commands yet.

joncampbell123 commented 5 years ago

I just added code to INT 1Bh emulation to fake success when asked to format a track, which seems to make Ys II save/load happy (F1=load F4=save).

joncampbell123 commented 5 years ago

You can prevent Ys II from destroying it's own boot disk on save by arranging the floppies like this:

imgmount 1 user.dsk -fs none imgmount 0 program.fdd scenario.fdd -fs none boot -l a

You can make user.dsk in Linux like this:

dd if=/dev/zero of=user.dsk bs=1024 count=$((8*2*77))

yksoft1 commented 5 years ago

You can prevent Ys II from destroying it's own boot disk on save by arranging the floppies like this:

imgmount 1 user.dsk -fs none imgmount 0 program.fdd scenario.fdd -fs none boot -l a

You can make user.dsk in Linux like this:

dd if=/dev/zero of=user.dsk bs=1024 count=$((8277))

Or use any formatted FDI or HDM disk image..