OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Jan 18, 2018 11:52 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: BIOS + OS for 80186/Am186 System
PostPosted: Sun Jan 07, 2018 11:51 am 
Offline
User avatar

Joined: Wed Nov 02, 2016 2:20 am
Posts: 9
Hi,

I have a SD186ES/EM-Demonstration Board from AMD equipped with an Am186ES, that runs at 40MHz. It is an 80186 compatible chip.

It has 2 serial ports, LEDs and 256kB RAM+256kb Flash onboard.
It uses a monitor program that is located in flash (e86mon).

I tried a lot, and finally I have everything together to write code for this very old board on a recent linux pc (terminal, toolchain, ...).

The monitor has a very limited int21 implementation, but i had to extend it heavily to run simple turbo-c-hello-world programs. I think that DOS-emulation is not what I want.
For modifying the monitor and it's extensions I need a Windows 3.x/9x, DOS, Visual C++, MASM. This leads to a seperate VM only for this job...

The idea is, maybe i could get real (MS) DOS running on this chip.

For easy (partially) PC-compatiblity I want to connect a Winbond ISA Controller (IDE, Floppy, 2x RS232, 1xLPT) as well as a Cirrus or Tseng ISA VGA.

The memory map of the system so far:
RAM:
0x00000 - 0x003FF IVT
0x00400 - 0x0040F Monitor Data (like BDA?, but smaller)
0x00410 - 0x3EFFF ~250k RAM
0x3F000 - 0x3FFFF 4k Stack+Data for Monitor

FLASH:
0xC0000 - 0xFFFFF Flash with Monitor, Space for User Application (managed by monitor)

I have all the stuff to connect more RAM (256k or 512k). The Monitor always uses top 4k of RAM. There are a few programmable chip selects available for the free memory regions.

How could i start making this system PC compatible?

What do i need at least to run DOS 5.0?
Do i need a PIT? Or is a 18.2Hz interrupt, generated by the Am186's timer, enough?
Do i need a KBC or does DOS use BIOS for keyboard?
Do i need a DMA Controller? The Internal one could be cascaded with 8259s, but the IO address would be different.
If i really need some of these components they could be added to bus easily, as this chip already has a demultiplexed bus with up to 12 CS for memory and IO regions.

I want to build a extension board that holds 128kx16 (256kB) Flash, that is switchable between the onboard-flash /CS and a programmable CS. So that i can have a program within the monitor flash, that maps the additional flash to a free area. I write the BIOS image to that flash.
I'll press reset and switch the flash memories. On power-up my BIOS loads and inits the system.

Where should i start when looking for a small generic BIOS?
Where do I find details about porting DOS and requirements for DOS? I read something about MS-DOS OAKs, is this the right direction? I don't want to modify DOS, i want to build everything around, so that unmodified DOS runs...


Top
 Profile  
 
 Post subject: Re: BIOS + OS for 80186/Am186 System
PostPosted: Tue Jan 09, 2018 1:51 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 1216
sdose wrote:
How could i start making this system PC compatible?

Start with the BIOS. You'll be able to get pretty far with just that. Unfortunately, you might have to disable a few of the CPU-internal peripherals to make your BIOS PC-compatible.

sdose wrote:
What do i need at least to run DOS 5.0?

You need a PC-compatible BIOS and... actually, I'm not sure if you need anything else. DOS relies pretty heavily on the BIOS.

sdose wrote:
Where should i start when looking for a small generic BIOS?

I don't think there's a BIOS generic enough to port to your board.

sdose wrote:
Where do I find details about porting DOS and requirements for DOS? I read something about MS-DOS OAKs, is this the right direction? I don't want to modify DOS, i want to build everything around, so that unmodified DOS runs...

The OAKs contain a good chunk of source code, and they should include all of the machine-specific parts so you can see exactly what DOS expects your computer to provide.


Top
 Profile  
 
 Post subject: Re: BIOS + OS for 80186/Am186 System
PostPosted: Wed Jan 17, 2018 11:32 am 
Offline
User avatar

Joined: Wed Nov 02, 2016 2:20 am
Posts: 9
Working on a BIOS is much harder than i thought... Everytime I solve a problem, I run into the next.

Most headache makes the monitor, that resides there, where a BIOS usually is located.
The internal Chip-Selects are not that smart enough, that i can switch between 2 flash-chips in software.
I'm still not sure what to do - locating my bios at C0000 and let the monitor start it OR having some (discrete) logic, that switches flash-chips.

A BIOS started by this monitor could be very helpful, it features a nice debugger and all the stuff I need to work with this board. On the other side i have concerns about compatiblity...

For now i have 512k SRAM from 0x00000 to 0x7FFFF and I am working on "bare bones" for NASM and C (bcc/dev86). bcc is able to produce code, that has first argument always in AX, not on stack. This could be useful for implementing interrupts in C.
I still have to do this flash-stuff, but I got stuck because of the not-so-flexible CS-implementation on this MCU. I have a lot of AM29F010, two of them would give me 128kx16. Perfect for BIOS...

I found that datalight provided an embedded x86 bios that is highly configurable. But i couldn't find any sources or else.
I also found a XT-ROM with MS-DOS 3.31 on the net, but not had a look at it.

I read this: http://www.drdos.net/documentation/romhtml/romch1.htm
It is about making a DR-DOS rom. I found a few DR-DOS releases on the internet, but not contain any of the stuff needed for this job and listed in the manual.
I assume, there was a seperate development-package or something similar....
Maybe someone could tell me more about this?


Top
 Profile  
 
 Post subject: Re: BIOS + OS for 80186/Am186 System
PostPosted: Wed Jan 17, 2018 12:20 pm 
Offline
User avatar

Joined: Wed Nov 02, 2016 2:20 am
Posts: 9
I forgot about the OAKs. I found some of these and it is quite a lot of useful information.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group