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

Re: Can't start IBM5150 the way I want to [Re: Tinu] #77014
02/07/12 07:43 PM
02/07/12 07:43 PM
Joined: Jan 2012
Posts: 796
C
crazyc Offline
Senior Member
crazyc  Offline
Senior Member
C
Joined: Jan 2012
Posts: 796
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 )?

Re: Can't start IBM5150 the way I want to [Re: crazyc] #77015
02/07/12 07:47 PM
02/07/12 07:47 PM
Joined: Feb 2012
Posts: 60
Switzerland
T
Tinu Offline OP
Member
Tinu  Offline OP
Member
T
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?

Re: Can't start IBM5150 the way I want to [Re: Tinu] #77016
02/07/12 07:59 PM
02/07/12 07:59 PM
Joined: Apr 2004
Posts: 1,554
J
judge Offline
Very Senior Member
judge  Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,554
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

Re: Can't start IBM5150 the way I want to [Re: Tinu] #77017
02/07/12 08:05 PM
02/07/12 08:05 PM
Joined: Apr 2004
Posts: 1,554
J
judge Offline
Very Senior Member
judge  Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,554
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.


Re: Can't start IBM5150 the way I want to [Re: Tinu] #77025
02/07/12 10:00 PM
02/07/12 10:00 PM
Joined: Feb 2012
Posts: 60
Switzerland
T
Tinu Offline OP
Member
Tinu  Offline OP
Member
T
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?

Re: Can't start IBM5150 the way I want to [Re: Tinu] #77026
02/07/12 10:05 PM
02/07/12 10:05 PM
Joined: Mar 2001
Posts: 16,072
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,072
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.
Re: Can't start IBM5150 the way I want to [Re: R. Belmont] #77027
02/07/12 10:11 PM
02/07/12 10:11 PM
Joined: Jan 2012
Posts: 796
C
crazyc Offline
Senior Member
crazyc  Offline
Senior Member
C
Joined: Jan 2012
Posts: 796
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.

Re: Can't start IBM5150 the way I want to [Re: Tinu] #77029
02/07/12 10:15 PM
02/07/12 10:15 PM
Joined: Mar 2001
Posts: 16,072
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,072
USA
In that case we should return 0xf8 | hsync and see if that makes the error beep go away.

Re: Can't start IBM5150 the way I want to [Re: crazyc] #77030
02/07/12 10:18 PM
02/07/12 10:18 PM
Joined: Feb 2012
Posts: 60
Switzerland
T
Tinu Offline OP
Member
Tinu  Offline OP
Member
T
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
3 registered members (Stick, Cpt. Pugwash, 1 invisible), 20 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,607
Posts112,529
Members4,828
Most Online296
Dec 5th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.035s Queries: 15 (0.010s) Memory: 5.7274 MB (Peak: 5.9495 MB) Zlib enabled. Server Time: 2018-12-19 16:19:07 UTC