VOGONS


First post, by kingcake

User metadata
Rank Oldbie
Rank
Oldbie

This is a combined VGA/System ROM out of a Packard Bell.

I disassembled it in IDA and I see all the VGA stuff, but I think the system rom part is compressed. (It's a Phoenix Bios). Because I see lots of bytes but very little code.

Does anyone have experience with this sort of thing? I'm trying to figure out what exact conditions trip a certain error vague error message.

I tried using some phoenix editor tools but they didn't recognize it as a phoenix bios. Either because it's too old (386 machine) or it has something to do with the VGA bios combines in the rom.

https://www.dropbox.com/s/x3ts1bcafb90qu3/pb.BIN?dl=0

Reply 1 of 7, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
kingcake wrote on 2020-09-21, 04:39:
This is a combined VGA/System ROM out of a Packard Bell. […]
Show full quote

This is a combined VGA/System ROM out of a Packard Bell.

I disassembled it in IDA and I see all the VGA stuff, but I think the system rom part is compressed. (It's a Phoenix Bios). Because I see lots of bytes but very little code.

Does anyone have experience with this sort of thing? I'm trying to figure out what exact conditions trip a certain error vague error message.

I tried using some phoenix editor tools but they didn't recognize it as a phoenix bios. Either because it's too old (386 machine) or it has something to do with the VGA bios combines in the rom.

https://www.dropbox.com/s/x3ts1bcafb90qu3/pb.BIN?dl=0

I looked a little and I don't think it's compressed. In fact, if you take out the second 64K and copy it over top of PCem's ami486.bin, it works as the bios for that machine and you can play with it in PCem.
What is the error message?

Reply 2 of 7, by kingcake

User metadata
Rank Oldbie
Rank
Oldbie
jakethompson1 wrote on 2020-09-24, 23:42:
kingcake wrote on 2020-09-21, 04:39:
This is a combined VGA/System ROM out of a Packard Bell. […]
Show full quote

This is a combined VGA/System ROM out of a Packard Bell.

I disassembled it in IDA and I see all the VGA stuff, but I think the system rom part is compressed. (It's a Phoenix Bios). Because I see lots of bytes but very little code.

Does anyone have experience with this sort of thing? I'm trying to figure out what exact conditions trip a certain error vague error message.

I tried using some phoenix editor tools but they didn't recognize it as a phoenix bios. Either because it's too old (386 machine) or it has something to do with the VGA bios combines in the rom.

https://www.dropbox.com/s/x3ts1bcafb90qu3/pb.BIN?dl=0

I looked a little and I don't think it's compressed. In fact, if you take out the second 64K and copy it over top of PCem's ami486.bin, it works as the bios for that machine and you can play with it in PCem.
What is the error message?

specifically, I was looking for what set the "shutdown failure" error message. I know vaguely it has something to do with the cmos/rtc. But I want to know exactly what's happening.

Weird, it does just work in pcem without the vga portion. I didn't expect that.

Reply 3 of 7, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
kingcake wrote on 2020-09-26, 00:12:

specifically, I was looking for what set the "shutdown failure" error message. I know vaguely it has something to do with the cmos/rtc. But I want to know exactly what's happening.

Weird, it does just work in pcem without the vga portion. I didn't expect that.

It looks like the code at 0x6aa2 tells the keyboard controller to reset the machine, then it re-enables interrupts (sti) and goes to sleep until the next (presumably timer) interrupt comes in (hlt). There is code after that to print the Shutdown failed message. The only way I could see it executing is if the kbc is too slow to reset the machine, or if the hlt instruction is somehow broken. Is there anything particular that causes your machine to print that message? It looks like the code might have something to do with switching from 286 protected mode back to real mode.

Reply 4 of 7, by kingcake

User metadata
Rank Oldbie
Rank
Oldbie
jakethompson1 wrote on 2020-09-26, 01:39:
kingcake wrote on 2020-09-26, 00:12:

specifically, I was looking for what set the "shutdown failure" error message. I know vaguely it has something to do with the cmos/rtc. But I want to know exactly what's happening.

Weird, it does just work in pcem without the vga portion. I didn't expect that.

It looks like the code at 0x6aa2 tells the keyboard controller to reset the machine, then it re-enables interrupts (sti) and goes to sleep until the next (presumably timer) interrupt comes in (hlt). There is code after that to print the Shutdown failed message. The only way I could see it executing is if the kbc is too slow to reset the machine, or if the hlt instruction is somehow broken. Is there anything particular that causes your machine to print that message? It looks like the code might have something to do with switching from 286 protected mode back to real mode.

the machine had a bad rtc. actually the problem was a bad cmos ram in the rtc. so I replaced the rtc chip (classic mc146818) and now it prints the shutdown failure message

Reply 5 of 7, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
kingcake wrote on 2020-09-26, 03:26:

the machine had a bad rtc. actually the problem was a bad cmos ram in the rtc. so I replaced the rtc chip (classic mc146818) and now it prints the shutdown failure message

Interesting, if in PCem in the file src/keyboard_at.c you add below the line case 0xf8: case 0xfa: case 0xfc: case 0xfe: /*Pulse output port - pin 0 selected - x86 reset*/ and recompile:

if (CS==0xf000&&cpu_state.pc==0x6aa6) break;

you can force your BIOS to generate that error under PCem.

If you go in DOS debug and enter the command
o 64 fe
your machine does reboot, right?
Are you having any problem with ctrl-alt-del on this machine?

Reply 6 of 7, by kingcake

User metadata
Rank Oldbie
Rank
Oldbie
jakethompson1 wrote on 2020-09-26, 05:37:
Interesting, if in PCem in the file src/keyboard_at.c you add below the line case 0xf8: case 0xfa: case 0xfc: case 0xfe: /*Pulse […]
Show full quote
kingcake wrote on 2020-09-26, 03:26:

the machine had a bad rtc. actually the problem was a bad cmos ram in the rtc. so I replaced the rtc chip (classic mc146818) and now it prints the shutdown failure message

Interesting, if in PCem in the file src/keyboard_at.c you add below the line case 0xf8: case 0xfa: case 0xfc: case 0xfe: /*Pulse output port - pin 0 selected - x86 reset*/ and recompile:

if (CS==0xf000&&cpu_state.pc==0x6aa6) break;

you can force your BIOS to generate that error under PCem.

If you go in DOS debug and enter the command
o 64 fe
your machine does reboot, right?
Are you having any problem with ctrl-alt-del on this machine?

actually now that you mention it. ctrl-alt-del doesn't work. it makes the machine lock up.

hmm are the 8042 and mc146818 connected at all? I need to pull up an ibm pc/at tech reference

Reply 7 of 7, by mkarcher

User metadata
Rank l33t
Rank
l33t
kingcake wrote on 2020-09-26, 05:43:

hmm are the 8042 and mc146818 connected at all? I need to pull up an ibm pc/at tech reference

No, they are not connected (except for the 8 data lines on the same bus, of course). But the reset logic in the BIOS kind-of connects them in software. The KBC knows whether the machine was reset "hard" (i.e. power on reset or reset button) or "soft" (e.g. reset to get out of protected mode). If the machine was reset soft, the BIOS then looks into the soft reset mode byte in CMOS (IIRC: byte 0x0F) to find out what should be done now that the processor did successfully reset.