mirror of
https://github.com/wavemotion-dave/NINTV-DS.git
synced 2025-06-18 13:55:33 -04:00
Version 4.7b where .int files can be either .rom or .bin and Nintellivision will auto-detect. This allows you to rename all Intellivision game ROMs to .int so that Twilight Menu will recognize them. Also slight tweak to Intellivoice games to speed them up 1%
This commit is contained in:
parent
44b66486dd
commit
7fc7b70c17
BIN
NINTV-DS.nds
BIN
NINTV-DS.nds
Binary file not shown.
@ -26,7 +26,7 @@ GRAPHICS := gfx
|
||||
#ARCH := -mthumb -mthumb-interwork
|
||||
ARCH :=
|
||||
|
||||
CFLAGS := -Ofast -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math $(ARCH) -falign-functions=16 -frename-registers
|
||||
CFLAGS := -Ofast -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math $(ARCH) -falign-functions=4 -frename-registers
|
||||
|
||||
CFLAGS += $(INCLUDE) -DARM9
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -Wno-conversion-null
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "AudioMixer.h"
|
||||
#include "printf.h"
|
||||
|
||||
INT32 debug[8] __attribute__((section(".dtcm"))) = {0};
|
||||
INT32 debug[DEBUG_SIZE] __attribute__((section(".dtcm"))) = {0};
|
||||
|
||||
int getMemUsed(void) // returns the amount of used memory in bytes
|
||||
{
|
||||
|
@ -32,6 +32,7 @@ extern AY38900 *debug_stic;
|
||||
extern AY38914 *debug_psg;
|
||||
extern AY38914 *debug_psg2;
|
||||
|
||||
#define DEBUG_SIZE 8
|
||||
extern INT32 debug[];
|
||||
|
||||
extern void show_debug_overlay(void);
|
||||
|
@ -27,7 +27,7 @@ INT32 bitsLeft __attribute__((section(".dtcm")));
|
||||
INT32 currentBits __attribute__((section(".dtcm")));
|
||||
UINT16 pc __attribute__((section(".dtcm")));
|
||||
UINT16 stack __attribute__((section(".dtcm")));
|
||||
INT32 mode __attribute__((section(".dtcm")));
|
||||
UINT8 mode __attribute__((section(".dtcm")));
|
||||
INT32 repeatPrefix __attribute__((section(".dtcm")));
|
||||
|
||||
UINT16 fifoBytes[64] __attribute__((section(".dtcm")));
|
||||
@ -166,8 +166,7 @@ ITCM_CODE INT32 SP0256::tick(INT32 minimum)
|
||||
if (periodCounter == 0) {
|
||||
periodCounter = 64;
|
||||
repeat--;
|
||||
for (UINT8 j = 0; j < 6; j++)
|
||||
y[j][0] = y[j][1] = 0;
|
||||
memset(y, 0x00, sizeof(y));
|
||||
}
|
||||
else
|
||||
periodCounter--;
|
||||
@ -183,9 +182,7 @@ ITCM_CODE INT32 SP0256::tick(INT32 minimum)
|
||||
periodCounter = period;
|
||||
repeat--;
|
||||
sample = ((amplitude & 0x1F) << ((amplitude & 0xE0) >> 5));
|
||||
for (INT32 j = 0; j < 6; j++)
|
||||
y[j][0] = y[j][1] = 0;
|
||||
|
||||
memset(y, 0x00, sizeof(y));
|
||||
}
|
||||
else
|
||||
periodCounter--;
|
||||
@ -213,7 +210,7 @@ ITCM_CODE INT32 SP0256::tick(INT32 minimum)
|
||||
return totalTicks;
|
||||
}
|
||||
|
||||
INT8 SP0256::readDelta(INT32 numBits) {
|
||||
ITCM_CODE INT8 SP0256::readDelta(INT32 numBits) {
|
||||
INT32 value = readBits(numBits);
|
||||
if ((value & (1 << (numBits - 1))) != 0)
|
||||
value |= -1 << numBits;
|
||||
@ -270,7 +267,6 @@ ITCM_CODE INT32 SP0256::readBits(INT32 numBits)
|
||||
bitsLeft += 10;
|
||||
pc++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
INT32 output = currentBits & bitMasks[numBits-1];
|
||||
@ -800,7 +796,7 @@ void SP0256::PAUSE(INT32 immed4) {
|
||||
periodInterpolation = 0;
|
||||
}
|
||||
|
||||
void SP0256::decode() {
|
||||
ITCM_CODE void SP0256::decode() {
|
||||
INT32 immed4 = readBits(4);
|
||||
INT32 nextInstruction = readBitsReverse(4);
|
||||
switch (nextInstruction) {
|
||||
|
@ -67,7 +67,7 @@ extern INT32 currentBits;
|
||||
//registers
|
||||
extern UINT16 pc;
|
||||
extern UINT16 stack;
|
||||
extern INT32 mode;
|
||||
extern UINT8 mode;
|
||||
extern INT32 repeatPrefix;
|
||||
extern INT32 command;
|
||||
|
||||
|
@ -61,7 +61,8 @@ BOOL LoadCart(const CHAR* filename)
|
||||
bIsFatalError = false;
|
||||
bGameLoaded = FALSE;
|
||||
|
||||
memset(debug, 0x00, 8 * (sizeof(UINT32)));
|
||||
// Clear out the debug array with every new game loaded
|
||||
memset(debug, 0x00, DEBUG_SIZE * (sizeof(UINT32)));
|
||||
|
||||
// Load up the configuration based on the CRC32 of the game. Do this early since we need some of those properties to load the RIP
|
||||
FindAndLoadConfig(CRC32::getCrc(filename));
|
||||
@ -84,6 +85,11 @@ BOOL LoadCart(const CHAR* filename)
|
||||
|
||||
const CHAR* extStart = filename + strlen(filename) - 4;
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
// A .bin is always assumed to be a flat binary file (and may or may not have a .cfg file to go with it).
|
||||
// A .rom is always assumed to be a file with extra meta-data that lets us know where to load it in memory.
|
||||
// A .int file can switch-hit and might be a .bin or a .rom -- we look for the signature 0xA8 byte to see if it's a .rom
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
UINT8 bIsROM = ((strcmpi(extStart, ".rom") == 0) ? true:false);
|
||||
if (strcmpi(extStart, ".int") == 0)
|
||||
{
|
||||
@ -93,7 +99,7 @@ BOOL LoadCart(const CHAR* filename)
|
||||
if (file == NULL)
|
||||
{
|
||||
FatalError("BIN FILE DOES NOT EXIST");
|
||||
return NULL;
|
||||
return FALSE;
|
||||
}
|
||||
if (fgetc(file) == 0xA8) bIsROM = true;
|
||||
fclose(file);
|
||||
@ -101,7 +107,7 @@ BOOL LoadCart(const CHAR* filename)
|
||||
|
||||
if (bIsROM)
|
||||
{
|
||||
//load the binary file as a Rip
|
||||
//load the .rom file as a Rip with meta-data parsed
|
||||
currentRip = Rip::LoadRom(filename);
|
||||
if (currentRip == NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user