VOGONS


DotXT

Topic actions

First post, by folkert

User metadata
Rank Newbie
Rank
Newbie

Hi,

To get to know C# a bit I decided to implement an IBM PC emulator (the 5150 system).
So far it goes through bios up to the point of floppy disk access:

DotXT, (C) 2023 by Folkert van Heusden
Released in the public domain
301

016 KB OK
032 KB OK
048 KB OK
064 KB OK

601

ERROR. (RESUME = "F1" KEY)

INT NR 16, AH: 00
^C

I develop it under Linux but, being C# it will probably run on windows as well.

https://github.com/folkertvanheusden/DotXT

Reply 1 of 8, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi. Could it be the BIOS?
IBM didn't had a lucky hand for writing firmware software, I think. 😒

I'm thinking of the mess they created with PS/2 series (individual reference diskette needed for each PC) or the 8 MHz speed limit that was hard-coded into some AT BIOSes.
Or its lack for type 47 fixed-disks.

Another user here has trouble with the PC BIOS, too, maybe.
The floppy controller wouldn't work with a Gotek, because BIOS/FDC hold a pin low for too long. Not sure it's really related, though.

Unable to boot IBM PC (5150) with a Gotek emulator and FlashFloppy

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 2 of 8, by GloriousCow

User metadata
Rank Member
Rank
Member
Jo22 wrote on 2023-06-17, 13:50:

Another user here has trouble with the PC BIOS, too, maybe.
The floppy controller wouldn't work with a Gotek, because BIOS/FDC hold a pin low for too long. Not sure it's really related, though.

Happy user of a Gotek on an IBM 5150 here 😀

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc

Reply 3 of 8, by xcomcmdr

User metadata
Rank Oldbie
Rank
Oldbie

Hi,

A new PC emulator in C# ? Very cool ! 😀
C# is a great choice for any project. Especially since it is cross platform (any .NET project will run on Windows, macOS, and Linux).

Also, perhaps an example of other emulators in C# will help you both discover C# and write your own emulator. Here is an example:

https://github.com/OpenRakis/Spice86

Also this one:

https://github.com/gregdivis/Aeon
https://github.com/maximilien-noal/Aeon-Stagi … e/feature/xplat

(this fork runs on Linux and MacOS thansk to AvaloniaUI. The original depends on Windows).

Since C# has a lot of low-level features inspired by C++ (pointers, safe pointers with Span<T> or Memory<T>, structs, value types, unions, enums, flags, etc...) rather than Java, the code from 86Box, PCem, and DOSBox Staging can help too.
If you want to learn C#, I'd recommend the book C# in Depth.

Last edited by xcomcmdr on 2023-06-17, 21:35. Edited 1 time in total.

Reply 4 of 8, by Jo22

User metadata
Rank l33t++
Rank
l33t++

^That's interesting!
Just found an interesting news from 2 years ago.

Microsoft Opens Up Old Win32 APIs to C# and Rust, More Languages to Come
https://visualstudiomagazine.com/articles/202 … 2-apis.aspx?m=1

I wonder if this will also cover those classic APIs used/supported by Win32s. ^^

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 5 of 8, by xcomcmdr

User metadata
Rank Oldbie
Rank
Oldbie

I love Windows 3.11 with Win32S. I wish I could targer it with C# (although someone already did). 😁

Going the other way, there is a project to compile C# to native code for IBM PC computers: https://github.com/CosmosOS/IL2CPU
It uses this project, a high level assembler for X86 and X86_64 assembly: https://www.x-sharp.net/
The mainline .NET SDK already supports ahead of time compilation to native code (skipping the bytecode, and therefore the JIT compilation), but of course not for such a low level platform. 😁

@folkert:

You could try to run this BIOS: https://github.com/skiselev/8088_bios

Reply 6 of 8, by GloriousCow

User metadata
Rank Member
Rank
Member
xcomcmdr wrote on 2023-06-17, 15:53:

You could try to run this BIOS: https://github.com/skiselev/8088_bios

I'm a big fan of GLaBIOS too
https://github.com/640-KB/GLaBIOS/

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc

Reply 8 of 8, by Jo22

User metadata
Rank l33t++
Rank
l33t++
GloriousCow wrote on 2023-06-17, 15:54:
I'm a big fan of GLaBIOS too https://github.com/640-KB/GLaBIOS/ […]
Show full quote
xcomcmdr wrote on 2023-06-17, 15:53:

You could try to run this BIOS: https://github.com/skiselev/8088_bios

I'm a big fan of GLaBIOS too
https://github.com/640-KB/GLaBIOS/

Hm. Looks good. 😀 👍
Even has 736KB Coventional Memory support out-of-box.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//