Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

80286 support? #41

Open
ajrossnz opened this issue Dec 21, 2023 · 10 comments
Open

80286 support? #41

ajrossnz opened this issue Dec 21, 2023 · 10 comments
Labels
enhancement New feature or request

Comments

@ajrossnz
Copy link

Hi, I have an IBM 5162 XT/286 as well as 5170 / AT. Have you considered supporting the 286 at any point?

Cheers!

@640-KB 640-KB added the enhancement New feature or request label Jan 2, 2024
@640-KB
Copy link
Owner

640-KB commented Jan 2, 2024

I have looked into it in the past for sure, and something that would be really neat to do some day. There is a decent amount of additional code needed for an AT/5170/286 BIOS including a complete hard drive BIOS, high-density floppy, AT keyboard interface, CMOS, protected mode code and a number of new INT 15h calls. As I do have some of this already done (CMOS is in GLaTICK and high-density support and extended keyboard are both a WIP), those would be included in an AT BIOS build.

This would be large enough that it would require being a fork to a project of its own, and I would like to take it on some day once I get a few more of these dependent issues done and out there. Since I don't have a timeline or a plan for when I can start on it, and it will become its own project I'm probably going to close this issue for now. However, knowing it's something that's asked for is really helpful to know and I really appreciate it!

Thank you for the suggestion,
640KB

@640-KB 640-KB closed this as completed Jan 2, 2024
@andreas-jonsson
Copy link

I know this is closed but I just want to add my thoughts.

I'm working (slowly) towards 286 and AT support in VirtualXT.
Just as you noted there is quote a lot on the system side that needs to happen and probably this would have to be a fork if not to clobber the current codebase.

There is also the interesting case where you have XT machines with 286 CPUs.
This is my first step along the way and I think the current BIOS would work well with that.

And since you know I like to sugest names for your future project I give you the sugestion of GLaTBIOS. ;)

@ajrossnz
Copy link
Author

ajrossnz commented Jan 10, 2024 via email

@andreas-jonsson
Copy link

GLaBIOS with his IBM 5150, which he has a 10mhz 286 accelerator card

Thats cool!
I would have thought those cards had there onboard BIOS?

@640-KB Could we have GLaBIOS to be 286 aware during post? and perhaps dedicate another bit in the BDA where the V20 flag is stored? I think the best way to detect a 286 is to look what happens to the upper bits of the flag register when you push and pop it. (I think that is how the Wolf3D 286 detection code works if I remember correctly.)

Although GLaBIOS is probably running fine a 286 there are some difference to a 8088/V20. Like the PUSH/POP SP instruction is slightly different.

I'm working on some new validation hardware for the 286. (kind of like a 286 accelerator card for my emulator)
When that is up and running I would be able to test with the real thing. :)

@640-KB
Copy link
Owner

640-KB commented Jan 10, 2024

I know this is closed but I just want to add my thoughts.

I'm working (slowly) towards 286 and AT support in VirtualXT. Just as you noted there is quote a lot on the system side that needs to happen and probably this would have to be a fork if not to clobber the current codebase.

Appreciate it - yes! I think it's a great idea, I only closed it since it would just need to be a forked project so wouldn't exist in this one (don't want an Issue hanging around here that would never be done on this project!).

That's really cool to hear about the 286 and AT support coming. Do you plan to also implement the high density floppy controller as well? That's something I've been working on (very slowly) but there really aren't any emulators with debugging capability that support both 286 and a high density controller.

There is also the interesting case where you have XT machines with 286 CPUs. This is my first step along the way and I think the current BIOS would work well with that.

I've looked at Tandy support before and just that I haven't really pursued is that 1) Each model has a fairly different customized BIOS for its specific hardware 2) they tend to have somewhat proprietary (and under documented) hardware, such as keyboards, video, etc 3) I don't have one/don't have an accurate emulator that has any kind of debugger to make it easier to do. That said, since many of them share similar hardware to the PCjr it would open up the door for being able to create a PCjr target as well. Though the question is... which should we focus on... PCjr/Tandy or AT/286? :)

And since you know I like to sugest names for your future project I give you the sugestion of GLaTBIOS. ;)

That's awesome! Just the right name will be a very important design decision for sure. :)

@640-KB
Copy link
Owner

640-KB commented Jan 10, 2024

My friend uses GLaBIOS with his IBM 5150, which he has a 10mhz 286 accelerator card, it seems to work quite well, he showed me it yesterday. However, I dare say it would work even better if there were optimisations for such setups (myself, I have a 6mhz 286 tulip card in my IBM XT), as well as my 5162. Cheers Alistair

Yes, I do have one of those as well (I think mine's an Orchid Tiny Turbo) and have used it with GLaBIOS and works great.

Thats cool! I would have thought those cards had there onboard BIOS?

@640-KB Could we have GLaBIOS to be 286 aware during post? and perhaps dedicate another bit in the BDA where the V20 flag is stored? I think the best way to detect a 286 is to look what happens to the upper bits of the flag register when you push and pop it. (I think that is how the Wolf3D 286 detection code works if I remember correctly.)

In truth, the current CPU type was really just meant to differentiate a V20 vs an 8088 from a functional perspective (don't allow V20 instructions to run on an 8088), but it does make sense to look at expanding it at some point (available code space willing). I do have some code to test for an 8086 vs 8088 but I've just never included it in the main repo due to code space limitations (it's actually a non-trivial number of bytes to do).

And yeah, I did leave another bit or two reserved in the BDA byte to indicate other CPU types/capabilities (perhaps a bitfield where one bit indicates 16bit vs 8bit bus, another is NEC or Intel and another may be 186+ instructions available). I can look at the code space impact to add a 286 test (and code to display a different string) just to see what it would take. Would probably end up being a non-default build option so would only have a code impact for those who need it (since it could potential require sacrificing another feature in that build).

Although GLaBIOS is probably running fine a 286 there are some difference to a 8088/V20. Like the PUSH/POP SP instruction is slightly different.

Yeah, since I already do some 186+ instructions now for V20 (PUSHA, SHR reg, imm, etc) adding a 286 target that uses just those and not the NEC ones would certainly be possible.

I'm working on some new validation hardware for the 286. (kind of like a 286 accelerator card for my emulator) When that is up and running I would be able to test with the real thing. :)

Oh cool... a 286 accelerator emulator option. That's neat! That will make testing this a lot easier too, since swapping the BIOS ROM on my 5160 that has that Orchid card is a big pain to do due to how tightly it sits in there.

Also, I did just pick up an actual 5170 so that may help inspire more movement on this too.

Okay - so I think I get the original request now a little bit better. Rather than talking about a full blown 5170 AT and beyond, we're looking for something that would enhance and/or target using a 286 CPU on an otherwise XT architecture. That makes sense and is reasonable. So I guess I should re-open this and put it on the list!

Thx again for the ideas!

640KB

@640-KB 640-KB reopened this Jan 10, 2024
@andreas-jonsson
Copy link

Currently I have been very lazy with the disk controller implementation. It is all done with a BIOS extension. :) (It is also because of harddrive support.)
I would not mind having proper HD floppy support but I have no current plans.

PCjr/Tandy or AT/286?

I would go with AT. There simply is no opesource AT BIOS that I'm aware of and I think it is quite a common machine as well. It also defines an entire platform. Just like the PC/XT.

Since I'm committed to supply an opensource BIOS with VirtualXT (it should be batteries included) there can never be any full AT support until there is a BIOS. :)

@ajrossnz
Copy link
Author

ajrossnz commented Jan 10, 2024 via email

@andreas-jonsson
Copy link

Perhaps you already know about the ATBIOS Kit?
If not, then perhaps it can be of use in the future. ;)

@640-KB
Copy link
Owner

640-KB commented Aug 29, 2024

Perhaps you already know about the ATBIOS Kit? If not, then perhaps it can be of use in the future. ;)

Oh, that's very interesting. I've never seen this before! This might just be very helpful to fill in some of the gaps with regards to a 286 BIOS. I will definitely give this a look over. Thanks so much for sharing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants