Reply 20 of 24, by rasz_pl
clb wrote on 2023-09-24, 16:24:On my test system, 80 MHz 486 with ISA bus at 10.0 MHz, it looks like the fast rep outsb method takes about 30-31 scanlines in vblank to write new 768 bytes, whereas the slow manual out path code takes 39-40 scanlines.
With the 286+ rep outsb instruction sequence and ISA bus at 10.0 MHz one can just about make it.
31.47kHz is what, 32 us per line? 30x32 means 768 bytes in ~1ms = ~768KB/s
wrote:duration of an ISA bus cycle accessing an 8-bit device defaults to four wait states unless shortened by NOWS# (to 3, 4, or 5 BCLK cycles) or lengthened by CHRDY. The default bus cycle ends at the trailing edge of the fifth data time.
Theoretical ISA speed limit for 8bit IO is 3 cycles per transaction, default is 6 cycles (4 wait states). 10MHz/ 3-6 = somewhere between 3.3MB/s and 1.6MB/s.
There definitely are waitstates being inserted by the VGA chip when accessing palette registers, ~11 in your particular case!
This means some VGA chip vendors simply screwed up by not inserting enough delay.
Then we get to ISA overclocking. It would be interesting to see how chip vendors derive the wait state delays they are inserting, are those fixed number of cycles or are they running timers and only inserting enough delay to meet their internal timing requirements. Is your ~30 scanlines on 10MHz bus card doing same ~30 scanlines on slowed down ISA bus? or does it still insert 11 wait states on 5MHz bus.
Another question arises, are numbers of wait stated constant on all VGA IO ports? Were there VGA chip vendors ignorantly inserting same delays indifferent to accessed port? You could argue 0x3C6-3C9 Palette access needs some delay, but how about 0x3C0/0x3C4/0x3CE ? are they all equally slow? I suppose a poorly designed VGA will just give everything same fixed delay and call it a day.
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