Skip to content

Commit 9bb00a0

Browse files
committed
Removes NET_BOARD build variables and always builds net board support.
1 parent 4cbe3bd commit 9bb00a0

16 files changed

Lines changed: 51 additions & 184 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
6464
- name: Build Supermodel
6565
run: |
66-
make -f Makefiles/${{ matrix.makefile }} release NET_BOARD=1 OPT="${OPT_INPUT:-"-O3"}" GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} SILENT=
66+
make -f Makefiles/${{ matrix.makefile }} release OPT="${OPT_INPUT:-"-O3"}" GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} SILENT=
6767
6868
- name: Validate build
6969
run: |
@@ -78,7 +78,7 @@ jobs:
7878
7979
- name: Create package
8080
run: |
81-
make -f Makefiles/${{ matrix.makefile }} pkg NET_BOARD=1 GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} SILENT=
81+
make -f Makefiles/${{ matrix.makefile }} pkg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} SILENT=
8282
8383
- name: Find and upload package
8484
run: |

Makefiles/Makefile.OSX

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ LD = clang
6464
#
6565

6666
SDL_CFLAGS =
67-
SDL_LIBS = -framework SDL2 -framework OpenGL -framework GLUT -framework Cocoa
68-
ifeq ($(strip $(NET_BOARD)),1)
69-
SDL_LIBS += -framework SDL2_net
70-
endif
67+
SDL_LIBS = -framework SDL2 -framework SDL2_net -framework OpenGL -framework GLUT -framework Cocoa
7168

7269
#
7370
# macOS-specific

Makefiles/Makefile.UNIX

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ LD = gcc
6464

6565
SDL2_CFLAGS = `sdl2-config --cflags`
6666
SDL2_LIBS = `sdl2-config --libs`
67-
ifeq ($(strip $(NET_BOARD)),1)
68-
SDL2_LIBS += -lSDL2_net
69-
endif
67+
SDL2_LIBS += -lSDL2_net
7068

7169
#
7270
# UNIX-specific

Makefiles/Makefile.Win32

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ else
9595
SDL2_LIBS = $(shell sdl2-config --static-libs | sed 's/-mwindows//g')
9696
SDL2_CFLAGS = $(shell sdl2-config --cflags)
9797
endif
98-
ifeq ($(strip $(NET_BOARD)),1)
99-
SDL2_LIBS += -lSDL2_net -liphlpapi
100-
endif
98+
SDL2_LIBS += -lSDL2_net -liphlpapi
10199

102100
#
103101
# MinGW/Windows-specific

Makefiles/Options.inc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ ifneq ($(filter $(strip $(EXTRA_DEBUG)),0 1),$(strip $(EXTRA_DEBUG)))
5151
override EXTRA_DEBUG =
5252
endif
5353

54-
#
55-
# Enable support for Model3 Net Board emulation
56-
#
57-
NET_BOARD =
58-
ifneq ($(filter $(strip $(NET_BOARD)),0 1),$(strip $(NET_BOARD)))
59-
override NET_BOARD =
60-
endif
61-
6254
#
6355
# Include console-based debugger in emulator ('yes' or 'no')
6456
#

Makefiles/Rules.inc

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ ifeq ($(strip $(EXTRA_DEBUG)),1)
5252
SUPERMODEL_BUILD_FLAGS += -DDEBUG
5353
endif
5454

55-
# If Net Board support is enabled, need to define NET_BOARD
56-
ifeq ($(strip $(NET_BOARD)),1)
57-
SUPERMODEL_BUILD_FLAGS += -DNET_BOARD
58-
endif
59-
6055
# If built-in debugger enabled, need to define SUPERMODEL_DEBUGGER
6156
ifeq ($(strip $(ENABLE_DEBUGGER)),1)
6257
SUPERMODEL_BUILD_FLAGS += -DSUPERMODEL_DEBUGGER
@@ -177,16 +172,12 @@ SRC_FILES = \
177172
Src/Pkgs/imgui/imgui_widgets.cpp \
178173
Src/ROMSet.cpp \
179174
Src/OSD/SDL/NetOutputs.cpp \
175+
Src/Network/TCPReceive.cpp \
176+
Src/Network/TCPSend.cpp \
177+
Src/Network/NetBoard.cpp \
178+
Src/Network/SimNetBoard.cpp \
180179
$(PLATFORM_SRC_FILES)
181180

182-
ifeq ($(strip $(NET_BOARD)),1)
183-
SRC_FILES += \
184-
Src/Network/TCPReceive.cpp \
185-
Src/Network/TCPSend.cpp \
186-
Src/Network/NetBoard.cpp \
187-
Src/Network/SimNetBoard.cpp
188-
endif
189-
190181
ifeq ($(strip $(ENABLE_DEBUGGER)),1)
191182
SRC_FILES += \
192183
Src/Debugger/Debugger.cpp \

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,12 @@ pacman -S mingw64/mingw-w64-x86_64-SDL2_net
5050

5151
At this point, you can continue using either the MSYS2 shell or Windows Command Prompt but ensure that both ```gcc``` and ```mingw32-make``` are in your path. In MSYS2, the location of these binaries will be ```/mingw64/bin``` and for Command Prompt, assuming MSYS2 was installed in the default location, add ```C:\msys64\mingw64\bin``` to your Windows ```PATH``` variable.
5252

53-
To build Supermodel without network support, use:
53+
To build Supermodel use (Network support built in by default now, no need to specify anymore):
5454

5555
```
5656
mingw32-make -f Makefiles/Makefile.Win32
5757
```
5858

59-
For network support:
60-
61-
```
62-
mingw32-make -f Makefiles/Makefile.Win32 NET_BOARD=1
63-
```
64-
6559
### Linux
6660

6761
Ensure SDL2 is installed. Most package managers ought to have this available. For example, on Ubuntu, it should be sufficient to run:
@@ -78,12 +72,6 @@ And then build Supermodel:
7872
make -f Makefiles/Makefile.UNIX
7973
```
8074

81-
For network support:
82-
83-
```
84-
make -f Makefiles/Makefile.UNIX NET_BOARD=1
85-
```
86-
8775
### macOS
8876

8977
Ensure Apple's Xcode Command Line Tools are installed:
@@ -106,12 +94,6 @@ And then build Supermodel:
10694
make -f Makefiles/Makefile.OSX
10795
```
10896

109-
For network support:
110-
111-
```
112-
make -f Makefiles/Makefile.OSX NET_BOARD=1
113-
```
114-
11597
### Note: running on macOS
11698
If you try and run a macOS binary that was downloaded from the internet and/or built on a different machine, you need to grant macOS permission to execute the binary (just 1-time):
11799

Scripts/supermodel_build_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def update_git_snapshot(working_dir, username, password, test_run, make):
240240
if result.returncode != 0:
241241
raise BuildError("Failed to obtain version")
242242
version = result.stdout.decode().strip()
243-
result = bash.execute(working_dir=repo_dir, command=make + " -f Makefiles/Makefile.Win32 release NET_BOARD=1", print_output=False)
243+
result = bash.execute(working_dir=repo_dir, command=make + " -f Makefiles/Makefile.Win32 release", print_output=False)
244244
if result.returncode != 0:
245245
raise BuildError("Build failed")
246246

Src/Debugger/SupermodelDebugger.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
#include "ConsoleDebugger.h"
3333
#include "CPUDebug.h"
3434
#include "Label.h"
35-
#ifdef NET_BOARD
3635
#include "Network/NetBoard.h"
37-
#endif // NET_BOARD
3836
#include "CPU/Musashi68KDebug.h"
3937
#include "CPU/PPCDebug.h"
4038
#include "CPU/Z80Debug.h"
@@ -78,13 +76,8 @@ namespace Debugger
7876
cpu->AddRegion(0x90000000, 0x9000000B, false, false, "Real3D VROM Texture Port");
7977
cpu->AddRegion(0x94000000, 0x940FFFFF, false, false, "Real3D Texture FIFO");
8078
cpu->AddRegion(0x98000000, 0x980FFFFF, false, false, "Real3D Polygon RAM");
81-
#ifndef NET_BOARD
82-
cpu->AddRegion(0xC0000000, 0xC00000FF, false, false, "SCSI (Step 1.x)");
83-
#endif
84-
#ifdef NET_BOARD
8579
cpu->AddRegion(0xC0000000, 0xC000FFFF, false, false, "Netboard Shared RAM (Step 1.5+)");
8680
cpu->AddRegion(0xC0020000, 0xC002FFFF, false, false, "Netboard Program RAM (Step 1.5+)");
87-
#endif
8881
cpu->AddRegion(0xC1000000, 0xC10000FF, false, false, "SCSI (Step 1.x) (Lost World expects it here)");
8982
cpu->AddRegion(0xC2000000, 0xC20000FF, false, false, "Real3D DMA (Step 2.x)");
9083
cpu->AddRegion(0xF0040000, 0xF004003F, false, false, "Input (Controls) Registers");
@@ -312,7 +305,6 @@ namespace Debugger
312305
return cpu;
313306
}
314307

315-
#ifdef NET_BOARD
316308
CCPUDebug *CSupermodelDebugger::CreateNetBoardCPUDebug(::CModel3 * model3)
317309
{
318310
CNetBoard *netBrd = dynamic_cast<CNetBoard*>(model3->GetNetBoard());
@@ -336,7 +328,6 @@ namespace Debugger
336328

337329
return cpu;
338330
}
339-
#endif
340331

341332
CSupermodelDebugger::CSupermodelDebugger(::CModel3 *model3, ::CInputs *inputs, std::shared_ptr<CLogger> logger) :
342333
CConsoleDebugger(), m_model3(model3), m_inputs(inputs), m_logger(logger),
@@ -365,11 +356,9 @@ namespace Debugger
365356
cpu = CreateDriveBoardCPUDebug(m_model3);
366357
if (cpu) AddCPU(cpu);
367358

368-
#ifdef NET_BOARD
369359
// Add net board CPU (if attached)
370360
cpu = CreateNetBoardCPUDebug(m_model3);
371361
if (cpu) AddCPU(cpu);
372-
#endif
373362

374363
}
375364

Src/Debugger/SupermodelDebugger.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ namespace Debugger
7979
static CCPUDebug *CreateDSBCPUDebug(::CModel3 *model3);
8080

8181
static CCPUDebug *CreateDriveBoardCPUDebug(::CModel3 *model3);
82-
#ifdef NET_BOARD
82+
8383
static CCPUDebug *CreateNetBoardCPUDebug(::CModel3 *model3);
84-
#endif
8584

8685
CSupermodelDebugger(::CModel3 *model3, ::CInputs *inputs, std::shared_ptr<CLogger> logger);
8786

0 commit comments

Comments
 (0)