TSTHawk: Potentially release ready?

This commit is contained in:
nattthebear 2017-07-11 20:35:01 -04:00
parent 071efa5dac
commit ab4d81788e
7 changed files with 19 additions and 24 deletions

View File

@ -67,11 +67,11 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCFX
_core = PreInit<LibTst>(new PeRunnerOptions _core = PreInit<LibTst>(new PeRunnerOptions
{ {
Filename = "pcfx.wbx", Filename = "pcfx.wbx",
SbrkHeapSizeKB = 1024, SbrkHeapSizeKB = 512,
SealedHeapSizeKB = 4 * 1024, SealedHeapSizeKB = 2 * 1024,
InvisibleHeapSizeKB = 256, InvisibleHeapSizeKB = 4,
PlainHeapSizeKB = 256, PlainHeapSizeKB = 4 * 1024,
MmapHeapSizeKB = 32 * 1024 MmapHeapSizeKB = 6 * 1024,
}); });
SetCdCallbacks(); SetCdCallbacks();

BIN
output/dll/pcfx.wbx.gz Normal file

Binary file not shown.

View File

@ -7,6 +7,9 @@
"*.inc": "cpp", "*.inc": "cpp",
"system_error": "cpp", "system_error": "cpp",
"ios": "cpp", "ios": "cpp",
"xiosbase": "cpp" "xiosbase": "cpp",
"iosfwd": "cpp",
"xlocale": "cpp",
"xstring": "cpp"
} }
} }

View File

@ -4,7 +4,7 @@ CCFLAGS:= -I. -I../emulibc \
-Wall -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration \ -Wall -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration \
-std=c++0x -fomit-frame-pointer -fvisibility=hidden -fno-exceptions -fno-rtti \ -std=c++0x -fomit-frame-pointer -fvisibility=hidden -fno-exceptions -fno-rtti \
-DLSB_FIRST \ -DLSB_FIRST \
-O0 -g -O3 -flto
TARGET = pcfx.wbx TARGET = pcfx.wbx
@ -29,8 +29,8 @@ $(TARGET).in: $(OBJS)
@$(CC) -o $@ $(LDFLAGS) $(CCFLAGS) $(OBJS) ../emulibc/libemuhost.so @$(CC) -o $@ $(LDFLAGS) $(CCFLAGS) $(OBJS) ../emulibc/libemuhost.so
$(TARGET): $(TARGET).in $(TARGET): $(TARGET).in
# strip $< -o $@ -R /4 -R /14 -R /29 -R /41 -R /55 -R /67 -R /78 -R /89 -R /104 strip $< -o $@ -R /4 -R /14 -R /29 -R /41 -R /55 -R /67 -R /78 -R /89 -R /104
cp $< $@ # cp $< $@
clean: clean:
rm -rf $(OBJ_DIR) rm -rf $(OBJ_DIR)

View File

@ -343,8 +343,8 @@ static MDFN_COLD void LoadCommon(std::vector<CDIF *> *CDInterfaces, const uint8_
uint32 RAM_Map_Addresses[1] = {0x00000000}; uint32 RAM_Map_Addresses[1] = {0x00000000};
uint32 BIOSROM_Map_Addresses[1] = {0xFFF00000}; uint32 BIOSROM_Map_Addresses[1] = {0xFFF00000};
RAM = PCFX_V810.SetFastMap(RAM_Map_Addresses, 0x00200000, 1, _("RAM")); RAM = PCFX_V810.SetFastMap(RAM_Map_Addresses, 0x00200000, 1, _("RAM"), true);
BIOSROM = PCFX_V810.SetFastMap(BIOSROM_Map_Addresses, 0x00100000, 1, _("BIOS ROM")); BIOSROM = PCFX_V810.SetFastMap(BIOSROM_Map_Addresses, 0x00100000, 1, _("BIOS ROM"), false);
memcpy(BIOSROM, bios, 1024 * 1024); memcpy(BIOSROM, bios, 1024 * 1024);
@ -356,7 +356,7 @@ static MDFN_COLD void LoadCommon(std::vector<CDIF *> *CDInterfaces, const uint8_
FileStream FXSCSIFile(fxscsi_path, FileStream::MODE_READ); FileStream FXSCSIFile(fxscsi_path, FileStream::MODE_READ);
uint32 FXSCSI_Map_Addresses[1] = {0x80780000}; uint32 FXSCSI_Map_Addresses[1] = {0x80780000};
FXSCSIROM = PCFX_V810.SetFastMap(FXSCSI_Map_Addresses, 0x0080000, 1, _("FX-SCSI ROM")); FXSCSIROM = PCFX_V810.SetFastMap(FXSCSI_Map_Addresses, 0x0080000, 1, _("FX-SCSI ROM"), false);
FXSCSIFile.read(FXSCSIROM, 1024 * 512); FXSCSIFile.read(FXSCSIROM, 1024 * 512);
} }

