VOGONS


Reply 220 of 309, by rasz_pl

User metadata
Rank l33t
Rank
l33t

You could make special debug firmware where in parallel you log last couple seconds of ISA bus to file and let Transient trigger it on his computer.

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 221 of 309, by Transient

User metadata
Rank Newbie
Rank
Newbie
FreddyV wrote on 2024-09-18, 06:14:
Hi, […]
Show full quote

Hi,

Thanks a lot,

The data can't really be written too fast.
The NE2000 emulation move IOCHRDY to slow down the bus, and ISA is limited in bandwidth, below the ne2000 capability.
Also, the warning you saw in the code is for ne2000, not picomem.

It look like a CPU bug ? How is ti possible to write "Too fast" on ISA ? 😀

Also, to see what is happening, I need a PC to be able to reproduce the problem...

TBH, I'm not really sure. I did note that this x86 Instruction Set Reference includes a warning:

Use the REP INS and REP OUTS instructions with caution. Not all I/O ports can handle the rate at which these instructions execute.

Reply 222 of 309, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
Transient wrote on 2024-09-18, 20:42:
FreddyV wrote on 2024-09-18, 06:14:
Hi, […]
Show full quote

Hi,

Thanks a lot,

The data can't really be written too fast.
The NE2000 emulation move IOCHRDY to slow down the bus, and ISA is limited in bandwidth, below the ne2000 capability.
Also, the warning you saw in the code is for ne2000, not picomem.

It look like a CPU bug ? How is ti possible to write "Too fast" on ISA ? 😀

Also, to see what is happening, I need a PC to be able to reproduce the problem...

TBH, I'm not really sure. I did note that this x86 Instruction Set Reference includes a warning:

Use the REP INS and REP OUTS instructions with caution. Not all I/O ports can handle the rate at which these instructions execute.

There are boards where you need to read another port to check if the data is ready, it is surely about it.
Otherwise, if IOCHRDY is set, the CPU wait.

Reply 223 of 309, by Transient

User metadata
Rank Newbie
Rank
Newbie
FreddyV wrote on 2024-09-20, 14:00:
Transient wrote on 2024-09-18, 20:42:
FreddyV wrote on 2024-09-18, 06:14:
Hi, […]
Show full quote

Hi,

Thanks a lot,

The data can't really be written too fast.
The NE2000 emulation move IOCHRDY to slow down the bus, and ISA is limited in bandwidth, below the ne2000 capability.
Also, the warning you saw in the code is for ne2000, not picomem.

It look like a CPU bug ? How is ti possible to write "Too fast" on ISA ? 😀

Also, to see what is happening, I need a PC to be able to reproduce the problem...

TBH, I'm not really sure. I did note that this x86 Instruction Set Reference includes a warning:

Use the REP INS and REP OUTS instructions with caution. Not all I/O ports can handle the rate at which these instructions execute.

There are boards where you need to read another port to check if the data is ready, it is surely about it.
Otherwise, if IOCHRDY is set, the CPU wait.

Okay, I understand. Most likely IOCHRDY is working fine and there's a problem elsewhere.

I think it's worth noting, other features of PicoMEM are working very well. Disk emulation is moving a lot more data around without issue.

It's just this wifi/NE2000 piece that seems to have a weird timing-related bug.

Reply 224 of 309, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
Transient wrote on 2024-09-21, 01:27:

Okay, I understand. Most likely IOCHRDY is working fine and there's a problem elsewhere.

I think it's worth noting, other features of PicoMEM are working very well. Disk emulation is moving a lot more data around without issue.

It's just this wifi/NE2000 piece that seems to have a weird timing-related bug.

Hi,

On the PicoMEM, Disk is done via memory move, via emulated RAM.
This is really different.

Reply 225 of 309, by rasz_pl

User metadata
Rank l33t
Rank
l33t
FreddyV wrote on 2024-09-20, 14:00:

Otherwise, if IOCHRDY is set, the CPU wait.

Is that code robust? maybe its not fast enough to signal waitstate every time with fast CPU? That of course assumes slow network is caused by errors when copying data to/from picomem emulated ne2000.

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 226 of 309, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
rasz_pl wrote on 2024-09-21, 15:31:
FreddyV wrote on 2024-09-20, 14:00:

Otherwise, if IOCHRDY is set, the CPU wait.

Is that code robust? maybe its not fast enough to signal waitstate every time with fast CPU? That of course assumes slow network is caused by errors when copying data to/from picomem emulated ne2000.

Hi,

Modify the code of the driver work, this prove that the data transfer is done correctly.
Also, in case of any I/O error, the PicoMEM disk will fail (as even if data is transfered by RAM, the commands are done via I/O)

