Skip to content

NEC V25 hangs on IN/OUT instructions in ATA CF driver #2575

@swausd

Description

@swausd

Hi @ghaerr,

I modified my NEC V25 system and now I can use it as CPU card on a passive ISA backplane using only 8 Bit slots. Works fine with a NE200 NIC in 8 bit mode. I added this XT-IDE Rev. 4 card from a german ebay site:

https://www.ebay.com/itm/226138176425?_skw=xt-ide&itmmeta=01KEYMPV9NCA5FDF0Z8E51Z8XW&hash=item34a6e2bba9:g:j7cAAOSwqHFmPTAL

The card has no dip-switches, but solder points on the back where options can be configured by cutting traces or adding solder. I only did one change from standard configuration to disabled the flash, because it would be in conflict with my memory map and it is not used anyways.

The card is used with an IDE to CF adapter and I am using an old 64MB Sandisk CF. This config works OK in another environment in 8 bit mode.

To escape IO address conflicts the NIC is configured to IO 0x200 and the XT-IDE is in standard config IO 0x300. I configure the ATA driver to

ata_mode = MODE_XTIDEv2;
xfer_mode = XFER_8_XTCF;

and on first sight it seems to work. I can copy and read files but sometimes the system hangs. This can be reproduced doing this with the current ELKS:

ELKS Setup INT f002 START
16K ext buffers, 8K cache, 1 req hdrs
eth: ne0 at 200, irq 2, (ne1k) MAC 00:4f:4c:02:4f:6b, flags 0x80
ssd: 2013265920K disk
cfa: 8-bit xfer on
cfa:   61M CHS 490, 8,32 62720K VER 0/576 xtide=2,1
cfb: ATA at 300/307 xtide=2,1 not found (-22)
cfa:(0,125440) cfa1:(1,125439) 
NECV25 machine, cpu 3, syscaps 0, 512K base ram, 16 tasks, 64 files, 96 inodes
ELKS 0.9.0-dev (51504 text, 0 ftext, 4768 data, 4816 bss, 55950 heap)
Kernel text e062 data 80 end 1080 top 8000 446+0+0K free
VFS: Mounted root device /dev/rom (0600) romfs filesystem.
Running /etc/rc.sys script
Wed Jan 14 16:59:02 2026

ELKS 0.9.0-dev

[0.68 secs] login: root
# mkfs /dev/cfa 16384
5461 inodes
16384 blocks
Firstdatazone=176 (176)
Zonesize=1024
Maxsize=16777216

# ls -lR /mnt

/mnt:
dr-xr-xr-x  1 root     root            9  Jan  1  1970 cf
dr-xr-xr-x  1 root     root            9  Jan  1  1970 sd

/mnt/sd:

/mnt/cf:
# mount -t minix /dev/cfa /mnt/cf
# ls -lR /mnt

/mnt:
drwxr-xr-x  2 root     root           32  Jan 14 16:59 cf
dr-xr-xr-x  1 root     root            9  Jan  1  1970 sd

/mnt/sd:

/mnt/cf:
# sync
# mkdir /mnt/cf/bin
# ls -lR /mnt

/mnt:
drwxr-xr-x  3 root     root           48  Jan 14 17:00 cf
dr-xr-xr-x  1 root     root            9  Jan  1  1970 sd

/mnt/sd:

/mnt/cf:
drwxr-xr-x  2 root     root           32  Jan 14 17:00 bin

/mnt/cf/bin:
# sync

System hangs on the last sync. Tried another CF card, same result.

Doing the same with my SD-card setup works as expected. Any hints where to look to get this solved is much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions