Previous Thread
Next Thread
Print Thread
Page 3 of 7 1 2 3 4 5 6 7
#77013 - 02/07/12 07:40 PM Re: Can't start IBM5150 the way I want to [Re: Lord Nightmare]  
Joined: Feb 2012
Posts: 60
Tinu Offline
Member
Tinu  Offline
Member

Joined: Feb 2012
Posts: 60
Switzerland
Originally Posted By Lord Nightmare
MDA doesn't have separate firmware; its firmware is built into the ibm 5150 bios itself (same with CGA)
LN

Yes, BIOS rev1 and rev2 couldn't even initialize additional firmware on an adapter. That's why a hard disk PC 5150 needs firmware rev3 to work.

#77014 - 02/07/12 07:43 PM Re: Can't start IBM5150 the way I want to [Re: Tinu]  
Joined: Jan 2012
Posts: 777
crazyc Offline
Senior Member
crazyc  Offline
Senior Member

Joined: Jan 2012
Posts: 777
Originally Posted By Tinu
Unfortunately MESS crashes right away with hercules alone. With an additional cga in isa4 I can boot.


Maybe it needs the same fix as MDA in MACHINE_CONFIG_FRAGMENT( pcvideo_hercules )?

#77015 - 02/07/12 07:47 PM Re: Can't start IBM5150 the way I want to [Re: crazyc]  
Joined: Feb 2012
Posts: 60
Tinu Offline
Member
Tinu  Offline
Member

Joined: Feb 2012
Posts: 60
Switzerland
Originally Posted By crazyc
Maybe it needs the same fix as MDA in MACHINE_CONFIG_FRAGMENT( pcvideo_hercules )?

Yes, that did the trick, thanks!
Do I have to do anything that this fix gets checked in?

#77016 - 02/07/12 07:59 PM Re: Can't start IBM5150 the way I want to [Re: Tinu]  
Joined: Apr 2004
Posts: 1,553
judge Offline
Very Senior Member
judge  Offline
Very Senior Member

Joined: Apr 2004
Posts: 1,553
Originally Posted By Tinu
Yes, that did the trick, thanks!
Do I have to do anything that this fix gets checked in?


No, I'll do that in my next commit wink

#77017 - 02/07/12 08:05 PM Re: Can't start IBM5150 the way I want to [Re: Tinu]  
Joined: Apr 2004
Posts: 1,553
judge Offline
Very Senior Member
judge  Offline
Very Senior Member

Joined: Apr 2004
Posts: 1,553
Done
Code:

ibmpc.c:
- Added hercules and vga to list of ISA cards.
- ibm5150: Changed the number of ISA slots to 5.
- ibm5160: Changed the number of ISA slots to 8.
isa_mda.c:
- Prevent crashes when only mounting the hercules video card.


#77025 - 02/07/12 10:00 PM Re: Can't start IBM5150 the way I want to [Re: Tinu]  
Joined: Feb 2012
Posts: 60
Tinu Offline
Member
Tinu  Offline
Member

Joined: Feb 2012
Posts: 60
Switzerland
@judge: Thanks!

From what I can see in the PC BIOS listing, the video tests are quite simple:
1. A line is written (I can see this on the emulated mda screen)
2. Repeatedly, the "Mode Control Register" is polled for Bit 4=on, which means "enable video signal".
In the end, the test routine gives up and sounds the beep. Then, the BIOS continues as if nothing happened. So a failed test has no consequences other than the beep.

The question is: Why does this simple test fail on the mda, but succeed with the cga?

One difference is the register address of the "Mode Control Register": mda is 0x3BA, cga is 0x3DA. I searched all the source code but could find no reference to these register addresses (except in the comment section of isa_cga.c).

Does anyone know how these ports are defined and where?

#77026 - 02/07/12 10:05 PM Re: Can't start IBM5150 the way I want to [Re: Tinu]  
Joined: Mar 2001
Posts: 15,933
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,933
USA
This line:

Code:
m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_mda_device::io_read), this ), 
write8_delegate( FUNC(isa8_mda_device::io_write), this ) );


causes all I/O port access between 3b0 and 3bf (inclusive) to go to the io_read and io_write functions in isa_mda. The 'offset' parameter in those functions is the offset from 3b0. So offset A (10 decimal) is port 3ba, and that returns the value from status_r().

status_r() for its part returns 0x08 ORed with hsync, so bit 3 is always set. Apparently that should be bit 4?

Last edited by R. Belmont; 02/07/12 10:07 PM.
#77027 - 02/07/12 10:11 PM Re: Can't start IBM5150 the way I want to [Re: R. Belmont]  
Joined: Jan 2012
Posts: 777
crazyc Offline
Senior Member
crazyc  Offline
Senior Member

Joined: Jan 2012
Posts: 777
According to this, bit 3 of 0x3ba is supposed to indicate whether a on or off pixel is being drawn. Maybe the bios doesn't like it being always on? (It also says bits 4-7 are always 1 so if he meant 4 not 3...) I don't see how to correctly emulate that.

#77029 - 02/07/12 10:15 PM Re: Can't start IBM5150 the way I want to [Re: Tinu]  
Joined: Mar 2001
Posts: 15,933
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,933
USA
In that case we should return 0xf8 | hsync and see if that makes the error beep go away.

#77030 - 02/07/12 10:18 PM Re: Can't start IBM5150 the way I want to [Re: crazyc]  
Joined: Feb 2012
Posts: 60
Tinu Offline
Member
Tinu  Offline
Member

Joined: Feb 2012
Posts: 60
Switzerland
It's bit 3, not 4, you are correct. The BIOS code jumps from line to line and checks whether the status bit goes on and then off again. In preparation, a green line is drawn on the screen first.
Update: Yes: The cga code uses the logic you propose: data = m_vsync | ( ( data & 0x40 ) >> 4 ) | m_hsync;

Last edited by Tinu; 02/07/12 10:20 PM.
Page 3 of 7 1 2 3 4 5 6 7

Who's Online Now
2 registered members (Sune, Duke), 17 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,534
Posts111,540
Members4,793
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.035s Queries: 15 (0.013s) Memory: 5.0235 MB (Peak: 5.2527 MB) Zlib enabled. Server Time: 2018-05-22 15:37:04 UTC