Skip to content

Commit

Permalink
Version 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jhhoward committed Oct 29, 2019
1 parent 65a7349 commit 3631a44
Show file tree
Hide file tree
Showing 80 changed files with 113 additions and 36,966 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Faux86: A portable, open-source 8086 PC emulator for bare metal Raspberry Pi
Faux86 is designed to be run 'bare metal' on a Raspberry Pi. This means that the emulator runs directly on the hardware so no OS needs to booted on the Pi.

## Features
- 8086 and 80186 instruction set emulation
- CGA / EGA / VGA emulation is mostly complete
- PC speaker, Adlib and Soundblaster sound emulation
- Serial mouse emulation

## Usage with Raspberry Pi
By default Faux86 boots from a floppy image dosboot.img which in the emulator is mounted as drive A. The SD card will be mounted as drive C and any connected USB mass storage device will be mounted as D.
Since MS-DOS is accessing the SD card directly, it does not work for large SD card types. I have found the best solution is to use a small capacity SD card and flash the image as a 32MB card.
USB keyboard and mouse should be plugged in before booting - hot swapping of devices is not supported.

## Credits
Faux86 was originally based on the Fake86 emulator by Mike Chambers.
http://fake86.rubbermallet.org
A lot of the code has been shuffled around or rewritten in C++ but the core CPU emulation remains mostly the same.

Faux86 uses the Circle library to interface with the Raspberry Pi
https://github.com/rsta2/circle




Binary file added build/bootcode.bin
Binary file not shown.
5 changes: 5 additions & 0 deletions build/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Disable rainbow splash screen
disable_splash=1

# Force aspect ratio to 4:3
sdtv_aspect=1
Binary file added build/faux86.img
Binary file not shown.
Binary file added build/kernel.img
Binary file not shown.
Binary file added build/kernel7.img
Binary file not shown.
Binary file added build/start.elf
Binary file not shown.
36,867 changes: 0 additions & 36,867 deletions data/dosboot.h

This file was deleted.

Binary file modified data/dosboot.img
Binary file not shown.
Binary file modified data/videorom.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion pi/CircleDeviceDisk.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion pi/CircleHostInterface.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion pi/CircleHostInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion pi/FatFsDisk.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion pi/PWMSound.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion pi/PWMSound.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion pi/VCHIQSound.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion pi/VCHIQSound.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
34 changes: 6 additions & 28 deletions pi/kernel.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand All @@ -28,9 +28,11 @@
#if USE_EMBEDDED_BOOT_FLOPPY
#include "../data/dosboot.h"
#endif
#if USE_EMBEDDED_ROM_IMAGES
#include "../data/asciivga.h"
#include "../data/pcxtbios.h"
#include "../data/videorom.h"
#endif

#define REQUIRED_KERNEL_MEMORY (0x2000000)

Expand All @@ -46,6 +48,7 @@ using namespace Faux86;

CKernel::CKernel (void) :
//: m_Screen (256, 256, true),//(m_Options.GetWidth (), m_Options.GetHeight (), true),
m_ActLED(false),
#if !USE_BCM_FRAMEBUFFER
m_Screen (m_Options.GetWidth (), m_Options.GetHeight ()),
#endif
Expand All @@ -68,33 +71,6 @@ boolean CKernel::Initialize (void)
{
boolean bOK = TRUE;

//m_pFrameBuffer = new CBcmFrameBuffer (OUTPUT_DISPLAY_WIDTH, OUTPUT_DISPLAY_HEIGHT, 8);
//
//for(int n = 0; n < 16; n++)
//{
// m_pFrameBuffer->SetPalette32 (n, palettecga[n]);
//}
//m_pFrameBuffer->SetPalette (0, 0x0000); // black
//m_pFrameBuffer->SetPalette (1, 0x0010); // blue
//m_pFrameBuffer->SetPalette (2, 0x8000); // red
//m_pFrameBuffer->SetPalette (3, 0x8010); // magenta
//m_pFrameBuffer->SetPalette (4, 0x0400); // green
//m_pFrameBuffer->SetPalette (5, 0x0410); // cyan
//m_pFrameBuffer->SetPalette (6, 0x8400); // yellow
//m_pFrameBuffer->SetPalette (7, 0x8410); // white
//m_pFrameBuffer->SetPalette (8, 0x0000); // black
//m_pFrameBuffer->SetPalette (9, 0x001F); // bright blue
//m_pFrameBuffer->SetPalette (10, 0xF800); // bright red
//m_pFrameBuffer->SetPalette (11, 0xF81F); // bright magenta
//m_pFrameBuffer->SetPalette (12, 0x07E0); // bright green
//m_pFrameBuffer->SetPalette (13, 0x07FF); // bright cyan
//m_pFrameBuffer->SetPalette (14, 0xFFE0); // bright yellow
//m_pFrameBuffer->SetPalette (15, 0xFFFF); // bright white

//if (!m_pFrameBuffer->Initialize()) {
// return FALSE;
//}

#if !USE_BCM_FRAMEBUFFER
if (bOK)
{
Expand Down Expand Up @@ -170,12 +146,14 @@ boolean CKernel::Initialize (void)
vmConfig->asciiFile = HostInterface->openFile("SD:/asciivga.dat");
vmConfig->diskDriveA = HostInterface->openFile("SD:/dosboot.img");

#if USE_EMBEDDED_ROM_IMAGES
if(!vmConfig->biosFile)
vmConfig->biosFile = new EmbeddedDisk(pcxtbios, sizeof(pcxtbios));
if(!vmConfig->videoRomFile)
vmConfig->videoRomFile = new EmbeddedDisk(videorom, sizeof(videorom));
if(!vmConfig->asciiFile)
vmConfig->asciiFile = new EmbeddedDisk(asciivga, sizeof(asciivga));
#endif
#if USE_EMBEDDED_BOOT_FLOPPY
if(!vmConfig->diskDriveA)
vmConfig->diskDriveA = new EmbeddedDisk(dosboot, sizeof(dosboot));
Expand Down
5 changes: 3 additions & 2 deletions pi/kernel.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -41,7 +41,8 @@


#define USE_BCM_FRAMEBUFFER 1
#define USE_EMBEDDED_BOOT_FLOPPY 1
#define USE_EMBEDDED_BOOT_FLOPPY 0
#define USE_EMBEDDED_ROM_IMAGES 0
#define USE_MMC_MOUNTING 1
#define USE_SERIAL_LOGGING 0
#define USE_VCHIQ_SOUND 1
Expand Down
2 changes: 1 addition & 1 deletion pi/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/Adlib.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/Adlib.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/Audio.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/Audio.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/CPU.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/CPU.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/CPUMacros.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/Config.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/Config.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/DMA.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/DMA.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/DisneySoundSource.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/DisneySoundSource.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/DriveManager.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/DriveManager.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/HostSystemInterface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/InputManager.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/InputManager.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/Log.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/faux86/MemUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Faux86: A portable, open-source 8086 PC emulator.
Copyright (C)2018 James Howard
Base on Fake86
Based on Fake86
Copyright (C)2010-2013 Mike Chambers
This program is free software; you can redistribute it and/or
Expand Down
Loading

0 comments on commit 3631a44

Please sign in to comment.