

VBForums

General

Application Testing

Pure VB6 8086 PC emulator! Results 1 to 12 of 12 Thread: Pure VB6 8086 PC emulator! #1 Thread Starter Junior Member Join Date Jan 2010 Posts 30 Pure VB6 8086 PC emulator! Hello, I've been working on this 8086 PC emulator written completely in pure VB6, called vb8086. Thought it would kind of fun and something not seen before (afaik) in VB6. There's a good reason for that, VB6 sucks for this type of thing but it was fun to do. Not everything will run perfectly yet, I believe there is a bug in emulation of the 16-bit IMUL/IDIV instructions.



So basically, this emulator supports the basics of the old 8086 style PC hardware platforms. The CPU instructions are totally emulated, minus the bug I mentioned. The i8253 timer chip is emulated, as well as the i8259 interrupt controller. Disk functionality is emulated for both floppy and hard drives through interrupt 13h calls. Many games run very well in it right now, but some are crippled by the IMUL/IDIV bug. One in particular that runs awesomely is Ultima 6. I've beaten the whole game inside my emulator without any issues. Ms Pacman runs well too, and a lot of other older ones. The PC speaker is emulated kind of poorly, but it's there.



As far as video emulation support, it supports the CGA video and text modes, as well as 320x200 8-bit VGA/MCGA mode.



So, I'm providing all of the source code as well as a few data files with the font and BIOS. I didn't include the .EXE to comply with the forum rules, but you can easily compile it yourself. Just load the vb8086.vbp file and compile. If you get any errors compiling or running, run the resreg.bat file with will register dx8vb.dll and comdlg32.ocx with Windows and try again.



I also included a blank 20 MB hard drive image to use in the emulator with the bare files for booting DOS 6.22. Use a utility like WinImage to insert files for DOS applications or games into the file drive0.raw, so that you can run them in the emulator.



I'd love feedback. Being VB6, it's not very fast. You'll want at least a 3 GHz CPU.



Here are all the files: http://s000.tinyupload.com/index.php...25203733885475 (about a 1.4 MB download, expands to over 20 MB mostly just from the blank hard drive image)



Here are some screenshots of it running just to give an idea of what it looks like and can do:











Last edited by miker00lz; Jun 24th, 2015 at 11:07 AM . #2 Junior Member Join Date Aug 2011 Posts 28 Re: Pure VB6 8086 PC emulator! Very interesting! #3 Thread Starter Junior Member Join Date Jan 2010 Posts 30 Re: Pure VB6 8086 PC emulator! Thank you! I've written a much more complete emulator in C over the last couple of years (called Fake86), but I used to be a VB6 fanatic. I still like VB6 in some ways, and I thought this would be fun to put together. Last edited by miker00lz; Oct 30th, 2012 at 09:20 PM . #4 Thread Starter Junior Member Join Date Jan 2010 Posts 30 Re: Pure VB6 8086 PC emulator! The problems in the IDIV/IMUL seem to come from me not being able to use an unsigned 32-bit variable to work things out with, I'll have to figure a way around that. The same CPU code works fine in FreeBASIC with unsigned values. #5 PowerPoster Join Date Dec 2001 Location Adelaide, Australia Posts 13,346 Re: Pure VB6 8086 PC emulator! Cool! I've always wondered how to write an emulator.

If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.

https://get.cryptobrowser.site/30/4111672 when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu. #6 Thread Starter Junior Member Join Date Jan 2010 Posts 30 Re: Pure VB6 8086 PC emulator! It's probably a good one to learn about it from by checking out the source code! It boils down to knowing how to implement the CPU, other components, and "connect" them all together. When I first wrote the code for this stuff, there was a LOT of reading of datasheets and other docs about the chips. #7 I'm about to be a PowerPoster! Join Date Jan 1999 Location Sweden Posts 14,649 Re: Pure VB6 8086 PC emulator! Hmmm.... By just looking at the screenshots you posted I must say that there must be something wrong with your emulator. If it truly emulated the 8086 processor then it would be impossible for you to run Windows 3.1 since it required 80286 to run in standard mode and 80386 to run in extended mode (taking advantage of virtual memory assignment). #8 Thread Starter Junior Member Join Date Jan 2010 Posts 30 Re: Pure VB6 8086 PC emulator! Originally Posted by Joacim Andersson Originally Posted by Hmmm.... By just looking at the screenshots you posted I must say that there must be something wrong with your emulator. If it truly emulated the 8086 processor then it would be impossible for you to run Windows 3.1 since it required 80286 to run in standard mode and 80386 to run in extended mode (taking advantage of virtual memory assignment). #9 Thread Starter Junior Member Join Date Jan 2010 Posts 30 Re: Pure VB6 8086 PC emulator! *duplicate post* sorry Last edited by miker00lz; Feb 13th, 2016 at 12:38 AM . #10 coder. Join Date Feb 2001 Location Elberfeld, IN Posts 7,599 Re: Pure VB6 8086 PC emulator! it thought it was a windows 2 screenshot. Looks like the OS the tandy computers came with. www.youtube.com/lordorwell2

www.facebook.com/lordorwell

https://play.google.com/store/apps/d....archery&hl=en #11 I'm about to be a PowerPoster! Join Date Jan 1999 Location Sweden Posts 14,649 Re: Pure VB6 8086 PC emulator! Originally Posted by Lord Orwell Originally Posted by it thought it was a windows 2 screenshot. Looks like the OS the tandy computers came with. #12 New Member Join Date May 2015 Posts 1 Re: Pure VB6 8086 PC emulator! I'm amazed this thread doesn't have more posts, this is extremely impressive. Who would have thought we'd ever see a PC emulator in VB6??? And fairly fast in EXE form! Fantastic work.

VBForums

General

Application Testing

Pure VB6 8086 PC emulator! Posting Permissions You may not post new threads

post new threads You may not post replies

post replies You may not post attachments

post attachments You may not edit your posts

edit your posts BB code is On

Smilies are On

[IMG] code is On

[VIDEO] code is On

HTML code is Off Forum Rules







Click Here to Expand Forum to Full Width





