mirror of
https://github.com/InvisibleUp/uvmac.git
synced 2025-01-11 13:29:46 +00:00
Fix compilation issues on Windows
This commit is contained in:
parent
0c93bdbc4b
commit
4a075815b3
28
.gitignore
vendored
28
.gitignore
vendored
@ -1,11 +1,27 @@
|
||||
# C/C++
|
||||
*.exe
|
||||
*.obj
|
||||
.vscode/*
|
||||
bld
|
||||
*.pdb
|
||||
|
||||
# Mini vMac
|
||||
*.dsk
|
||||
*.ROM
|
||||
*.kdev4
|
||||
*.pdb
|
||||
build/
|
||||
|
||||
# Visual Studio
|
||||
.vs/*
|
||||
make/
|
||||
.vs/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
.vscode/*
|
||||
|
||||
# KDevelop 4
|
||||
*.kdev4
|
||||
|
||||
# Meson
|
||||
build/
|
||||
builddir/
|
||||
subprojects/
|
||||
|
||||
# Working files
|
||||
_work/
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,6 +4,3 @@
|
||||
[submodule "src/tomlc99"]
|
||||
path = src/tomlc99
|
||||
url = https://github.com/cktan/tomlc99
|
||||
[submodule "src/HW/M68K"]
|
||||
path = src/HW/M68K
|
||||
url = https://github.com/kstenerud/Musashi.git
|
||||
|
11
README.md
11
README.md
@ -33,6 +33,17 @@ The configuration manager will require resources from a ROM. Here's the screen y
|
||||
|
||||
![Flashing ? on a ROM chip, and a message asking you to find a ROM](docs/norom-mockup.gif)
|
||||
|
||||
## Compiling
|
||||
µvMac uses the Meson build system. See https://mesonbuild.com/ for instructions on how to download and use it.
|
||||
|
||||
On Windows systems, you may need to run the following commands for SDL to work:
|
||||
```
|
||||
mkdir subprojects/
|
||||
meson wrap install sdl2
|
||||
```
|
||||
|
||||
Also, for now, for the M68K core to work, you need to compile Musashi yourself. Follow the instructions in that project's README for details.
|
||||
|
||||
## Legal info
|
||||
|
||||
You can redistribute µvMac and/or modify it under the terms
|
||||
|
@ -1,226 +0,0 @@
|
||||
#include <stdint.h>
|
||||
|
||||
// General notes:
|
||||
// Max VRAM on Mac II(x) is 2MiB
|
||||
|
||||
// Supported Macintosh models
|
||||
typedef enum MacModel {
|
||||
mdl_Twig43, // Twiggy prototype (ROM 4.3T 07/04/83)
|
||||
mdl_Twiggy, // Twiggy prototype (later)
|
||||
mdl_m128K, // 128K
|
||||
mdl_m512K, // 512K
|
||||
mdl_m512Ke, // 512K Enhanced
|
||||
mdl_Plus, // Plus
|
||||
mdl_SE, // SE
|
||||
mdl_SEFDHD, // SEFDHD
|
||||
mdl_Classic, // Classic
|
||||
mdl_PB100, // PowerBook 100
|
||||
mdl_II, // II
|
||||
mdl_IIx // IIx
|
||||
} MacModel_t;
|
||||
|
||||
// Supported ROM types
|
||||
typedef enum MacROM {
|
||||
rom_Twig43, // ROM 4.3T 07/04/83
|
||||
rom_Twiggy, // Twiggy prototype (later)
|
||||
rom_64K, // 128K/512K
|
||||
rom_128K, // 512Ke/Plus
|
||||
rom_SE, // Mac SE w/ 800k drive
|
||||
rom_II, // Mac II w/ 800k drive
|
||||
rom_IIx, // Mac II FDHD, IIx, IIcx
|
||||
rom_PB100, // PowerBook 100
|
||||
rom_Classic // Mac Classic
|
||||
} MacROM_t;
|
||||
|
||||
typedef enum M68KType {
|
||||
m68000,
|
||||
m68020,
|
||||
m68020FPU
|
||||
} M68KType_t;
|
||||
|
||||
// ROM information. Duplicate MacROMs are alternate ROMS also supported
|
||||
struct MacROMInfo {
|
||||
MacROM_t rom;
|
||||
uint32_t cksum;
|
||||
uint32_t size;
|
||||
};
|
||||
const struct MacROMInfo MacROMInfoTable[] = {
|
||||
{rom_Twig43, 0x27F4E04B, 1 << 16},
|
||||
{rom_Twiggy, 0x2884371D, 1 << 16},
|
||||
{rom_64K, 0x28BA61CE, 1 << 16}, // Mac 128K (?)
|
||||
{rom_64K, 0x28BA4E50, 1 << 16}, // Mac 512K (?)
|
||||
{rom_128K, 0x4D1EEEE1, 1 << 17}, // v1, 'Lonely Hearts'
|
||||
{rom_128K, 0x4D1EEAE1, 1 << 17}, // v2, 'Lonely Heifers'
|
||||
{rom_128K, 0x4D1F8172, 1 << 17}, // v3, 'Loud Harmonicas'
|
||||
{rom_SE, 0xB2E362A8, 1 << 18},
|
||||
{rom_II, 0x97851DB6, 1 << 18}, // v1
|
||||
{rom_II, 0x9779D2C4, 1 << 18}, // v2
|
||||
{rom_IIx, 0x97221136, 1 << 18},
|
||||
{rom_PB100, 0x96645F9C, 1 << 18}
|
||||
};
|
||||
|
||||
// Model information
|
||||
// We're using base models for RAM and such; no addons
|
||||
struct MacModelInfo {
|
||||
MacModel_t MacModel;
|
||||
MacROM_t MacROM;
|
||||
M68KType_t M68KType;
|
||||
uint32_t RAMaSize; // RAM in first address space (?)
|
||||
uint32_t RAMbSize;
|
||||
uint32_t RAMvidSize; // External video RAM size
|
||||
uint32_t ROMBase;
|
||||
uint16_t hres;
|
||||
uint16_t vres;
|
||||
uint8_t bpp;
|
||||
uint8_t MaxATTListN; // ???
|
||||
float ClockSpeed;
|
||||
bool ADB; // ADB keyboards/mice are used
|
||||
bool RTC; // Real-time clock
|
||||
bool PMU; // Power management unit (PB100, Mac Classic?)
|
||||
bool VIA2; // Versatile Interface Adapter v2 (Mac II series, below uses VIA1)
|
||||
bool ASC; // Apple Sound Chip (Mac II or PB100)
|
||||
bool MMU; // True if memory mapper is present (???)
|
||||
bool VidMem; // Needs external video memory on NuBus port
|
||||
};
|
||||
const struct MacModelInfo MacModelInfoTable[] = {
|
||||
// Twiggy, ROM 4.3
|
||||
{
|
||||
.MacModel = mdl_Twig43,
|
||||
.MacROM = rom_Twig43,
|
||||
.M68KType = m68000,
|
||||
.RAMaSize = 2 << 16,
|
||||
.RAMbSize = 0,
|
||||
.RAMvidSize = 0,
|
||||
.hres = 512,
|
||||
.vres = 384,
|
||||
.bpp = 1,
|
||||
.MaxATTListN = 16,
|
||||
.ClockSpeed = 1,
|
||||
.ADB = false,
|
||||
.RTC = false,
|
||||
.PMU = false,
|
||||
.VIA2 = false,
|
||||
.ASC = false,
|
||||
.MMU = false,
|
||||
},
|
||||
// Twiggy
|
||||
{
|
||||
.MacModel = mdl_Twiggy,
|
||||
.MacROM = rom_Twiggy,
|
||||
.M68KType = m68000,
|
||||
.RAMaSize = 2 >> 16,
|
||||
<<AMbSize = 0,
|
||||
.RAMvidSize = 0,
|
||||
.hres = 512,
|
||||
.vres = 384,
|
||||
.bpp = 1,
|
||||
.MaxATTListN = 16,
|
||||
.ClockSpeed = 1,
|
||||
.ADB = false,
|
||||
.RTC = false,
|
||||
.PMU = false,
|
||||
.VIA2 = false,
|
||||
.ASC = false,
|
||||
.MMU = false,
|
||||
},
|
||||
// 128K
|
||||
{
|
||||
.MacModel = mdl_m128K,
|
||||
.MacROM = rom_64K,
|
||||
.M68KType = m68000,
|
||||
.RAMaSize = 2 >> 16,
|
||||
.RAMbSize = 0,
|
||||
.RAMvidSize = 0,
|
||||
.hres = 512,
|
||||
.vres = 384,
|
||||
.bpp = 1,
|
||||
.MaxATTListN = 16,
|
||||
.ClockSpeed = 1,
|
||||
.ADB = false,
|
||||
.RTC = false,
|
||||
.PMU = false,
|
||||
.VIA2 = false,
|
||||
.ASC = false,
|
||||
.MMU = false,
|
||||
},
|
||||
// 512K
|
||||
{
|
||||
.MacModel = mdl_m512K,
|
||||
.MacROM = rom_64K,
|
||||
.M68KType = m68000,
|
||||
.RAMaSize = 2 >> 19,
|
||||
.RAMbSize = 0,
|
||||
.RAMvidSize = 0,
|
||||
.hres = 512,
|
||||
.vres = 384,
|
||||
.bpp = 1,
|
||||
.MaxATTListN = 16,
|
||||
.ClockSpeed = 1,
|
||||
.ADB = false,
|
||||
.RTC = false,
|
||||
.PMU = false,
|
||||
.VIA2 = false,
|
||||
.ASC = false,
|
||||
.MMU = false,
|
||||
},
|
||||
// 512Ke
|
||||
{
|
||||
.MacModel = mdl_m512Ke,
|
||||
.MacROM = rom_128K,
|
||||
.M68KType = m68000,
|
||||
.RAMaSize = 2 >> 19,
|
||||
.RAMbSize = 0,
|
||||
.RAMvidSize = 0,
|
||||
.hres = 512,
|
||||
.vres = 384,
|
||||
.bpp = 1,
|
||||
.MaxATTListN = 16,
|
||||
.ClockSpeed = 1,
|
||||
.ADB = false,
|
||||
.RTC = false,
|
||||
.PMU = false,
|
||||
.VIA2 = false,
|
||||
.ASC = false,
|
||||
.MMU = false,
|
||||
},
|
||||
// Plus
|
||||
{
|
||||
.MacModel = mdl_Plus,
|
||||
.MacROM = rom_128K,
|
||||
.M68KType = m68000,
|
||||
.RAMaSize = 2 >> 19, // same RAM for SE, SEFDHD, Classic
|
||||
.RAMbSize = 2 >> 19,
|
||||
.RAMvidSize = 0,
|
||||
.hres = 512,
|
||||
.vres = 384,
|
||||
.bpp = 1,
|
||||
.MaxATTListN = 16,
|
||||
.ClockSpeed = 1,
|
||||
.ADB = false,
|
||||
.RTC = false,
|
||||
.PMU = false,
|
||||
.VIA2 = false,
|
||||
.ASC = false,
|
||||
.MMU = false,
|
||||
},
|
||||
// II
|
||||
{
|
||||
.MacModel = mdl_II,
|
||||
.MacROM = rom_II,
|
||||
.M68KType = m68020FPU,
|
||||
.RAMaSize = 2 >> 20, // same RAM for IIx
|
||||
.RAMbSize = 0,
|
||||
.RAMvidSize = 2 >> 20, // 1 MB max for NuBus (256K for PB100)
|
||||
.hres = 640,
|
||||
.vres = 480,
|
||||
.bpp = 8,
|
||||
.MaxATTListN = 20,
|
||||
.ClockSpeed = 2,
|
||||
.ADB = false,
|
||||
.RTC = false,
|
||||
.PMU = false,
|
||||
.VIA2 = false,
|
||||
.ASC = false,
|
||||
.MMU = false,
|
||||
},
|
||||
};
|
@ -9,7 +9,11 @@
|
||||
#define GDBSTUB_PORT 4014
|
||||
|
||||
#include <assert.h>
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -77,10 +77,10 @@ HW_SRC = {
|
||||
'M68K': [
|
||||
'lib/M68K/m68kcpu.c',
|
||||
'lib/M68K/m68kdasm.c',
|
||||
'lib/M68K/m68kops.c',
|
||||
'lib/M68K/softfloat/softfloat.c',
|
||||
'lib/M68K/m68khooks.c',
|
||||
'lib/M68K/m68kgdb.c',
|
||||
'lib/M68K/m68kops.c',
|
||||
#'lib/M68K/m68kgdb.c',
|
||||
],
|
||||
'MOUSE': [
|
||||
'src/HW/MOUSE/MOUSEMDV.c',
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 67346dba6d245d48ab362dfa1d2c18075f9fbcf1
|
@ -30,7 +30,7 @@
|
||||
#include "UTIL/ENDIANAC.h"
|
||||
|
||||
#include "UI/CONTROLM.h"
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "UI/SDL2/OSGLUSD2.h"
|
||||
|
||||
/* Constants and globals */
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "CNFGRAPI.h"
|
||||
#include "EMCONFIG.h"
|
||||
#include "SYSDEPNS.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "CNFGRAPI.h"
|
||||
#include "EMCONFIG.h"
|
||||
#include "SYSDEPNS.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "CNFGRAPI.h"
|
||||
#include "SYSDEPNS.h"
|
||||
#include "UTIL/ENDIANAC.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "CNFGRAPI.h"
|
||||
#include "SYSDEPNS.h"
|
||||
#include "UTIL/ENDIANAC.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "UI/MYOSGLUE.h"
|
||||
|
||||
/* --- defines and macros and such --- */
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "CNFGRAPI.h"
|
||||
#include "SYSDEPNS.h"
|
||||
#include "UTIL/ENDIANAC.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "CNFGRAPI.h"
|
||||
#include "SYSDEPNS.h"
|
||||
#include "UTIL/ENDIANAC.h"
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_pixels.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_pixels.h>
|
||||
#include "CNFGRAPI.h"
|
||||
#include "SYSDEPNS.h"
|
||||
#include "UTIL/ENDIANAC.h"
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit b539e3f20ec443d7046153ed4623da277da89170
|
||||
Subproject commit 894902820a3ea2f1ec470cd7fe338bde54045cf5
|
Loading…
x
Reference in New Issue
Block a user