IOCHRDY driving code is always done at the exact same time, it is well controlled and 100% assembly code, with code in the Cache memory.

Reply 227 of 309, by rasz_pl

User metadata
Rank l33t
Rank
l33t
FreddyV wrote on 2024-09-22, 20:53:

Modify the code of the driver work,

by force slowing IO operations by at least 1/2. Transient made it work by disabling 'rep outs' _and_ inserting dummy read.

Transient wrote on 2024-09-14, 08:09:

In NE2000.ASM, there's write_loop, specifically for 8086/8088 CPU. There's also a separate write_186 for 186 and later CPUs. This 186 code is problematic on my system.
I modified NE2000.ASM to always use write_loop. Additionally, I introduced pause_ inside the loop.
Now my FTP transfer is 100% stable. I get around 9.6 KiB/sec transfer rate download from FTPSRV, which is slow, but uploads are better at 68 KiB/sec.

Transient:
- Can you check if you really need this 'additional pause_ inside the loop'?
- Looks like the hack only took care of write_loop so it makes sense your upload is ok. Try doing the same to read_loop by disabling "rep insw" to see if Download gets faster.
- Can you slow ISA clock in the bios further to lets say 4.7MHz and test original NE2000 binary with that slower ISA clock and cpu cache ON?

FreddyV wrote on 2024-09-22, 20:53:

Also, in case of any I/O error, the PicoMEM disk will fail (as even if data is transfered by RAM, the commands are done via I/O)

https://github.com/search?q=repo%3AFreddyVRet … ts%22&type=code shows nothing else uses 'rep outs'.

FreddyV wrote on 2024-09-22, 20:53:

IOCHRDY driving code is always done at the exact same time, it is well controlled and 100% assembly code, with code in the Cache memory.

In theory (and reading ISA System Architecture) it should be enough. But timings are tricky. Looking at the CPU side, for 486 Intel says https://www.pld.ttu.ee/~prj/486dev.pdf
>The fastest non-burst bus cycle that the Intel486 processor supports is two clocks. These cycles
are called 2-2 cycles because reads and writes take two cycles each. The first “2” refers to reads
and the second “2” to writes. If a wait state needs to be added to the write, the cycle is called “2-
3.”

This is on CPU bus and not ISA bus, but there is distinct difference:

>7.2.7 Write Buffers and I/O Cycles
>...When processing an I/O write instruction
(OUT, OUTS), internal execution stops until the I/O write actually completes on the external bus.
This allows time for the external system to drive an invalidate into the Intel486 processor or to
mask interrupts before the processor continues to the instruction following the write instruction.
Repeated OUTS (REP OUTS) instructions are buffered and the next instruction is not executed
until the REP OUTS finishes executing.

>7.2.7.1 Write Buffers and Recovery Time
>The write buffers, in association with the cache, have certain implications for I/O device recovery
times. Back-to-back write recovery times must be guaranteed by explicitly generating a read cycle to a non-cacheable area in between the writes. Since the Intel486 processor does not buffer
I/O writes, the inserted read does not proceed to the bus until the first write is completed. Then,
the read cycle executes on the external bus. During this time, the I/O device recovers and allows
the next write.

It sounds like when doing single OUTB CPU will:
- perform 2 cycle dummy READ followed by actual 2 cycle WRITE
- actually Stop the CPU between IO operations
Meanwhile REP OUTS use write buffers and transfers become back-to-back.
Of course all of this should have no effect on ISA bus, but maybe there is some ISA controller quirk involved here?

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 228 of 309, by Transient

User metadata
Rank Newbie
Rank
Newbie
rasz_pl wrote on 2024-09-23, 15:10:
Transient: - Can you check if you really need this 'additional pause_ inside the loop'? - Looks like the hack only took care of […]
Show full quote

Transient:
- Can you check if you really need this 'additional pause_ inside the loop'?
- Looks like the hack only took care of write_loop so it makes sense your upload is ok. Try doing the same to read_loop by disabling "rep insw" to see if Download gets faster.
- Can you slow ISA clock in the bios further to lets say 4.7MHz and test original NE2000 binary with that slower ISA clock and cpu cache ON?

- Yes, without two pause_ it hangs. Always at the exact same spot during the transfer too. With a single pause_ it makes it further, but still hangs.
- I did some speed tests with read_loop and you're right, Download increases by about 10 KiB/s when using it instead of read_186.
- Unfortunately, the slowest documented option is 8MHz. This is set via jumpers on the motherboard. I haven't tried experimenting with undocumented positioning of the jumpers.

Reply 229 of 309, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Hi,

This is interresting but I don't have time to enter deep in the analisys of this 🙁

