mirror of
https://github.com/wavemotion-dave/NINTV-DS.git
synced 2025-06-18 13:55:33 -04:00
Version 5.3 with integrated 2K GRAM build. See README.md for details.
This commit is contained in:
parent
ad33e8a18e
commit
f8d2c1265b
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ include $(DEVKITARM)/ds_rules
|
||||
|
||||
export TARGET := NINTV-DS
|
||||
export TOPDIR := $(CURDIR)
|
||||
export VERSION := 5.2a
|
||||
export VERSION := 5.3
|
||||
|
||||
ICON := -b $(CURDIR)/logo.bmp "NINTV-DS $(VERSION);wavemotion-dave;https://github.com/wavemotion-dave/NINTV-DS"
|
||||
|
||||
|
BIN
NINTV-DS.nds
BIN
NINTV-DS.nds
Binary file not shown.
@ -31,6 +31,7 @@ Features :
|
||||
* Numerous button / controller mapping options. Dual-Controller support (run and shoot at the same time).
|
||||
* JLP support for accelerated functions (multiply/divide), extra RAM and flash memory. If not auto-detected, when loading a game use the X button to load with options.
|
||||
* ECS support for ECS games including sound-enhanced games like Space Patrol. If not auto-detected, when loading a game use the X button to load with options.
|
||||
* 2K GRAM (aka Tutorvision mode) is supported on a per-game basis. Select 2K GRAM in the second page of Configuration for any game (reload game for it to take effect).
|
||||
|
||||
Technical Specs :
|
||||
----------
|
||||
@ -125,6 +126,9 @@ Credits :
|
||||
--------------------------------------------------------------------------------
|
||||
History :
|
||||
--------------------------------------------------------------------------------
|
||||
V5.3 : 07-Sep-2024 by wavemotion-dave
|
||||
* Integrated 2KGRAM build into the main code. There is now one unified Nintellivision build. Use Configuration to select 2KGRAM (aka Tutorvision mode) for games that support it.
|
||||
|
||||
V5.2 : 22-Jun-2024 by wavemotion-dave
|
||||
* Improved MOB collision detection to fix GORF
|
||||
* Improved MOB rendering so that Y coordinates of zero don't draw (fixes minor glitch in Beauty and the Beast at end of levels)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
@ -173,7 +173,7 @@ static void SetDefaultGameConfig(UINT32 crc)
|
||||
myConfig.fudgeTiming = 0;
|
||||
myConfig.key_click = 0;
|
||||
myConfig.bSkipBlanks = 0;
|
||||
myConfig.spare5 = 0;
|
||||
myConfig.gramSize = GRAM_512B; // Normal 512 bytes
|
||||
myConfig.spare6 = 0;
|
||||
myConfig.spare7 = 0;
|
||||
myConfig.spare8 = 0;
|
||||
@ -460,6 +460,7 @@ const struct options_t Option_Table[3][20] =
|
||||
// Page 2 options
|
||||
{
|
||||
{"BACKTAB", {"NOT LATCHED", "LATCHED"}, &myConfig.bLatched, 2},
|
||||
{"GRAM SIZE", {"512B", "2K (TUTOR)"}, &myConfig.gramSize, 2},
|
||||
{"CPU FUDGE", {"NONE", "LOW", "MEDIUM", "HIGH", "MAX"}, &myConfig.fudgeTiming, 5},
|
||||
{"KEYBD CLICK", {"NO" , "YES"}, &myConfig.key_click, 2},
|
||||
{"SKIP BLANKS", {"NO" , "YES"}, &myConfig.bSkipBlanks, 2},
|
||||
|
@ -53,7 +53,7 @@ struct Config_t
|
||||
UINT8 fudgeTiming;
|
||||
UINT8 key_click;
|
||||
UINT8 bSkipBlanks;
|
||||
UINT8 spare5;
|
||||
UINT8 gramSize;
|
||||
UINT8 spare6;
|
||||
UINT8 spare7;
|
||||
UINT8 spare8;
|
||||
@ -116,6 +116,9 @@ struct AllConfig_t
|
||||
#define DPAD_DIAGONALS 3
|
||||
#define DPAD_STRICT_4WAY 4
|
||||
|
||||
#define GRAM_512B 0
|
||||
#define GRAM_2K 1
|
||||
|
||||
extern struct Config_t myConfig;
|
||||
extern struct GlobalConfig_t myGlobalConfig;
|
||||
extern struct AllConfig_t allConfigs;
|
||||
|
@ -11,12 +11,20 @@
|
||||
|
||||
#include <nds.h>
|
||||
#include "GRAM.h"
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
UINT8 gram_image[GRAM_SIZE] __attribute__((section(".dtcm")));
|
||||
UINT8 dirtyCards[GRAM_SIZE>>3] __attribute__((section(".dtcm")));
|
||||
UINT8 dirtyRAM __attribute__((section(".dtcm")));
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
// These are not defines so that we can adjust based on whether the 2K GRAM (aka Tutorvision mode) is
|
||||
// enabled. This is 1% slower emulation but provides for the ability to have an upgraded GRAM emulation.
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
UINT16 GRAM_MASK __attribute__((section(".dtcm"))) = 0x01FF; // Allows indexing the 512 or 2K bytes of GRAM
|
||||
UINT16 GRAM_COL_STACK_MASK __attribute__((section(".dtcm"))) = 0x01F8; // Allows for indexing 64 / 256 tiles in Color Stack mode
|
||||
UINT16 GRAM_CARD_MOB_MASK __attribute__((section(".dtcm"))) = 0x3F; // Allows for indexing 64 / 256 tiles for MOBs in Color Stack mode
|
||||
|
||||
GRAM::GRAM()
|
||||
: RAM(GRAM_SIZE, GRAM_ADDRESS, GRAM_READ_MASK, GRAM_WRITE_MASK, 8)
|
||||
{}
|
||||
@ -30,6 +38,19 @@ void GRAM::reset()
|
||||
|
||||
for (i = 0; i < (GRAM_SIZE>>3); i++)
|
||||
dirtyCards[i] = TRUE;
|
||||
|
||||
if (myConfig.gramSize == GRAM_2K)
|
||||
{
|
||||
GRAM_MASK = 0x07FF;
|
||||
GRAM_COL_STACK_MASK = 0x07F8;
|
||||
GRAM_CARD_MOB_MASK = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
GRAM_MASK = 0x01FF;
|
||||
GRAM_COL_STACK_MASK = 0x01F8;
|
||||
GRAM_CARD_MOB_MASK = 0x3F;
|
||||
}
|
||||
}
|
||||
|
||||
ITCM_CODE void GRAM::poke(UINT16 location, UINT16 value)
|
||||
|
@ -16,27 +16,13 @@
|
||||
|
||||
#define GRAM_ADDRESS 0x3800 // GRAM base address (mirros handled with READ/WRITE masks below)
|
||||
|
||||
//#define GRAM_2K // Enable this line if you want to experiment with a 2K GRAM build
|
||||
#define GRAM_SIZE 0x0800 // Max of 2K GRAM even though most of the time we will only use the normal 512 byte version
|
||||
#define GRAM_READ_MASK 0xFFFF // To allow for a full 2K GRAM even though the actual GRAM MASK might restrict
|
||||
#define GRAM_WRITE_MASK 0x3FFF // To allow for a full 2K GRAM even though the actual GRAM MASK might restrict
|
||||
|
||||
#ifdef GRAM_2K
|
||||
|
||||
#define GRAM_SIZE 0x0800 // 2K of GRAM is non-standard but possible!
|
||||
#define GRAM_READ_MASK 0xFFFF // This is what produces the GRAM read aliases due to incomplete address decoding
|
||||
#define GRAM_WRITE_MASK 0x3FFF // This is what produces the GRAM write aliases due to incomplete address decoding
|
||||
#define GRAM_MASK 0x07FF // Allows indexing all 2K of GRAM
|
||||
#define GRAM_COL_STACK_MASK 0x07F8 // Allows for indexing 256 tiles in Color Stack mode
|
||||
#define GRAM_CARD_MOB_MASK 0xFF // Allows for indexing 256 tiles for MOBs in Color Stack mode
|
||||
|
||||
#else // Normal 512b GRAM
|
||||
|
||||
#define GRAM_SIZE 0x0200 // 512 bytes of GRAM
|
||||
#define GRAM_READ_MASK 0xF9FF // This is what produces the GRAM read aliases due to incomplete address decoding
|
||||
#define GRAM_WRITE_MASK 0x39FF // This is what produces the GRAM write aliases due to incomplete address decoding
|
||||
#define GRAM_MASK 0x01FF // Allows indexing the 512 bytes of GRAM
|
||||
#define GRAM_COL_STACK_MASK 0x01F8 // Allows for indexing 64 tiles in Color Stack mode
|
||||
#define GRAM_CARD_MOB_MASK 0x3F // Allows for indexing 64 tiles for MOBs in Color Stack mode
|
||||
|
||||
#endif // GRAM_2K
|
||||
extern UINT16 GRAM_MASK;
|
||||
extern UINT16 GRAM_COL_STACK_MASK;
|
||||
extern UINT16 GRAM_CARD_MOB_MASK;
|
||||
|
||||
extern UINT8 gram_image[GRAM_SIZE];
|
||||
extern UINT8 dirtyCards[GRAM_SIZE>>3];
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "manual.h"
|
||||
#include "bgBottom.h"
|
||||
#include "bgTop.h"
|
||||
#include "bgTop2K.h"
|
||||
#include "bgMenu-Green.h"
|
||||
#include "bgMenu-White.h"
|
||||
#include "Emulator.h"
|
||||
@ -1270,15 +1269,9 @@ void dsShowScreenMain(bool bFull, bool bPlayJingle)
|
||||
bg1b = bgInitSub(1, BgType_Text8bpp, BgSize_T_256x256, 30,0);
|
||||
bgSetPriority(bg0b,1);bgSetPriority(bg1b,0);
|
||||
|
||||
#ifdef GRAM_2K
|
||||
decompress(bgTop2KTiles, bgGetGfxPtr(bg0), LZ77Vram);
|
||||
decompress(bgTop2KMap, (void*) bgGetMapPtr(bg0), LZ77Vram);
|
||||
dmaCopy((void *) bgTop2KPal,(u16*) BG_PALETTE,256*2);
|
||||
#else
|
||||
decompress(bgTopTiles, bgGetGfxPtr(bg0), LZ77Vram);
|
||||
decompress(bgTopMap, (void*) bgGetMapPtr(bg0), LZ77Vram);
|
||||
dmaCopy((void *) bgTopPal,(u16*) BG_PALETTE,256*2);
|
||||
#endif
|
||||
|
||||
if (bPlayJingle)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ extern Emulator *currentEmu;
|
||||
extern Rip *currentRip;
|
||||
extern UINT16 global_frames;
|
||||
|
||||
#define CURRENT_SAVE_FILE_VER 0x000B
|
||||
#define CURRENT_SAVE_FILE_VER 0x000C
|
||||
|
||||
// ------------------------------------------------------
|
||||
// We allow up to 3 saves per game. More than enough.
|
||||
|
Loading…
Reference in New Issue
Block a user