mirror of
https://github.com/libretro/beetle-finalarcade2019.git
synced 2026-11-07 10:15:58 -10:00
(libretro) Fix defines (part 2) + other related updates/rework
This commit is contained in:
1 parent
4bfcf69665
commit
4189444e03
12 files changed
+74
-61
No files matched your search
@@ -1,5 +1,4 @@
|
||||
[](https://travis-ci.org/libretro/fbalpha)
|
||||
[](https://ci.appveyor.com/project/bparker06/fbalpha/branch/master)
|
||||
|
||||
# FBAlpha-libretro
|
||||
https://www.fbalpha.com
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
APP_STL := c++_static
|
||||
APP_ABI := all
|
||||
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
+6
-1
@@ -637,10 +637,15 @@ endif
|
||||
%.o: %.c
|
||||
$(CC) -c $(OBJOUT)$@ $< $(CFLAGS) $(INCFLAGS)
|
||||
|
||||
# Disabling file_stream_transform for this file, it's messing up cdda playback
|
||||
# Disabling file_stream_transform for those files
|
||||
# In the following file, it's messing with the cdda playback
|
||||
src/burner/libretro/retro_cdemu.o: src/burner/libretro/retro_cdemu.cpp
|
||||
$(CXX) -c $(OBJOUT)$@ $< $(CXXFLAGS) $(INCFLAGS) -DSKIP_STDIO_REDEFINES
|
||||
|
||||
# In the following file, it's lacking a stdout implementation
|
||||
src/cpu/mips3/x64/mips3_x64.o: src/cpu/mips3/x64/mips3_x64.cpp
|
||||
$(CXX) -c $(OBJOUT)$@ $< $(CXXFLAGS) $(INCFLAGS) -DSKIP_STDIO_REDEFINES
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) -c $(OBJOUT)$@ $< $(CXXFLAGS) $(INCFLAGS)
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "mips3_intf.h"
|
||||
#include "ide.h"
|
||||
#include "dcs2k.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define IDE_IRQ 1
|
||||
#define VBLANK_IRQ 0
|
||||
|
||||
@@ -339,12 +339,11 @@ unsigned ide_disk::read_alternate(unsigned offset)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool ide_disk::load_disk_image(const string &filename)
|
||||
bool ide_disk::load_disk_image(const char *filename)
|
||||
{
|
||||
char szFilePath[MAX_PATH];
|
||||
const char *szFileName = filename.c_str();
|
||||
|
||||
sprintf(szFilePath, "%s%s", _TtoA(szAppHDDPath), szFileName);
|
||||
sprintf(szFilePath, "%s%s", _TtoA(szAppHDDPath), filename);
|
||||
|
||||
m_disk_image = fopen(szFilePath, "r+b");
|
||||
if (!m_disk_image) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef IDE
|
||||
#define IDE
|
||||
|
||||
#include <string>
|
||||
#include "burnint.h"
|
||||
|
||||
namespace ide
|
||||
@@ -17,7 +16,7 @@ public:
|
||||
void write_alternate(unsigned offset, unsigned value);
|
||||
unsigned read(unsigned offset);
|
||||
unsigned read_alternate(unsigned offset);
|
||||
bool load_disk_image(const string &filename);
|
||||
bool load_disk_image(const char *filename);
|
||||
void close_disk_image();
|
||||
int load_hdd_image(int idx);
|
||||
ide_disk();
|
||||
|
||||
@@ -13,20 +13,21 @@ extern int bRunPause;
|
||||
extern int nSekCpuCore; // 0 - c68k, 1 - m68k
|
||||
#endif
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <stdint.h>
|
||||
/* fastcall only works on x86_32 */
|
||||
#ifndef FASTCALL
|
||||
#undef __fastcall
|
||||
#define __fastcall
|
||||
#else
|
||||
/* fastcall only works on x86_32 */
|
||||
#ifndef FASTCALL
|
||||
#undef __fastcall
|
||||
#define __fastcall
|
||||
#else
|
||||
#ifndef _MSC_VER
|
||||
#undef __fastcall
|
||||
#define __fastcall __attribute__((fastcall))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#undef _UNICODE
|
||||
#undef __fastcall
|
||||
#define __fastcall
|
||||
#include "compat/msvc.h"
|
||||
#include "compat/posix_string.h"
|
||||
#endif
|
||||
|
||||
+40
-40
@@ -1,11 +1,11 @@
|
||||
#include "burnint.h"
|
||||
#include "m6805_intf.h"
|
||||
|
||||
static INT32 ADDRESS_MAX;
|
||||
static INT32 ADDRESS_MASK;
|
||||
static INT32 PAGE;
|
||||
static INT32 PAGE_MASK;
|
||||
static INT32 PAGE_SHIFT;
|
||||
static INT32 M6805_ADDRESS_MAX;
|
||||
static INT32 M6805_ADDRESS_MASK;
|
||||
static INT32 M6805_PAGE;
|
||||
static INT32 M6805_PAGE_MASK;
|
||||
static INT32 M6805_PAGE_SHIFT;
|
||||
|
||||
#define READ 0
|
||||
#define WRITE 1
|
||||
@@ -38,11 +38,11 @@ void m6805MapMemory(UINT8 *ptr, INT32 nStart, INT32 nEnd, INT32 nType)
|
||||
if (!DebugCPU_M6805Initted) bprintf(PRINT_ERROR, _T("m6805MapMemory called without init\n"));
|
||||
#endif
|
||||
|
||||
for (INT32 i = nStart / PAGE; i < (nEnd / PAGE) + 1; i++)
|
||||
for (INT32 i = nStart / M6805_PAGE; i < (nEnd / M6805_PAGE) + 1; i++)
|
||||
{
|
||||
if (nType & (1 << READ)) mem[ READ][i] = ptr + ((i * PAGE) - nStart);
|
||||
if (nType & (1 << WRITE)) mem[WRITE][i] = ptr + ((i * PAGE) - nStart);
|
||||
if (nType & (1 << FETCH)) mem[FETCH][i] = ptr + ((i * PAGE) - nStart);
|
||||
if (nType & (1 << READ)) mem[ READ][i] = ptr + ((i * M6805_PAGE) - nStart);
|
||||
if (nType & (1 << WRITE)) mem[WRITE][i] = ptr + ((i * M6805_PAGE) - nStart);
|
||||
if (nType & (1 << FETCH)) mem[FETCH][i] = ptr + ((i * M6805_PAGE) - nStart);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ void m6805SetReadHandler(UINT8 (*read)(UINT16))
|
||||
|
||||
void m6805Write(UINT16 address, UINT8 data)
|
||||
{
|
||||
address &= ADDRESS_MASK;
|
||||
address &= M6805_ADDRESS_MASK;
|
||||
|
||||
if (mem[WRITE][address >> PAGE_SHIFT] != NULL) {
|
||||
mem[WRITE][address >> PAGE_SHIFT][address & PAGE_MASK] = data;
|
||||
if (mem[WRITE][address >> M6805_PAGE_SHIFT] != NULL) {
|
||||
mem[WRITE][address >> M6805_PAGE_SHIFT][address & M6805_PAGE_MASK] = data;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -83,10 +83,10 @@ void m6805Write(UINT16 address, UINT8 data)
|
||||
|
||||
UINT8 m6805Read(UINT16 address)
|
||||
{
|
||||
address &= ADDRESS_MASK;
|
||||
address &= M6805_ADDRESS_MASK;
|
||||
|
||||
if (mem[READ][address >> PAGE_SHIFT] != NULL) {
|
||||
return mem[READ][address >> PAGE_SHIFT][address & PAGE_MASK];
|
||||
if (mem[READ][address >> M6805_PAGE_SHIFT] != NULL) {
|
||||
return mem[READ][address >> M6805_PAGE_SHIFT][address & M6805_PAGE_MASK];
|
||||
}
|
||||
|
||||
if (m6805ReadFunction != NULL) {
|
||||
@@ -98,10 +98,10 @@ UINT8 m6805Read(UINT16 address)
|
||||
|
||||
UINT8 m6805Fetch(UINT16 address)
|
||||
{
|
||||
address &= ADDRESS_MASK;
|
||||
address &= M6805_ADDRESS_MASK;
|
||||
|
||||
if (mem[FETCH][address >> PAGE_SHIFT] != NULL) {
|
||||
return mem[FETCH][address >> PAGE_SHIFT][address & PAGE_MASK];
|
||||
if (mem[FETCH][address >> M6805_PAGE_SHIFT] != NULL) {
|
||||
return mem[FETCH][address >> M6805_PAGE_SHIFT][address & M6805_PAGE_MASK];
|
||||
}
|
||||
|
||||
return m6805Read(address);
|
||||
@@ -113,18 +113,18 @@ void m6805_write_rom(UINT32 address, UINT8 data)
|
||||
if (!DebugCPU_M6805Initted) bprintf(PRINT_ERROR, _T("m6805_write_rom called without init\n"));
|
||||
#endif
|
||||
|
||||
address &= ADDRESS_MASK;
|
||||
address &= M6805_ADDRESS_MASK;
|
||||
|
||||
if (mem[READ][address >> PAGE_SHIFT] != NULL) {
|
||||
mem[READ][address >> PAGE_SHIFT][address & PAGE_MASK] = data;
|
||||
if (mem[READ][address >> M6805_PAGE_SHIFT] != NULL) {
|
||||
mem[READ][address >> M6805_PAGE_SHIFT][address & M6805_PAGE_MASK] = data;
|
||||
}
|
||||
|
||||
if (mem[WRITE][address >> PAGE_SHIFT] != NULL) {
|
||||
mem[WRITE][address >> PAGE_SHIFT][address & PAGE_MASK] = data;
|
||||
if (mem[WRITE][address >> M6805_PAGE_SHIFT] != NULL) {
|
||||
mem[WRITE][address >> M6805_PAGE_SHIFT][address & M6805_PAGE_MASK] = data;
|
||||
}
|
||||
|
||||
if (mem[FETCH][address >> PAGE_SHIFT] != NULL) {
|
||||
mem[FETCH][address >> PAGE_SHIFT][address & PAGE_MASK] = data;
|
||||
if (mem[FETCH][address >> M6805_PAGE_SHIFT] != NULL) {
|
||||
mem[FETCH][address >> M6805_PAGE_SHIFT][address & M6805_PAGE_MASK] = data;
|
||||
}
|
||||
|
||||
if (m6805WriteFunction != NULL) {
|
||||
@@ -149,16 +149,16 @@ void m6805Init(INT32 num, INT32 max)
|
||||
{
|
||||
DebugCPU_M6805Initted = 1;
|
||||
|
||||
ADDRESS_MAX = max;
|
||||
ADDRESS_MASK = ADDRESS_MAX - 1;
|
||||
PAGE = ADDRESS_MAX / 0x100;
|
||||
PAGE_MASK = PAGE - 1;
|
||||
PAGE_SHIFT = 0;
|
||||
for (PAGE_SHIFT = 0; (1 << PAGE_SHIFT) < PAGE; PAGE_SHIFT++) {}
|
||||
M6805_ADDRESS_MAX = max;
|
||||
M6805_ADDRESS_MASK = M6805_ADDRESS_MAX - 1;
|
||||
M6805_PAGE = M6805_ADDRESS_MAX / 0x100;
|
||||
M6805_PAGE_MASK = M6805_PAGE - 1;
|
||||
M6805_PAGE_SHIFT = 0;
|
||||
for (M6805_PAGE_SHIFT = 0; (1 << M6805_PAGE_SHIFT) < M6805_PAGE; M6805_PAGE_SHIFT++) {}
|
||||
|
||||
memset (mem[0], 0, PAGE * sizeof(UINT8 *));
|
||||
memset (mem[1], 0, PAGE * sizeof(UINT8 *));
|
||||
memset (mem[2], 0, PAGE * sizeof(UINT8 *));
|
||||
memset (mem[0], 0, M6805_PAGE * sizeof(UINT8 *));
|
||||
memset (mem[1], 0, M6805_PAGE * sizeof(UINT8 *));
|
||||
memset (mem[2], 0, M6805_PAGE * sizeof(UINT8 *));
|
||||
|
||||
for (INT32 i = 0; i < num; i++)
|
||||
CpuCheatRegister(i, &M6805Config);
|
||||
@@ -170,12 +170,12 @@ void m6805Exit()
|
||||
if (!DebugCPU_M6805Initted) bprintf(PRINT_ERROR, _T("m6805Exit called without init\n"));
|
||||
#endif
|
||||
|
||||
ADDRESS_MAX = 0;
|
||||
ADDRESS_MASK = 0;
|
||||
PAGE = 0;
|
||||
PAGE_MASK = 0;
|
||||
PAGE_SHIFT = 0;
|
||||
|
||||
M6805_ADDRESS_MAX = 0;
|
||||
M6805_ADDRESS_MASK = 0;
|
||||
M6805_PAGE = 0;
|
||||
M6805_PAGE_MASK = 0;
|
||||
M6805_PAGE_SHIFT = 0;
|
||||
|
||||
DebugCPU_M6805Initted = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
#include "mips3_common.h"
|
||||
|
||||
#ifndef __LIBRETRO__
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
#if MIPS3_ENABLE_BREAKPOINTS
|
||||
#include <unordered_set>
|
||||
@@ -68,7 +70,9 @@ public:
|
||||
void reset();
|
||||
bool run(int cycles, bool skip_bps=true);
|
||||
|
||||
#ifndef __LIBRETRO__
|
||||
string dasm(uint32_t opcode, uint64_t pc);
|
||||
#endif
|
||||
|
||||
enum {
|
||||
LR = 31
|
||||
@@ -229,8 +233,10 @@ private:
|
||||
void MFLO(uint32_t opcode);
|
||||
void MTLO(uint32_t opcode);
|
||||
|
||||
#ifndef __LIBRETRO__
|
||||
string dasm_cop0(uint32_t opcode, uint64_t pc);
|
||||
string dasm_cop1(uint32_t opcode, uint64_t pc);
|
||||
#endif
|
||||
};
|
||||
|
||||
extern mips3 *g_mips;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef COMMON
|
||||
#define COMMON
|
||||
|
||||
#include <stdint.h>
|
||||
#include <burnint.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ALIGN_DECL(n) __attribute__ ((aligned (n)))
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
#ifndef TMS34010_H
|
||||
#define TMS34010_H
|
||||
|
||||
#include "stdint.h"
|
||||
#include "burnint.h"
|
||||
#ifndef __LIBRETRO__
|
||||
#include <string>
|
||||
#endif
|
||||
//#include <list>
|
||||
//#include <fstream>
|
||||
//#include <array>
|
||||
@@ -517,9 +519,10 @@ void reset(cpu_state *cpu);
|
||||
void write_ioreg(cpu_state *cpu, dword addr, word value);
|
||||
dword read_ioreg(cpu_state *cpu, dword addr);
|
||||
|
||||
#ifndef __LIBRETRO__
|
||||
std::string dasm(dword addr, size_t *size);
|
||||
std::string new_dasm(dword pc, size_t *size);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // TMS34010_H
|
||||
@@ -5,7 +5,9 @@
|
||||
#ifndef TMS34010_GFX_H
|
||||
#define TMS34010_GFX_H
|
||||
|
||||
#ifndef __LIBRETRO__
|
||||
#include <iostream>
|
||||
#endif
|
||||
#include "tms34010.h"
|
||||
#include "tms34010_defs.h"
|
||||
#include "tms34010_memacc.h"
|
||||
|
||||
Reference in new issue
Block a user