I can't promice any delay to check this.
FreddyV

Reply 230 of 309, by RealityTech

User metadata
Rank Newbie
Rank
Newbie

So I was thinking about a machine I used to love working with, The Amstrad PPC1640. Sadly it lacked any real upgradability because, well, Amstrad didnt seem to think it needed any and those that were made are either vanishingly rare, dead ended or stop it being portable. While looking today I remeber that Adrian Black reviewed this project and it might be the basis of a perfect solution. I can access the ISA bus internally as some XT IDE cards did in the day so I reckon I can make this work too.

Reply 231 of 309, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Hi,

New PicoMEM firmware released.
The more important is the Tandy 1000 Support 😉

https://github.com/FreddyVRetro/ISA-PicoMEM/t … e/main/firmware

PM_W_Oct5: Tandy 1000, CMS and Tandy Audio​

New: Added support for Tandy 1000 (Early ones with Tandy graphic)
New: CMS/SAA1099 Sound card Added
New: Tandy Sound card Added
New: Adlib/Tandy and CMS are working at the same time and can be configured by PMinit
New: Added Display of the mounted USB devices
New: Adlib/CMS/Tandy and Joystick can be use even if the BIOS Start to fail / is Disabled.
! If the BIOS Start in 40 Column graphic mode, change to 80 Column when starting the setup
If the Bootstrap fail to load a sector, display the error code.

Reply 232 of 309, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
RealityTech wrote on 2024-10-06, 17:46:

So I was thinking about a machine I used to love working with, The Amstrad PPC1640. Sadly it lacked any real upgradability because, well, Amstrad didnt seem to think it needed any and those that were made are either vanishingly rare, dead ended or stop it being portable. While looking today I remeber that Adrian Black reviewed this project and it might be the basis of a perfect solution. I can access the ISA bus internally as some XT IDE cards did in the day so I reckon I can make this work too.

Hi,

For PPC, you should look at the ISA Port extender.
it seems that the one sold on Tindy currently does not work, they used Buffers not compatible (But can be changed)

There is an issue opened on the GitHub with some person discussing about it.

Reply 233 of 309, by paulfromPT

User metadata
Rank Newbie
Rank
Newbie
FreddyV wrote on 2024-10-09, 08:44:
Hi, […]
Show full quote
RealityTech wrote on 2024-10-06, 17:46:

So I was thinking about a machine I used to love working with, The Amstrad PPC1640. Sadly it lacked any real upgradability because, well, Amstrad didnt seem to think it needed any and those that were made are either vanishingly rare, dead ended or stop it being portable. While looking today I remeber that Adrian Black reviewed this project and it might be the basis of a perfect solution. I can access the ISA bus internally as some XT IDE cards did in the day so I reckon I can make this work too.

Hi,

For PPC, you should look at the ISA Port extender.
it seems that the one sold on Tindy currently does not work, they used Buffers not compatible (But can be changed)

There is an issue opened on the GitHub with some person discussing about it.

The 2x 74HCT244 in one of the projects might be causing issues. Changing to a 74HC244 should work.
I'm currently building some Enide's ISA expansion boards, waiting on 74HC244 chips to arrive.
Thsese are a pain to solder the connectors properly, i was thinking of placing some on ebay but not sure anymore.

Reply 234 of 309, by paulfromPT

User metadata
Rank Newbie
Rank
Newbie

The missing image from previous post.

Reply 235 of 309, by 0xDEADBEEF

User metadata
Rank Newbie
Rank
Newbie
paulfromPT wrote on 2024-10-20, 22:23:

Thsese are a pain to solder the connectors properly, i was thinking of placing some on ebay but not sure anymore.

If you do put them on ebay you have one guaranteed customer here 😉
My PPC640 needs it!

Reply 236 of 309, by paulfromPT

User metadata
Rank Newbie
Rank
Newbie
0xDEADBEEF wrote on 2024-10-22, 23:49:
paulfromPT wrote on 2024-10-20, 22:23:

Thsese are a pain to solder the connectors properly, i was thinking of placing some on ebay but not sure anymore.

If you do put them on ebay you have one guaranteed customer here 😉
My PPC640 needs it!

There is 1 on Ebay now. Waiting on parts to post a few more.

Reply 237 of 309, by 0xDEADBEEF

User metadata
Rank Newbie
Rank
Newbie

Aww, did I miss it? My searches show nothing.

Reply 239 of 309, by weedeewee

User metadata
Rank l33t
Rank
l33t
0xDEADBEEF wrote on 2024-10-25, 23:37:

Aww, did I miss it? My searches show nothing.

It's item number 135316842371 . If that means anything to you.

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port