View File

@ -42,6 +42,7 @@ found freely through public domain sources.
// CPU routines // CPU routines
#include "../defs.h" #include "../defs.h"
#include "../emulibc/emulibc.h"
//#include "pcfx.h" //#include "pcfx.h"
//#include "debug.h" //#include "debug.h"
@ -87,7 +88,6 @@ V810::V810()
V810::~V810() V810::~V810()
{ {
Kill();
} }
INLINE void V810::RecalcIPendingCache(void) INLINE void V810::RecalcIPendingCache(void)
@ -354,11 +354,6 @@ bool V810::Init(V810_Emu_Mode mode, bool vb_mode)
return (TRUE); return (TRUE);
} }
void V810::Kill(void)
{
FastMapAllocList.clear();
}
void V810::SetInt(int level) void V810::SetInt(int level)
{ {
assert(level >= -1 && level <= 15); assert(level >= -1 && level <= 15);
@ -367,7 +362,7 @@ void V810::SetInt(int level)
RecalcIPendingCache(); RecalcIPendingCache();
} }
uint8 *V810::SetFastMap(uint32 addresses[], uint32 length, unsigned int num_addresses, const char *name) uint8 *V810::SetFastMap(uint32 addresses[], uint32 length, unsigned int num_addresses, const char *name, bool writable)
{ {
for (unsigned int i = 0; i < num_addresses; i++) for (unsigned int i = 0; i < num_addresses; i++)
{ {
@ -375,8 +370,7 @@ uint8 *V810::SetFastMap(uint32 addresses[], uint32 length, unsigned int num_addr
} }
assert((length & (V810_FAST_MAP_PSIZE - 1)) == 0); assert((length & (V810_FAST_MAP_PSIZE - 1)) == 0);
FastMapAllocList.emplace_back(std::unique_ptr<uint8[]>(new uint8[length + V810_FAST_MAP_TRAMPOLINE_SIZE])); uint8 *ret = (uint8 *)(writable ? alloc_plain(length + V810_FAST_MAP_TRAMPOLINE_SIZE) : alloc_sealed(length + V810_FAST_MAP_TRAMPOLINE_SIZE));
uint8 *ret = FastMapAllocList.back().get();
for (unsigned int i = length; i < length + V810_FAST_MAP_TRAMPOLINE_SIZE; i += 2) for (unsigned int i = length; i < length + V810_FAST_MAP_TRAMPOLINE_SIZE; i += 2)
{ {

View File

@ -160,7 +160,7 @@ class V810
void SetIOWriteHandlers(void MDFN_FASTCALL (*write8)(v810_timestamp_t &, uint32, uint8), void MDFN_FASTCALL (*write16)(v810_timestamp_t &, uint32, uint16), void MDFN_FASTCALL (*write32)(v810_timestamp_t &, uint32, uint32)) MDFN_COLD; void SetIOWriteHandlers(void MDFN_FASTCALL (*write8)(v810_timestamp_t &, uint32, uint8), void MDFN_FASTCALL (*write16)(v810_timestamp_t &, uint32, uint16), void MDFN_FASTCALL (*write32)(v810_timestamp_t &, uint32, uint32)) MDFN_COLD;
// Length specifies the number of bytes to map in, at each location specified by addresses[] (for mirroring) // Length specifies the number of bytes to map in, at each location specified by addresses[] (for mirroring)
uint8 *SetFastMap(uint32 addresses[], uint32 length, unsigned int num_addresses, const char *name) MDFN_COLD; uint8 *SetFastMap(uint32 addresses[], uint32 length, unsigned int num_addresses, const char *name, bool writable) MDFN_COLD;
INLINE void ResetTS(v810_timestamp_t new_base_timestamp) INLINE void ResetTS(v810_timestamp_t new_base_timestamp)
{ {
@ -311,8 +311,6 @@ class V810
bool have_src_cache, have_dst_cache; bool have_src_cache, have_dst_cache;
uint8 *FastMap[(1ULL << 32) / V810_FAST_MAP_PSIZE]; uint8 *FastMap[(1ULL << 32) / V810_FAST_MAP_PSIZE];
std::vector<std::unique_ptr<uint8[]>> FastMapAllocList;
#ifdef WANT_DEBUGGER #ifdef WANT_DEBUGGER
void (*CPUHook)(const v810_timestamp_t timestamp, uint32 PC); void (*CPUHook)(const v810_timestamp_t timestamp, uint32 PC);