Update to mupen64plus-2.6.0.

Backport several security patches that have not yet been merged upstream:
https://github.com/mupen64plus/mupen64plus-core/pull/1080
https://github.com/mupen64plus/mupen64plus-core/pull/1119
https://github.com/mupen64plus/mupen64plus-core/pull/1122
https://github.com/mupen64plus/mupen64plus-core/pull/1123

Add pledge to the mupen64plus binary:
"stdio rpath wpath cpath inet flock unix dns sendfd recvfd prot_exec drm audio"
This commit is contained in:
bentley
2025-04-16 09:16:01 +00:00
parent 6d2cfa2780
commit 14bdfe3f4c
66 changed files with 671 additions and 391 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
ONLY_FOR_ARCHS ?= amd64 i386 powerpc arm arm64
VERSION ?= 2.5.9
VERSION ?= 2.6.0
DISTNAME ?= mupen64plus-${MUPEN64PLUS_MOD}-src-${VERSION}
PKGNAME ?= mupen64plus-${MUPEN64PLUS_MOD}-${VERSION}
HOMEPAGE ?= https://mupen64plus.org/
-2
View File
@@ -1,7 +1,5 @@
COMMENT = n64 emulator sdl audio plugin
REVISION = 0
# GPLv2+
PERMIT_PACKAGE = Yes
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-audio-sdl-src-2.5.9.tar.gz) = GTFNlMxKCscTYQgf7U5uaB86SVwbG7A6q/dAYQfjjm4=
SIZE (mupen64plus-audio-sdl-src-2.5.9.tar.gz) = 28884
SHA256 (mupen64plus-audio-sdl-src-2.6.0.tar.gz) = iEBDS2Qf1gD595kRu6J58oSlPrjnRtgzcqdpK6jayVw=
SIZE (mupen64plus-audio-sdl-src-2.6.0.tar.gz) = 32210
+4 -3
View File
@@ -1,17 +1,18 @@
COMMENT = n64 emulator core
SHARED_LIBS = mupen64plus 2.4 # 2.5.9
REVISION = 2
# GPLv2+
PERMIT_PACKAGE = Yes
WANTLIB = GL GLU c m ${COMPILER_LIBCXX} z freetype minizip png pthread SDL2
WANTLIB += ${COMPILER_LIBCXX}
WANTLIB += GL GLU SDL2 c freetype m minizip png vulkan z
COMPILER = base-clang ports-gcc base-gcc
LIB_DEPENDS = devel/sdl2 \
archivers/minizip \
graphics/png
graphics/png \
graphics/vulkan-loader
MUPEN64PLUS_MOD = core
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-core-src-2.5.9.tar.gz) = hCRMd6k8DBmHKdoG11YoxcVRPuVqX8CleFqSRhBx80w=
SIZE (mupen64plus-core-src-2.5.9.tar.gz) = 1618486
SHA256 (mupen64plus-core-src-2.6.0.tar.gz) = f3n39WuU36Ccjw3JVyDN/8B8ciRX4Y9G7IrbuzUF0h8=
SIZE (mupen64plus-core-src-2.6.0.tar.gz) = 1754271
@@ -1,9 +1,9 @@
Index: projects/unix/Makefile
--- projects/unix/Makefile.orig
+++ projects/unix/Makefile
@@ -735,7 +735,6 @@ install: $(TARGET)
@@ -822,7 +822,6 @@ install: $(TARGET)
$(INSTALL) -d "$(DESTDIR)$(INCDIR)"
$(INSTALL) -m 0644 ../../src/api/m64p_*.h "$(DESTDIR)$(INCDIR)"
$(INSTALL) -m 0644 $(SRCDIR)/api/m64p_*.h "$(DESTDIR)$(INCDIR)"
-$(LDCONFIG) "$(DESTDIR)$(LIBDIR)"
- if [ ! -e "$(DESTDIR)$(LIBDIR)/$(SONAME)" ]; then ln -sf "$(TARGET)" "$(DESTDIR)$(LIBDIR)/$(SONAME)"; fi
@@ -0,0 +1,28 @@
"Add bounds checking to some DMA operations"
https://github.com/mupen64plus/mupen64plus-core/pull/1122
Index: src/device/cart/cart.c
--- src/device/cart/cart.c.orig
+++ src/device/cart/cart.c
@@ -26,6 +26,8 @@
#include "main/rom.h"
+#include "device/r4300/r4300_core.h"
+
#include <stdint.h>
#include <string.h>
@@ -129,10 +131,10 @@ void init_cart(struct cart* cart,
init_flashram(&cart->flashram,
flashram_type,
- flashram_storage, iflashram_storage);
+ flashram_storage, iflashram_storage, r4300->rdram);
init_sram(&cart->sram,
- sram_storage, isram_storage);
+ sram_storage, isram_storage, r4300->rdram);
if (ROM_SETTINGS.savetype == SAVETYPE_SRAM)
cart->use_flashram = -1;
@@ -0,0 +1,36 @@
"Add bounds checking to some DMA operations"
https://github.com/mupen64plus/mupen64plus-core/pull/1122
Index: src/device/cart/cart_rom.c
--- src/device/cart/cart_rom.c.orig
+++ src/device/cart/cart_rom.c
@@ -28,6 +28,7 @@
#include "device/memory/memory.h"
#include "device/r4300/r4300_core.h"
#include "device/rcp/pi/pi_controller.h"
+#include "device/rdram/rdram.h"
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
@@ -101,7 +102,7 @@ unsigned int cart_rom_dma_write(void* opaque, uint8_t*
if (cart_addr + length < cart_rom->rom_size)
{
- for(i = 0; i < length; ++i) {
+ for(i = 0; i < length && (dram_addr+i) < cart_rom->r4300->rdram->dram_size; ++i) {
dram[(dram_addr+i)^S8] = mem[(cart_addr+i)^S8];
}
}
@@ -111,10 +112,10 @@ unsigned int cart_rom_dma_write(void* opaque, uint8_t*
? 0
: cart_rom->rom_size - cart_addr;
- for (i = 0; i < diff; ++i) {
+ for (i = 0; i < diff && (dram_addr+i) < cart_rom->r4300->rdram->dram_size; ++i) {
dram[(dram_addr+i)^S8] = mem[(cart_addr+i)^S8];
}
- for (; i < length; ++i) {
+ for (; i < length && (dram_addr+i) < cart_rom->r4300->rdram->dram_size; ++i) {
dram[(dram_addr+i)^S8] = 0;
}
}
@@ -0,0 +1,38 @@
"Add bounds checking to some DMA operations"
https://github.com/mupen64plus/mupen64plus-core/pull/1122
Index: src/device/cart/flashram.c
--- src/device/cart/flashram.c.orig
+++ src/device/cart/flashram.c
@@ -28,6 +28,7 @@
#include "api/m64p_types.h"
#include "backends/api/storage_backend.h"
#include "device/memory/memory.h"
+#include "device/rdram/rdram.h"
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
@@ -122,12 +123,13 @@ static void flashram_command(struct flashram* flashram
void init_flashram(struct flashram* flashram,
uint32_t flashram_id,
- void* storage, const struct storage_backend_interface* istorage)
+ void* storage, const struct storage_backend_interface* istorage, struct rdram* rdram)
{
flashram->silicon_id[0] = FLASHRAM_TYPE_ID;
flashram->silicon_id[1] = flashram_id;
flashram->storage = storage;
flashram->istorage = istorage;
+ flashram->rdram = rdram;
}
void poweron_flashram(struct flashram* flashram)
@@ -207,7 +209,7 @@ unsigned int flashram_dma_write(void* opaque, uint8_t*
}
/* do actual DMA */
- for(i = 0; i < length; ++i) {
+ for(i = 0; i < length && (dram_addr+i) < flashram->rdram->dram_size; ++i) {
dram[(dram_addr+i)^S8] = mem[(cart_addr+i)^S8];
}
}
@@ -0,0 +1,21 @@
"Add bounds checking to some DMA operations"
https://github.com/mupen64plus/mupen64plus-core/pull/1122
Index: src/device/cart/flashram.h
--- src/device/cart/flashram.h.orig
+++ src/device/cart/flashram.h
@@ -61,12 +61,13 @@ struct flashram
void* storage;
const struct storage_backend_interface* istorage;
+ struct rdram* rdram;
};
void init_flashram(struct flashram* flashram,
uint32_t flashram_id,
void* storage,
- const struct storage_backend_interface* istorage);
+ const struct storage_backend_interface* istorage, struct rdram* rdram);
void poweron_flashram(struct flashram* flashram);
@@ -0,0 +1,25 @@
"Fix integer overflow in write_is_viewer"
https://github.com/mupen64plus/mupen64plus-core/pull/1123
Index: src/device/cart/is_viewer.c
--- src/device/cart/is_viewer.c.orig
+++ src/device/cart/is_viewer.c
@@ -55,13 +55,15 @@ void write_is_viewer(void* opaque, uint32_t address, u
{
if (word > 0)
{
- /* make sure we don't overflow the buffer */
- if (is_viewer->buffer_pos + word > IS_BUFFER_SIZE)
+ /* make sure we don't overflow the integer or the buffer */
+ if (is_viewer->buffer_pos > IS_BUFFER_SIZE
+ || word > IS_BUFFER_SIZE
+ || is_viewer->buffer_pos + word > IS_BUFFER_SIZE )
{
/* reset buffer */
memset(is_viewer->output_buffer, 0, IS_BUFFER_SIZE);
is_viewer->buffer_pos = 0;
- DebugMessage(M64MSG_WARNING, "IS64: prevented buffer overflow, cleared buffer");
+ DebugMessage(M64MSG_WARNING, "IS64: prevented integer overflow, cleared buffer");
return;
}
@@ -0,0 +1,45 @@
"Add bounds checking to some DMA operations"
https://github.com/mupen64plus/mupen64plus-core/pull/1122
Index: src/device/cart/sram.c
--- src/device/cart/sram.c.orig
+++ src/device/cart/sram.c
@@ -27,6 +27,7 @@
#include "backends/api/storage_backend.h"
#include "device/memory/memory.h"
+#include "device/rdram/rdram.h"
#define SRAM_ADDR_MASK UINT32_C(0x0000ffff)
@@ -36,10 +37,11 @@ void format_sram(uint8_t* mem)
}
void init_sram(struct sram* sram,
- void* storage, const struct storage_backend_interface* istorage)
+ void* storage, const struct storage_backend_interface* istorage, struct rdram* rdram)
{
sram->storage = storage;
sram->istorage = istorage;
+ sram->rdram = rdram;
}
unsigned int sram_dma_read(void* opaque, const uint8_t* dram, uint32_t dram_addr, uint32_t cart_addr, uint32_t length)
@@ -50,7 +52,7 @@ unsigned int sram_dma_read(void* opaque, const uint8_t
cart_addr &= SRAM_ADDR_MASK;
- for (i = 0; i < length; ++i) {
+ for (i = 0; i < length && (cart_addr+i) < SRAM_SIZE; ++i) {
mem[(cart_addr+i)^S8] = dram[(dram_addr+i)^S8];
}
@@ -67,7 +69,7 @@ unsigned int sram_dma_write(void* opaque, uint8_t* dra
cart_addr &= SRAM_ADDR_MASK;
- for (i = 0; i < length; ++i) {
+ for (i = 0; i < length && (dram_addr+i) < sram->rdram->dram_size; ++i) {
dram[(dram_addr+i)^S8] = mem[(cart_addr+i)^S8];
}
@@ -0,0 +1,21 @@
"Add bounds checking to some DMA operations"
https://github.com/mupen64plus/mupen64plus-core/pull/1122
Index: src/device/cart/sram.h
--- src/device/cart/sram.h.orig
+++ src/device/cart/sram.h
@@ -32,12 +32,13 @@ struct sram
{
void* storage;
const struct storage_backend_interface* istorage;
+ struct rdram* rdram;
};
void format_sram(uint8_t* sram);
void init_sram(struct sram* sram,
- void* storage, const struct storage_backend_interface* istorage);
+ void* storage, const struct storage_backend_interface* istorage, struct rdram* rdram);
unsigned int sram_dma_read(void* opaque, const uint8_t* dram, uint32_t dram_addr, uint32_t cart_addr, uint32_t length);
unsigned int sram_dma_write(void* opaque, uint8_t* dram, uint32_t dram_addr, uint32_t cart_addr, uint32_t length);
@@ -1,13 +0,0 @@
From upstream 39975200ad4926cfc79c96609b64696289065502.
Index: src/device/r4300/idec.h
--- src/device/r4300/idec.h.orig
+++ src/device/r4300/idec.h
@@ -82,6 +82,6 @@ size_t idec_u53(uint32_t iw, uint8_t u53, uint8_t* u5)
#define IDEC_U53(r4300, iw, u53, u5) (void*)(((char*)(r4300)) + idec_u53((iw), (u53), (u5)))
-const char* g_r4300_opcodes[R4300_OPCODES_COUNT];
+extern const char* g_r4300_opcodes[R4300_OPCODES_COUNT];
#endif
@@ -0,0 +1,14 @@
"Misc crash fixes"
https://github.com/mupen64plus/mupen64plus-core/pull/1080
Index: src/device/r4300/new_dynarec/arm64/assem_arm64.c
--- src/device/r4300/new_dynarec/arm64/assem_arm64.c.orig
+++ src/device/r4300/new_dynarec/arm64/assem_arm64.c
@@ -2393,6 +2393,7 @@ static void emit_writebyte_indexed_tlb(int rt, int add
static void emit_writeword(int rt, intptr_t addr)
{
+ if(rt<0) return;
intptr_t offset = addr-(intptr_t)&g_dev.r4300.new_dynarec_hot_state;
assert(offset<16380LL);
assert(offset%4 == 0); /* 4 bytes aligned */
@@ -0,0 +1,14 @@
"Misc crash fixes"
https://github.com/mupen64plus/mupen64plus-core/pull/1080
Index: src/device/r4300/new_dynarec/arm/assem_arm.c
--- src/device/r4300/new_dynarec/arm/assem_arm.c.orig
+++ src/device/r4300/new_dynarec/arm/assem_arm.c
@@ -2040,6 +2040,7 @@ static void emit_writebyte_indexed_tlb(int rt, int add
}
static void emit_writeword(int rt, int addr)
{
+ if(rt<0) return;
u_int offset = addr-(u_int)&g_dev.r4300.new_dynarec_hot_state;
assert(offset<4096);
assem_debug("str %s,fp+%d",regname[rt],offset);
@@ -0,0 +1,22 @@
"Misc crash fixes"
https://github.com/mupen64plus/mupen64plus-core/pull/1080
Index: src/device/r4300/new_dynarec/new_dynarec.c
--- src/device/r4300/new_dynarec/new_dynarec.c.orig
+++ src/device/r4300/new_dynarec/new_dynarec.c
@@ -4274,6 +4274,7 @@ static void loop_preload(signed char pre[],signed char
// Generate address for load/store instruction
static void address_generation(int i,struct regstat *i_regs,signed char entry[])
{
+ if(i>=4069) return;
if(itype[i]==LOAD||itype[i]==LOADLR||itype[i]==STORE||itype[i]==STORELR||itype[i]==C1LS) {
int ra=0;
int agr=AGEN1+(i&1);
@@ -4380,6 +4381,7 @@ static void address_generation(int i,struct regstat *i
}
}
// Preload constants for next instruction
+ if(i+1>=4096) return;
if(itype[i+1]==LOAD||itype[i+1]==LOADLR||itype[i+1]==STORE||itype[i+1]==STORELR||itype[i+1]==C1LS) {
int agr,ra;
#if (NEW_DYNAREC!=NEW_DYNAREC_X86) && (NEW_DYNAREC!=NEW_DYNAREC_X64)
@@ -0,0 +1,14 @@
"Misc crash fixes"
https://github.com/mupen64plus/mupen64plus-core/pull/1080
Index: src/device/r4300/new_dynarec/x64/assem_x64.c
--- src/device/r4300/new_dynarec/x64/assem_x64.c.orig
+++ src/device/r4300/new_dynarec/x64/assem_x64.c
@@ -2309,6 +2309,7 @@ static void emit_xchg64(int rs, int rt)
}
static void emit_writeword(int rt, intptr_t addr)
{
+ if(rt<0) return;
assert((intptr_t)addr-(intptr_t)out>=-2147483648LL&&(intptr_t)addr-(intptr_t)out<2147483647LL);
assem_debug("movl %%%s,%llx",regname[rt],addr);
output_byte(0x89);
@@ -0,0 +1,27 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/ai/ai_controller.c
--- src/device/rcp/ai/ai_controller.c.orig
+++ src/device/rcp/ai/ai_controller.c
@@ -180,7 +180,7 @@ void read_ai_regs(void* opaque, uint32_t address, uint
ai->last_read = *value;
}
}
- else
+ else if (reg < AI_REGS_COUNT)
{
*value = ai->regs[reg];
}
@@ -216,7 +216,10 @@ void write_ai_regs(void* opaque, uint32_t address, uin
return;
}
- masked_write(&ai->regs[reg], value, mask);
+ if (reg < AI_REGS_COUNT)
+ {
+ masked_write(&ai->regs[reg], value, mask);
+ }
}
void ai_end_of_dma_event(void* opaque)
@@ -0,0 +1,15 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/ai/ai_controller.h
--- src/device/rcp/ai/ai_controller.h.orig
+++ src/device/rcp/ai/ai_controller.h
@@ -71,7 +71,7 @@ struct ai_controller
static osal_inline uint32_t ai_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x1f) >> 2;
}
void init_ai(struct ai_controller* ai,
@@ -0,0 +1,15 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/mi/mi_controller.h
--- src/device/rcp/mi/mi_controller.h.orig
+++ src/device/rcp/mi/mi_controller.h
@@ -57,7 +57,7 @@ struct mi_controller
static osal_inline uint32_t mi_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0xf) >> 2;
}
void init_mi(struct mi_controller* mi, struct r4300_core* r4300);
@@ -0,0 +1,28 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/pi/pi_controller.c
--- src/device/rcp/pi/pi_controller.c.orig
+++ src/device/rcp/pi/pi_controller.c
@@ -153,7 +153,8 @@ void read_pi_regs(void* opaque, uint32_t address, uint
struct pi_controller* pi = (struct pi_controller*)opaque;
uint32_t reg = pi_reg(address);
- *value = pi->regs[reg];
+ if (reg < PI_REGS_COUNT)
+ *value = pi->regs[reg];
if (reg == PI_WR_LEN_REG || reg == PI_RD_LEN_REG)
*value = 0x7F;
@@ -209,7 +210,10 @@ void write_pi_regs(void* opaque, uint32_t address, uin
return;
}
- masked_write(&pi->regs[reg], value, mask);
+ if (reg < PI_REGS_COUNT)
+ {
+ masked_write(&pi->regs[reg], value, mask);
+ }
}
void pi_end_of_dma_event(void* opaque)
@@ -0,0 +1,15 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/pi/pi_controller.h
--- src/device/rcp/pi/pi_controller.h.orig
+++ src/device/rcp/pi/pi_controller.h
@@ -87,7 +87,7 @@ struct pi_controller
static osal_inline uint32_t pi_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x3f) >> 2;
}
@@ -0,0 +1,30 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/rdp/rdp_core.c
--- src/device/rcp/rdp/rdp_core.c.orig
+++ src/device/rcp/rdp/rdp_core.c
@@ -128,7 +128,10 @@ void read_dps_regs(void* opaque, uint32_t address, uin
struct rdp_core* dp = (struct rdp_core*)opaque;
uint32_t reg = dps_reg(address);
- *value = dp->dps_regs[reg];
+ if (reg < DPS_REGS_COUNT)
+ {
+ *value = dp->dps_regs[reg];
+ }
}
void write_dps_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask)
@@ -136,7 +139,10 @@ void write_dps_regs(void* opaque, uint32_t address, ui
struct rdp_core* dp = (struct rdp_core*)opaque;
uint32_t reg = dps_reg(address);
- masked_write(&dp->dps_regs[reg], value, mask);
+ if (reg < DPS_REGS_COUNT)
+ {
+ masked_write(&dp->dps_regs[reg], value, mask);
+ }
}
void rdp_interrupt_event(void* opaque)
@@ -0,0 +1,21 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/rdp/rdp_core.h
--- src/device/rcp/rdp/rdp_core.h.orig
+++ src/device/rcp/rdp/rdp_core.h
@@ -95,12 +95,12 @@ struct rdp_core
static osal_inline uint32_t dpc_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x1f) >> 2;
}
static osal_inline uint32_t dps_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x1f) >> 2;
}
void init_rdp(struct rdp_core* dp,
@@ -0,0 +1,15 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/ri/ri_controller.h
--- src/device/rcp/ri/ri_controller.h.orig
+++ src/device/rcp/ri/ri_controller.h
@@ -51,7 +51,7 @@ struct ri_controller
static osal_inline uint32_t ri_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x1f) >> 2;
}
static osal_inline uint16_t ri_address_to_id_field(uint32_t address)
@@ -0,0 +1,30 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/rsp/rsp_core.c
--- src/device/rcp/rsp/rsp_core.c.orig
+++ src/device/rcp/rsp/rsp_core.c
@@ -304,11 +304,11 @@ void read_rsp_regs2(void* opaque, uint32_t address, ui
struct rsp_core* sp = (struct rsp_core*)opaque;
uint32_t reg = rsp_reg2(address);
- *value = sp->regs2[reg];
+ if (reg < SP_REGS2_COUNT)
+ *value = sp->regs2[reg];
if (reg == SP_PC_REG)
*value &= 0xffc;
-
}
void write_rsp_regs2(void* opaque, uint32_t address, uint32_t value, uint32_t mask)
@@ -319,7 +319,8 @@ void write_rsp_regs2(void* opaque, uint32_t address, u
if (reg == SP_PC_REG)
mask &= 0xffc;
- masked_write(&sp->regs2[reg], value, mask);
+ if (reg < SP_REGS2_COUNT)
+ masked_write(&sp->regs2[reg], value, mask);
}
void do_SP_Task(struct rsp_core* sp)
@@ -0,0 +1,21 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/rsp/rsp_core.h
--- src/device/rcp/rsp/rsp_core.h.orig
+++ src/device/rcp/rsp/rsp_core.h
@@ -111,12 +111,12 @@ static osal_inline uint32_t rsp_mem_address(uint32_t a
static osal_inline uint32_t rsp_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x1f) >> 2;
}
static osal_inline uint32_t rsp_reg2(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x1f) >> 2;
}
void init_rsp(struct rsp_core* sp,
@@ -0,0 +1,18 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/si/si_controller.c
--- src/device/rcp/si/si_controller.c.orig
+++ src/device/rcp/si/si_controller.c
@@ -123,7 +123,10 @@ void read_si_regs(void* opaque, uint32_t address, uint
struct si_controller* si = (struct si_controller*)opaque;
uint32_t reg = si_reg(address);
- *value = si->regs[reg];
+ if (reg < SI_REGS_COUNT)
+ {
+ *value = si->regs[reg];
+ }
}
void write_si_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask)
@@ -0,0 +1,15 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/si/si_controller.h
--- src/device/rcp/si/si_controller.h.orig
+++ src/device/rcp/si/si_controller.h
@@ -72,7 +72,7 @@ struct si_controller
static osal_inline uint32_t si_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x1f) >> 2;
}
@@ -0,0 +1,30 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/vi/vi_controller.c
--- src/device/rcp/vi/vi_controller.c.orig
+++ src/device/rcp/vi/vi_controller.c
@@ -105,7 +105,10 @@ void read_vi_regs(void* opaque, uint32_t address, uint
vi->regs[VI_CURRENT_REG] = (vi->regs[VI_CURRENT_REG] & (~1)) | vi->field;
}
- *value = vi->regs[reg];
+ if (reg < VI_REGS_COUNT)
+ {
+ *value = vi->regs[reg];
+ }
}
void write_vi_regs(void* opaque, uint32_t address, uint32_t value, uint32_t mask)
@@ -151,7 +154,10 @@ void write_vi_regs(void* opaque, uint32_t address, uin
return;
}
- masked_write(&vi->regs[reg], value, mask);
+ if (reg < VI_REGS_COUNT)
+ {
+ masked_write(&vi->regs[reg], value, mask);
+ }
}
void vi_vertical_interrupt_event(void* opaque)
@@ -0,0 +1,15 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rcp/vi/vi_controller.h
--- src/device/rcp/vi/vi_controller.h.orig
+++ src/device/rcp/vi/vi_controller.h
@@ -64,7 +64,7 @@ struct vi_controller
static osal_inline uint32_t vi_reg(uint32_t address)
{
- return (address & 0xffff) >> 2;
+ return (address & 0x3f) >> 2;
}
@@ -0,0 +1,30 @@
"Implement register mirroring"
https://github.com/mupen64plus/mupen64plus-core/pull/1119
Index: src/device/rdram/rdram.c
--- src/device/rdram/rdram.c.orig
+++ src/device/rdram/rdram.c
@@ -173,7 +173,11 @@ void read_rdram_regs(void* opaque, uint32_t address, u
return;
}
- *value = rdram->regs[module][reg];
+ if (reg < RDRAM_REGS_COUNT) {
+ *value = rdram->regs[module][reg];
+ } else {
+ *value = 0;
+ }
/* some bits are inverted when read */
if (reg == RDRAM_MODE_REG) {
@@ -187,6 +191,10 @@ void write_rdram_regs(void* opaque, uint32_t address,
uint32_t reg = rdram_reg(address);
size_t module;
size_t modules = get_modules_count(rdram);
+
+ if (reg >= RDRAM_REGS_COUNT) {
+ return;
+ }
/* HACK: Detect when current Control calibration is about to start,
* so we can set corrupted rdram_dram handler
@@ -1,13 +0,0 @@
From upstream 39975200ad4926cfc79c96609b64696289065502.
Index: src/main/workqueue.h
--- src/main/workqueue.h.orig
+++ src/main/workqueue.h
@@ -27,7 +27,6 @@
struct work_struct;
-struct work_struct *work;
typedef void (*work_func_t)(struct work_struct *work);
struct work_struct {
work_func_t func;
-2
View File
@@ -1,7 +1,5 @@
COMMENT = n64 emulator input plugin
REVISION = 1
# GPLv2+
PERMIT_PACKAGE = Yes
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-input-sdl-src-2.5.9.tar.gz) = bZzSN1of91XOEJ0D9ozEVgpI0HgVHES24blzL/x3cU8=
SIZE (mupen64plus-input-sdl-src-2.5.9.tar.gz) = 56403
SHA256 (mupen64plus-input-sdl-src-2.6.0.tar.gz) = O4Yp9yuxN/0r25pswprScMOHfz1A4fna6J2yTd4EJeQ=
SIZE (mupen64plus-input-sdl-src-2.6.0.tar.gz) = 61800
-2
View File
@@ -1,7 +1,5 @@
COMMENT = n64 emulator MSP communications simulator
REVISION = 1
# GPLv2+
PERMIT_PACKAGE = Yes
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-rsp-cxd4-src-2.5.9.tar.gz) = piAUvJzKNp5f24KWV4lH7G2yY50J9ley3TWJE9Cwrk4=
SIZE (mupen64plus-rsp-cxd4-src-2.5.9.tar.gz) = 71231
SHA256 (mupen64plus-rsp-cxd4-src-2.6.0.tar.gz) = r/IV5PCXOeANMGwa71RAUl8yOWbn/CNCG7ar3ltzMvo=
SIZE (mupen64plus-rsp-cxd4-src-2.6.0.tar.gz) = 74203
@@ -1,22 +0,0 @@
Fix build with -fno-common.
From upstream a961c711bfca2568a70591e69951f9af05564a00.
Index: su.c
--- su.c.orig
+++ su.c
@@ -34,6 +34,8 @@ pu8 DMEM;
pu8 IMEM;
unsigned long su_max_address = 0x007FFFFFul;
+static int temp_PC;
+
NOINLINE void res_S(void)
{
message("RESERVED.");
@@ -1644,7 +1646,6 @@ void STV(unsigned vt, unsigned element, signed offset,
return;
}
-int temp_PC;
#ifdef WAIT_FOR_CPU_HOST
short MFC0_count[NUMBER_OF_SCALAR_REGISTERS];
#endif
@@ -1,22 +0,0 @@
Fix build with -fno-common.
From upstream a961c711bfca2568a70591e69951f9af05564a00.
Index: su.h
--- su.h.orig
+++ su.h
@@ -155,7 +155,6 @@ extern u32 SR[];
int stage;
#endif
-extern int temp_PC;
#ifdef WAIT_FOR_CPU_HOST
extern short MFC0_count[];
/* Keep one C0 MF status read count for each scalar register. */
@@ -268,7 +267,7 @@ extern void set_PC(unsigned int address);
#define SP_STATUS_SIG6 (0x00000001ul << 13)
#define SP_STATUS_SIG7 (0x00000001ul << 14)
-enum {
+typedef enum {
RCP_SP_MEM_ADDR_REG,
RCP_SP_DRAM_ADDR_REG,
RCP_SP_RD_LEN_REG,
-2
View File
@@ -1,7 +1,5 @@
COMMENT = n64 emulator signal co-processor plugin
REVISION = 0
# GPLv2+
PERMIT_PACKAGE = Yes
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-rsp-hle-src-2.5.9.tar.gz) = rXrF4brwu7RguuQAZbnmcz4eCxFBRFrIdpVsj1jkSCs=
SIZE (mupen64plus-rsp-hle-src-2.5.9.tar.gz) = 53889
SHA256 (mupen64plus-rsp-hle-src-2.6.0.tar.gz) = hQG5cxXbgMfyAO55xc40IDxdHgxh+T9TgmP8g/hGSn8=
SIZE (mupen64plus-rsp-hle-src-2.6.0.tar.gz) = 60324
@@ -0,0 +1,14 @@
Disable incorrect assert.
Index: src/jpeg.c
--- src/jpeg.c.orig
+++ src/jpeg.c
@@ -475,7 +475,7 @@ static void ReorderSubBlock(int16_t *dst, const int16_
unsigned int i;
/* source and destination sublocks cannot overlap */
- assert(labs(dst - src) > SUBBLOCK_SIZE);
+ //assert(labs(dst - src) > SUBBLOCK_SIZE);
for (i = 0; i < SUBBLOCK_SIZE; ++i)
dst[i] = src[table[i]];
-2
View File
@@ -1,7 +1,5 @@
COMMENT = n64 emulator signal co-processor plugin
REVISION = 1
# GPLv2+
PERMIT_PACKAGE = Yes
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-rsp-z64-src-2.5.9.tar.gz) = TINB14KwX7eSe+Idrbr6rYjtIvksicl/tzRKP3x4hvs=
SIZE (mupen64plus-rsp-z64-src-2.5.9.tar.gz) = 45620
SHA256 (mupen64plus-rsp-z64-src-2.6.0.tar.gz) = 0DBDeFL9dkPyaYB2CW/2+EifRJ20yjrV7dANGAmLNho=
SIZE (mupen64plus-rsp-z64-src-2.6.0.tar.gz) = 47039
@@ -4,7 +4,7 @@ is only used for debug output that isn't compiled in anyway.
Index: src/rsp.h
--- src/rsp.h.orig
+++ src/rsp.h
@@ -374,7 +374,6 @@ INLINE void n64_dp_reg_w(UINT32 offset, UINT32 data, U
@@ -380,7 +380,6 @@ INLINE void n64_dp_reg_w(UINT32 offset, UINT32 data, U
}
}
+1 -1
View File
@@ -1,9 +1,9 @@
COMMENT = n64 emulator command-line ui plugin
REVISION = 0
# GPLv2+
PERMIT_PACKAGE = Yes
# uses pledge()
WANTLIB = SDL2 c pthread
LIB_DEPENDS = devel/sdl2
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-ui-console-src-2.5.9.tar.gz) = c+kASI1q06d+OLp5T1YAjXdTFCYN8ZrPVVJRcDcSA8E=
SIZE (mupen64plus-ui-console-src-2.5.9.tar.gz) = 58934
SHA256 (mupen64plus-ui-console-src-2.6.0.tar.gz) = +camEpFAS3dZymW0YexYUpD9JWB57MkM2AdL3CmHBhY=
SIZE (mupen64plus-ui-console-src-2.6.0.tar.gz) = 63122
@@ -0,0 +1,15 @@
Index: src/main.c
--- src/main.c.orig
+++ src/main.c
@@ -1138,6 +1143,11 @@ int main(int argc, char *argv[])
before the relatively long-running game. */
if (l_SaveOptions && (*ConfigHasUnsavedChanges)(NULL))
(*ConfigSaveFile)();
+
+ if (pledge("stdio rpath wpath cpath inet flock unix dns sendfd recvfd prot_exec drm audio", NULL) == -1) {
+ fprintf(stderr, "pledge\n");
+ return 1;
+ }
/* run the game */
(*CoreDoCommand)(M64CMD_EXECUTE, 0, NULL);
@@ -1,7 +1,5 @@
COMMENT = n64 emulator video plugin
REVISION = 0
# GPLv2+
PERMIT_PACKAGE = Yes
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-video-arachnoid-src-2.5.9.tar.gz) = Pg2B+psfO9vKmU/07XcHU49SryFiHYtKzhlqWWVBwW4=
SIZE (mupen64plus-video-arachnoid-src-2.5.9.tar.gz) = 129064
SHA256 (mupen64plus-video-arachnoid-src-2.6.0.tar.gz) = FRh/QqyOC9xKKnFU9+2yYdkNkTaQejEhjbB5AWQPISE=
SIZE (mupen64plus-video-arachnoid-src-2.6.0.tar.gz) = 130350
@@ -1,7 +1,5 @@
COMMENT = n64 emulator video plugin
REVISION = 2
# GPLv2+
PERMIT_PACKAGE = Yes
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-video-glide64-src-2.5.9.tar.gz) = zO6GkSv8qD+GKxDGHLw7NxcetDs+ZXLNsXO9jWmocCs=
SIZE (mupen64plus-video-glide64-src-2.5.9.tar.gz) = 334690
SHA256 (mupen64plus-video-glide64-src-2.6.0.tar.gz) = 2+AfoDjMxNq38qnN5yuFuLSjijUjteEWliRlizBykbo=
SIZE (mupen64plus-video-glide64-src-2.6.0.tar.gz) = 335880
@@ -1,16 +0,0 @@
From upstream 8d618f060a9e1b179a917d452c5420a1607d23f5.
Index: src/wrapper/filter.cpp
--- src/wrapper/filter.cpp.orig
+++ src/wrapper/filter.cpp
@@ -32,8 +32,8 @@
unsigned char *blur_edges(unsigned char *source, int width, int height, int *width2, int *height2)
{
unsigned char *result, *temp, *temp2;
- char mx[3*3] = {-1, 0, 1, -2, 0, 2, -1, 0, 1};
- char my[3*3] = {-1, -2, -1, 0, 0, 0, 1, 2 ,1};
+ signed char mx[3*3] = {-1, 0, 1, -2, 0, 2, -1, 0, 1};
+ signed char my[3*3] = {-1, -2, -1, 0, 0, 0, 1, 2 ,1};
int i,j;
*width2 = width*2;
@@ -1,14 +1,12 @@
COMMENT = n64 emulator video plugin
REVISION = 1
# GPLv2+
PERMIT_PACKAGE = Yes
COMPILER = base-clang ports-gcc
WANTLIB = GL SDL2 boost_filesystem boost_system c m png pthread z ${COMPILER_LIBCXX}
LIB_DEPENDS = devel/boost devel/sdl2 graphics/png
WANTLIB = GL SDL2 c m png pthread z ${COMPILER_LIBCXX}
LIB_DEPENDS = devel/sdl2 graphics/png
MUPEN64PLUS_MOD = video-glide64mk2
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-video-glide64mk2-src-2.5.9.tar.gz) = VoPzx0KknZ2ZSqcahP1UnjzhOUatJCrGAjmZVQcIwJE=
SIZE (mupen64plus-video-glide64mk2-src-2.5.9.tar.gz) = 498350
SHA256 (mupen64plus-video-glide64mk2-src-2.6.0.tar.gz) = +a7b1UFaz1cUR6D4RUdHNcemT+jAaSvuBfJF+zLSTEA=
SIZE (mupen64plus-video-glide64mk2-src-2.6.0.tar.gz) = 503590
@@ -1,23 +0,0 @@
https://github.com/mupen64plus/mupen64plus-video-glide64mk2/pull/129
Index: src/GlideHQ/TxCache.cpp
--- src/GlideHQ/TxCache.cpp.orig
+++ src/GlideHQ/TxCache.cpp
@@ -237,7 +237,7 @@ TxCache::save(const wchar_t *path, const wchar_t *file
/* dump cache to disk */
char cbuf[MAX_PATH];
- boost::filesystem::wpath cachepath(path);
+ boost::filesystem::path cachepath(path);
boost::filesystem::create_directory(cachepath);
/* Ugly hack to enable fopen/gzopen in Win9x */
@@ -330,7 +330,7 @@ TxCache::load(const wchar_t *path, const wchar_t *file
/* find it on disk */
char cbuf[MAX_PATH];
- boost::filesystem::wpath cachepath(path);
+ boost::filesystem::path cachepath(path);
#ifdef BOOST_WINDOWS_API
wchar_t curpath[MAX_PATH];
@@ -1,184 +0,0 @@
https://github.com/mupen64plus/mupen64plus-video-glide64mk2/pull/129
Index: src/GlideHQ/TxHiResCache.cpp
--- src/GlideHQ/TxHiResCache.cpp.orig
+++ src/GlideHQ/TxHiResCache.cpp
@@ -65,8 +65,8 @@ TxHiResCache::~TxHiResCache()
if ((_options & DUMP_HIRESTEXCACHE) && !_haveCache && !_abortLoad) {
/* dump cache to disk */
std::wstring filename = _ident + L"_HIRESTEXTURES.dat";
- boost::filesystem::wpath cachepath(_cachepath);
- cachepath /= boost::filesystem::wpath(L"glidehq");
+ boost::filesystem::path cachepath(_cachepath);
+ cachepath /= boost::filesystem::path(L"glidehq");
int config = _options & (HIRESTEXTURES_MASK|COMPRESS_HIRESTEX|COMPRESSION_MASK|TILE_HIRESTEX|FORCE16BPP_HIRESTEX|GZ_HIRESTEXCACHE|LET_TEXARTISTS_FLY);
TxCache::save(cachepath.wstring().c_str(), filename.c_str(), config);
@@ -107,8 +107,8 @@ TxHiResCache::TxHiResCache(int maxwidth, int maxheight
if (_options & DUMP_HIRESTEXCACHE) {
/* find it on disk */
std::wstring filename = _ident + L"_HIRESTEXTURES.dat";
- boost::filesystem::wpath cachepath(_cachepath);
- cachepath /= boost::filesystem::wpath(L"glidehq");
+ boost::filesystem::path cachepath(_cachepath);
+ cachepath /= boost::filesystem::path(L"glidehq");
int config = _options & (HIRESTEXTURES_MASK|COMPRESS_HIRESTEX|COMPRESSION_MASK|TILE_HIRESTEX|FORCE16BPP_HIRESTEX|GZ_HIRESTEXCACHE|LET_TEXARTISTS_FLY);
_haveCache = TxCache::load(cachepath.wstring().c_str(), filename.c_str(), config);
@@ -132,7 +132,7 @@ TxHiResCache::load(boolean replace) /* 0 : reload, 1 :
if (!replace) TxCache::clear();
- boost::filesystem::wpath dir_path(_datapath);
+ boost::filesystem::path dir_path(_datapath);
switch (_options & HIRESTEXTURES_MASK) {
case GHQ_HIRESTEXTURES:
@@ -149,8 +149,8 @@ TxHiResCache::load(boolean replace) /* 0 : reload, 1 :
INFO(80, L" usage of only 2) and 3) highly recommended!\n");
INFO(80, L" folder names must be in US-ASCII characters!\n");
- dir_path /= boost::filesystem::wpath(L"hires_texture");
- dir_path /= boost::filesystem::wpath(_ident);
+ dir_path /= boost::filesystem::path(L"hires_texture");
+ dir_path /= boost::filesystem::path(_ident);
loadHiResTextures(dir_path, replace);
break;
case JABO_HIRESTEXTURES:
@@ -164,7 +164,7 @@ TxHiResCache::load(boolean replace) /* 0 : reload, 1 :
}
boolean
-TxHiResCache::loadHiResTextures(boost::filesystem::wpath dir_path, boolean replace)
+TxHiResCache::loadHiResTextures(boost::filesystem::path dir_path, boolean replace)
{
uint32_t last, now, diff;
DBG_INFO(80, L"-----\n");
@@ -224,7 +224,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
}
DBG_INFO(80, L"-----\n");
- DBG_INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ DBG_INFO(80, L"file: %ls\n", it->path().filename().c_str());
int width = 0, height = 0;
uint16 format = 0;
@@ -257,8 +257,8 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
/* read in Rice's file naming convention */
#define CRCFMTSIZ_LEN 13
#define PALCRC_LEN 9
- //wcstombs(fname, it->path().leaf().c_str(), MAX_PATH);
- strncpy(fname, it->path().leaf().string().c_str(), sizeof(fname));
+ //wcstombs(fname, it->path().filename().c_str(), MAX_PATH);
+ strncpy(fname, it->path().filename().string().c_str(), sizeof(fname));
fname[sizeof(fname) - 1] = '\0';
/* XXX case sensitivity fiasco!
* files must use _a, _rgb, _all, _allciByRGBA, _ciByRGBA, _ci
@@ -276,7 +276,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: not png or bmp or dds!\n");
continue;
@@ -295,7 +295,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: not Rice texture naming convention!\n");
continue;
@@ -304,7 +304,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: crc32 = 0!\n");
continue;
@@ -319,7 +319,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: already cached! duplicate texture!\n");
continue;
@@ -355,7 +355,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: missing _rgb.*! _a.* must be paired with _rgb.*!\n");
continue;
@@ -396,7 +396,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
if (!tex) {
INFO(80, L"Error: missing _rgb.*!\n");
@@ -448,7 +448,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Warning: missing _a.*! only using _rgb.*. treat as opaque texture.\n");
int i;
@@ -495,7 +495,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: W:H aspect ratio range not 8:1 - 1:8!\n");
continue;
@@ -507,7 +507,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: not power of 2 size!\n");
continue;
@@ -520,7 +520,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: load failed!\n");
continue;
@@ -539,7 +539,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
INFO(80, L"Error: not width * height > 4 or 8bit palette color or 32bpp or dxt1 or dxt3 or dxt5!\n");
continue;
@@ -1017,7 +1017,7 @@ TxHiResCache::loadHiResTextures(boost::filesystem::wpa
#if !DEBUG
INFO(80, L"-----\n");
INFO(80, L"path: %ls\n", dir_path.string().c_str());
- INFO(80, L"file: %ls\n", it->path().leaf().c_str());
+ INFO(80, L"file: %ls\n", it->path().filename().c_str());
#endif
if (tex) {
free(tex);
@@ -1,14 +0,0 @@
https://github.com/mupen64plus/mupen64plus-video-glide64mk2/pull/129
Index: src/GlideHQ/TxHiResCache.h
--- src/GlideHQ/TxHiResCache.h.orig
+++ src/GlideHQ/TxHiResCache.h
@@ -47,7 +47,7 @@ class TxHiResCache : public TxCache (private)
TxImage *_txImage;
TxQuantize *_txQuantize;
TxReSample *_txReSample;
- boolean loadHiResTextures(boost::filesystem::wpath dir_path, boolean replace);
+ boolean loadHiResTextures(boost::filesystem::path dir_path, boolean replace);
public:
~TxHiResCache();
TxHiResCache(int maxwidth, int maxheight, int maxbpp, int options,
@@ -1,27 +0,0 @@
https://github.com/mupen64plus/mupen64plus-video-glide64mk2/pull/129
Index: src/GlideHQ/TxTexCache.cpp
--- src/GlideHQ/TxTexCache.cpp.orig
+++ src/GlideHQ/TxTexCache.cpp
@@ -37,8 +37,8 @@ TxTexCache::~TxTexCache()
if (_options & DUMP_TEXCACHE) {
/* dump cache to disk */
std::wstring filename = _ident + L"_MEMORYCACHE.dat";
- boost::filesystem::wpath cachepath(_cachepath);
- cachepath /= boost::filesystem::wpath(L"glidehq");
+ boost::filesystem::path cachepath(_cachepath);
+ cachepath /= boost::filesystem::path(L"glidehq");
int config = _options & (FILTER_MASK|ENHANCEMENT_MASK|COMPRESS_TEX|COMPRESSION_MASK|FORCE16BPP_TEX|GZ_TEXCACHE);
TxCache::save(cachepath.wstring().c_str(), filename.c_str(), config);
@@ -58,8 +58,8 @@ TxTexCache::TxTexCache(int options, int cachesize, con
if (_options & DUMP_TEXCACHE) {
/* find it on disk */
std::wstring filename = _ident + L"_MEMORYCACHE.dat";
- boost::filesystem::wpath cachepath(_cachepath);
- cachepath /= boost::filesystem::wpath(L"glidehq");
+ boost::filesystem::path cachepath(_cachepath);
+ cachepath /= boost::filesystem::path(L"glidehq");
int config = _options & (FILTER_MASK|ENHANCEMENT_MASK|COMPRESS_TEX|COMPRESSION_MASK|FORCE16BPP_TEX|GZ_TEXCACHE);
TxCache::load(cachepath.wstring().c_str(), filename.c_str(), config);
+3 -3
View File
@@ -1,15 +1,15 @@
COMMENT = n64 emulator opengl video plugin
REVISION = 0
# GPLv2+
PERMIT_PACKAGE = Yes
WANTLIB = GL SDL2 m png pthread z ${COMPILER_LIBCXX}
WANTLIB = GL SDL2 m png pthread ${COMPILER_LIBCXX}
COMPILER = base-clang ports-gcc base-gcc
LIB_DEPENDS = devel/sdl2 graphics/png
MUPEN64PLUS_MOD = video-rice
MAKE_FLAGS += NO_ASM=1
.include <bsd.port.mk>
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-video-rice-src-2.5.9.tar.gz) = eVlhF4dOhJFls9/55ki3gmLggnUKO2xmfwa5QDflI2Y=
SIZE (mupen64plus-video-rice-src-2.5.9.tar.gz) = 300964
SHA256 (mupen64plus-video-rice-src-2.6.0.tar.gz) = GflH2Fj2auxBqZwEML1B1qLf9Wm+Mk0TFWvXj7iercQ=
SIZE (mupen64plus-video-rice-src-2.6.0.tar.gz) = 303629
-2
View File
@@ -1,7 +1,5 @@
COMMENT = n64 emulator video plugin
REVISION = 1
# GPLv2+
PERMIT_PACKAGE = Yes
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (mupen64plus-video-z64-src-2.5.9.tar.gz) = +9bgH1iG09cG9CI1P4KistdanLz/IwzVh30erDvRXsM=
SIZE (mupen64plus-video-z64-src-2.5.9.tar.gz) = 66880
SHA256 (mupen64plus-video-z64-src-2.6.0.tar.gz) = VfUX6IqcgwdI0qeqCeeSg3P3QNxsLtZCqD+jo++VozA=
SIZE (mupen64plus-video-z64-src-2.6.0.tar.gz) = 68424
@@ -1,3 +1,2 @@
lib/mupen64plus/
@so lib/mupen64plus/mupen64plus-video-z64.so
share/mupen64plus/
+1 -1
View File
@@ -1,7 +1,7 @@
COMMENT-main= n64 emulator (default plugins)
COMMENT-extra= n64 emulator (all plugins)
V= 2.5.9
V= 2.6.0
PKGNAME= mupen64plus-$V
PKGNAME-main= mupen64plus-$V