Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom1975 committed Aug 30, 2024
1 parent 66a0c27 commit f4441ad
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 15 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ OBJS = src/main.o\
CPCCore/CPCCoreEmu/simple_filesystem.o \
CPCCore/CPCCoreEmu/simple_math.o \
CPCCore/CPCCoreEmu/simple_regex.o \
CPCCore/CPCCoreEmu/simple_stdio.o \
CPCCore/CPCCoreEmu/simple_string.o \
CPCCore/CPCCoreEmu/Snapshot.o \
CPCCore/CPCCoreEmu/SoundMixer.o\
Expand Down Expand Up @@ -111,7 +110,7 @@ LIBS = circle-stdlib/install/arm-none-circle/lib/libcirclenewlib.a \
STDLIB_SUPPORT = 3
include circle-stdlib/libs/circle/Rules.mk

CFLAGS += -I "$(NEWLIBDIR)/include" -I $(STDDEF_INCPATH)
CFLAGS += -DMINIMUM_DEPENDENCIES -DUSE_VCHIQ_SOUND -DNO_CUSTOM_OPCODES -DNO_MULTITHREAD -I. -Isrc -ICPCCore/zlib_pi -DNOFILTER -DNOZLIB -DNO_RAW_FORMAT -I$(CIRCLEHOME)/addon -DLOG_MIXER -DLOGFDC -DARM_ALLOW_MULTI_CORE
CPPFLAGS += -DMINIMUM_DEPENDENCIES -DUSE_VCHIQ_SOUND -DNO_CUSTOM_OPCODES -DNO_MULTITHREAD -I. -Isrc -ICPCCore/zlib_pi -DNOFILTER -DNOZLIB -DNO_RAW_FORMAT -I$(CIRCLEHOME)/addon -DLOG_MIXER -DLOGFDC -DARM_ALLOW_MULTI_CORE -std=c++1z
CFLAGS += -I "$(NEWLIBDIR)/include" -I "$(STDDEF_INCPATH)" -I "$(CIRCLEHOME)"
CFLAGS += -D_USE_LONG_TIME_T -DMINIMUM_DEPENDENCIES -DUSE_VCHIQ_SOUND -DNO_CUSTOM_OPCODES -DNO_MULTITHREAD -I. -Isrc -ICPCCore/zlib_pi -DNOFILTER -DNOZLIB -DNO_RAW_FORMAT -I$(CIRCLEHOME)/addon -DLOG_MIXER -DLOGFDC -DARM_ALLOW_MULTI_CORE
CPPFLAGS += -D_USE_LONG_TIME_T -DMINIMUM_DEPENDENCIES -DUSE_VCHIQ_SOUND -DNO_CUSTOM_OPCODES -DNO_MULTITHREAD -I. -Isrc -ICPCCore/zlib_pi -DNOFILTER -DNOZLIB -DNO_RAW_FORMAT -I$(CIRCLEHOME)/addon -DLOG_MIXER -DLOGFDC -DARM_ALLOW_MULTI_CORE -std=c++1z

7 changes: 4 additions & 3 deletions build_pi4_32bits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ echo "*** Build target for Raspberry Pi 4 ***"

# Set arch
echo ARCH = 32 > Config.mk
echo FLOAT_ABI = hard >> Config.mk
echo FLOAT_ABI = hard > Config.mk
echo RASPPI = 4 >> Config.mk
echo PREFIX = arm-none-eabi- >> Config.mk
echo STDLIB_SUPPORT = 3 >> Config.mk
echo DEFINE = -DARM_ALLOW_MULTI_CORE >> Config.mk
echo CHECK_DEPS = 0 >> Config.mk

cp Config.mk circle-stdlib/libs/circle/
cp Config.mk circle-stdlib/

#cp Config2.mk circle-stdlib/libs/circle/
#cp Config2.mk circle-stdlib/
./build_circle.sh

# check output dir
Expand Down
12 changes: 7 additions & 5 deletions res/SugarboxLogo.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/* GIMP RGBA C-Source image dump (coolspot.c) */

#include <memory.h>
#include "SugarboxLogo.h"

#include "CPCCore/CPCCoreEmu/simple_stdio.h"
#include "files.h"
#include <CPCCore/CPCCoreEmu/stdafx.h>
#include <stdio.h>
#include <memory.h>


#ifdef __circle__
#include <circle/logger.h>
//#include <circle/logger.h>
#include <circle/spinlock.h>
static CSpinLock mutex_;
void Lock() { mutex_.Acquire(); }
Expand Down Expand Up @@ -73,12 +75,12 @@ void SugarboxLogo::Load()
if (fopen_s(&f, PATH_RES INTER_FILE "logo.bin", "r+b") == 0)
{
int size_read = fread(pixel_data_, Sugarbox_logo.width * Sugarbox_logo.height * Sugarbox_logo.bytes_per_pixel, 1, f);
CLogger::Get()->Write("MenuItemWindows", LogNotice, "Bitmap read : %X", size_read);
//CLogger::Get()->Write("MenuItemWindows", LogNotice, "Bitmap read : %X", size_read);
fclose(f);
}

// Compute first byte to display per line.
CLogger::Get()->Write("MenuItemWindows", LogNotice, " Compute first byte to display per line.");
//CLogger::Get()->Write("MenuItemWindows", LogNotice, " Compute first byte to display per line.");

for (int i = 0; i < Sugarbox_logo.height; i++)
{
Expand Down
5 changes: 4 additions & 1 deletion src/ConfigurationManager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

#include <CPCCore/CPCCoreEmu/stdafx.h>

#include "ConfigurationManager.h"

#include "CPCCore/CPCCoreEmu/simple_stdio.h"
#include <stdio.h>

CLogger* log_s = nullptr;

Expand Down
7 changes: 6 additions & 1 deletion src/DisplayPiImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <circle/debug.h>
#include <circle/multicore.h>
#include "bcm_host.h"
#include <circle/addon/vc4/interface/vcinclude/common.h>
#include <addon/vc4/interface/vcinclude/common.h>

#include <math.h>

Expand Down Expand Up @@ -400,6 +400,11 @@ void DisplayPiImp::BeginDraw()
// Copy mem to resouurces
CopyMemoryToRessources();

// Last frame is displayed and can be reused
//Lock();
//emu_frame_.FrameIsDisplayed();
//Unlock();

int result = current_update_ = vc_dispmanx_update_start(0);
}

Expand Down
1 change: 1 addition & 0 deletions src/Engine.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//
#include <CPCCore/CPCCoreEmu/stdafx.h>
#include "Engine.h"

#ifdef __circle__
Expand Down

0 comments on commit f4441ad

Please sign in to comment.