0.9.8: merge r4255,r4269,r4286,r4288,r4302,r4322,r4323
This commit is contained in:
parent
538f69f564
commit
d8d2f5882b
|
@ -2038,8 +2038,9 @@ static void GPU_RenderLine_layer(NDS_Screen * screen, u16 l)
|
||||||
switch(gpu->setFinalColorBck_funcNum)
|
switch(gpu->setFinalColorBck_funcNum)
|
||||||
{
|
{
|
||||||
//for backdrops, blend isnt applied (it's illogical, isnt it?)
|
//for backdrops, blend isnt applied (it's illogical, isnt it?)
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
|
PLAIN_CLEAR:
|
||||||
memset_u16_le<256>(gpu->currDst,backdrop_color);
|
memset_u16_le<256>(gpu->currDst,backdrop_color);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2047,10 +2048,12 @@ static void GPU_RenderLine_layer(NDS_Screen * screen, u16 l)
|
||||||
case 2:
|
case 2:
|
||||||
if(gpu->BLDCNT & 0x20) //backdrop is selected for color effect
|
if(gpu->BLDCNT & 0x20) //backdrop is selected for color effect
|
||||||
memset_u16_le<256>(gpu->currDst,gpu->currentFadeInColors[backdrop_color]);
|
memset_u16_le<256>(gpu->currDst,gpu->currentFadeInColors[backdrop_color]);
|
||||||
|
else goto PLAIN_CLEAR;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if(gpu->BLDCNT & 0x20) //backdrop is selected for color effect
|
if(gpu->BLDCNT & 0x20) //backdrop is selected for color effect
|
||||||
memset_u16_le<256>(gpu->currDst,gpu->currentFadeOutColors[backdrop_color]);
|
memset_u16_le<256>(gpu->currDst,gpu->currentFadeOutColors[backdrop_color]);
|
||||||
|
else goto PLAIN_CLEAR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//windowed cases apparently need special treatment? why? can we not render the backdrop? how would that even work?
|
//windowed cases apparently need special treatment? why? can we not render the backdrop? how would that even work?
|
||||||
|
|
|
@ -433,9 +433,10 @@ static void TouchDisplay() {
|
||||||
aggDraw.hud->line(temptouch.X, temptouch.Y - 256, temptouch.X, temptouch.Y + 384); //vert
|
aggDraw.hud->line(temptouch.X, temptouch.Y - 256, temptouch.X, temptouch.Y + 384); //vert
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nds.isTouch) {
|
if(nds.isTouch)
|
||||||
temptouch.X = nds.scr_touchX;
|
{
|
||||||
temptouch.Y = nds.scr_touchY;
|
temptouch.X = nds.scr_touchX / 16;
|
||||||
|
temptouch.Y = nds.scr_touchY / 16;
|
||||||
aggDraw.hud->lineColor(255, 0, 0, 128);
|
aggDraw.hud->lineColor(255, 0, 0, 128);
|
||||||
aggDraw.hud->line(temptouch.X - 256, temptouch.Y + 192, temptouch.X + 256, temptouch.Y + 192); //horiz
|
aggDraw.hud->line(temptouch.X - 256, temptouch.Y + 192, temptouch.X + 256, temptouch.Y + 192); //horiz
|
||||||
aggDraw.hud->line(temptouch.X, temptouch.Y - 256, temptouch.X, temptouch.Y + 384); //vert
|
aggDraw.hud->line(temptouch.X, temptouch.Y - 256, temptouch.X, temptouch.Y + 384); //vert
|
||||||
|
|
|
@ -4029,8 +4029,11 @@ void FASTCALL _MMU_ARM7_write16(u32 adr, u16 val)
|
||||||
if(nds.adc_jitterctr == 25)
|
if(nds.adc_jitterctr == 25)
|
||||||
{
|
{
|
||||||
nds.adc_jitterctr = 0;
|
nds.adc_jitterctr = 0;
|
||||||
nds.adc_touchY ^= 16;
|
if (nds.stylusJitter)
|
||||||
nds.adc_touchX ^= 16;
|
{
|
||||||
|
nds.adc_touchY ^= 16;
|
||||||
|
nds.adc_touchX ^= 16;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(MMU.SPI_CNT&(1<<11))
|
if(MMU.SPI_CNT&(1<<11))
|
||||||
{
|
{
|
||||||
|
|
|
@ -2482,6 +2482,7 @@ void NDS_Reset()
|
||||||
nds.ConsoleType = CommonSettings.ConsoleType;
|
nds.ConsoleType = CommonSettings.ConsoleType;
|
||||||
nds._DebugConsole = CommonSettings.DebugConsole;
|
nds._DebugConsole = CommonSettings.DebugConsole;
|
||||||
nds.ensataEmulation = CommonSettings.EnsataEmulation;
|
nds.ensataEmulation = CommonSettings.EnsataEmulation;
|
||||||
|
nds.stylusJitter = CommonSettings.StylusJitter;
|
||||||
nds.ensataHandshake = ENSATA_HANDSHAKE_none;
|
nds.ensataHandshake = ENSATA_HANDSHAKE_none;
|
||||||
nds.ensataIpcSyncCounter = 0;
|
nds.ensataIpcSyncCounter = 0;
|
||||||
SetupMMU(nds.Is_DebugConsole(),nds.Is_DSI());
|
SetupMMU(nds.Is_DebugConsole(),nds.Is_DSI());
|
||||||
|
|
|
@ -177,6 +177,7 @@ struct NDSSystem
|
||||||
u16 adc_touchX;
|
u16 adc_touchX;
|
||||||
u16 adc_touchY;
|
u16 adc_touchY;
|
||||||
s32 adc_jitterctr;
|
s32 adc_jitterctr;
|
||||||
|
BOOL stylusJitter;
|
||||||
|
|
||||||
//the DSI returns calibrated touch coords from its TSC (?), so we need to save these separately
|
//the DSI returns calibrated touch coords from its TSC (?), so we need to save these separately
|
||||||
u16 scr_touchX;
|
u16 scr_touchX;
|
||||||
|
@ -507,6 +508,7 @@ extern struct TCommonSettings {
|
||||||
, spu_advanced(false)
|
, spu_advanced(false)
|
||||||
, StylusPressure(50)
|
, StylusPressure(50)
|
||||||
, ConsoleType(NDS_CONSOLE_TYPE_FAT)
|
, ConsoleType(NDS_CONSOLE_TYPE_FAT)
|
||||||
|
, StylusJitter(true)
|
||||||
{
|
{
|
||||||
strcpy(ARM9BIOS, "biosnds9.bin");
|
strcpy(ARM9BIOS, "biosnds9.bin");
|
||||||
strcpy(ARM7BIOS, "biosnds7.bin");
|
strcpy(ARM7BIOS, "biosnds7.bin");
|
||||||
|
@ -553,6 +555,7 @@ extern struct TCommonSettings {
|
||||||
bool rigorous_timing;
|
bool rigorous_timing;
|
||||||
|
|
||||||
int StylusPressure;
|
int StylusPressure;
|
||||||
|
bool StylusJitter;
|
||||||
|
|
||||||
bool dispLayers[2][5];
|
bool dispLayers[2][5];
|
||||||
|
|
||||||
|
|
|
@ -1856,7 +1856,7 @@ DEFINE_LUA_FUNCTION(memory_readbyterange, "address,length")
|
||||||
{
|
{
|
||||||
if(IsHardwareAddressValid(a))
|
if(IsHardwareAddressValid(a))
|
||||||
{
|
{
|
||||||
unsigned char value = (unsigned char)(_MMU_read08<ARMCPU_ARM9>(address) & 0xFF);
|
unsigned char value = (unsigned char)(_MMU_read08<ARMCPU_ARM9>(a) & 0xFF);
|
||||||
lua_pushinteger(L, value);
|
lua_pushinteger(L, value);
|
||||||
lua_rawseti(L, -2, n);
|
lua_rawseti(L, -2, n);
|
||||||
}
|
}
|
||||||
|
@ -4421,7 +4421,8 @@ static int gui_osdtext(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stylus_read(lua_State *L){
|
DEFINE_LUA_FUNCTION(stylus_read, "")
|
||||||
|
{
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
||||||
|
@ -4434,7 +4435,8 @@ static int stylus_read(lua_State *L){
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
static int stylus_peek(lua_State *L){
|
DEFINE_LUA_FUNCTION(stylus_peek, "")
|
||||||
|
{
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
||||||
|
@ -4452,7 +4454,7 @@ static int toTouchValue(int pixCoord, int maximum)
|
||||||
pixCoord = std::min(std::max(pixCoord, 0), maximum-1);
|
pixCoord = std::min(std::max(pixCoord, 0), maximum-1);
|
||||||
return (pixCoord << 4) & 0x0FF0;
|
return (pixCoord << 4) & 0x0FF0;
|
||||||
}
|
}
|
||||||
static int stylus_write(lua_State *L)
|
DEFINE_LUA_FUNCTION(stylus_write, "table")
|
||||||
{
|
{
|
||||||
if(movieMode == MOVIEMODE_PLAY) // don't allow tampering with a playing movie's input
|
if(movieMode == MOVIEMODE_PLAY) // don't allow tampering with a playing movie's input
|
||||||
return 0; // (although it might be useful sometimes...)
|
return 0; // (although it might be useful sometimes...)
|
||||||
|
|
|
@ -450,6 +450,18 @@ void HK_DecreasePressure(int, bool justPressed) {
|
||||||
if(CommonSettings.StylusPressure<0) CommonSettings.StylusPressure = 0;
|
if(CommonSettings.StylusPressure<0) CommonSettings.StylusPressure = 0;
|
||||||
osd->addLine("Stylus Pressure to %d%%",CommonSettings.StylusPressure);
|
osd->addLine("Stylus Pressure to %d%%",CommonSettings.StylusPressure);
|
||||||
}
|
}
|
||||||
|
void HK_ToggleStylusJitter(int, bool justPressed) {
|
||||||
|
CommonSettings.StylusJitter = !CommonSettings.StylusJitter;
|
||||||
|
nds.stylusJitter = CommonSettings.StylusJitter;
|
||||||
|
WritePrivateProfileBool("Emulation", "StylusJitter", CommonSettings.StylusJitter, IniName);
|
||||||
|
osd->addLine("Stylus Jitter %s",CommonSettings.StylusJitter ? "On" : "Off");
|
||||||
|
}
|
||||||
|
|
||||||
|
void HK_Rotate0(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 0);}
|
||||||
|
void HK_Rotate90(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 90);}
|
||||||
|
void HK_Rotate180(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 180);}
|
||||||
|
void HK_Rotate270(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 270);}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//======================================================================================
|
//======================================================================================
|
||||||
|
@ -535,6 +547,12 @@ void InitCustomKeys (SCustomKeys *keys)
|
||||||
keys->DecreaseSpeed.page = HOTKEY_PAGE_MAIN;
|
keys->DecreaseSpeed.page = HOTKEY_PAGE_MAIN;
|
||||||
keys->DecreaseSpeed.key = VK_OEM_MINUS;
|
keys->DecreaseSpeed.key = VK_OEM_MINUS;
|
||||||
|
|
||||||
|
keys->ToggleStylusJitter.handleKeyDown = HK_ToggleStylusJitter;
|
||||||
|
keys->ToggleStylusJitter.code = "ToggleStylusJitter";
|
||||||
|
keys->ToggleStylusJitter.name = STRW(ID_LABEL_HK61);
|
||||||
|
keys->ToggleStylusJitter.page = HOTKEY_PAGE_MAIN;
|
||||||
|
keys->ToggleStylusJitter.key = NULL;
|
||||||
|
|
||||||
keys->FrameLimitToggle.handleKeyDown = HK_FrameLimitToggle;
|
keys->FrameLimitToggle.handleKeyDown = HK_FrameLimitToggle;
|
||||||
keys->FrameLimitToggle.code = "FrameLimitToggle";
|
keys->FrameLimitToggle.code = "FrameLimitToggle";
|
||||||
keys->FrameLimitToggle.name = STRW(ID_LABEL_HK8b);
|
keys->FrameLimitToggle.name = STRW(ID_LABEL_HK8b);
|
||||||
|
@ -808,6 +826,31 @@ void InitCustomKeys (SCustomKeys *keys)
|
||||||
keys->ResetLagCounter.page = HOTKEY_PAGE_MOVIE;
|
keys->ResetLagCounter.page = HOTKEY_PAGE_MOVIE;
|
||||||
keys->ResetLagCounter.key = NULL;
|
keys->ResetLagCounter.key = NULL;
|
||||||
|
|
||||||
|
//Other Page -------------------------------------------------------
|
||||||
|
keys->Rotate0.handleKeyDown = HK_Rotate0;
|
||||||
|
keys->Rotate0.code = "Rotate0";
|
||||||
|
keys->Rotate0.name = STRW(ID_LABEL_HK57);
|
||||||
|
keys->Rotate0.page = HOTKEY_PAGE_OTHER;
|
||||||
|
keys->Rotate0.key = NULL;
|
||||||
|
|
||||||
|
keys->Rotate90.handleKeyDown = HK_Rotate90;
|
||||||
|
keys->Rotate90.code = "Rotate90";
|
||||||
|
keys->Rotate90.name = STRW(ID_LABEL_HK58);
|
||||||
|
keys->Rotate90.page = HOTKEY_PAGE_OTHER;
|
||||||
|
keys->Rotate90.key = NULL;
|
||||||
|
|
||||||
|
keys->Rotate180.handleKeyDown = HK_Rotate180;
|
||||||
|
keys->Rotate180.code = "Rotate180";
|
||||||
|
keys->Rotate180.name = STRW(ID_LABEL_HK59);
|
||||||
|
keys->Rotate180.page = HOTKEY_PAGE_OTHER;
|
||||||
|
keys->Rotate180.key = NULL;
|
||||||
|
|
||||||
|
keys->Rotate270.handleKeyDown = HK_Rotate270;
|
||||||
|
keys->Rotate270.code = "Rotate270";
|
||||||
|
keys->Rotate270.name = STRW(ID_LABEL_HK60);
|
||||||
|
keys->Rotate270.page = HOTKEY_PAGE_OTHER;
|
||||||
|
keys->Rotate270.key = NULL;
|
||||||
|
|
||||||
//StateSlots Page --------------------------------------------------
|
//StateSlots Page --------------------------------------------------
|
||||||
keys->NextSaveSlot.handleKeyDown = HK_NextSaveSlot;
|
keys->NextSaveSlot.handleKeyDown = HK_NextSaveSlot;
|
||||||
keys->NextSaveSlot.code = "NextSaveSlot";
|
keys->NextSaveSlot.code = "NextSaveSlot";
|
||||||
|
|
|
@ -30,6 +30,7 @@ enum HotkeyPage {
|
||||||
HOTKEY_PAGE_STATE,
|
HOTKEY_PAGE_STATE,
|
||||||
HOTKEY_PAGE_STATE_SLOTS,
|
HOTKEY_PAGE_STATE_SLOTS,
|
||||||
HOTKEY_PAGE_TURBO,
|
HOTKEY_PAGE_TURBO,
|
||||||
|
HOTKEY_PAGE_OTHER,
|
||||||
NUM_HOTKEY_PAGE,
|
NUM_HOTKEY_PAGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,6 +40,7 @@ static LPCTSTR hotkeyPageTitle[] = {
|
||||||
_T("Savestates"),
|
_T("Savestates"),
|
||||||
_T("Savestate Slots"),
|
_T("Savestate Slots"),
|
||||||
_T("Turbo"),
|
_T("Turbo"),
|
||||||
|
_T("Other"),
|
||||||
_T("NUM_HOTKEY_PAGE"),
|
_T("NUM_HOTKEY_PAGE"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,7 +67,9 @@ struct SCustomKeys
|
||||||
SCustomKey Slot[10];
|
SCustomKey Slot[10];
|
||||||
SCustomKey QuickSave, QuickLoad, NextSaveSlot, PreviousSaveSlot;
|
SCustomKey QuickSave, QuickLoad, NextSaveSlot, PreviousSaveSlot;
|
||||||
|
|
||||||
SCustomKey OpenROM, ReloadROM, Reset, Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, FrameLimitToggle, Microphone, IncreasePressure, DecreasePressure;
|
SCustomKey Rotate0, Rotate90, Rotate180, Rotate270;
|
||||||
|
|
||||||
|
SCustomKey OpenROM, ReloadROM, Reset, Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, FrameLimitToggle, Microphone, IncreasePressure, DecreasePressure, ToggleStylusJitter;
|
||||||
|
|
||||||
SCustomKey PlayMovie, RecordMovie, StopMovie, ToggleReadOnly;
|
SCustomKey PlayMovie, RecordMovie, StopMovie, ToggleReadOnly;
|
||||||
|
|
||||||
|
|
|
@ -435,8 +435,6 @@ bool romloaded = false;
|
||||||
|
|
||||||
void SetScreenGap(int gap);
|
void SetScreenGap(int gap);
|
||||||
|
|
||||||
void SetRotate(HWND hwnd, int rot, bool user=true);
|
|
||||||
|
|
||||||
bool ForceRatio = true;
|
bool ForceRatio = true;
|
||||||
bool SeparationBorderDrag = true;
|
bool SeparationBorderDrag = true;
|
||||||
int ScreenGapColor = 0xFFFFFF;
|
int ScreenGapColor = 0xFFFFFF;
|
||||||
|
|
|
@ -41,6 +41,7 @@ void WavRecordTo(int wavmode);
|
||||||
void WavEnd();
|
void WavEnd();
|
||||||
void UpdateToolWindows();
|
void UpdateToolWindows();
|
||||||
bool DemandLua();
|
bool DemandLua();
|
||||||
|
void SetRotate(HWND hwnd, int rot, bool user = true);
|
||||||
|
|
||||||
extern bool frameCounterDisplay;
|
extern bool frameCounterDisplay;
|
||||||
extern bool FpsDisplay;
|
extern bool FpsDisplay;
|
||||||
|
|
|
@ -800,6 +800,11 @@
|
||||||
#define ID_LABEL_HK54 4519
|
#define ID_LABEL_HK54 4519
|
||||||
#define ID_LABEL_HK55 4520
|
#define ID_LABEL_HK55 4520
|
||||||
#define ID_LABEL_HK56 4521
|
#define ID_LABEL_HK56 4521
|
||||||
|
#define ID_LABEL_HK57 4522
|
||||||
|
#define ID_LABEL_HK58 4523
|
||||||
|
#define ID_LABEL_HK59 4524
|
||||||
|
#define ID_LABEL_HK60 4525
|
||||||
|
#define ID_LABEL_HK61 4526
|
||||||
#define IDD_MICROPHONE 5000
|
#define IDD_MICROPHONE 5000
|
||||||
#define IDM_MICROPHONESETTINGS 5001
|
#define IDM_MICROPHONESETTINGS 5001
|
||||||
#define IDC_MICSAMPLEBROWSE 5003
|
#define IDC_MICSAMPLEBROWSE 5003
|
||||||
|
|
Binary file not shown.
|
@ -361,7 +361,7 @@ static INT_PTR CALLBACK SoundView_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, L
|
||||||
if(data == NULL)
|
if(data == NULL)
|
||||||
{
|
{
|
||||||
data = (SoundView_DataStruct*)lParam;
|
data = (SoundView_DataStruct*)lParam;
|
||||||
SetWindowLongPtr(hDlg, DWLP_USER, (LONG)data);
|
SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)data);
|
||||||
}
|
}
|
||||||
data->hDlg = hDlg;
|
data->hDlg = hDlg;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue