Adapt to upstream changes.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
edc1c366fe
commit
14c5c820c1
8 changed files with 79 additions and 26 deletions
|
@ -534,12 +534,12 @@ BYTE KeybGetKeycode ()
|
|||
return 0;
|
||||
}
|
||||
|
||||
BYTE __stdcall KeybReadData (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles)
|
||||
BYTE KeybReadData()
|
||||
{
|
||||
return nextKey;
|
||||
}
|
||||
|
||||
BYTE __stdcall KeybReadFlag (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles)
|
||||
BYTE KeybReadFlag()
|
||||
{
|
||||
BYTE result = keyReady ? nextKey : 0;
|
||||
nextKey = 0;
|
||||
|
|
|
@ -433,25 +433,13 @@ BYTE KeybGetKeycode ()
|
|||
return keyCode;
|
||||
}
|
||||
|
||||
BYTE __stdcall KeybReadData (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles)
|
||||
BYTE KeybReadData()
|
||||
{
|
||||
Q_UNUSED(pc)
|
||||
Q_UNUSED(addr)
|
||||
Q_UNUSED(bWrite)
|
||||
Q_UNUSED(d)
|
||||
Q_UNUSED(uExecutedCycles)
|
||||
|
||||
return keyCode | (keyWaiting ? 0x80 : 0x00);
|
||||
}
|
||||
|
||||
BYTE __stdcall KeybReadFlag (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles)
|
||||
BYTE KeybReadFlag()
|
||||
{
|
||||
Q_UNUSED(pc)
|
||||
Q_UNUSED(addr)
|
||||
Q_UNUSED(bWrite)
|
||||
Q_UNUSED(d)
|
||||
Q_UNUSED(uExecutedCycles)
|
||||
|
||||
keyWaiting = false;
|
||||
return keyCode;
|
||||
}
|
||||
|
|
|
@ -142,11 +142,6 @@ int g_nAltCharSetOffset = 0; // alternate character set
|
|||
#define SW_PAGE2 (g_uVideoMode & VF_PAGE2)
|
||||
#define SW_TEXT (g_uVideoMode & VF_TEXT)
|
||||
|
||||
bool VideoGetSW80COL()
|
||||
{
|
||||
return SW_80COL ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetVblBar(DWORD uExecutedCycles)
|
||||
{
|
||||
// get video scanner position
|
||||
|
@ -346,6 +341,46 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles)
|
|||
return static_cast<WORD>(nAddress);
|
||||
}
|
||||
|
||||
bool VideoGetSW80COL(void)
|
||||
{
|
||||
return SW_80COL ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetSWDHIRES(void)
|
||||
{
|
||||
return SW_DHIRES ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetSWHIRES(void)
|
||||
{
|
||||
return SW_HIRES ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetSW80STORE(void)
|
||||
{
|
||||
return SW_80STORE ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetSWMIXED(void)
|
||||
{
|
||||
return SW_MIXED ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetSWPAGE2(void)
|
||||
{
|
||||
return SW_PAGE2 ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetSWTEXT(void)
|
||||
{
|
||||
return SW_TEXT ? true : false;
|
||||
}
|
||||
|
||||
bool VideoGetSWAltCharSet(void)
|
||||
{
|
||||
return g_nAltCharSetOffset != 0;
|
||||
}
|
||||
|
||||
// NTSC
|
||||
|
||||
void NTSC_VideoUpdateCycles( long cyclesLeftToUpdate )
|
||||
|
|
|
@ -16,8 +16,8 @@ void FrameRefreshStatus(int x, bool);
|
|||
// Keyboard
|
||||
|
||||
BYTE KeybGetKeycode ();
|
||||
BYTE __stdcall KeybReadData (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
|
||||
BYTE __stdcall KeybReadFlag (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
|
||||
BYTE KeybReadData();
|
||||
BYTE KeybReadFlag();
|
||||
|
||||
// Joystick
|
||||
|
||||
|
|
|
@ -312,6 +312,8 @@ typedef struct tagOFN {
|
|||
|
||||
typedef OPENFILENAME OPENFILENAME_NT4;
|
||||
|
||||
typedef int LCID;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
|
||||
#include "../resource/resource.h"
|
||||
#include "Log.h"
|
||||
|
@ -250,3 +251,25 @@ BOOL WINAPI PostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int GetDateFormat(LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpDate, LPCSTR lpFormat, LPSTR lpDateStr, int cchDate)
|
||||
{
|
||||
std::time_t t = std::time(nullptr);
|
||||
std::tm tm = *std::localtime(&t);
|
||||
std::ostringstream ss;
|
||||
ss << std::put_time(&tm, "%D");
|
||||
const std::string str = ss.str();
|
||||
strncpy(lpDateStr, str.c_str(), cchDate);
|
||||
return cchDate; // not 100% sure, but it is never used
|
||||
}
|
||||
|
||||
int GetTimeFormat(LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpTimeStr, int cchTime)
|
||||
{
|
||||
std::time_t t = std::time(nullptr);
|
||||
std::tm tm = *std::localtime(&t);
|
||||
std::ostringstream ss;
|
||||
ss << std::put_time(&tm, "%T");
|
||||
const std::string str = ss.str();
|
||||
strncpy(lpTimeStr, str.c_str(), cchTime);
|
||||
return cchTime; // not 100% sure, but it is never used
|
||||
}
|
||||
|
|
|
@ -136,3 +136,8 @@ int MessageBox(HWND, const char *, const char *, UINT);
|
|||
|
||||
// used in TestCPU6502
|
||||
#define _tmain main
|
||||
|
||||
#define LOCALE_SYSTEM_DEFAULT 0x0800
|
||||
|
||||
int GetDateFormat(LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpDate, LPCSTR lpFormat, LPSTR lpDateStr, int cchDate);
|
||||
int GetTimeFormat(LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpTimeStr, int cchTime);
|
||||
|
|
|
@ -16,8 +16,8 @@ void FrameRefreshStatus(int x, bool) { }
|
|||
// Keyboard
|
||||
|
||||
BYTE KeybGetKeycode () { return 0; }
|
||||
BYTE __stdcall KeybReadData (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nCyclesLeft) { return 0; }
|
||||
BYTE __stdcall KeybReadFlag (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nCyclesLeft) { return 0; }
|
||||
BYTE KeybReadData() { return 0; }
|
||||
BYTE KeybReadFlag() { return 0; }
|
||||
|
||||
// Joystick
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue