VOGONS


How to slow down NEC V20?

Topic actions

First post, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hello everyone,

I've got an unusual question and hope some of you can share their experience.. :

I wonder how to slow down a NEC V20 that it comes close to an 8088 at 4,77MHz.

The reason is the following:
My "XT" has an intelligent BIOS, which is not aware of the V20's existence.
So during POST, it detects that there's something strange going on (believes the timing of the PIT is not correct).

Because some instructions are faster than normal, it suspects a hardware defect thus.

Anyway, I could live with such an error message. But not the BIOS. It halts the machine.

I'm looking into a workaround thus, so that the BIOS passes the tests.
Would it be somehow possible, for example, to feed the V20 with a separate, slower clock signal? Maybe by using an interposer board with another crystal oscillator?

Thanks in advance!

🙂

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 1 of 21, by darry

User metadata
Rank l33t++
Rank
l33t++
Jo22 wrote on 2020-11-13, 01:28:
Hello everyone, […]
Show full quote

Hello everyone,

I've got an unusual question and hope some of you can share their experience.. :

I wonder how to slow down a NEC V20 that it comes close to an 8088 at 4,77MHz.

The reason is the following:
My "XT" has an intelligent BIOS, which is not aware of the V20's existence.
So during POST, it detects that there's something strange going on (believes the timing of the PIT is not correct).

Because some instructions are faster than normal, it suspects a hardware defect thus.

Anyway, I could live with such an error message. But not the BIOS. It halts the machine.

I'm looking into a workaround thus, so that the BIOS passes the tests.
Would it be somehow possible, for example, to feed the V20 with a separate, slower clock signal? Maybe by using an interposer board with another crystal oscillator?

Thanks in advance!

🙂

This is quite outside of my comfort zone, but is using a different BIOS not an option ? I was under the impression that BIOSes were pretty interchangeable among XT class machines.

Reply 2 of 21, by SSTV2

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2020-11-13, 01:28:

Would it be somehow possible, for example, to feed the V20 with a separate, slower clock signal? Maybe by using an interposer board with another crystal oscillator?

I don't see why not, but that would make the whole idea of using a faster V20 CPU kind of pointless?

Right now you can either test BIOS taken from other motherboards, that are known to work with V20 or modify portions of existing BIOS, so that it would bypass testing subroutines that cause system's halt.

Reply 3 of 21, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Thanks for the feedback guys!

My XT is kind of special, a generic XT BIOS doesn't work sadly.
And so far it seems that no BIOS update exists (another PC had same revision).
NEC V20 not compatible with my PC ?

The idea was to slow down the V20 during POST and switch back to normal speed afterwards.
But even if it was slowed down, doesn't necessarily mean that the BIOS would continue to boot, of course.
Maybe it will still complain, because some instructions are not perfectly 8088 speed level.

Maybe it would be possible to install two CPUs (8088/V20) on a little card and switch between via a set of switches ?
I know this sounds akward. But maybe it works somehow ? Maybe the BIOS doesn't do a full POST after a soft reset ?
If that worked, I could normally boot with the 8088 and sometimes (if needed) switch to the V20 and do a warm boot ?

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 4 of 21, by macroexp

User metadata
Rank Newbie
Rank
Newbie

Dunno if this helps, but I have (in storage at the moment) a Heath/Zenith 150 that came with 8088, but was later upgraded to a V20 with a kit that includes a stick-on turbo button to put on the front of the case. I can’t remember if it starts out immediately in turbo, or if it waits until after POST, but it is definitely necessary to toggle it back to normal speed to do timing-sensitive things like formatting floppies.

It would take me a while, but I could eventually get some pictures/schematics of how it accomplished the speed change. I do remember removing the 8088 so it’s not toggling between CPU’s.

Reply 5 of 21, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie

If that machine is 4.77MHz-only (no turbo), then most likely everything is clocked from a single 14.318 MHz crystal, notably the timer chip, and the CGA video.
So, replacing the crystal with a slower one won't help, as the timer tick/CPU cycle ratio won't change.
The display, however, would get out-of-sync, as the HSYNC would be lower than the default 15 kHz.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 6 of 21, by SSTV2

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2020-11-13, 06:04:

Maybe it would be possible to install two CPUs (8088/V20) on a little card and switch between via a set of switches ?

That would just reset the system in the best case scenario. Upload your MBs BIOS image, I'll try to track back what part of it is responsible for outputting PIT error on screen.

Reply 7 of 21, by Jo22

User metadata
Rank l33t++
Rank
l33t++
macroexp wrote on 2020-11-13, 06:34:

Dunno if this helps, but I have (in storage at the moment) a Heath/Zenith 150 that came with 8088, but was later upgraded to a V20 with a kit that includes a stick-on turbo button to put on the front of the case. I can’t remember if it starts out immediately in turbo, or if it waits until after POST, but it is definitely necessary to toggle it back to normal speed to do timing-sensitive things like formatting floppies.

It would take me a while, but I could eventually get some pictures/schematics of how it accomplished the speed change. I do remember removing the 8088 so it’s not toggling between CPU’s.

Thanks for the information! 😀
This is an interesting little computer, by the way. I really like the modular design.
Having a CPU card makes things easier to fix/upgrade, I think.
https://ljkrakauer.com/LJK/80s90s/heathkit.htm

Grzyb wrote on 2020-11-13, 07:48:

If that machine is 4.77MHz-only (no turbo), then most likely everything is clocked from a single 14.318 MHz crystal, notably the timer chip, and the CGA video.
So, replacing the crystal with a slower one won't help, as the timer tick/CPU cycle ratio won't change.
The display, however, would get out-of-sync, as the HSYNC would be lower than the default 15 kHz.

I see, thanks for the explanation. I didn't think about that.
I just hoped I could run it from a separate crystal oscillator, just like a 287 FPU in async mode. 😅

SSTV2 wrote on 2020-11-13, 07:50:
Jo22 wrote on 2020-11-13, 06:04:

Maybe it would be possible to install two CPUs (8088/V20) on a little card and switch between via a set of switches ?

That would just reset the system in the best case scenario. Upload your MBs BIOS image, I'll try to track back what part of it is responsible for outputting PIT error on screen.

Thanks! 😎

Attachments

  • Filename
    m35_bios.zip
    File size
    12.96 KiB
    Downloads
    44 downloads
    File license
    Fair use/fair dealing exception

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 8 of 21, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2020-11-13, 09:53:

Thanks! 😎

Hi
Interestingly your BIOS also runs into a "PIT1 ERR" when run under PCem. I'm able to patch out that check, as well as several others, and can then get it to boot in PCem.

I assume you can break out your hex editor and you have a way to program a new BIOS chip for the machine.

First at 1D5D change 74 with EB [bypasses BIOS ROM checksum check].
If you're running into the PIT1 ERR, at 1E0C replace 74 with EB, and at 1DF7 replace 75 15 with 90 90.
If you're running into the PIT0 ERR, at 1D90 replace 74 with EB.
By doing the PIT1 change as well as a few others (PREG, CRTC, VSTS) I was able to boot the rom in PCem with a monochrome display.

Reply 9 of 21, by SSTV2

User metadata
Rank Oldbie
Rank
Oldbie

Jake basically has provided the solution to your timer problem, I had modified BIOS a bit differently (no NOPs). There are 3 modified BIOS images attached in the zip file, each image has some or all error subroutine calls omitted + checksums are patched. I can post the offending PIT1 testing routine if you'd like to analyze it.

By the way Jake, could you explain how you were able to identify the checksum routine?

Filename
BIOS.zip
File size
51.98 KiB
Downloads
34 downloads
File license
Fair use/fair dealing exception

Reply 10 of 21, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
SSTV2 wrote on 2020-11-14, 23:24:

By the way Jake, could you explain how you were able to identify the checksum routine?

You can tell from this code that it's adding up every byte from f000:c000 through f000:fffe and comparing it with the byte stored at f000:ffff; if it doesn't match, it does a hlt (interesting that it doesn't do any beeping).

This is the first XT bios I've looked at. I've looked at many 486 ones and many of those use a lodsw and add loop which makes it easier to find. But basically anything that loads every value in the entire BIOS segment is suspect for being the checksum.

Attachments

  • Filename
    checksum.png
    File size
    11.54 KiB
    Downloads
    No downloads
    File license
    Public domain

Reply 11 of 21, by kdr

User metadata
Rank Member
Rank
Member
jakethompson1 wrote on 2020-11-15, 01:54:

if it doesn't match, it does a hlt (interesting that it doesn't do any beeping).

One of my XT clones (a Datamini 10Mhz turbo) has a Phoenix BIOS that is utterly silent. Doesn't beep on boot. Missing video card? No beeps! Bad keyboard? No beep.

I actually thought the board was dead when I first acquired it. On a whim I put in a video card and it worked. So then I wasted a lot of time debugging the speaker output on the motherboard, only to find that it was working perfectly. The BIOS just doesn't ever beep.

Reply 12 of 21, by SSTV2

User metadata
Rank Oldbie
Rank
Oldbie
jakethompson1 wrote on 2020-11-15, 01:54:

You can tell from this code that it's adding up every byte from f000:c000 through f000:fffe and comparing it with the byte stored at f000:ffff; if it doesn't match, it does a hlt (interesting that it doesn't do any beeping).

Thanks, now that you've mentioned the exact memory range for checksum calculation, I was able to find and interpret the code portion responsible for it. That missing error beep initiation for checksum mismatch also baffles me, a single insignificant bit rot would brick the system and you'd not know what had happened to it.

Reply 14 of 21, by Jo22

User metadata
Rank l33t++
Rank
l33t++
jakethompson1 wrote on 2020-11-22, 01:55:
Jo22 wrote on 2020-11-13, 09:53:

Thanks for the information! 😀

Did you get anywhere with this?

Hi! Thanks a lot for all of your help and sorry for the delay.
- I've wanted to program a new EPROM (2764 ?) and try it in my XT first, before posting back..
But unfortunately, I was totally busy because of a birthday party, so I hadn't been able to post back.

Anyway, I think I can try it in the next two days or so. I'll write back then and add some photos.
Hope that's okay. I really appreciate all of you help, it's not just meaningless phrase. (^_^)

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 15 of 21, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2020-11-23, 09:27:
Hi! Thanks a lot for all of your help and sorry for the delay. - I've wanted to program a new EPROM (2764 ?) and try it in my XT […]
Show full quote

Hi! Thanks a lot for all of your help and sorry for the delay.
- I've wanted to program a new EPROM (2764 ?) and try it in my XT first, before posting back..
But unfortunately, I was totally busy because of a birthday party, so I hadn't been able to post back.

Anyway, I think I can try it in the next two days or so. I'll write back then and add some photos.
Hope that's okay. I really appreciate all of you help, it's not just meaningless phrase. (^_^)

Sounds great, I was just wondering whether it actually worked.

Reply 16 of 21, by Jo22

User metadata
Rank l33t++
Rank
l33t++
jakethompson1 wrote on 2020-11-26, 01:55:
Jo22 wrote on 2020-11-23, 09:27:
Hi! Thanks a lot for all of your help and sorry for the delay. - I've wanted to program a new EPROM (2764 ?) and try it in my XT […]
Show full quote

Hi! Thanks a lot for all of your help and sorry for the delay.
- I've wanted to program a new EPROM (2764 ?) and try it in my XT first, before posting back..
But unfortunately, I was totally busy because of a birthday party, so I hadn't been able to post back.

Anyway, I think I can try it in the next two days or so. I'll write back then and add some photos.
Hope that's okay. I really appreciate all of you help, it's not just meaningless phrase. (^_^)

Sounds great, I was just wondering whether it actually worked.

Hi! Yes, it worked right from the start! 😁
- Just checked this morning.
I started testing with the - PIT0 -PREG binary first.
On weeked, I want to try the other ones, as well.

Edit: Photos added.

Edit: I'm really glad this fine machine finally can run normal DOS programs too (80186 instructions)! ^^

Attachments

  • checkit_v20.jpg
    Filename
    checkit_v20.jpg
    File size
    134.06 KiB
    Views
    823 views
    File license
    Public domain
  • boot_v20.jpg
    Filename
    boot_v20.jpg
    File size
    50.11 KiB
    Views
    823 views
    File license
    Public domain
  • bench_v20.jpg
    Filename
    bench_v20.jpg
    File size
    89.12 KiB
    Views
    823 views
    File license
    Public domain

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 17 of 21, by SSTV2

User metadata
Rank Oldbie
Rank
Oldbie

I had no doubts that it would work 😉

At the same occasion, try this BIOS image from a completely different machine.

Filename
Leading Edge Model M v4.71.zip
File size
10.96 KiB
Downloads
35 downloads
File license
Fair use/fair dealing exception

Reply 18 of 21, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi, it takes a little longer..
I'll try as soon as I can.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 19 of 21, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I'm sorry for the delay.
My room is a mess and I have no space for setting up the M35 at the moment. 😅
- I will definitely test the binaries, though, as quickly as I can.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//