4 Attachment(s)
BasicBox: A full 486-class x86 PC emulator written in Visual Basic 6
GitHub link: https://github.com/mikechambers84/BasicBox
I made a full 486-class PC emulator in VB6! I mainly have been writing this in C, but I've also been doing a VB6 port as a side project just as a proof of concept that you can write just about anything in VB6 as long as you don't care how slow it is!
It runs Linux, Windows NT 4.0 and DOS. Unfortunately, Win95/98 don't work in it yet for some reason. I'm trying to figure out the issue. Windows 2000 won't boot either, only NT 4.
NT 4 also doesn't like something about my IDE controller right now, so it has to be booted as a SCSI Disk.
Old Linux distros like Debian 2.2 Potato are usable if you're running this on a modern CPU with high IPC and clock speed.
There are two sample hard disk images available over in the releases section on the GitHub, there's FreeDOS 1.4 and Debian 2.2. Couldn't include NT 4 obviously, since that's technically illegal even though it's ancient.
Root password for the Potato sample is "basicbox"
Notes from the readme:
Usage notes:
- BasicBox currently requires you to configure the guest machine from the command line. Launch with -h for a list of options. I plan to have a GUI configuration utility soon.
- Click in the window or press Ctrl-F11 to "grab" the mouse. Ctrl-F11 releases the grab.
- Ctrl-F12 injects a Ctrl-Alt-Delete sequence to the guest OS.
- Windows NT 4.0 doesn't like my IDE controller, it blue screens during startup unless using a SCSI hard disk. DOS and Linux seem to work fine with IDE.
- There is a "-video et4000" option but it's buggy and has issues, so I don't recommend using it yet. Stick with the default "stdvga" card for now.
- It uses a real 486 era BIOS, so just like back in the day you need to configure IDE disks in BIOS setup.
- Have a lot of patience. :)
- Emulated NE2000 is at IO port 0x300, IRQ 7. (If enabled)
- Emulated BusLogic SCSI default IO port is 0x334. (If enabled)
- Emulated Sound Blaster is at IO port 0x220, IRQ 5, DMA 1.
- To configure an empty-on-boot SCSI CD drive, for example on SCSI ID 1, use: "-scsi-cd 1 ." then you can change ISOs on the fly from the UI.
Features
- 486 CPU (plus a few extra instructions... let's just call it an "enhanced 486" for now)
- 387-class FPU (ported from Tiny386)
- ATA/IDE controller
- BusLogic BT-545S SCSI controller with both hard disk and CD ISO support (ported from 86Box)
- Floppy controller (A bit broken, works in DOS. Linux and NT 4 don't really like it.)
- VGA graphics
- Microsoft-compatible serial mouse
- NE2000 network card (ported from Bochs) -- requires winpcap/npcap to be installed.
- Sound Blaster (my implementation) + OPL3 (NukedOPL ported to VB6)
To do:
- SPEED OPTIMIZATION! As much as possible at least.
- Get Windows 2000 and 9x working.
- Fix IDE issues.
- Finish user-mode networking module so pcap isn't required.
- Get ET4000 working correctly.
- Some GUI config tool.
- Fix various other bugs
- Clean up some very ugly stuff in the code
Screenshots:
Attachment 195803
Attachment 195804
Attachment 195805
Attachment 195806
Re: BasicBox: A full 486-class x86 PC emulator written in Visual Basic 6
This is absolutely mind boggling :-))
cheers,
</wqw>
Re: BasicBox: A full 486-class x86 PC emulator written in Visual Basic 6
Quote:
Originally Posted by
wqweto
This is absolutely mind boggling :-))
cheers,
</wqw>
That's what I was hoping for! This has been an idea that's been kicking around in my head for years.
I've always wondered how it would handle this. Not well honestly, but still better than I thought. :bigyello:
I need to see how much more speed I can get out of it.
The code is really ugly in a few places though. Now that it's functional I need to get in there soon and clean it up.
Re: BasicBox: A full 486-class x86 PC emulator written in Visual Basic 6
Re: BasicBox: A full 486-class x86 PC emulator written in Visual Basic 6
I would like to have something from the BASIC box for my M2000 Interpreter an open source .VB6 project, which target the educational space. I would like to have a part of BASIC box in the same M2000.dll (an activeX dll which hold the M2000 Environment (advanced console/UI -users forms). This part I want to used for executing machine code, which the user write on M2000 code, but not executed in the real processor but in an emulator, with the benefit to run it step by step, see the instructions as they executed, the registers, the flags. I don't need something fast. I made in M200 0the Buffer object which can be used either for data or foe execution, but if you execute code at the level of newbie the result can be a disaster, hanging the M2000 Environment (which also have the editor to write a run code. So using a BASIC BOX without file system, just some events for each execution, sending current/program counter and getting: execute, abort execution, start execution from address, read/write flags, read/write byte from memory, read write block of bytes, copy of stack for a number of bytes (for inspection).