VOGONS


First post, by davecom

User metadata
Rank Newbie
Rank
Newbie

I am at the point that my PC (original 5150) emulator is actually displaying things on the screen, which is great. I'm using the standard free Super PC BIOS 3.1 and I am seeing "System Error: 00" printed out. But the documentation doesn't list what error "00" means. Does anyone have any idea? If not I'll try to figure it out from the assembly source.

Also, after printing the first couple of lines on the screen, it goes back to the top to print "Upgrades by..." Any pointer as to what instruction may be going wrong to cause that? Has anyone else seen this behavior? I don't think it's coming from the CGA code. I'm going to guess it's a wrong X86 string instruction.

My emulator is very much a hack as I have a couple hours here and there, so the code is a bit of a mess, but here it is if you're interested (only setup to build right now with Xcode, but should be portable to other places with SDL):
https://github.com/davecom/DK86PC

Screen Shot 2020-08-29 at 1.16.22 AM.png
Filename
Screen Shot 2020-08-29 at 1.16.22 AM.png
File size
13.53 KiB
Views
161 views
File license
Public domain

Reply 1 of 6, by davecom

User metadata
Rank Newbie
Rank
Newbie

This is what the documentation says... no 00 unfortunately:

Error Codes ----------- The BIOS may give a "System Error" code at bootup. This error code is a combination of the following cod […]
Show full quote

Error Codes
-----------
The BIOS may give a "System Error" code at bootup. This error code is a
combination of the following codes:

01h - Bad system BIOS checksum
02h - Bad RAM in main system memory
04h - Bad RAM in video card
10h - Bad RAM in vector area (this also in main system memory)
20h - Bad expansion ROM checksum

Note that the codes are in hexadecimal. The "System Error" code given by the
BIOS is a sum of the above codes. For example, if the code 26 is given, the
individual errors are 02h, 04h, and 20h.

Reply 2 of 6, by davecom

User metadata
Rank Newbie
Rank
Newbie

Sorry for the live debugging. I've inspected the RAM where the error code is generated from (found by looking through the BIOS source) and it appears to be 04 "Bad RAM in video card." Now I not only need to figure that out, but also why 04 is displaying as 00.

Reply 4 of 6, by davecom

User metadata
Rank Newbie
Rank
Newbie

The "staying on the same line" bug ended up being another CPU bug, in some of the first instructions I implemented (MOV, A0-A3) . I caught this by finally implementing automated CPU tests. Just goes to show how important CPU tests are when implementing an emulator...

Anyway, if this thread is at all helpful to other people, perhaps it will be with the message "implement CPU tests early."

Attachments

Reply 5 of 6, by UselessSoftware

User metadata
Rank Newbie
Rank
Newbie

Good work! Have fun, writing a PC emulator from scratch is a process full of blood, sweat and tears. Lots and lots of tears. But once everything comes together, it feels awesome!